:root {
    --p: #142850;
    --accent: #f0a500;
    --danger: #e63946;
    --success: #2a9d8f;
    --bg: #f4f6fb;
    --card: #fff;
    --text: #1c2333;
    --text-light: #667;
    --border: #e4e8f2;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #fff;
    padding: 36px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(20,40,80,.12);
    width: 100%;
    max-width: 380px;
}
.login-card h1 { color: var(--p); font-size: 20px; margin-top: 0; text-align: center; }
.login-card .logo-mark {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--p); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin: 0 auto 16px;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input[type=text], .field input[type=password], .field input[type=date], .field select {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
}
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--p); color: #fff; border: none; border-radius: 10px;
    padding: 11px 18px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit;
}
.btn.block { width: 100%; }
.btn.accent { background: var(--accent); color: #1c1200; }
.btn.danger { background: var(--danger); }
.btn.ghost { background: #eef1f8; color: var(--p); }
.btn.small { padding: 7px 12px; font-size: 12px; }

.alert {
    padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}
.alert.error { background: #fdecee; color: var(--danger); }
.alert.warn { background: #fff6e0; color: #8a5b00; }
.alert.success { background: #e6f6f4; color: var(--success); }

/* --- Dashboard layout --- */
.topbar {
    background: var(--p);
    color: #fff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar .brand { font-weight: 800; font-size: 18px; }
.topbar .brand span { color: var(--accent); }
.topbar nav a { font-size: 13px; opacity: .85; margin-inline-start: 16px; }
.topbar nav a:hover { opacity: 1; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 18px 60px; }

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
@media (min-width: 800px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat-card {
    background: var(--card);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(20,40,80,.06);
}
.stat-card .value { font-size: 24px; font-weight: 800; color: var(--p); }
.stat-card .label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar input[type=date], .toolbar select {
    padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px;
}

.table-wrap {
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(20,40,80,.06);
    overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 960px; }
th, td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #f8f9fd; color: var(--text-light); font-size: 12px; }
td.address-cell { white-space: normal; max-width: 220px; }
tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge.new { background: #e8edfb; color: #2b4bbf; }
.badge.confirmed { background: #e6f6f4; color: var(--success); }
.badge.shipped { background: #fff6e0; color: #8a5b00; }
.badge.cancelled { background: #fdecee; color: var(--danger); }

.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions select { padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--border); font-family: inherit; font-size: 12px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.page-link {
    padding: 7px 12px; border-radius: 8px; background: var(--card); font-size: 13px; font-weight: 700;
    box-shadow: 0 2px 8px rgba(20,40,80,.06); text-decoration: none;
}
.page-link.active { background: var(--p); color: #fff; }
