/* ====================================================
   LUXORA — The Salon Modern Glassmorphism CSS System
   ==================================================== */

:root {
    --noir: #08080A;
    --noir-card: #111116;
    --gold: #C9A961;
    --gold-lit: #EBD6A3;
    --gold-deep: #8A6F32;
    --pearl: #F2EEE7;
    --smoke: #9A948A;
    --line: rgba(242, 238, 231, 0.12);
    --glass: rgba(242, 238, 231, 0.04);
    --glass-card: rgba(17, 17, 22, 0.85);
    --glass-line: rgba(201, 169, 97, 0.25);
    --ok: #7FBF8F;
    --wait: #D9B15F;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Jost", system-ui, -apple-system, sans-serif;
    --pad: clamp(20px, 5vw, 70px);
    --gap: clamp(50px, 8vh, 100px);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--noir);
    color: var(--pearl);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -999px;
    left: 20px;
    background: var(--gold);
    color: #100D06;
    padding: 10px 18px;
    font-weight: 600;
    z-index: 1000;
}
.skip-link:focus {
    top: 20px;
}

/* Typography */
.eyebrow {
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(38px, 6vw, 84px);
    line-height: 1.05;
    text-transform: uppercase;
    margin: 0 0 20px;
}

.h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.1;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.gold-gradient {
    display: block;
    background: linear-gradient(110deg, var(--gold-lit), var(--gold) 45%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gold-text {
    color: var(--gold);
}

.lede {
    font-size: 17px;
    color: #BEB8AE;
    max-width: 600px;
    margin: 0;
}

/* Layout */
.wrap {
    width: 100%;
    max-width: 1300px;
    margin-inline: auto;
    padding-inline: var(--pad);
}

.band {
    padding-block: var(--gap);
    position: relative;
}

/* Header & Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;          /* between 900px and the nav's natural width it otherwise clips */
    row-gap: 10px;
    padding: 20px var(--pad);
    background: rgba(8, 8, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-line);
}

.brand-logo {
    text-decoration: none;
    line-height: 1.1;
}

.brand-title {
    display: block;
    font-family: var(--serif);
    font-size: 24px;
    letter-spacing: 0.35em;
    color: var(--pearl);
}

.brand-sub {
    display: block;
    font-size: 9px;
    letter-spacing: 0.4em;
    color: var(--gold);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #B3ADA3;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 11.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--sans);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-gold {
    background: linear-gradient(120deg, var(--gold-lit), var(--gold) 50%, var(--gold-deep));
    color: #100D06;
    font-weight: 600;
}

.btn-gold:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.3);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--pearl);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.full-btn {
    width: 100%;
    margin-top: 15px;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    background: linear-gradient(160deg, #141118 0%, #08080A 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(201, 169, 97, 0.15), transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
    padding-inline: var(--pad);
}

.hero-text {
    font-size: 18px;
    color: var(--smoke);
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Offers Grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.offer-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-line);
    padding: 24px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.offer-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.offer-header h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.25;
    flex: 1;
}

.offer-badge {
    background: linear-gradient(120deg, var(--gold-lit), var(--gold));
    color: #100D06;
    font-size: 10px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.offer-card p {
    font-size: 14px;
    color: var(--smoke);
    margin: 0 0 16px;
    line-height: 1.6;
}

.promo-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201, 169, 97, 0.12);
    border: 1px dashed var(--glass-line);
    color: var(--gold-lit);
    padding: 6px 14px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13.5px;
    align-self: flex-start;
}

/* Feature Tiles */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tile-card {
    background: var(--glass-card);
    border: 1px solid var(--line);
    padding: 30px 24px;
    border-radius: 4px;
    text-align: center;
    transition: border-color 0.3s;
}

.tile-card:hover {
    border-color: var(--gold);
}

.tile-icon {
    font-size: 32px;
    margin-bottom: 14px;
}

.tile-card h3 {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.tile-card p {
    font-size: 14px;
    color: var(--smoke);
    margin: 0;
}

/* Services Menu */
.category-tabs {
    display: flex;
    gap: 12px;
    margin-block: 30px 40px;
    flex-wrap: wrap;
}

input[type="checkbox"] { accent-color: var(--gold); }

.cat-tab, .pill {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--smoke);
    padding: 10px 22px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.cat-tab.active, .cat-tab:hover, .pill.active, .pill:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 169, 97, 0.08);
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--glass-card);
    border: 1px solid var(--line);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
}

.svc-info h3 {
    font-family: var(--serif);
    font-size: 22px;
    margin: 0 0 6px;
}

.svc-info p {
    font-size: 13.5px;
    color: var(--smoke);
    margin: 0 0 8px;
}

.svc-meta {
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.svc-price {
    font-size: 20px;
    font-family: var(--serif);
    color: var(--gold-lit);
    font-weight: 500;
}

/* Stylists Grid */
.stylists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stylist-card {
    background: var(--glass-card);
    border: 1px solid var(--line);
    padding: 24px;
    text-align: center;
    border-radius: 4px;
}

.stylist-card h3 {
    font-family: var(--serif);
    font-size: 22px;
    margin: 0 0 4px;
}

.stylist-card span {
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

/* Contact & Hours */
.contact-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.hours-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
}

.hours-list li.closed {
    color: var(--smoke);
}

.panel {
    background: var(--glass-card);
    border: 1px solid var(--glass-line);
    padding: 36px;
    border-radius: 4px;
}

/* Modals System */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(8, 8, 10, 0.88);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;   /* removes closed modals from the a11y tree and tab order */
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-card {
    background: #111116;
    border: 1px solid var(--glass-line);
    border-radius: 6px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.wide-modal {
    max-width: 840px;
}

.xl-modal {
    max-width: 1100px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: 0;
    color: var(--smoke);
    font-size: 28px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--pearl);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 11.5px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--smoke);
    margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea, select {
    width: 100%;
    padding: 12px 16px;
    background: #14141A;
    border: 1px solid var(--line);
    color: #F2EEE7;
    font-family: var(--sans);
    font-size: 15px;
    border-radius: 3px;
}

.form-group input:focus, .form-group select:focus, select:focus {
    outline: none;
    border-color: var(--gold);
}

/* Explicit Dropdown Option Styling for High Contrast */
select option {
    background-color: #14141A !important;
    color: #F2EEE7 !important;
    padding: 10px;
}

select option:checked, select option:hover {
    background-color: #C9A961 !important;
    color: #100D06 !important;
}

.input-with-btn {
    display: flex;
    gap: 10px;
}

/* Password Input Wrapper & Toggle Eye Button */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 44px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--smoke);
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, opacity 0.2s ease;
    user-select: none;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: var(--gold);
}


/* Auth Modal */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--smoke);
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
}

.auth-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.hidden {
    display: none !important;
}

.demo-hint {
    font-size: 12px;
    color: var(--smoke);
    margin-top: 15px;
    text-align: center;
}

/* Booking Wizard */
.wizard-header {
    margin-bottom: 24px;
}

.wizard-steps {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.step-pill {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(242, 238, 231, 0.08);
    color: var(--smoke);
}

.step-pill.active {
    background: var(--gold);
    color: #100D06;
    font-weight: 600;
}

.booking-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    margin-block: 20px;
}

.svc-select-item {
    background: rgba(242, 238, 231, 0.03);
    border: 1px solid var(--line);
    padding: 14px;
    border-radius: 4px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
}

.svc-select-item:hover {
    border-color: var(--gold);
    background: rgba(201, 169, 97, 0.08);
}

.svc-select-item.selected {
    border-color: var(--gold) !important;
    background: rgba(201, 169, 97, 0.15) !important;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.15);
}

.svc-select-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    margin-top: 2px;
    cursor: pointer;
}

.slots-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.slot-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--pearl);
    padding: 10px 18px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
}

.slot-btn.selected, .slot-btn:hover {
    border-color: var(--gold);
    background: rgba(201, 169, 97, 0.15);
    color: var(--gold-lit);
}

.summary-card {
    background: rgba(201, 169, 97, 0.05);
    border: 1px solid var(--glass-line);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

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

/* User Profile Header */
.user-profile-header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(130deg, var(--gold-lit), var(--gold-deep));
    color: #100D06;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 22px;
}

.user-balances {
    margin-left: auto;
    display: flex;
    gap: 16px;
}

.balance-card {
    background: rgba(242, 238, 231, 0.04);
    padding: 10px 18px;
    border-radius: 4px;
    text-align: right;
}

/* Toast & Alert Notifications System */
#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
}

.toast {
    background: #181822;
    border-left: 4px solid var(--gold);
    color: var(--pearl);
    padding: 14px 20px;
    border-radius: 4px;
    font-size: 13.5px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    line-height: 1.4;
    animation: slideIn 0.3s ease;
}

.toast-error {
    border-left-color: #D9534F !important;
    background: #2B1416 !important;
    color: #F8D7DA !important;
    border: 1px solid rgba(217, 83, 79, 0.3);
    border-left-width: 4px;
}

.toast-success {
    border-left-color: #5CB85C !important;
    background: #122818 !important;
    color: #D4EDDA !important;
    border: 1px solid rgba(92, 184, 92, 0.3);
    border-left-width: 4px;
}

.toast-warning {
    border-left-color: #F0AD4E !important;
    background: #2D2312 !important;
    color: #FFF3CD !important;
    border: 1px solid rgba(240, 173, 78, 0.3);
    border-left-width: 4px;
}

.balance-card h3 {
    margin: 4px 0 0;
    color: var(--gold-lit);
}

.member-pill {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--gold);
    color: var(--gold);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--smoke);
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.badge-confirmed { background: rgba(217, 177, 95, 0.2); color: var(--wait); }
.badge-completed { background: rgba(127, 191, 143, 0.2); color: var(--ok); }
.badge-cancelled { background: rgba(217, 100, 100, 0.2); color: #D9A0A0; }

/* Admin Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-block: 20px;
}

.metric-card {
    background: rgba(201, 169, 97, 0.05);
    border: 1px solid var(--glass-line);
    padding: 20px;
    border-radius: 4px;
}

.metric-card span {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--smoke);
}

.metric-card h3 {
    margin: 6px 0 0;
    font-size: 24px;
    color: var(--gold-lit);
}

.admin-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.admin-tab {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--smoke);
    padding: 12px 20px;
    font-size: 11.5px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
}

.admin-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.admin-pane-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* POS Terminal */
.pos-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.pos-services-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.pos-item-btn {
    background: rgba(242, 238, 231, 0.04);
    border: 1px solid var(--line);
    padding: 12px;
    border-radius: 4px;
    color: var(--pearl);
    text-align: left;
    cursor: pointer;
}

.pos-item-btn:hover {
    border-color: var(--gold);
}

.pos-cart-items {
    min-height: 140px;
    max-height: 200px;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    margin-bottom: 15px;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    padding-block: 6px;
}

.pm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.pm-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--pearl);
    padding: 10px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
}

.pm-btn.active {
    border-color: var(--gold);
    background: rgba(201, 169, 97, 0.15);
    color: var(--gold-lit);
}

.upi-qr-box {
    text-align: center;
    margin-top: 15px;
}

.qr-placeholder img {
    margin: 10px auto;
    border: 4px solid #fff;
}

/* Thermal Printable Slip */
.printable-card {
    max-width: 420px;
    background: #fff;
    color: #000;
}

.receipt-print-area {
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
}

.receipt-header { text-align: center; }
.receipt-header h2 { margin: 0; font-size: 18px; text-transform: uppercase; }
.receipt-header p { margin: 2px 0; font-size: 11px; }

.dashed-line {
    border: 0;
    border-top: 1px dashed #000;
    margin: 10px 0;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
}

.receipt-table th, .receipt-table td {
    padding: 4px 0;
    font-size: 12px;
}
.receipt-table .num { text-align: right; }

.receipt-totals p {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

.bold-row { font-weight: bold; font-size: 15px; }

.receipt-footer {
    text-align: center;
    font-size: 11px;
    margin-top: 10px;
}

/* Page Layouts & Multi-page Portal System */
.page-main {
    padding-top: 120px;
    padding-bottom: 60px;
}

.nav-links a.active {
    color: var(--gold);
}

/* Member Profile Card on customer.html */
.member-profile-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-line);
    padding: 30px 36px;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
}

.member-profile-card .user-info {
    flex: 1;
    min-width: 250px;
}

.member-profile-card h1 {
    font-family: var(--serif);
    font-size: 32px;
    margin: 0 0 6px;
}

.user-contact {
    font-size: 13px;
    color: var(--smoke);
    margin: 6px 0 0;
}

.user-balances-row {
    display: flex;
    gap: 20px;
}

.balance-box {
    background: rgba(242, 238, 231, 0.04);
    border: 1px solid var(--line);
    padding: 14px 22px;
    border-radius: 4px;
    text-align: right;
    min-width: 150px;
}

.balance-box span {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--smoke);
}

.balance-box h2 {
    margin: 4px 0 0;
    font-family: var(--sans);
    font-size: 24px;
}

/* Portal Navigation Tabs */
.portal-nav-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.portal-tab {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--smoke);
    padding: 14px 24px;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portal-tab:hover {
    color: var(--pearl);
}

.portal-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    font-weight: 500;
}

.portal-pane {
    animation: fadeIn 0.4s ease;
}

.footer {
    padding: 30px var(--pad);
    border-top: 1px solid var(--line);
    background: #08080A;
}

/* Table Filter Bars & Pagination */
.table-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-block: 15px 20px;
    background: rgba(242, 238, 231, 0.02);
    border: 1px solid var(--line);
    padding: 16px;
    border-radius: 4px;
}

.table-filter-bar .filter-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.table-filter-bar .filter-group.flex-2 {
    flex: 2;
    min-width: 240px;
}

.table-filter-bar .filter-group.full-width {
    flex: 100%;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 15px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--smoke);
}

.page-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn {
    padding: 6px 14px;
    font-size: 11px;
}

.current-page-num {
    padding: 4px 10px;
    background: rgba(201, 169, 97, 0.15);
    color: var(--gold-lit);
    border-radius: 3px;
    font-weight: 500;
}

/* =================================================== */
/* COMPREHENSIVE RESPONSIVE DESIGN (MOBILE & TABLET) */
/* =================================================== */

/* Data Table Responsive Overflow Container */
.data-table-wrapper, div:has(> table.data-table) {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
    .nav {
        flex-direction: column;
        gap: 15px;
        padding-block: 15px;
        position: relative;
    }

    .nav-links {
        gap: 15px;
        font-size: 11px;
    }

    .pos-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .member-profile-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-balances-row {
        width: 100%;
        justify-content: space-between;
    }

    .balance-box {
        flex: 1;
        text-align: left;
    }

    .portal-nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    /* Horizontal scrollers stay swipeable but hide the default OS scrollbar,
       and pill text must not wrap into clipped two-liners. */
    .portal-nav-tabs, .category-pills { scrollbar-width: none; }
    .portal-nav-tabs::-webkit-scrollbar, .category-pills::-webkit-scrollbar { display: none; }
    .pill, .cat-tab, .portal-tab { white-space: nowrap; flex-shrink: 0; }

    .portal-tab {
        padding: 10px 16px;
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    .page-main {
        padding-top: 140px;
    }

    .hero-title {
        font-size: 38px;
    }

    .panel {
        padding: 20px 16px;
    }

    .modal-card {
        padding: 24px 16px;
    }

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

    .table-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-filter-bar .filter-group {
        width: 100%;
    }

    .pagination-bar {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}


/* ====================================================
   POS — Selected Customer Snapshot
   ==================================================== */
.pos-cust-card {
    border: 1px solid var(--glass-line);
    background: linear-gradient(180deg, rgba(201, 169, 97, 0.06), rgba(242, 238, 231, 0.02));
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 18px;
    min-height: 132px;
}

.pos-cust-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 12px;
}

.pos-cust-avatar {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(201, 169, 97, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-lit);
    font-family: var(--serif);
    font-size: 16px;
    letter-spacing: 0.5px;
}

.pos-cust-name { font-size: 15px; color: var(--pearl); margin: 0; font-weight: 500; }
.pos-cust-sub  { font-size: 11px; color: var(--smoke); margin: 2px 0 0; }

.pos-cust-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pos-stat {
    background: rgba(8, 8, 10, 0.4);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 12px;
}

.pos-stat > span {
    display: block;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--smoke);
    margin-bottom: 4px;
}

.pos-stat strong {
    display: block;
    font-family: var(--serif);
    font-size: 20px;
    color: var(--gold-lit);
    line-height: 1.1;
}

.pos-stat small { display: block; margin-top: 4px; font-size: 10px; }
.pos-covers     { color: var(--ok); }
.pos-short      { color: #E08E7A; }

.pos-cust-note {
    margin-top: 12px;
    padding: 9px 11px;
    border-radius: 4px;
    font-size: 11.5px;
    line-height: 1.5;
    border: 1px solid var(--glass-line);
    background: rgba(201, 169, 97, 0.07);
    color: var(--pearl);
}

.pos-cust-note.warn {
    border-color: rgba(224, 142, 122, 0.5);
    background: rgba(224, 142, 122, 0.1);
}

.pos-cust-empty {
    display: grid;
    place-items: center;
    min-height: 104px;
    color: var(--smoke);
    font-size: 12px;
    text-align: center;
}

/* Loading state: spinner plus shimmering placeholders in the shape of the real card. */
.pos-cust-loading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.pos-spinner {
    width: 18px;
    height: 18px;
    flex: none;
    border-radius: 50%;
    border: 2px solid rgba(201, 169, 97, 0.25);
    border-top-color: var(--gold);
    animation: pos-spin 0.7s linear infinite;
}

.pos-loading-text { font-size: 12px; color: var(--gold); letter-spacing: 0.04em; }

.pos-skeleton {
    border-radius: 4px;
    background: linear-gradient(90deg,
        rgba(242, 238, 231, 0.05) 25%,
        rgba(242, 238, 231, 0.12) 37%,
        rgba(242, 238, 231, 0.05) 63%);
    background-size: 400% 100%;
    animation: pos-shimmer 1.3s ease infinite;
}

@keyframes pos-spin { to { transform: rotate(360deg); } }
@keyframes pos-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Referenced by .toast and .portal-pane — they animated as no-ops without these. */
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .pos-spinner, .pos-skeleton { animation-duration: 0.01ms; animation-iteration-count: 1; }
}

/* =================================================== */
/* PRINT — only the open receipt, black on white       */
/* =================================================== */
@media print {
    /* Scoped with :has so pages without an open receipt (terms, the public site)
       still print normally instead of coming out blank. */
    body:has(#receiptModal.open) * { visibility: hidden; }
    /* Printers skip the dark backgrounds, so the theme's pearl-on-noir text would land
       near-white on white paper — force ink for ordinary page prints. */
    body:not(:has(#receiptModal.open)) * { color: #000 !important; background: transparent !important; text-shadow: none !important; }
    #receiptModal.open, #receiptModal.open * { visibility: visible; }
    #receiptModal.open {
        position: absolute;
        inset: 0;
        display: block;
        padding: 0;
        background: #fff;
        backdrop-filter: none;
        opacity: 1;
    }
    #receiptModal.open .modal-card {
        position: absolute;
        top: 0; left: 0;
        width: 100%;
        max-width: 100%;
        max-height: none;
        overflow: visible;
        border: none;
        box-shadow: none;
        background: #fff;
        padding: 24px;
    }
    #receiptModal .receipt-print-area, #receiptModal .receipt-print-area * { color: #000 !important; }
    #receiptModal .modal-close, #receiptModal .btn-row { display: none !important; }
}
