:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef3fb;
    --text: #1f2a37;
    --muted: #667085;
    --border: #d9e2f1;
    --primary: #31589C;
    --primary-dark: #27477d;
    --success: #1f9d55;
    --warning: #d98e04;
    --danger: #c0392b;
    --shadow: 0 10px 30px rgba(49, 88, 156, 0.10);
    --radius: 18px;
    --radius-sm: 12px;
    --max-width: 1440px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3fb 100%);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px 48px 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-kicker {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: bold;
}

.brand-title {
    font-size: 30px;
    font-weight: bold;
    line-height: 1.1;
    color: var(--text);
}

.brand-subtitle {
    font-size: 15px;
    color: var(--muted);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-links a,
.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
}

.nav-links a:hover,
.btn:hover,
button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--surface-2);
    color: var(--primary-dark);
}

.hero {
    margin-bottom: 28px;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(49,88,156,0.98) 0%, rgba(39,71,125,0.96) 100%);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-kicker {
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 10px;
    font-weight: bold;
}

.hero h1 {
    margin: 0 0 12px 0;
    font-size: 42px;
    line-height: 1.1;
}

.hero p {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    max-width: 920px;
    color: rgba(255,255,255,0.92);
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: var(--text);
}

.card-text {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.kpi {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.kpi-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: bold;
}

.kpi-value {
    font-size: 42px;
    font-weight: bold;
    color: var(--text);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.badge-created {
    background: rgba(217, 142, 4, 0.12);
    color: var(--warning);
}

.badge-approved {
    background: rgba(31, 157, 85, 0.12);
    color: var(--success);
}

.badge-completed {
    background: rgba(49, 88, 156, 0.12);
    color: var(--primary);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
    align-items: center;
}

.toolbar input,
.toolbar select,
input[type="text"],
input[type="email"],
input[type="password"],
select {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
}

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #e9eef7;
    vertical-align: top;
}

th {
    background: #f1f5fb;
    color: var(--text);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

tr:hover td {
    background: #fafcff;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 18px;
}

.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.order-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.order-id {
    font-size: 24px;
    font-weight: bold;
    color: var(--text);
}

.order-section {
    margin-top: 14px;
}

.order-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: bold;
}

.order-value {
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
}

.notice {
    padding: 14px 16px;
    border-radius: 12px;
    background: #edf4ff;
    border: 1px solid #cfe0ff;
    color: var(--primary-dark);
}

@media (max-width: 1100px) {
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero h1 {
        font-size: 34px;
    }
}

@media (max-width: 700px) {
    .page {
        padding: 18px 14px 30px 14px;
    }

    .hero {
        padding: 24px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .brand-title {
        font-size: 24px;
    }
}

/* ===== HEADER ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(49,88,156,0.08);
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Brand */

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 0 1 auto;
    min-width: 0;
}

.site-brand-logo {
    height: 56px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.site-brand-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    line-height: 1.15;
}

.site-brand-title {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--text);
    white-space: nowrap;
}

.site-brand-stand {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.2;
    white-space: nowrap;
}

/* Navigation */

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Links */

.nav-link {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

button.nav-link {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    line-height: 1.2;
}

.nav-link:hover {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--primary);
    text-decoration: none;
}

.nav-link-active {
    background: rgba(49,88,156,0.12);
    color: var(--primary);
    border-color: rgba(49,88,156,0.2);
}

/* Dropdown */

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: -1px;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 12px 12px 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 100;
}

.nav-dropdown-menu a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.nav-dropdown-menu a:hover {
    background: var(--surface-2);
    color: var(--primary);
    text-decoration: none;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: flex;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Mobile */

@media (max-width: 1200px) {
    .site-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .site-brand-title,
    .site-brand-stand {
        white-space: normal;
    }
}