:root {
    --ink: #18212f;
    --muted: #657184;
    --line: #dfe5eb;
    --surface: #ffffff;
    --surface-soft: #f5f8f7;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #c2410c;
    --gold: #b7791f;
    --blue: #2563eb;
    --shadow: 0 18px 45px rgba(24, 33, 47, .09);
}

* {
    letter-spacing: 0;
}

body {
    background: var(--surface-soft);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.btn {
    border-radius: 8px;
    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.form-control,
.form-select {
    border-color: #cfd8e3;
    border-radius: 8px;
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .15);
}

.eyebrow {
    color: var(--accent);
    display: inline-block;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.brand-mark {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    font-weight: 850;
    gap: .65rem;
}

.brand-icon {
    align-items: center;
    background: var(--primary);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.public-nav {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    min-height: 72px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.public-nav .nav-link {
    color: var(--muted);
    font-weight: 700;
}

.public-nav .nav-link.active,
.public-nav .nav-link:hover {
    color: var(--primary);
}

.hero {
    min-height: calc(100vh - 72px);
    overflow: hidden;
    position: relative;
}

.hero-media {
    background:
        linear-gradient(90deg, rgba(10, 38, 36, .86), rgba(10, 38, 36, .54) 45%, rgba(10, 38, 36, .18)),
        url("https://images.unsplash.com/photo-1576602976047-174e57a47881?auto=format&fit=crop&w=1800&q=80") center / cover;
    inset: 0;
    position: absolute;
}

.hero-content {
    align-items: center;
    display: flex;
    min-height: calc(100vh - 72px);
    padding-bottom: 7rem;
    padding-top: 7rem;
    position: relative;
}

.hero-copy {
    color: #fff;
    max-width: 720px;
}

.hero-copy .eyebrow {
    color: #fbbf24;
}

.hero h1 {
    font-size: clamp(3.5rem, 9vw, 7.2rem);
    font-weight: 900;
    line-height: .92;
    margin: .75rem 0 1.25rem;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    max-width: 650px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-top: 1.8rem;
}

.section-strip {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
    margin-top: -5rem;
    position: relative;
    z-index: 1;
}

.metric-row {
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(4, 1fr);
}

.metric-row > div {
    background: var(--surface);
    padding: 1.4rem;
}

.metric-row strong,
.metric-row span {
    display: block;
}

.metric-row strong {
    font-size: 1.05rem;
}

.metric-row span {
    color: var(--muted);
    margin-top: .2rem;
}

.content-band {
    padding: 5rem 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2rem;
}

.section-heading h2,
.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 850;
}

.feature-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}

.feature-grid article,
.pricing-card,
.statement-panel,
.contact-details,
.contact-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.feature-grid i,
.feature-row i {
    color: var(--primary);
    font-size: 1.8rem;
}

.feature-grid h3,
.feature-row h2,
.pricing-card h2 {
    font-size: 1.15rem;
    font-weight: 820;
    margin-top: .9rem;
}

.feature-grid p,
.feature-row p,
.pricing-card p,
.page-hero p,
.split-layout p {
    color: var(--muted);
}

.page-hero {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, .88), rgba(15, 118, 110, .62)),
        url("https://images.unsplash.com/photo-1585435557343-3b092031a831?auto=format&fit=crop&w=1600&q=80") center / cover;
    color: #fff;
    padding: 6rem 0;
}

.page-hero .eyebrow {
    color: #fbbf24;
}

.page-hero p {
    color: rgba(255, 255, 255, .84);
    max-width: 720px;
}

.split-layout {
    align-items: start;
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .7fr);
}

.feature-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

.feature-row {
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    padding: 1.35rem;
}

.pricing-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
}

.pricing-card strong {
    color: var(--accent);
    display: block;
    margin-bottom: .8rem;
}

.auth-screen {
    align-items: center;
    background:
        linear-gradient(90deg, rgba(245, 248, 247, .98), rgba(245, 248, 247, .82)),
        url("https://images.unsplash.com/photo-1587854692152-cbe660dbde88?auto=format&fit=crop&w=1600&q=80") center / cover;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding: 3rem 1rem;
}

.auth-screen.wide {
    align-items: flex-start;
}

.auth-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 480px;
    padding: 2rem;
    width: 100%;
}

.wide .auth-panel {
    max-width: 860px;
}

.auth-panel h1 {
    font-size: 1.85rem;
    font-weight: 850;
    margin-bottom: 1.4rem;
}

.stacked-form {
    display: grid;
    gap: 1rem;
}

.stacked-form span {
    display: block;
    font-weight: 700;
    margin-bottom: .35rem;
}

.auth-note {
    color: var(--muted);
    margin: 1rem 0 0;
}

.public-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .8);
    padding: 1.25rem 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #111827;
    color: #fff;
    padding: 1.3rem;
}

.sidebar-brand {
    color: #fff;
    margin-bottom: 1.4rem;
}

.sidebar-nav {
    display: grid;
    gap: .35rem;
}

.sidebar-nav a {
    align-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, .76);
    display: flex;
    gap: .7rem;
    min-height: 44px;
    padding: .65rem .8rem;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.app-main {
    min-width: 0;
    padding: 1.5rem;
}

.app-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.app-topbar h1 {
    font-size: 1.75rem;
    font-weight: 850;
    margin: 0;
}

.user-menu {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    min-width: 240px;
    padding: .65rem .75rem;
}

.user-menu small {
    color: var(--muted);
}

.icon-btn {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    grid-row: span 2;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.flash-wrap {
    margin-bottom: 1rem;
}

.stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 1rem;
}

.stat-grid.compact {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.stat-panel,
.data-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(24, 33, 47, .06);
}

.stat-panel {
    padding: 1.25rem;
}

.stat-panel i {
    color: var(--primary);
    font-size: 1.45rem;
}

.stat-panel.warn i {
    color: var(--gold);
}

.stat-panel.info i {
    color: var(--blue);
}

.stat-panel.success i {
    color: #15803d;
}

.stat-panel span,
.stat-panel strong {
    display: block;
}

.stat-panel span {
    color: var(--muted);
    margin-top: .7rem;
}

.stat-panel strong {
    font-size: 1.8rem;
    font-weight: 850;
}

.two-column,
.module-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.5fr);
}

.two-column {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
}

.data-panel {
    overflow: hidden;
    padding: 1rem;
}

.data-panel h2,
.panel-heading h2,
.form-panel h2 {
    font-size: 1.05rem;
    font-weight: 820;
    margin-bottom: 1rem;
}

.panel-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.form-panel {
    align-self: start;
    display: grid;
    gap: .85rem;
}

.form-panel .form-label {
    color: var(--muted);
    display: grid;
    font-weight: 700;
    gap: .35rem;
}

.table {
    margin: 0;
}

.table th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.empty-row {
    color: var(--muted);
    padding: 1.25rem !important;
    text-align: center;
}

.alert-list {
    display: grid;
    gap: .7rem;
}

.alert-list div {
    border-bottom: 1px solid var(--line);
    padding-bottom: .7rem;
}

.alert-list div:last-child {
    border-bottom: 0;
}

.alert-list strong,
.alert-list span {
    display: block;
}

.alert-list span {
    color: var(--muted);
}

.status-pill {
    background: #e6f4f1;
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-block;
    font-size: .78rem;
    font-weight: 800;
    padding: .25rem .55rem;
    text-transform: capitalize;
}

.pos-workspace {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, .8fr);
}

.pos-checkout {
    display: grid;
    gap: 1rem;
}

.pos-heading span {
    color: var(--muted);
    display: block;
    font-weight: 700;
}

.pos-controls {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.pos-controls .form-label {
    color: var(--muted);
    display: grid;
    font-weight: 700;
    gap: .35rem;
}

.pos-cart-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
}

.pos-cart th:first-child,
.pos-cart td:first-child {
    min-width: 360px;
}

.pos-cart th:nth-child(2),
.pos-cart th:nth-child(3),
.pos-cart td:nth-child(2),
.pos-cart td:nth-child(3) {
    width: 120px;
}

.pos-cart th:nth-child(4),
.pos-cart th:nth-child(5),
.pos-cart td:nth-child(4),
.pos-cart td:nth-child(5) {
    width: 130px;
}

.pos-remove {
    background: #fff;
    color: var(--accent);
}

.pos-footer {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto minmax(320px, 480px);
}

.pos-totals {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    padding: 1rem;
}

.pos-totals div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.pos-totals span {
    color: var(--muted);
    font-weight: 750;
}

.pos-totals strong {
    font-size: 1.05rem;
}

.pos-totals div:nth-child(4) {
    border-top: 1px solid var(--line);
    padding-top: .65rem;
}

.pos-totals div:nth-child(4) strong {
    color: var(--primary-dark);
    font-size: 1.45rem;
}

.pos-sales {
    align-self: start;
}

.setup-body {
    align-items: center;
    background:
        linear-gradient(90deg, rgba(245, 248, 247, .96), rgba(245, 248, 247, .8)),
        url("https://images.unsplash.com/photo-1563213126-a4273aed2016?auto=format&fit=crop&w=1600&q=80") center / cover;
    display: flex;
    min-height: 100vh;
    padding: 1rem;
}

.setup-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: auto;
    max-width: 620px;
    padding: 2rem;
}

.settings-summary {
    align-self: start;
}

.settings-summary p {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: .5rem;
}

.settings-summary i {
    color: var(--primary);
}

.receipt-wrap {
    display: flex;
    justify-content: center;
}

.receipt {
    max-width: 720px;
    width: 100%;
}

.receipt-head {
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    text-align: center;
}

.receipt-head h2 {
    margin-bottom: .35rem;
}

.receipt-head p,
.receipt-meta {
    color: var(--muted);
}

.receipt-meta {
    display: grid;
    gap: .25rem;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 1rem;
}

.receipt-total {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
}

.receipt-total strong {
    font-size: 1.45rem;
}

.receipt-actions {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media print {
    .sidebar,
    .app-topbar,
    .flash-wrap,
    .receipt-actions {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .app-main {
        padding: 0;
    }

    .receipt {
        border: 0;
        box-shadow: none;
    }
}

@media (max-width: 1100px) {
    .feature-grid,
    .metric-row,
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .hero-content {
        align-items: flex-end;
        padding-bottom: 6rem;
    }

    .feature-grid,
    .feature-list,
    .pricing-grid,
    .pos-workspace,
    .split-layout,
    .module-grid,
    .two-column,
    .stat-grid,
    .stat-grid.compact {
        grid-template-columns: 1fr;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .user-menu {
        min-width: 0;
    }

    .pos-controls,
    .pos-footer {
        grid-template-columns: 1fr;
    }

    .pos-cart th:first-child,
    .pos-cart td:first-child {
        min-width: 260px;
    }
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: 3.4rem;
    }

    .hero-actions .btn,
    .metric-row > div {
        width: 100%;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .app-main {
        padding: 1rem;
    }
}
