
:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --surface-hover: #f4f6f8;
    --text: #171a1d;
    --text-soft: #4f5963;
    --muted: #7a838d;
    --border: #e1e5e9;
    --border-strong: #cfd5dc;
    --sidebar: #111827;
    --sidebar-hover: #1d2939;
    --sidebar-border: rgba(255,255,255,.08);
    --accent: #13795b;
    --accent-hover: #0e634a;
    --accent-soft: #eaf7f1;
    --blue: #2563eb;
    --blue-soft: #eef4ff;
    --success: #147d64;
    --success-soft: #e7f7f1;
    --warning: #a15c07;
    --warning-soft: #fff5e5;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --info: #175cd3;
    --info-soft: #eef4ff;
    --shadow-xs: 0 1px 2px rgba(16,24,40,.04);
    --shadow-sm: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
    --shadow-md: 0 8px 24px rgba(16,24,40,.08);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --sidebar-width: 264px;
    --topbar-height: 72px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { appearance: none; }

.app-shell { min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    padding: 18px 14px 16px;
    color: #fff;
    background:
        radial-gradient(circle at 15% -10%, rgba(33,192,140,.16), transparent 28%),
        linear-gradient(180deg, #111827 0%, #101820 100%);
    border-right: 1px solid rgba(255,255,255,.04);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 18px;
    border-bottom: 1px solid var(--sidebar-border);
}
.brand-copy { min-width: 0; }
.brand-copy strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-copy small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #aeb8c4;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #08261c;
    background: linear-gradient(145deg, #c9f6e5, #77d8b8);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
    font-size: 15px;
    font-weight: 900;
}

.sidebar nav {
    display: grid;
    gap: 4px;
    margin-top: 18px;
}
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #cdd6df;
    font-size: 14px;
    font-weight: 550;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.sidebar nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.055);
}
.sidebar nav a.active {
    color: #fff;
    background: rgba(255,255,255,.09);
    border-color: rgba(255,255,255,.07);
    box-shadow: inset 3px 0 0 #62d6ad;
}
.nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    opacity: .88;
}
.nav-label {
    margin: 22px 10px 6px;
    color: #7f8b99;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px 8px 2px;
    border-top: 1px solid var(--sidebar-border);
}
.user-block {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #273447;
    color: #eaf0f6;
    font-size: 12px;
    font-weight: 800;
}
.user-name {
    max-width: 150px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-footer .muted {
    max-width: 150px;
    margin-top: 2px;
    overflow: hidden;
    color: #8996a4;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.logout-link {
    display: inline-flex;
    margin-top: 12px;
    color: #aeb8c4;
    font-size: 12px;
}
.logout-link:hover { color: #fff; }

/* Main / topbar */
.main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}
.main.public {
    margin-left: 0;
    min-height: 100vh;
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 30px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.topbar-title {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 700;
}
.location-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #344054;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    font-size: 12px;
    font-weight: 650;
}
.location-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #12a36d;
    box-shadow: 0 0 0 3px #dff5eb;
}
.mobile-menu {
    display: none;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
}
.content-wrap {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 30px;
}

/* Typography / page headings */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}
.page-head h1 {
    margin: 0 0 7px;
    color: #171a1d;
    font-size: clamp(25px, 3vw, 31px);
    font-weight: 760;
    letter-spacing: -.035em;
}
.page-head p {
    max-width: 760px;
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.55;
}
.eyebrow {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.section-title {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 720;
    letter-spacing: -.015em;
}
.section-subtitle {
    margin: -7px 0 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-xs);
}
.card.raised { box-shadow: var(--shadow-sm); }
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: -2px 0 16px;
}
.card-header h2 { margin: 0; font-size: 17px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.metric {
    position: relative;
    min-height: 142px;
    overflow: hidden;
    padding: 20px;
}
.metric::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -35px;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(19,121,91,.09), rgba(19,121,91,.015));
}
.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.metric-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--accent);
    background: var(--accent-soft);
}
.metric-icon svg { width: 19px; height: 19px; }
.metric span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 17px;
    font-size: 31px;
    line-height: 1;
    letter-spacing: -.04em;
}
.metric small {
    display: block;
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 12px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 188px;
    padding: 28px;
    color: white;
    background:
        radial-gradient(circle at 92% 8%, rgba(98,214,173,.26), transparent 34%),
        linear-gradient(120deg, #162033, #0f2b27);
    border: 0;
    box-shadow: var(--shadow-md);
}
.hero-card::before {
    content: "";
    position: absolute;
    inset: auto -90px -155px auto;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
}
.hero-card h2 {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -.04em;
}
.hero-card p {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 11px 0 22px;
    color: #cbd6dc;
    line-height: 1.6;
}
.hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.quick-action:hover {
    transform: translateY(-1px);
    border-color: #b9c5ce;
    box-shadow: var(--shadow-sm);
}
.quick-action-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f0f3f5;
}
.quick-action-icon svg { width: 20px; height: 20px; }
.quick-action strong { display: block; font-size: 13px; }
.quick-action span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    color: #27303a;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--surface-hover); border-color: #b9c0c8; }
.btn:active { transform: translateY(1px); }
.btn.primary {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 1px 2px rgba(19,121,91,.18);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.dark {
    color: white;
    background: #17202c;
    border-color: #17202c;
}
.btn.danger { color: white; background: var(--danger); border-color: var(--danger); }
.btn.soft { color: var(--accent); background: var(--accent-soft); border-color: #c9eadf; box-shadow: none; }
.btn.small { min-height: 32px; padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Forms */
.toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}
.toolbar .field { min-width: 205px; margin: 0; }
.toolbar .field.search-field { flex: 1 1 280px; }
.field { margin-bottom: 17px; }
label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    outline: 0;
    color: var(--text);
    background: #fff;
    box-shadow: inset 0 1px 1px rgba(16,24,40,.02);
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: #67b9a0;
    box-shadow: 0 0 0 3px rgba(19,121,91,.1);
}
textarea { min-height: 112px; resize: vertical; }
input[type="checkbox"] { accent-color: var(--accent); }
.help, .muted { color: var(--muted); font-size: 12px; line-height: 1.5; }
.input-wrap { position: relative; }
.input-wrap .input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    color: #7a838d;
    pointer-events: none;
}
.input-wrap input { padding-left: 36px; }

/* Tables */
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
th {
    color: #667085;
    background: #fafbfc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}
td { color: #303842; font-size: 13px; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fbfcfc; }
tbody tr:last-child td { border-bottom: 0; }
.table-primary { color: #171a1d; font-weight: 700; }
.line-title { color: #20262d; font-weight: 670; }
.line-meta { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.order-number {
    display: inline-flex;
    min-width: 65px;
    color: #0e6f53;
    font-weight: 750;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid #d9dee3;
    border-radius: 999px;
    color: #4b5563;
    background: #f5f7f8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .65;
}
.badge.green { color: var(--success); background: var(--success-soft); border-color: #bfe5d7; }
.badge.orange { color: var(--warning); background: var(--warning-soft); border-color: #f0d7aa; }
.badge.red { color: var(--danger); background: var(--danger-soft); border-color: #f3c8c3; }
.badge.blue { color: var(--info); background: var(--info-soft); border-color: #cddcff; }
.badge.gray { color: #667085; background: #f3f4f6; border-color: #e1e4e8; }
.location-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #cee7dd;
    border-radius: 999px;
    color: #0e6a50;
    background: #eef9f5;
    font-size: 11px;
    font-weight: 700;
}
.location-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1aa475;
}

/* Alerts / empty */
.flash {
    position: relative;
    margin-bottom: 18px;
    padding: 13px 15px 13px 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow-xs);
    font-size: 13px;
}
.flash::before {
    content: "i";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}
.flash.success { color: #0c5f46; background: #effaf5; border-color: #b8e1d2; }
.flash.success::before { color: white; background: var(--success); content: "✓"; }
.flash.error { color: #8c1c13; background: #fff5f4; border-color: #efc4bf; }
.flash.error::before { color: white; background: var(--danger); content: "!"; }
.empty { padding: 50px 28px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 5px; color: var(--text-soft); }

/* Order page */
.order-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.58fr) minmax(310px, .72fr);
    gap: 18px;
    align-items: start;
}
.order-sidebar { position: sticky; top: calc(var(--topbar-height) + 20px); }
.detail-list { display: grid; gap: 12px; }
.detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: 0; }
.detail-row span:first-child { color: var(--muted); font-size: 12px; }
.detail-row strong { font-size: 13px; text-align: right; }
.address { color: #3f4851; line-height: 1.65; }
.fulfillment-block {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
}
.fulfillment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafb;
    border-bottom: 1px solid var(--border);
}
.fulfillment-id { color: var(--muted); font-size: 10px; }

/* Login */
.main.public {
    display: grid;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 15%, rgba(34,197,140,.15), transparent 31%),
        radial-gradient(circle at 88% 80%, rgba(37,99,235,.09), transparent 29%),
        #f3f5f7;
}
.public .content-wrap {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    padding: 0;
}
.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 1.05fr) minmax(420px, .95fr);
}
.login-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(36px, 6vw, 76px);
    color: white;
    background:
        radial-gradient(circle at 75% 15%, rgba(95,223,178,.25), transparent 28%),
        linear-gradient(140deg, #121c2c 0%, #0b322a 100%);
}
.login-visual::after {
    content: "";
    position: absolute;
    right: -180px;
    bottom: -200px;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02);
}
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark { width: 44px; height: 44px; flex-basis: 44px; }
.login-copy { position: relative; z-index: 2; max-width: 600px; }
.login-copy h2 { margin: 0 0 15px; font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -.055em; }
.login-copy p { max-width: 560px; margin: 0; color: #c6d4d7; font-size: 15px; line-height: 1.7; }
.login-features { position: relative; z-index: 2; display: grid; gap: 10px; margin-top: 28px; }
.login-feature { display: flex; align-items: center; gap: 9px; color: #d6e1e3; font-size: 13px; }
.login-check { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #103c30; background: #8ce0c1; font-size: 11px; font-weight: 900; }
.login-form-side { display: grid; place-items: center; padding: 34px; }
.login-card {
    width: min(440px, 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}
.login-card h1 { margin: 0 0 7px; font-size: 27px; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 24px; }
.login-card .btn { width: 100%; min-height: 43px; }

/* Invoice */
.invoice-toolbar { max-width: 920px; margin: 0 auto 14px; }
.invoice {
    max-width: 920px;
    margin: 0 auto;
    padding: 42px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.invoice-head { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.invoice h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.invoice-total { width: min(390px, 100%); margin-left: auto; }
.invoice-total div { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; }
.invoice-total .grand { margin-top: 7px; padding-top: 12px; border-top: 2px solid var(--text); font-size: 17px; font-weight: 750; }

/* Misc */
.notice-bar {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #cfe5dc;
    border-radius: 11px;
    color: #31534a;
    background: #f2faf7;
}
.notice-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: #dff3eb; }
.notice-bar strong { display: block; margin-bottom: 3px; color: #183c32; font-size: 13px; }
.notice-bar p { margin: 0; font-size: 12px; line-height: 1.5; }
.divider { height: 1px; margin: 18px 0; background: var(--border); }

@media (max-width: 1180px) {
    .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .quick-actions { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
    :root { --sidebar-width: 0px; }
    body.nav-open { overflow: hidden; }
    .sidebar {
        width: 270px;
        transform: translateX(-102%);
        box-shadow: 18px 0 42px rgba(15,23,42,.24);
        transition: transform .2s ease;
    }
    body.nav-open .sidebar { transform: translateX(0); }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: none;
        background: rgba(15,23,42,.48);
    }
    body.nav-open .sidebar-overlay { display: block; }
    .main { margin-left: 0; }
    .mobile-menu { display: grid; }
    .topbar { padding-inline: 18px; }
    .content-wrap { padding: 22px 18px; }
    .grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .order-summary { grid-template-columns: 1fr; }
    .order-sidebar { position: static; }
}

@media (max-width: 760px) {
    .login-layout { grid-template-columns: 1fr; }
    .login-visual { min-height: 310px; padding: 34px 26px; }
    .login-copy h2 { font-size: 35px; }
    .login-form-side { padding: 24px 18px 38px; }
    .page-head { flex-direction: column; }
    .page-head > .actions, .page-head > .btn, .page-head > form { width: 100%; }
    .page-head > .actions .btn { flex: 1; }
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .topbar-right .location-chip { display: none; }
    .metric { min-height: 124px; }
    .invoice { padding: 24px 18px; border-radius: 0; }
    .invoice-head { flex-direction: column; }
}

@media (max-width: 560px) {
    .topbar { min-height: 62px; padding: 10px 14px; }
    .topbar-title { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .content-wrap { padding: 18px 12px; }
    .card { padding: 16px; }
    .hero-card { padding: 22px; }
    .toolbar { align-items: stretch; }
    .toolbar .field, .toolbar .field.search-field { min-width: 100%; flex-basis: 100%; }
    .toolbar .btn { width: 100%; }
    th, td { padding: 12px; }
}

@media print {
    @page { margin: 12mm; }
    body { background: white; }
    .sidebar, .topbar, .no-print, .flash, .sidebar-overlay { display: none !important; }
    .main { margin: 0; }
    .content-wrap { width: 100%; max-width: none; padding: 0; }
    .invoice { max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
}
