:root {
    /* ShopVibe palette. Variable names are kept so existing markup keeps working:
       indigo = primary fuchsia (interactive only), cyan = secondary cyan,
       violet = ink. */
    --bg-base: #fafafa;
    --bg-surface: #f5f5f5;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-input: #ffffff;
    --bg-glass: #ffffff;

    --border-subtle: #e5e5e5;
    --border-card: #e5e5e5;
    --border-hover: #d4d4d4;
    --border-input: #d4d4d4;
    --border-cyan: rgba(34, 211, 238, 0.45);

    --indigo-primary: #d946ef;
    --indigo-hover: #c026d3;
    --indigo-active: #a21caf;
    --indigo-glow: rgba(217, 70, 239, 0.15);
    --primary-tint: #fdf4ff;
    /* Fuchsia text on white needs the darker shade to stay readable */
    --primary-text: #c026d3;

    --secondary: #22d3ee;
    --tertiary: #facc15;
    --cyan-accent: #0e7490;
    --cyan-glow: rgba(34, 211, 238, 0.25);
    --violet-accent: #171717;
    --violet-glow: rgba(23, 23, 23, 0.12);
    --orange: #facc15;

    --success: #166534;
    --success-bg: #dcfce7;
    --success-border: #bbf7d0;
    --warning: #854d0e;
    --warning-bg: #fef9c3;
    --warning-border: #fde68a;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --danger-border: #fecaca;
    --info: #3b82f6;

    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #737373;
    --text-placeholder: #a3a3a3;
    --font-main: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Poppins', 'Nunito', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 10px 25px rgba(0, 0, 0, 0.10), 0 6px 10px rgba(0, 0, 0, 0.06);
    --shadow-overlay: 0 25px 50px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.08);
    --shadow-product-hover: 0 14px 32px rgba(217, 70, 239, 0.12), 0 6px 12px rgba(0, 0, 0, 0.06);
    --shadow-card: var(--shadow-medium);
    --shadow-glow: none;
    --shadow-cyan-glow: none;
}

/* Global Top Loading Bar */
.global-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--indigo-primary), var(--cyan-accent), var(--violet-accent));
    background-size: 200% 100%;
    z-index: 9999;
    animation: loadingBarMove 1.2s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

@keyframes loadingBarMove {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Animated Ambient Glow Canvas Background */
.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.28;
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.ambient-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #6366f1 0%, rgba(217, 70, 239, 0) 70%);
    top: -150px;
    left: -150px;
}

.ambient-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #06b6d4 0%, rgba(34, 211, 238, 0) 70%);
    bottom: -100px;
    right: -100px;
    animation-duration: 22s;
    animation-delay: -5s;
}

.ambient-orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #8b5cf6 0%, rgba(23, 23, 23, 0) 70%);
    top: 40%;
    right: 25%;
    animation-duration: 25s;
    animation-delay: -10s;
    opacity: 0.18;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(23, 23, 23, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(23, 23, 23, 0.02) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 80%);
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* ========================================================
   LOGIN PAGE STYLING
======================================================== */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.brand-panel {
    flex: 1 1 48%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 4rem;
    position: relative;
    border-right: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    backdrop-filter: blur(20px);
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--indigo-primary), var(--cyan-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.3rem;
    box-shadow: 0 4px 18px var(--indigo-glow);
    border: 1px solid rgba(23, 23, 23, 0.3);
}

.brand-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, var(--cyan-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-hero {
    max-width: 460px;
    margin: 2.5rem 0;
}

.status-ticker-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.brand-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.brand-hero h1 span.gradient-text {
    background: linear-gradient(135deg, var(--indigo-primary) 0%, var(--indigo-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Feature Badges in Brand Panel */
.brand-feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.1rem;
    background: rgba(23, 23, 23, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.brand-feature-item:hover {
    transform: translateX(4px);
    border-color: var(--border-hover);
}

.brand-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(217, 70, 239, 0.15);
    border: 1px solid rgba(217, 70, 239, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo-primary);
}

.brand-feature-text h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.brand-feature-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* Login Form Panel */
.form-panel {
    flex: 1 1 52%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    position: relative;
}

.form-content {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2.2rem;
    box-shadow: var(--shadow-card), 0 20px 40px -15px rgba(23, 23, 23, 0.08);
    backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.form-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--indigo-primary), var(--cyan-accent), var(--violet-accent));
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-header .subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* 6-Digit Code Inputs */
.code-inputs {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    justify-content: space-between;
}

.code-digit {
    width: 100%;
    aspect-ratio: 1;
    max-width: 52px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--bg-input);
    border: 1.5px solid rgba(23, 23, 23, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    caret-color: var(--cyan-accent);
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(23, 23, 23, 0.08);
}

.code-digit:focus {
    outline: none;
    border-color: var(--cyan-accent);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--cyan-glow), inset 0 2px 4px rgba(23, 23, 23, 0.08);
    transform: translateY(-2px);
}

.code-digit.input-error {
    border-color: var(--danger);
    background: rgba(244, 63, 94, 0.08);
    box-shadow: 0 0 0 3px var(--danger-border);
}

.shake {
    animation: shakeKeypad 0.4s ease-in-out;
}

@keyframes shakeKeypad {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* On-Screen POS Numpad */
.pos-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin: 1.25rem 0 1.5rem;
}

.numpad-key {
    background: rgba(23, 23, 23, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.numpad-key:hover {
    background: rgba(217, 70, 239, 0.16);
    border-color: var(--indigo-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.numpad-key:active {
    transform: scale(0.95);
    background: var(--indigo-primary);
}

.numpad-key.key-action {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.numpad-key.key-action:hover {
    color: var(--danger);
    border-color: var(--danger-border);
    background: var(--danger-bg);
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 0.9rem 1.4rem;
    background: linear-gradient(135deg, var(--indigo-primary) 0%, var(--indigo-hover) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(23, 23, 23, 0.15);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 3.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 16px var(--indigo-glow);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(23, 23, 23, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1.5px);
    box-shadow: 0 8px 24px var(--indigo-glow);
    background: linear-gradient(135deg, var(--indigo-hover) 0%, var(--indigo-hover) 100%);
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.5);
    box-shadow: none;
}

.btn-secondary {
    padding: 0.75rem 1.25rem;
    background: rgba(23, 23, 23, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(23, 23, 23, 0.09);
    border-color: rgba(23, 23, 23, 0.2);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(23, 23, 23, 0.25);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spinLoader 0.7s linear infinite;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

.error-message {
    color: var(--danger);
    font-size: 0.88rem;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footnote {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ========================================================
   APP BODY & TOPBAR NAVIGATION
======================================================== */
.app-body {
    min-height: 100vh;
    background-color: var(--bg-base);
    position: relative;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 2.5rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.topbar-logo {
    font-weight: 700;
    font-size: 1.28rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, var(--cyan-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topbar-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: rgba(217, 70, 239, 0.15);
    border: 1px solid rgba(217, 70, 239, 0.3);
    color: var(--indigo-primary);
}

/* Topbar Center: Store Clock & Status */
.topbar-center {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.store-clock-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(23, 23, 23, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.store-live-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.85rem 0.35rem 0.45rem;
    background: rgba(23, 23, 23, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.user-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo-primary), var(--violet-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.logout-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.logout-link:hover {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

/* ========================================================
   DASHBOARD & MAIN LAYOUT
======================================================== */
.dashboard, .page {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.5rem 2rem 5rem;
}

/* Dashboard Header Banner */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dashboard-title-group h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.dashboard-title-group p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-nav-pos {
    background: linear-gradient(135deg, var(--cyan-accent) 0%, var(--indigo-primary) 100%);
    box-shadow: 0 4px 16px var(--cyan-glow);
}

.btn-nav-pos:hover:not(:disabled) {
    box-shadow: 0 8px 24px var(--cyan-glow);
}

/* Dashboard Summary KPI Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    margin-bottom: 2.2rem;
}

.summary-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.8rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--indigo-primary), transparent);
    opacity: 0.5;
}

.summary-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), 0 10px 25px -10px var(--indigo-glow);
}

.summary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.summary-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.icon-revenue {
    background: rgba(217, 70, 239, 0.15);
    color: var(--indigo-primary);
    border: 1px solid rgba(217, 70, 239, 0.3);
}

.icon-stock {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.icon-performer {
    background: rgba(34, 211, 238, 0.15);
    color: var(--indigo-primary);
    border: 1px solid rgba(34, 211, 238, 0.3);
}

.summary-value {
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.summary-sub {
    font-size: 0.86rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Trend Pill */
.trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.trend-up {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.trend-alert {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

/* Mini SVG Sparkline Chart */
.sparkline-container {
    margin-top: 1rem;
    height: 44px;
    width: 100%;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Navigation Grid */
.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-heading-row h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.nav-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.nav-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(217, 70, 239, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card), 0 15px 30px -10px var(--indigo-glow);
}

.nav-card:hover::after {
    opacity: 1;
}

.nav-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.nav-card-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(217, 70, 239, 0.12);
    border: 1px solid rgba(217, 70, 239, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo-primary);
    font-size: 1.4rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-card:hover .nav-card-icon-box {
    transform: scale(1.08);
    background: rgba(217, 70, 239, 0.22);
    color: var(--text-primary);
}

.nav-arrow-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(23, 23, 23, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nav-card:hover .nav-arrow-badge {
    background: var(--indigo-primary);
    color: var(--text-primary);
    transform: translateX(3px);
}

.nav-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================================
   TABLES & DATA LISTS (INVENTORY, STAFF, REPORTS)
======================================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(23, 23, 23, 0.04);
    border: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
}

.back-link:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(217, 70, 239, 0.1);
}

.page-header .page-title {
    margin: 0;
    flex: 1;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.btn-inline {
    width: auto;
    padding: 0.65rem 1.3rem;
    min-height: auto;
    font-size: 0.92rem;
}

.data-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th, .data-table td {
    padding: 1rem 1.4rem;
    text-align: left;
}

.data-table th {
    background: #ffffff;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(23, 23, 23, 0.03);
}

.data-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    color: var(--text-primary);
}

.actions-cell {
    text-align: right;
}

.btn-link {
    background: none;
    border: 1px solid transparent;
    color: var(--indigo-primary);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    margin-left: 0.35rem;
}

.btn-link:hover {
    color: var(--text-primary);
    background: rgba(217, 70, 239, 0.15);
    border-color: rgba(217, 70, 239, 0.3);
    text-decoration: none;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 3.5rem 1rem;
    font-size: 0.95rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-ok {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge-low {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-critical {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

/* ========================================================
   MODALS
======================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(23, 23, 23, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 100;
    animation: fadeInModal 0.2s ease-out;
}

.modal-backdrop[hidden] {
    display: none;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 2.2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-card), 0 25px 50px -12px rgba(23, 23, 23, 0.08);
    position: relative;
    animation: popInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popInModal {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal h2 {
    margin: 0 0 1.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
}

.modal input, .modal-select {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.75rem 0.9rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.modal input:focus, .modal-select:focus {
    outline: none;
    border-color: var(--indigo-primary);
    box-shadow: 0 0 0 3px var(--indigo-glow);
    background: #ffffff;
}

.modal-error {
    color: var(--danger);
    font-size: 0.85rem;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin: -0.4rem 0 1.2rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.code-inputs-modal {
    margin-bottom: 1.25rem;
}

/* ========================================================
   SALES / POS REGISTER (sales.html)
======================================================== */
.sales-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.8rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--cyan-accent);
    box-shadow: 0 0 0 3px var(--cyan-glow);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.product-card:hover:not(:disabled) {
    border-color: var(--cyan-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px -5px var(--cyan-glow);
    background: var(--bg-card-hover);
}

.product-card:active:not(:disabled) {
    transform: scale(0.97);
}

.product-card:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.product-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.product-card-price {
    font-family: var(--font-mono);
    color: var(--cyan-accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.product-card-stock {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.cart-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 1.6rem;
    position: sticky;
    top: 5.5rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

.cart-panel h2 {
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    gap: 0.6rem;
    background: rgba(23, 23, 23, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.85rem;
}

.cart-row-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-row-qty {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.cart-row-qty button {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(23, 23, 23, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

.cart-row-qty button:hover {
    background: var(--indigo-primary);
    border-color: var(--indigo-primary);
}

.cart-row-subtotal {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--cyan-accent);
    min-width: 65px;
    text-align: right;
}

.empty-state-small {
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    padding: 2rem 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1.1rem;
    margin: 1rem 0 1.25rem;
    color: var(--text-primary);
}

.cart-total span:last-child {
    font-family: var(--font-mono);
    color: var(--cyan-accent);
}

.receipt-no {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin: -0.75rem 0 1.25rem;
}

.receipt-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
    max-height: 240px;
    overflow-y: auto;
}

/* ========================================================
   REPORTS & ATTENDANCE
======================================================== */
.attendance-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    max-height: 280px;
    overflow-y: auto;
}

.attendance-row {
    font-size: 0.88rem;
    padding: 0.65rem 0.85rem;
    background: rgba(23, 23, 23, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.report-section {
    margin-bottom: 3rem;
}

.report-section:last-child {
    margin-bottom: 0;
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    backdrop-filter: blur(12px);
}

.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-bar input {
    padding: 0.6rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.filter-bar input:focus {
    outline: none;
    border-color: var(--indigo-primary);
    box-shadow: 0 0 0 3px var(--indigo-glow);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    margin-bottom: 2.2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem;
}

.reconcile-result {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.3rem 1.6rem;
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.92rem;
}

.reconcile-status {
    font-weight: 700;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.75rem;
    margin-top: 0.3rem;
}

.inline-form {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
}

.inline-form input {
    padding: 0.65rem 0.95rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.92rem;
    color: var(--text-primary);
    flex: 1;
    min-width: 160px;
}

.inline-form input:focus {
    outline: none;
    border-color: var(--indigo-primary);
    box-shadow: 0 0 0 3px var(--indigo-glow);
}

/* ========================================================
   RESPONSIVE DESIGN & ACCESSIBILITY
======================================================== */
@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
    }
    .brand-panel {
        flex: 0 0 auto;
        padding: 3rem 2rem;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
    .brand-hero h1 {
        font-size: 2.1rem;
    }
    .form-panel {
        padding: 3rem 1.5rem;
    }
    .summary-grid, .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .summary-grid, .nav-grid, .two-col {
        grid-template-columns: 1fr;
    }
    .topbar {
        padding: 0.85rem 1.25rem;
    }
    .topbar-center {
        display: none;
    }
    .dashboard, .page {
        padding: 1.75rem 1.25rem 3.5rem;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    .sales-layout {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    .cart-panel {
        position: static;
    }
    .data-table th, .data-table td {
        padding: 0.8rem 0.9rem;
    }
}

:focus-visible {
    outline: 2px solid var(--cyan-accent);
    outline-offset: 2px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #ffffff;
}

::-webkit-scrollbar-thumb {
    background: rgba(217, 70, 239, 0.3);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 70, 239, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
/* ========================================================
   AUTH FEEDBACK: login attempt popups, forgot-code flow
======================================================== */
.popup {
    text-align: center;
    max-width: 400px;
}

.popup-icon {
    width: 3.4rem;
    height: 3.4rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    border: 1px solid var(--border-card);
    background: rgba(217, 70, 239, 0.14);
}

.popup.severity-warning .popup-icon { background: var(--warning-bg); border-color: var(--warning-border); }
.popup.severity-danger .popup-icon { background: var(--danger-bg); border-color: var(--danger-border); }
.popup.severity-success .popup-icon { background: var(--success-bg); border-color: var(--success-border); }

.popup h2 {
    margin-bottom: 0.6rem;
}

.popup.severity-warning h2 { color: var(--warning); }
.popup.severity-danger h2 { color: var(--danger); }
.popup.severity-success h2 { color: var(--success); }

.popup-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
}

.popup-countdown {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--danger);
    margin-top: 1rem;
}

.popup .modal-actions {
    justify-content: center;
}

.attempt-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.1rem;
}

.attempt-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: rgba(23, 23, 23, 0.14);
}

.attempt-dot.used { background: var(--danger); box-shadow: 0 0 8px var(--danger-border); }

.attempt-caption {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.forgot-link {
    display: inline-block;
    margin-top: 1.1rem;
    color: var(--indigo-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.forgot-link:hover { color: var(--text-primary); text-decoration: underline; }

.auth-field {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
    text-align: left;
}

.text-input {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1.5px solid rgba(23, 23, 23, 0.12);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.text-input:focus {
    outline: none;
    border-color: var(--cyan-accent);
    box-shadow: 0 0 0 3px var(--cyan-glow);
}

.text-input.input-error {
    border-color: var(--danger);
    background: rgba(244, 63, 94, 0.08);
}

.field-error {
    color: var(--danger);
    font-size: 0.84rem;
    margin: -0.6rem 0 1rem;
    text-align: left;
}

.field-error button {
    background: none;
    border: none;
    color: var(--indigo-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-left: 0.25rem;
}

.info-note {
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    font-size: 0.86rem;
    margin-bottom: 1.2rem;
    text-align: left;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step-indicator span {
    width: 2rem;
    height: 0.3rem;
    border-radius: 999px;
    background: rgba(23, 23, 23, 0.12);
}

.step-indicator span.done { background: var(--cyan-accent); }

.auth-step[hidden] { display: none; }

.auth-secondary-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.86rem;
}

.auth-secondary-actions button {
    background: none;
    border: none;
    color: var(--indigo-primary);
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
}

.auth-secondary-actions button:disabled {
    color: var(--text-muted);
    cursor: default;
}

.code-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-align: left;
}

.muted-cell { color: var(--text-muted); font-style: italic; }

/* display:flex above would otherwise override the hidden attribute */
.error-message[hidden],
.field-error[hidden],
.modal-error[hidden] {
    display: none;
}

/* ========================================================
   SHOPVIBE THEME
   Spacious, bright, conversion-focused. Fuchsia is reserved
   for things you can click; cyan and yellow are accents.
======================================================== */
.ambient-bg { display: none; }
body { background: var(--bg-base); font-size: 16px; line-height: 1.6; }

/* Typography: Poppins headings, Nunito body, Space Mono for numbers/codes */
h1, h2, h3, h4,
.page-title, .brand-logo-text, .topbar-logo, .form-header h2,
.modal h2, .summary-card-title, .nav-card h3, .cart-panel h2 {
    font-family: var(--font-heading);
    letter-spacing: 0.01em;
}
.brand-hero h1, .dashboard-greeting h1, .page-title { font-weight: 700; }

/* Flat surfaces, no glass blur */
.form-content, .summary-card, .nav-card, .data-table-container, .modal,
.cart-panel, .product-card, .topbar, .brand-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.modal-backdrop {
    background: rgba(23, 23, 23, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.modal { border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); border: none; }

/* Wordmarks: solid ink */
.brand-logo-text, .topbar-logo, .brand-hero h1 span.gradient-text {
    background: none;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    color: var(--text-primary);
}
.brand-logo-icon, .user-avatar-circle {
    background: var(--text-primary);
    color: #ffffff;
    border: none;
    box-shadow: none;
    border-radius: var(--radius-full);
}
.global-loading-bar { background: var(--secondary); animation: none; }
.form-content::before, .summary-card::before, .nav-card::after { display: none; }

/* ---- Buttons ---- */
.btn-primary {
    background: var(--indigo-primary);
    color: #ffffff;
    border: 2px solid var(--indigo-primary);
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 700;
    min-height: 42px;
    padding: 12px 28px;
    box-shadow: none;
}
.btn-primary::before { display: none; }
.btn-primary:hover:not(:disabled) {
    background: var(--indigo-hover);
    border-color: var(--indigo-hover);
    box-shadow: none;
    transform: none;
}
.btn-primary:active:not(:disabled) { background: var(--indigo-active); border-color: var(--indigo-active); transform: none; }
.btn-primary:disabled { opacity: 0.4; filter: none; }
#login-btn, #send-btn, #verify-btn, #save-btn { min-height: 50px; padding: 14px 36px; }
a.btn-primary, a.btn-primary:visited, a.btn-primary:hover { color: #ffffff; text-decoration: none; }
.btn-nav-pos, .btn-nav-pos:hover:not(:disabled) { box-shadow: none; }
.btn-spinner { border-color: rgba(255, 255, 255, 0.35); border-top-color: #ffffff; }

/* Secondary = outline */
.btn-secondary {
    background: transparent;
    color: var(--primary-text);
    border: 2px solid var(--indigo-primary);
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 15px;
    padding: 10px 26px;
}
.btn-secondary:hover { background: var(--primary-tint); color: var(--primary-text); border-color: var(--indigo-primary); transform: none; }

/* Ghost-style text actions */
.btn-link, .forgot-link, .auth-secondary-actions button, .field-error button {
    color: var(--primary-text);
    border-radius: var(--radius-full);
}
.btn-link:hover { background: var(--primary-tint); border-color: transparent; color: var(--primary-text); }
.forgot-link:hover { color: var(--indigo-active); }
.back-link, .btn-back {
    border-radius: var(--radius-full);
}

/* ---- Inputs ---- */
.text-input, .modal input, .modal-select, .search-input, .inline-form input {
    background: #ffffff;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 16px;
    min-height: 44px;
    box-shadow: none;
}
.text-input::placeholder, .modal input::placeholder, .search-input::placeholder, .inline-form input::placeholder {
    color: var(--text-placeholder);
}
.text-input:focus, .modal input:focus, .modal-select:focus, .search-input:focus, .inline-form input:focus {
    outline: none;
    border-color: var(--indigo-primary);
    box-shadow: 0 0 0 3px var(--indigo-glow);
}
.text-input.input-error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); background: #ffffff; }
.auth-field, .modal label, .code-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* 6-digit boxes and keypad */
.code-digit {
    background: #ffffff;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    box-shadow: none;
    font-family: var(--font-mono);
}
.code-digit:focus { border-color: var(--indigo-primary); box-shadow: 0 0 0 3px var(--indigo-glow); transform: none; }
.code-digit.input-error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); background: #ffffff; }
.numpad-key {
    background: var(--bg-surface);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
}
.numpad-key:hover { background: #ededed; border-color: transparent; color: var(--text-primary); transform: none; }
.numpad-key:active { background: var(--indigo-primary); color: #ffffff; }
.numpad-key.key-action { font-family: var(--font-main); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; }

/* ---- Cards ---- */
.form-content {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    padding: 40px 32px;
}
.summary-card, .nav-card, .data-table-container, .cart-panel {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}
.summary-card:hover, .nav-card:hover {
    box-shadow: var(--shadow-large);
    transform: translateY(-3px);
    border-color: var(--border-hover);
}
.product-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    transition: box-shadow 200ms ease, transform 200ms ease;
}
.product-card:hover:not(:disabled) { box-shadow: var(--shadow-product-hover); transform: translateY(-3px); border-color: var(--border-hover); }
.product-card-price { color: var(--text-primary); font-family: var(--font-mono); }

.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-subtle);
}

/* Overline-style tags and status chips */
.topbar-tag {
    background: #cffafe;
    border: none;
    color: #155e75;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
}
.badge { border-radius: var(--radius-full); font-size: 11px; letter-spacing: 0.1em; border: none; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-low { background: #fef9c3; color: #854d0e; }
.badge-critical { background: #fee2e2; color: #991b1b; }

.data-table th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.data-table tbody tr:hover td { background: var(--bg-base); }

/* Non-interactive highlights never use fuchsia */
.step-indicator span.done { background: var(--tertiary); }
.attempt-dot.used { background: #ef4444; box-shadow: none; }
.info-note { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.error-message, .modal-error { color: #991b1b; background: #fee2e2; border-color: #fecaca; }
.field-error { color: var(--danger); }
.popup-icon { border-radius: var(--radius-full); background: var(--bg-surface); border-color: var(--border-subtle); }
.popup.severity-warning .popup-icon { background: #fef9c3; border-color: #fde68a; }
.popup.severity-danger .popup-icon { background: #fee2e2; border-color: #fecaca; }
.popup.severity-success .popup-icon { background: #dcfce7; border-color: #bbf7d0; }

:focus-visible { outline: 2px solid var(--indigo-primary); outline-offset: 2px; }

/* ---- Photo panels on the login and reset pages ---- */
.brand-panel.photo-panel {
    background-color: #171717;
    background-size: cover;
    background-repeat: no-repeat;
    border-right: none;
    color: #ffffff;
    overflow: hidden;
}
.brand-panel.photo-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.7) 62%, rgba(0, 0, 0, 0.88) 100%);
    pointer-events: none;
}
.brand-panel.photo-panel > * { position: relative; }
.photo-card-tap { background-image: url("../images/card-tap.jpg"); background-position: 58% center; }
.photo-receipt-printer { background-image: url("../images/receipt-printer.jpg"); background-position: center 40%; }
.photo-panel .brand-logo-icon { background: #ffffff; color: var(--text-primary); }
.photo-panel .brand-logo-text,
.photo-panel .brand-hero h1 { color: #ffffff; }
.photo-panel .brand-hero h1 span.gradient-text { color: var(--tertiary); }
.photo-panel .brand-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.photo-panel .brand-hero p { color: rgba(255, 255, 255, 0.85); font-size: 18px; }
.photo-panel .brand-hero { margin-top: auto; margin-bottom: 1.5rem; }
.photo-panel .brand-footer { color: rgba(255, 255, 255, 0.7); border-top-color: rgba(255, 255, 255, 0.2); }
.form-panel { background: var(--bg-base); }

@media (max-width: 992px) {
    .brand-panel.photo-panel { min-height: 320px; }
    .photo-panel .brand-hero p { display: none; }
    .photo-panel .brand-hero h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .summary-card:hover, .nav-card:hover, .product-card:hover:not(:disabled) { transform: none; }
}
/* Decorative icon tiles and scrollbars stay neutral or use the accents */
.icon-revenue { background: #cffafe; border: 1px solid #a5f3fc; color: #155e75; }
.nav-card-icon-box { background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-primary); }
.nav-card:hover .nav-card-icon-box { background: #fef9c3; border-color: #fde68a; }
.back-link:hover { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: #d4d4d4; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }

/* Names are words, not figures: heading font instead of mono */
#topemployee-value, #top-employee-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    line-height: 1.2;
}
