/* ============================================================
   Supermarket POS — design tokens
   Palette pulled from the shop floor: fresh-produce green,
   price-tag amber, and register-ink charcoal on pale shelf-paper.
   Signature element: the price-tag notch (see .tag) used for
   badges, status pills and card accents throughout the app.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Barlow:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --paper: #F3F4F7;
    --card: #FFFFFF;
    --ink: #17221C;
    --ink-soft: #556158;
    --aisle: #1B2E4F;
    --aisle-dark: #12213A;
    --aisle-soft: #E7EAF0;
    --amber: #AE2A28;
    --amber-dark: #8B211F;
    --amber-soft: #F7E0DF;
    --alert: #C1443A;
    --alert-dark: #9C332B;
    --alert-soft: #F7E4E1;
    --line: #DCE0E6;

    --font-display: 'Archivo Black', 'Barlow', sans-serif;
    --font-body: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow-card: 0 1px 2px rgba(23, 34, 28, 0.06), 0 6px 16px -8px rgba(23, 34, 28, 0.12);
    --shadow-modal: 0 20px 60px -12px rgba(23, 34, 28, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.45;
}

body {
    min-height: 100vh;
}

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

.page-wrap {
    max-width: none;
    margin: 0;
    padding: 1.75rem 2rem 4rem;
}

/* ---------- Header / nav ---------- */

.app-header {
    background: var(--aisle);
    color: #fff;
}

.app-header-inner {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #fff;
}

.brand-logo {
    height: 68px;
    width: 68px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-mark {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    order: 2;
}

.app-nav a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    border-bottom: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.app-nav a.active {
    color: #fff;
    border-bottom-color: var(--amber);
}

.auth-area {
    display: flex;
    align-items: center;
    order: 3;
}

.auth-area .btn-secondary,
.auth-area .btn-danger {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.auth-user-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-user-name {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
}

.auth-user-name::before {
    content: "🟢";
    font-size: 0.6rem;
}

.auth-hint {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin: 0.4rem 0 0;
}

/* ---------- Header / nav (mobile) ---------- */
/* On phones the header used to squeeze brand + 6 nav links + login button into
   one row; the nav links would overflow past the edge of the screen instead of
   wrapping, so the later links were effectively invisible without scrolling.
   Below 640px, stack the header into: brand, then nav (2 columns -> 3 rows so
   all 6 links stay visible and reachable), then the login/user area. */
@media (max-width: 640px) {
    .app-header-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1rem;
        gap: 0.6rem;
    }

    .brand { justify-content: center; }

    .app-nav {
        order: 2;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
        width: 100%;
    }

    .app-nav a {
        text-align: center;
        padding: 0.6rem 0.4rem;
        background: rgba(255, 255, 255, 0.06);
    }

    .auth-area {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .auth-user-box {
        width: 100%;
        justify-content: space-between;
    }
}

/* ---------- Headings ---------- */

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 0.4rem;
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.page-title-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
    flex: 1 1 320px;
}

.page-title-toolbar .field {
    margin: 0;
}

.page-title-logo {
    height: 105px;
    width: 105px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    margin: 0 0 0.2rem;
}

/* ---------- Cards / toolbar / panels ---------- */

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field-hint {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.field-inline {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="password"],
select {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, button:focus-visible {
    border-color: var(--aisle);
    box-shadow: 0 0 0 3px var(--aisle-soft);
}

.mono-input { font-family: var(--font-mono); }

.password-field {
    position: relative;
    display: flex;
}
.password-field input[type="password"],
.password-field input[type="text"] {
    width: 100%;
    padding-right: 2.4rem;
}
.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1;
}
.password-toggle:hover { color: var(--ink); }
.password-toggle:focus-visible { outline: 2px solid var(--aisle); outline-offset: 2px; }

/* ---------- Buttons ---------- */

button, .btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
    background: var(--card);
    color: var(--ink);
    border-color: var(--line);
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

.btn-primary, #checkoutBtn, #saveProductBtn, #openAddBtn {
    background: var(--aisle);
    color: #fff;
    border-color: var(--aisle-dark);
}
.btn-primary:hover, #checkoutBtn:hover, #saveProductBtn:hover, #openAddBtn:hover {
    background: var(--aisle-dark);
}

.btn-secondary, #openCameraScanBtn, #scanForFormBtn, #refreshBtn {
    background: var(--amber-soft);
    color: var(--amber-dark);
    border-color: var(--amber);
}
.btn-secondary:hover, #openCameraScanBtn:hover, #scanForFormBtn:hover, #refreshBtn:hover {
    background: var(--amber);
    color: #fff;
}

.btn-danger, .deleteBtn {
    background: var(--alert-soft);
    color: var(--alert-dark);
    border-color: var(--alert);
}
.btn-danger:hover, .deleteBtn:hover {
    background: var(--alert);
    color: #fff;
}

.editBtn {
    background: var(--aisle-soft);
    color: var(--aisle-dark);
    border-color: var(--aisle);
}
.editBtn:hover {
    background: var(--aisle);
    color: #fff;
}

/* Icon-only Edit/Delete buttons used in table rows (Registrations,
   Subsidy Balances, Products). */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    line-height: 1;
}
.icon-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Tables ---------- */

.table-wrap {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.9rem;
    padding: 0.6rem 0.1rem;
}

.pager-summary {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.pager-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pager-controls button {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.pager-controls button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pager-page-label {
    font-size: 0.88rem;
    color: var(--ink-soft);
    min-width: 5.5rem;
    text-align: center;
}

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

thead th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    background: var(--aisle-soft);
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--line);
}

tbody td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFBF9; }

.num, .money, .qty {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Editable qty stepper in the POS cart (+/- buttons either side of a number input) */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.qty-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}
.qty-btn:hover { background: var(--aisle-soft); border-color: var(--aisle); }
.qty-btn:active { transform: translateY(1px); }

.qty-input {
    width: 48px;
    height: 26px;
    padding: 0 0.25rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    text-align: center;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input:focus {
    outline: none;
    border-color: var(--aisle);
    box-shadow: 0 0 0 2px var(--aisle-soft);
}

/* Merged Address cell (rowspan) grouping registrations at the same unit —
   styled as a single self-contained box so it visually reads as "one address" */
td.address-cell {
    vertical-align: middle;
    text-align: center;
    padding: 0.5rem;
    background: var(--card);
}

.address-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 2.4rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--aisle-soft);
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* Merged Subsidy Amount cell (rowspan) — same treatment as .address-box,
   grouped by the same address so a household's subsidy shows once. */
td.subsidy-cell {
    vertical-align: middle;
    text-align: center;
    padding: 0.5rem;
    background: var(--card);
}

.subsidy-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 2.4rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--amber-soft);
    color: var(--amber-dark);
    font-weight: 600;
    font-family: var(--font-mono);
    text-align: center;
    line-height: 1.3;
}

/* ---------- Signature element: price-tag notch ---------- */
/* A badge shaped like a real price tag, with a punched hole. */

.tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem 0.28rem 1.1rem;
    background: var(--aisle-soft);
    color: var(--aisle-dark);
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
}

.tag::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
    transform: translateY(-50%);
}

.tag-amber { background: var(--amber-soft); color: var(--amber-dark); }
.tag-alert { background: var(--alert-soft); color: var(--alert-dark); }
.tag-muted { background: #EEF1EE; color: var(--ink-soft); }

/* ---------- Messages ---------- */

.msg { min-height: 1.2em; font-size: 0.9rem; }
.msg-error { color: var(--alert-dark); font-weight: 600; }
.msg-info { color: var(--ink-soft); }
.msg-success { color: var(--aisle-dark); font-weight: 600; }

.popup-message {
    display: none;
    position: fixed;
    top: 90px;
    right: 1.5rem;
    z-index: 900;
    max-width: 320px;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink-soft);
}
.popup-message.show { display: block; }
.popup-message.popup-error {
    background: var(--alert-soft);
    color: var(--alert-dark);
    border-color: var(--alert);
}

.alert {
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.92rem;
    font-weight: 500;
}
.alert-success { background: var(--aisle-soft); color: var(--aisle-dark); border: 1px solid #C9E1D0; }
.alert-error { background: var(--alert-soft); color: var(--alert-dark); border: 1px solid #EAC4C0; }
.alert-error ul { margin: 0; padding-left: 1.1rem; }

.field-validation-error, .validation-summary-errors {
    color: var(--alert-dark);
    font-size: 0.82rem;
    font-weight: 500;
}
input.input-validation-error { border-color: var(--alert); }

.form-row { display: flex; gap: 0.9rem; }
.form-row .field { flex: 1; }

@media (max-width: 640px) {
    .form-row { flex-direction: column; }
}

/* ---------- Modal ---------- */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 27, 22, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modal-in 0.15s ease-out;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: var(--aisle-soft);
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header strong {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.05rem;
    color: var(--aisle-dark);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--ink-soft);
    padding: 0.2rem 0.5rem;
}
.modal-close:hover { color: var(--alert); transform: none; background: none; }

.modal-body { padding: 1.1rem 1.25rem 1.25rem; }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.scan-video {
    width: 100%;
    border-radius: var(--radius-sm);
    background: #000;
    display: block;
}

/* POS "Scan with Camera" panel: inline (not a modal), sits above #scanMessage and
   stays open across multiple scans. The preview only needs to be wide enough to
   frame a barcode, not tall. */
.camera-scan-panel {
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}

.camera-scan-video {
    width: 90vw;
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0 auto;
}

/* ---------- Responsive tables (mobile) ---------- */
/* Stacks each row into a label:value block list so wide tables (cart, receipts)
   fit the screen width instead of clipping or needing horizontal scroll. */
@media (max-width: 640px) {
    .mobile-stack-table thead { display: none; }

    .mobile-stack-table, .mobile-stack-table tbody, .mobile-stack-table tr, .mobile-stack-table td {
        display: block;
        width: 100%;
    }

    .mobile-stack-table tr {
        padding: 0.6rem 0.85rem;
        border-bottom: 1px solid var(--line);
    }

    .mobile-stack-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.3rem 0;
        border-bottom: none;
        text-align: right;
    }

    .mobile-stack-table td[data-label]:not([data-label=""])::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--ink-soft);
        text-align: left;
        flex-shrink: 0;
    }
}

/* ---------- POS cart table (mobile) ---------- */
/* Unlike the other tables, the cart stays as a real single-row table on
   mobile instead of stacking into label:value blocks — everything (Product,
   Qty, Unit Price, Line Total, Remove) shrinks down to fit one row per item.
   The wrapper scrolls horizontally as a fallback on very narrow screens. */
.cart-table-wrap {
    overflow-x: auto;
}

@media (max-width: 640px) {
    .cart-table thead th,
    .cart-table tbody td {
        padding: 0.4rem 0.3rem;
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .cart-table tbody td:first-child,
    .cart-table thead th:first-child {
        white-space: normal;
        min-width: 72px;
    }

    .cart-table .qty-stepper { gap: 0.15rem; }

    .cart-table .qty-btn {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }

    .cart-table .qty-input {
        width: 30px;
        height: 20px;
        padding: 0;
        font-size: 0.72rem;
    }

    .cart-table .btn-remove-line {
        width: 24px;
        height: 24px;
        padding: 0;
        font-size: 0.75rem;
        line-height: 1;
    }
}

/* ---------- Home page ---------- */

.hero {
    padding: 2.25rem 0 1.5rem;
}

.hero-title-main {
    margin-bottom: 0.5rem;
    gap: 1.25rem;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber-dark);
    background: var(--amber-soft);
    display: inline-block;
    padding: 0.25rem 0.6rem;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
    margin-bottom: 0.9rem;
}

.hero h1 {
    font-size: 2.1rem;
    line-height: 1.08;
    max-width: 14ch;
}

.hero p {
    color: var(--ink-soft);
    max-width: 46ch;
    font-size: 1.02rem;
}

.module-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    margin-top: 1.75rem;
}

/* Large phones: 2 per row */
@media (min-width: 480px) {
    .module-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets: 3 per row (5 cards wrap to 2 rows) */
@media (min-width: 768px) {
    .module-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Desktop / wide screens: all cards on one row */
@media (min-width: 1200px) {
    .module-grid { grid-template-columns: repeat(5, 1fr); }
}

.module-card {
    position: relative;
    display: block;
    text-decoration: none;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.5rem 1.5rem 1.6rem;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -10px rgba(23, 34, 28, 0.22);
}

.module-card::after {
    content: '';
    position: absolute;
    top: 14px;
    right: -34px;
    width: 110px;
    height: 26px;
    background: var(--amber);
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.module-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.6rem;
}

.module-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.module-card p {
    color: var(--ink-soft);
    margin: 0;
    font-size: 0.92rem;
}

.module-card.disabled {
    opacity: 0.45;
    filter: grayscale(65%);
    cursor: not-allowed;
    pointer-events: none;
}

.module-card.disabled::after {
    background: var(--ink-soft);
}

.module-lock {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.05rem;
}

.home-staff-auth {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.home-auth-user-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.home-auth-user-name {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--aisle-dark);
    background: var(--aisle-soft);
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
}

.home-auth-user-name::before {
    content: "🟢";
    font-size: 0.6rem;
}

@media (max-width: 640px) {
    .hero h1 { font-size: 1.7rem; }
    .page-title-logo { height: 49px; width: 49px; }
    .hero-title-main .page-title-logo { height: 63px; width: 63px; }
}
