:root {
    --ui-ink: #17324d;
    --ui-muted: #64748b;
    --ui-blue: #1d5fa8;
    --ui-blue-dark: #104477;
    --ui-line: #dce7f1;
    --ui-canvas: #f4f8fb;
    --ui-shadow: 0 16px 40px rgba(22, 53, 82, .07);
}

body.admin-shell,
body.staff-shell,
body.customer-shell {
    color: var(--ui-ink);
    background: var(--ui-canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-shell {
    background: #f3f7fb;
}

.admin-sidebar {
    background: linear-gradient(165deg, #123f6a 0%, #0d3156 65%, #092845 100%);
    box-shadow: 12px 0 36px rgba(13, 49, 86, .08);
}

.admin-sidebar .brand-row {
    min-height: 80px;
    border-color: rgba(255, 255, 255, .13);
}

.admin-sidebar .brand-row img {
    background: white;
    box-shadow: 0 2px 12px rgba(8, 40, 69, .13);
}

.admin-sidebar nav {
    overflow-y: auto;
    scrollbar-width: thin;
}

.admin-sidebar nav p {
    color: #9ec6e7;
    letter-spacing: .12em;
    font-size: 10px;
}

.admin-sidebar nav a {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 9px 12px;
    color: #dceaf7;
    font-size: 13px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.admin-sidebar nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    transform: translateX(2px);
}

.admin-sidebar nav a.bg-blue-700 {
    color: #fff;
    background: rgba(110, 183, 239, .24);
    border-color: rgba(188, 225, 251, .24);
}

.admin-sidebar nav a svg {
    width: 17px;
    height: 17px;
    stroke-width: 2;
}

.admin-topbar {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--ui-line);
    box-shadow: 0 3px 18px rgba(22, 53, 82, .035);
}

.admin-content {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 28px 30px 44px;
}

.admin-content h1,
.admin-content h2,
.customer-content h1,
.customer-content h2 {
    letter-spacing: -.025em;
}

.admin-content .bg-white.rounded-xl,
.customer-content .bg-white.rounded-xl,
.customer-content .bg-white.rounded-2xl {
    border: 1px solid var(--ui-line);
    box-shadow: var(--ui-shadow);
}

.admin-content .dashboard-card {
    box-shadow: var(--ui-shadow);
}

.admin-content .dashboard-card:hover {
    box-shadow: 0 20px 42px rgba(22, 53, 82, .12);
}

.admin-content table thead {
    background: #edf4fa;
    color: #315c7c;
}

.admin-content table tbody tr:hover {
    background: #f8fbfd;
}

.admin-content input:focus,
.admin-content select:focus,
.admin-content textarea:focus,
.customer-content input:focus,
.customer-content select:focus,
.customer-content textarea:focus {
    outline: none;
    border-color: #5b9bd3;
    box-shadow: 0 0 0 3px rgba(66, 145, 209, .14);
}

.customer-topbar {
    position: relative;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--ui-line);
    box-shadow: 0 3px 18px rgba(22, 53, 82, .035);
}

.customer-header-inner {
    width: min(100%, 1760px);
    min-height: 76px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: 22px;
}

.customer-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: fit-content;
    min-width: 0;
    text-decoration: none;
}

.customer-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 12px;
    background: #155e9e;
    color: #fff;
}

.customer-brand-mark svg {
    width: 21px;
    height: 21px;
    stroke-width: 2.2;
}

.customer-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.customer-brand-name {
    color: #123a5d;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -.035em;
}

.customer-brand-subtitle {
    margin-top: 4px;
    color: #75879a;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .015em;
}

.customer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    scrollbar-width: none;
}

.customer-nav::-webkit-scrollbar { display: none; }

.customer-nav a {
    white-space: nowrap;
    padding: 12px 11px;
    border-bottom: 2px solid transparent;
    color: #607489;
    font-size: 13px;
    font-weight: 600;
    transition: border-color .18s ease, color .18s ease;
}

.customer-nav a:hover {
    color: var(--ui-blue);
}

.customer-nav a[aria-current="page"] {
    color: var(--ui-blue-dark);
    border-bottom-color: var(--ui-blue);
}

.customer-account {
    justify-self: end;
}

.customer-account-button {
    min-height: 42px;
    padding: 5px 7px 5px 5px;
    border: 1px solid #e0e9f1;
    border-radius: 999px;
    background: #fff;
    color: #29435c;
}

.customer-account-button:hover {
    border-color: #b8d2e7;
    background: #f7fbfe;
}

.customer-account-avatar {
    width: 31px;
    height: 31px;
    background: #e6f1fa;
    color: #155e9e;
    font-size: 13px;
}

.customer-account-name {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-content {
    width: min(100%, 1440px);
    flex: 1;
}

.customer-content .dashboard-card {
    border-color: var(--ui-line);
    border-radius: 18px;
    box-shadow: var(--ui-shadow);
}

.customer-content .dashboard-card:hover {
    box-shadow: 0 18px 38px rgba(22, 53, 82, .12);
}

body.staff-shell {
    min-height: 100vh;
}

.staff-topbar {
    background: #123f6a;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    box-shadow: 0 7px 24px rgba(16, 68, 119, .11);
}

.staff-content {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 28px 30px;
}

.pos-product {
    border: 1px solid var(--ui-line);
    box-shadow: var(--ui-shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pos-product:hover {
    border-color: #85b7dd;
    box-shadow: 0 20px 40px rgba(22, 53, 82, .13);
    transform: translateY(-3px);
}

.pos-summary {
    border: 1px solid var(--ui-line);
    box-shadow: var(--ui-shadow);
}

#cartItems:empty::before {
    content: "Your cart is empty. Select a product to begin.";
    display: block;
    padding: 28px 18px;
    border: 1px dashed #bfd2e2;
    border-radius: 14px;
    color: var(--ui-muted);
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .customer-header-inner {
        grid-template-columns: 1fr auto;
        column-gap: 16px;
        padding-top: 12px;
        padding-bottom: 8px;
    }

    .customer-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        overflow-x: auto;
    }
}

@media (max-width: 767px) {
    .admin-content,
    .staff-content { padding: 20px 16px 32px; }

    .customer-header-inner {
        min-height: 0;
        padding: 12px 16px 6px;
    }

    .customer-brand-subtitle,
    .customer-account-name { display: none; }

    .customer-nav a { padding: 10px 9px; font-size: 12px; }
}
