:root {
    --neu-bg: #e4e9f2;
    --neu-surface: #e4e9f2;
    --neu-light: #ffffff;
    --neu-dark: #b8bec9;
    --neu-text: #4a5568;
    --neu-text-strong: #2d3748;
    --neu-accent: #6c8cff;
    --neu-accent-soft: #8fa8ff;

    --pastel-purple: #d4d0f7;
    --pastel-pink: #f5c6d8;
    --pastel-blue: #c4e4f7;
    --pastel-yellow: #f5e6b8;
    --pastel-cream: #ebe8df;
    --pastel-green: #c8f0d4;

    --shadow-out: 9px 9px 16px rgba(163, 177, 198, 0.55), -9px -9px 16px rgba(255, 255, 255, 0.7);
    --shadow-out-sm: 5px 5px 10px rgba(163, 177, 198, 0.5), -5px -5px 10px rgba(255, 255, 255, 0.65);
    --shadow-in: inset 5px 5px 10px rgba(163, 177, 198, 0.45), inset -5px -5px 10px rgba(255, 255, 255, 0.6);
    --shadow-in-sm: inset 3px 3px 6px rgba(163, 177, 198, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.55);
    --radius: 20px;
    --radius-sm: 14px;
    --radius-pill: 999px;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
.is-hidden { display: none !important; }

body {
    font-family: "Poppins", "Nunito", sans-serif;
    color: var(--neu-text);
    overflow-x: hidden;
    background: var(--neu-bg);
}

img, video, canvas { max-width: 100%; }

.font-fredoka { font-family: "Poppins", "Nunito", sans-serif; }

/* Pastel surfaces — tinted neumorphic panels */
.bg-pastel-purple { background: var(--pastel-purple); }
.bg-pastel-pink { background: var(--pastel-pink); }
.bg-pastel-blue { background: var(--pastel-blue); }
.bg-pastel-yellow { background: var(--pastel-yellow); }
.bg-pastel-cream { background: var(--pastel-cream); }
.bg-pastel-green { background: var(--pastel-green); }

.neu-bg {
    background: var(--neu-bg);
}

/* Override retro hard borders from Tailwind utilities */
.border-black,
[class*="border-black"] {
    border-color: transparent !important;
}

.border-4,
[class*="border-4"] {
    border-width: 0 !important;
}

.shadow-hard {
    box-shadow: var(--shadow-out-sm) !important;
}

/* Cards */
.sticker-card {
    border: none;
    border-radius: var(--radius);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.bubble-card {
    border: none;
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
}

.neu-inset {
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-in-sm);
}

.neu-badge {
    display: inline-block;
    border-radius: var(--radius-pill);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
    font-weight: 600;
    color: var(--neu-text-strong);
}

.neu-alert {
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-in-sm);
    font-weight: 600;
    color: var(--neu-text-strong);
}

/* Buttons */
.retro-btn {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.72rem 1.25rem;
    font-weight: 600;
    color: var(--neu-text-strong);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.retro-btn:hover {
    transform: translateY(-1px);
    box-shadow: 10px 10px 18px rgba(163, 177, 198, 0.5), -10px -10px 18px rgba(255, 255, 255, 0.75);
}

.retro-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-in-sm);
}

.retro-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: var(--shadow-in-sm);
}

/* Inputs */
.bubble-input {
    width: 100%;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    padding: 0.85rem 1.1rem;
    font-weight: 500;
    color: var(--neu-text-strong);
    outline: none;
    box-shadow: var(--shadow-in-sm);
    transition: box-shadow 0.2s ease;
}

.bubble-input::placeholder {
    color: #a0aec0;
}

.bubble-input:focus {
    box-shadow: var(--shadow-in), 0 0 0 2px rgba(108, 140, 255, 0.35);
}

/* Navigation */
.nav-pill {
    display: block;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.95rem;
    font-weight: 600;
    color: var(--neu-text);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
    transition: box-shadow 0.2s ease, color 0.2s ease;
}

.nav-pill:hover {
    color: var(--neu-text-strong);
}

.nav-pill.active {
    color: var(--neu-accent);
    box-shadow: var(--shadow-in-sm);
    background: var(--neu-surface);
}

/* Bottom navigation bar (mobile) */
.app-main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.45rem 0.5rem calc(0.55rem + env(safe-area-inset-bottom));
    background: rgba(228, 233, 242, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 -4px 16px rgba(163, 177, 198, 0.35);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bottom-bar::-webkit-scrollbar {
    display: none;
}

.bottom-bar-item {
    flex: 1 0 auto;
    min-width: 4.25rem;
    max-width: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.35rem 0.25rem;
    border-radius: var(--radius-sm);
    color: var(--neu-text);
    text-decoration: none;
    transition: color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bottom-bar-item:hover {
    color: var(--neu-text-strong);
}

.bottom-bar-item.active {
    color: var(--neu-accent);
    background: var(--neu-surface);
    box-shadow: var(--shadow-in-sm);
}

.bottom-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
}

.bottom-bar-icon svg {
    width: 100%;
    height: 100%;
}

.bottom-bar-label {
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: none;
    border-radius: var(--radius);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
}

.play-table {
    min-width: 760px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.play-table th {
    background: var(--neu-surface);
    padding: 0.9rem;
    text-align: left;
    font-weight: 700;
    color: var(--neu-text-strong);
    box-shadow: inset 0 -2px 4px rgba(163, 177, 198, 0.2);
}

.play-table td {
    padding: 0.85rem;
    border-top: 1px solid rgba(163, 177, 198, 0.25);
    font-weight: 500;
    color: var(--neu-text);
}

.play-table tr:hover td {
    background: rgba(255, 255, 255, 0.35);
}

/* Status badges */
.status-valid {
    background: var(--pastel-green);
    box-shadow: var(--shadow-out-sm);
}

.status-invalid {
    background: var(--pastel-pink);
    box-shadow: var(--shadow-out-sm);
}

.status-waiting {
    background: var(--pastel-blue);
    box-shadow: var(--shadow-out-sm);
}

/* Subtle hover lift */
.wobble-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wobble-hover:hover {
    transform: translateY(-3px);
    box-shadow: 12px 12px 20px rgba(163, 177, 198, 0.5), -12px -12px 20px rgba(255, 255, 255, 0.75);
}

/* Profile avatar */
.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-out);
}

.profile-avatar-sm {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    font-size: 1rem;
}

.profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neu-accent);
    background: var(--neu-surface);
}

.profile-avatar-sm.profile-avatar-fallback {
    font-size: 0.95rem;
}

.profile-upload-btn {
    width: fit-content;
}

.photo-cropper {
    display: grid;
    gap: 0.85rem;
}

.photo-cropper-stage {
    position: relative;
    width: min(100%, 320px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background: var(--neu-surface);
    box-shadow: var(--shadow-in);
    touch-action: none;
    cursor: grab;
    user-select: none;
}

.photo-cropper-stage:active {
    cursor: grabbing;
}

.photo-cropper-stage img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    transform-origin: top left;
    pointer-events: none;
    will-change: transform;
}

.photo-cropper-mask {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.photo-cropper-zoom {
    display: grid;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--neu-text-strong);
}

.photo-cropper-zoom input[type="range"] {
    width: 100%;
    accent-color: var(--neu-accent);
}

.qr-reader-shell {
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-in-sm);
}

.qr-reader-shell video {
    width: 100% !important;
    border-radius: var(--radius-sm);
}

.qr-reader-shell #qr-reader__scan_region {
    min-height: 280px;
}

.qr-reader-shell #qr-reader__dashboard_section_csr button {
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.5rem 0.9rem;
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
    font-weight: 600;
}

.location-panel {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-in-sm);
}

.location-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.location-panel-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.location-panel-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--neu-text);
}

.location-panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    background: rgba(108, 140, 255, 0.14);
    color: var(--neu-accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.location-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--pastel-yellow);
    color: var(--neu-text-strong);
    box-shadow: var(--shadow-out-sm);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.location-refresh-btn svg {
    width: 0.95rem;
    height: 0.95rem;
}

.location-status {
    margin-top: 0.7rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--neu-text-strong);
    word-break: break-word;
}

.location-panel-hint {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--neu-text);
}

.location-panel.is-ok {
    background: rgba(200, 240, 212, 0.55);
}

.location-panel.is-ok .location-panel-badge {
    background: rgba(16, 185, 129, 0.16);
    color: #047857;
}

.location-panel.is-ok .location-status {
    color: #047857;
}

.location-panel.is-warn {
    background: rgba(245, 230, 184, 0.55);
}

.location-panel.is-warn .location-panel-badge {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
}

.location-panel.is-warn .location-status {
    color: #92400e;
}

.location-panel.is-error {
    background: rgba(245, 198, 216, 0.4);
}

.location-panel.is-error .location-panel-badge {
    background: rgba(236, 72, 153, 0.12);
    color: #be185d;
}

.location-panel.is-error .location-status {
    color: #9d174d;
}

.location-status.is-ok,
.location-status.is-warn,
.location-status.is-error {
    color: inherit;
}

@media (max-width: 640px) {
    .location-panel {
        padding: 0.85rem 0.9rem;
    }

    .location-panel-top {
        align-items: flex-start;
    }

    .location-refresh-btn {
        min-height: 2rem;
        padding: 0.3rem 0.65rem;
    }

    .location-refresh-btn span {
        display: none;
    }

    .location-status {
        font-size: 0.86rem;
        margin-top: 0.6rem;
    }

    .location-panel-hint {
        font-size: 0.72rem;
    }
}

@keyframes checkin-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .checkin-loading-spinner {
        animation: none;
        border-top-color: var(--neu-accent);
    }
}

.checkin-feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.checkin-feedback-overlay.show {
    opacity: 1;
}

.checkin-feedback-card {
    position: relative;
    width: min(100%, 320px);
    padding: 2rem 1.5rem 1.6rem;
    border-radius: 24px;
    background: var(--neu-surface);
    box-shadow: var(--shadow-out);
    text-align: center;
    transform: scale(0.88) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.checkin-feedback-overlay.show .checkin-feedback-card {
    transform: scale(1) translateY(0);
}

.checkin-feedback-burst {
    position: absolute;
    inset: 1.2rem;
    border-radius: 50%;
    animation: success-burst 0.8s ease-out forwards;
}

.checkin-feedback-overlay.is-success .checkin-feedback-burst {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0) 70%);
}

.checkin-feedback-overlay.is-warning .checkin-feedback-burst {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0) 70%);
}

.checkin-feedback-overlay.is-error .checkin-feedback-burst {
    background: radial-gradient(circle, rgba(244, 114, 182, 0.18) 0%, rgba(244, 114, 182, 0) 70%);
}

.checkin-feedback-overlay.is-loading .checkin-feedback-burst {
    display: none;
}

.checkin-loading-spinner {
    width: 64px;
    height: 64px;
    margin: 0.2rem auto 1.1rem;
    border-radius: 50%;
    border: 4px solid rgba(108, 140, 255, 0.18);
    border-top-color: var(--neu-accent);
    box-shadow: var(--shadow-out-sm);
    animation: checkin-spin 0.85s linear infinite;
}

.checkin-feedback-icon-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.checkin-feedback-icon {
    width: 88px;
    height: 88px;
}

.checkin-feedback-circle {
    stroke-width: 3;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: success-circle 0.55s ease forwards 0.1s;
}

.checkin-feedback-overlay.is-success .checkin-feedback-circle,
.checkin-feedback-overlay.is-success .checkin-feedback-check {
    stroke: #10b981;
}

.checkin-feedback-overlay.is-warning .checkin-feedback-circle,
.checkin-feedback-overlay.is-warning .checkin-feedback-mark {
    stroke: #f59e0b;
}

.checkin-feedback-overlay.is-warning .checkin-feedback-dot {
    color: #f59e0b;
}

.checkin-feedback-overlay.is-error .checkin-feedback-circle,
.checkin-feedback-overlay.is-error .checkin-feedback-mark {
    stroke: #ec4899;
}

.checkin-feedback-check,
.checkin-feedback-mark {
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.checkin-feedback-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: success-check 0.4s ease forwards 0.55s;
}

.checkin-feedback-mark {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: success-check 0.35s ease forwards 0.55s;
}

.checkin-feedback-dot {
    opacity: 0;
    animation: feedback-dot-in 0.25s ease forwards 0.85s;
}

.checkin-feedback-title {
    position: relative;
    z-index: 1;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--neu-text-strong);
}

.checkin-feedback-message {
    position: relative;
    z-index: 1;
    margin-top: 0.45rem;
    font-size: 0.92rem;
    color: var(--neu-text);
}

.checkin-feedback-hint {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--neu-accent);
}

@keyframes feedback-dot-in {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes success-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes success-check {
    to { stroke-dashoffset: 0; }
}

@keyframes success-burst {
    0% { transform: scale(0.4); opacity: 0; }
    60% { opacity: 1; }
    100% { transform: scale(1.15); opacity: 0; }
}

/* Toast notification */
.neu-toast {
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out);
    font-weight: 600;
    color: var(--neu-text-strong);
}

/* Neutralize forced square corners from legacy overrides */
.sticker-card,
.bubble-card,
.retro-btn,
.bubble-input,
.nav-pill,
.bottom-bar-item,
.table-wrap,
[class*="rounded"] {
    border-radius: var(--radius-sm);
}

.sticker-card {
    border-radius: var(--radius);
}

.retro-btn,
.neu-badge {
    border-radius: var(--radius-pill);
}

@media print {
    .no-print { display: none !important; }
    body { background: white; }
    .sticker-card, .bubble-card, .table-wrap { box-shadow: none; }
}

@media (min-width: 1024px) {
    .bottom-bar {
        display: none !important;
    }

    .app-main {
        padding-bottom: 0;
    }
}

@media (max-width: 640px) {
    .retro-btn {
        width: 100%;
        text-align: center;
        padding: 0.68rem 0.9rem;
    }

    header .retro-btn {
        width: auto;
    }

    header.mb-5 {
        align-items: flex-start;
    }

    header .tracking-wide {
        font-size: 0.75rem;
    }

    .font-fredoka.text-4xl,
    .font-fredoka.text-5xl {
        font-size: 2rem;
        line-height: 1.1;
    }

    .play-table {
        min-width: 640px;
    }
}

/* ============================================================
   Admin SaaS Console
   ============================================================ */
.admin-saas {
    --saas-sidebar: #0f172a;
    --saas-sidebar-hover: #1e293b;
    --saas-sidebar-text: #cbd5e1;
    --saas-sidebar-active: #ffffff;
    --saas-accent: #4f46e5;
    --saas-accent-soft: #eef2ff;
    --saas-bg: #f1f5f9;
    --saas-surface: #ffffff;
    --saas-border: #e2e8f0;
    --saas-text: #475569;
    --saas-text-strong: #0f172a;
    background: var(--saas-bg);
    color: var(--saas-text);
}

.admin-saas .neu-bg,
.admin-saas .fixed.inset-0 {
    background: var(--saas-bg) !important;
}

.admin-saas > .min-h-screen {
    padding: 0 !important;
    min-height: 100vh;
}

.saas-app {
    display: flex;
    min-height: 100vh;
}

.saas-sidebar {
    width: 260px;
    flex-direction: column;
    background: var(--saas-sidebar);
    color: var(--saas-sidebar-text);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    height: 100vh;
}

.saas-sidebar-brand {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.saas-brand-mark {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    font-weight: 700;
}

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

.saas-brand-text strong {
    font-size: 0.95rem;
}

.saas-brand-text small {
    font-size: 0.72rem;
    opacity: 0.65;
}

.saas-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.saas-nav-group {
    margin: 0.85rem 0.5rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.saas-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem 0.7rem;
    margin-bottom: 0.2rem;
    border-radius: 10px;
    color: var(--saas-sidebar-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.saas-nav-link:hover {
    background: var(--saas-sidebar-hover);
    color: #fff;
}

.saas-nav-link.active {
    background: rgba(99, 102, 241, 0.22);
    color: var(--saas-sidebar-active);
}

.saas-nav-icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    opacity: 0.9;
}

.saas-nav-icon svg {
    width: 100%;
    height: 100%;
}

.saas-sidebar-footer {
    padding: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.saas-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.saas-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.saas-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0.75rem;
    background: var(--saas-surface);
    border-bottom: 1px solid var(--saas-border);
}

.saas-breadcrumb {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.saas-page-title {
    margin-top: 0.15rem;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--saas-text-strong);
    line-height: 1.2;
}

.saas-page-subtitle {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--saas-text);
}

.saas-topbar-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.saas-pill {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--saas-accent-soft);
    color: var(--saas-accent);
    font-size: 0.75rem;
    font-weight: 600;
}

.saas-content {
    padding: 1rem 1.5rem 1.5rem;
}

.admin-saas .app-main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.saas-grid-stats {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .saas-grid-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .saas-grid-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.saas-stat {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.saas-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.saas-stat-value {
    margin-top: 0.35rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--saas-text-strong);
    line-height: 1.1;
}

.saas-stat-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--saas-text);
}

.saas-stat-blue { border-top: 3px solid #3b82f6; }
.saas-stat-green { border-top: 3px solid #10b981; }
.saas-stat-yellow { border-top: 3px solid #f59e0b; }
.saas-stat-pink { border-top: 3px solid #ec4899; }
.saas-stat-purple { border-top: 3px solid #8b5cf6; }

.saas-card {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.saas-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--saas-border);
}

.saas-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--saas-text-strong);
}

.saas-card-subtitle {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--saas-text);
}

.saas-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.saas-card-body {
    padding: 1rem 1.1rem;
}

.saas-layout-split {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1280px) {
    .saas-layout-split {
        grid-template-columns: 380px minmax(0, 1fr);
    }

    .saas-layout-dashboard {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
    }
}

.saas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.saas-btn-block { width: 100%; }

.saas-btn-primary {
    background: var(--saas-accent);
    color: #fff;
}

.saas-btn-primary:hover { background: #4338ca; }

.saas-btn-secondary {
    background: #fff;
    border-color: var(--saas-border);
    color: var(--saas-text-strong);
}

.saas-btn-secondary:hover { background: #f8fafc; }

.saas-btn-ghost {
    background: transparent;
    border-color: var(--saas-border);
    color: var(--saas-text-strong);
}

.saas-btn-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.saas-btn-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.saas-btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.admin-saas .bubble-input,
.admin-saas .saas-input,
.admin-saas .saas-select,
.admin-saas .saas-textarea {
    width: 100%;
    border: 1px solid var(--saas-border);
    border-radius: 10px;
    background: #fff;
    padding: 0.65rem 0.8rem;
    font-size: 0.88rem;
    color: var(--saas-text-strong);
    box-shadow: none;
}

.admin-saas .bubble-input:focus,
.admin-saas .saas-input:focus,
.admin-saas .saas-select:focus,
.admin-saas .saas-textarea:focus {
    outline: none;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.saas-form-label {
    display: block;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--saas-text-strong);
}

.saas-form-label span,
.saas-form-label small {
    display: block;
    margin-top: 0.15rem;
    font-weight: 400;
    color: var(--saas-text);
}

.saas-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--saas-border);
    border-radius: 12px;
}

.saas-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.saas-table th {
    padding: 0.75rem 0.9rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid var(--saas-border);
}

.saas-table td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--saas-border);
    font-size: 0.86rem;
    color: var(--saas-text-strong);
    vertical-align: middle;
}

.saas-table tr:last-child td { border-bottom: 0; }
.saas-table tr:hover td { background: #f8fafc; }

.saas-table-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.saas-table-user small {
    display: block;
    color: var(--saas-text);
    font-size: 0.75rem;
}

.saas-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.saas-badge-info { background: #dbeafe; color: #1d4ed8; }
.saas-badge-default { background: #f1f5f9; color: #475569; }
.saas-badge-success,
.saas-badge.saas-badge-success { background: #dcfce7; color: #166534; }
.saas-badge-warning,
.saas-badge.saas-badge-warning { background: #fef3c7; color: #92400e; }
.saas-badge-danger,
.saas-badge.saas-badge-danger { background: #fee2e2; color: #991b1b; }

.saas-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    color: #475569;
    font-weight: 700;
    flex-shrink: 0;
}

.saas-avatar-sm { width: 36px; height: 36px; font-size: 0.8rem; }
.saas-avatar-md { width: 44px; height: 44px; font-size: 0.9rem; }

.saas-avatar-fallback {
    background: linear-gradient(135deg, #c7d2fe, #e9d5ff);
    color: #4338ca;
}

.saas-empty {
    padding: 2rem 1rem;
    text-align: center;
}

.saas-empty-title {
    font-weight: 700;
    color: var(--saas-text-strong);
}

.saas-empty-text {
    margin-top: 0.35rem;
    font-size: 0.86rem;
    color: var(--saas-text);
}

.saas-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--saas-border);
}

.saas-activity-item:last-child { border-bottom: 0; }

.saas-activity-meta {
    min-width: 0;
    flex: 1;
}

.saas-activity-meta strong {
    display: block;
    font-size: 0.86rem;
    color: var(--saas-text-strong);
}

.saas-activity-meta span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--saas-text);
}

.saas-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.saas-toolbar .saas-form-label {
    margin-bottom: 0;
    min-width: 150px;
}

.saas-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.saas-alert {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.saas-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.saas-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.saas-preview-stack {
    display: grid;
    gap: 0.65rem;
}

.saas-preview-item {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--saas-border);
    background: #f8fafc;
    font-size: 0.86rem;
    font-weight: 600;
}

.admin-saas .bottom-bar {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.25);
}

.admin-saas .bottom-bar-item {
    color: #94a3b8;
    min-width: 3.75rem;
}

.admin-saas .bottom-bar-item.active {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
    box-shadow: none;
}

@media (min-width: 1024px) {
    .admin-saas .app-main {
        padding-bottom: 0;
    }
}

@media (max-width: 640px) {
    .saas-topbar {
        padding: 1rem 1rem 0.75rem;
    }

    .saas-content {
        padding: 0.85rem 1rem 1rem;
    }

    .saas-page-title {
        font-size: 1.25rem;
    }

    .saas-topbar-meta .saas-pill {
        display: none;
    }
}

/* ============================================================
   User Mobile App
   ============================================================ */
.user-app .app-main {
    padding-bottom: calc(7.25rem + env(safe-area-inset-bottom));
}

.user-page-header {
    padding-top: 0.15rem;
}

.user-bottom-bar {
    --bottom-accent: #2f9e5b;
    --bottom-muted: #9aa3af;
    position: fixed;
    left: 0.85rem;
    right: 0.85rem;
    bottom: calc(0.7rem + env(safe-area-inset-bottom));
    z-index: 50;
    height: 4.45rem;
    pointer-events: none;
}

.user-bottom-shell {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr) 4.5rem repeat(2, 1fr);
    align-items: center;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #ffffff;
    box-shadow:
        6px 8px 18px rgba(163, 177, 198, 0.35),
        -4px -4px 12px rgba(255, 255, 255, 0.85);
    pointer-events: auto;
    /* Notch tengah untuk FAB — bentuk seperti referensi */
    -webkit-mask-image: radial-gradient(circle 35px at 50% 0, transparent 34px, #000 35.5px);
    mask-image: radial-gradient(circle 35px at 50% 0, transparent 34px, #000 35.5px);
}

.user-bottom-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 3.25rem;
    border-radius: 1.1rem;
    color: var(--bottom-muted);
    text-decoration: none;
    transition: color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.user-bottom-item.active {
    color: var(--bottom-accent);
}

.user-bottom-icon {
    display: flex;
    width: 1.35rem;
    height: 1.35rem;
}

.user-bottom-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2.1;
}

.user-bottom-dot {
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-bottom-item.active .user-bottom-dot {
    background: var(--bottom-accent);
    box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.45), -1px -1px 3px rgba(255, 255, 255, 0.7);
}

.user-bottom-fab-space {
    display: block;
    width: 100%;
    height: 1px;
}

.user-bottom-shell::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.58rem;
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    background: transparent;
    transform: translateX(-50%);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    pointer-events: none;
}

.user-bottom-bar.is-scan-active .user-bottom-shell::after {
    background: var(--bottom-accent);
    box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.45), -1px -1px 3px rgba(255, 255, 255, 0.7);
}

.user-bottom-fab {
    position: absolute;
    left: 50%;
    top: -1.2rem;
    transform: translateX(-50%);
    width: 3.85rem;
    height: 3.85rem;
    display: grid;
    place-items: center;
    text-decoration: none;
    pointer-events: auto;
    z-index: 2;
}

.user-bottom-fab-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #4db87a, #2f9e5b);
    color: #fff;
    box-shadow:
        8px 8px 16px rgba(163, 177, 198, 0.55),
        -6px -6px 14px rgba(255, 255, 255, 0.75),
        inset 2px 2px 4px rgba(255, 255, 255, 0.28),
        inset -2px -2px 5px rgba(20, 90, 50, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-bottom-fab-inner svg {
    width: 1.45rem;
    height: 1.45rem;
}

.user-bottom-fab.active .user-bottom-fab-inner {
    box-shadow:
        inset 5px 5px 10px rgba(20, 90, 50, 0.28),
        inset -4px -4px 10px rgba(255, 255, 255, 0.22),
        6px 6px 14px rgba(163, 177, 198, 0.4);
}

.user-bottom-label {
    display: none;
}

.date-calendar-card {
    position: relative;
    padding: 0.85rem;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-out);
    overflow: visible;
}

.date-calendar-wave {
    display: none;
}

.date-pill-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.15rem 0.1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.date-pill-row::-webkit-scrollbar {
    display: none;
}

.date-pill {
    flex: 0 0 auto;
    width: 3.4rem;
    min-height: 4.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.65rem 0.35rem;
    border-radius: 1.15rem;
    background: #f3f5f9;
    color: #1f2937;
    box-shadow: 4px 4px 10px rgba(163, 177, 198, 0.35), -4px -4px 10px rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.date-pill.today:not(.active) {
    box-shadow: 4px 4px 10px rgba(163, 177, 198, 0.35), -4px -4px 10px rgba(255, 255, 255, 0.9), inset 0 0 0 2px rgba(108, 140, 255, 0.4);
}

.date-pill.active {
    background: #111827;
    color: #ffffff;
    transform: none;
    box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.28), inset -2px -2px 6px rgba(255, 255, 255, 0.08);
}

.date-pill-day {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    color: inherit;
}

.date-pill-month {
    margin-top: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: inherit;
    opacity: 0.7;
}

.date-pill.active .date-pill-month {
    opacity: 0.88;
}

/* Home page */
.home-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.home-greeting-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--neu-text);
}

.home-greeting-name {
    margin-top: 0.15rem;
    font-family: "Poppins", "Nunito", sans-serif;
    font-size: clamp(1.55rem, 5vw, 2.1rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--neu-text-strong);
}

.home-greeting-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
    color: var(--neu-accent);
    font-weight: 700;
    text-decoration: none;
}

.home-greeting-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-office-hero {
    position: relative;
    min-height: 190px;
    border-radius: var(--radius);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.78) 100%),
        var(--office-photo) center/cover no-repeat,
        #1f2937;
    box-shadow: var(--shadow-out);
}

.home-office-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(108, 140, 255, 0.22), transparent 42%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.72) 100%);
    pointer-events: none;
}

.home-office-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 190px;
    padding: 1.2rem 1.15rem 1.15rem;
    color: #f8fafc;
}

.home-office-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.72);
}

.home-office-name {
    margin-top: 0.35rem;
    font-family: "Poppins", "Nunito", sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.home-office-address {
    margin-top: 0.4rem;
    max-width: 34rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: rgba(248, 250, 252, 0.84);
}

.home-office-maps {
    display: inline-flex;
    align-items: center;
    margin-top: 0.9rem;
    width: fit-content;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.home-schedule-card {
    padding: 1rem;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-out);
}

.home-schedule-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.home-schedule-head-text {
    min-width: 0;
    flex: 1;
}

.home-schedule-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--neu-text);
}

.home-schedule-title {
    margin-top: 0.2rem;
    font-family: "Poppins", "Nunito", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--neu-text-strong);
}

.home-schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.95rem;
}

.home-schedule-item {
    padding: 0.85rem 0.65rem;
    border-radius: var(--radius-sm);
    background: #f3f5f9;
    box-shadow: inset 3px 3px 7px rgba(163, 177, 198, 0.28), inset -3px -3px 7px rgba(255, 255, 255, 0.85);
    text-align: center;
}

.home-schedule-item.is-active {
    background: rgba(200, 240, 212, 0.85);
    box-shadow: var(--shadow-out-sm);
}

.home-schedule-item-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--neu-text);
}

.home-schedule-item strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--neu-text-strong);
}

.home-schedule-item small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--neu-text);
}

.home-schedule-status {
    margin-top: 0.85rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
    background: #f3f5f9;
    box-shadow: inset 2px 2px 6px rgba(163, 177, 198, 0.22), inset -2px -2px 6px rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--neu-text);
}

.home-attendance-result {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    background: #f3f5f9;
    box-shadow: inset 2px 2px 6px rgba(163, 177, 198, 0.22), inset -2px -2px 6px rgba(255, 255, 255, 0.8);
}

.home-attendance-empty {
    margin-top: 0.75rem;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    background: #f3f5f9;
    box-shadow: inset 2px 2px 6px rgba(163, 177, 198, 0.22), inset -2px -2px 6px rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--neu-text);
}

@media (max-width: 640px) {
    .home-office-hero,
    .home-office-content {
        min-height: 176px;
    }

    .home-office-content {
        padding: 1rem;
    }

    .home-office-name {
        font-size: 1.28rem;
    }

    .date-calendar-card {
        padding: 0.75rem;
    }

    .date-pill {
        width: 3.15rem;
        min-height: 3.85rem;
    }

    .home-schedule-card {
        padding: 0.9rem;
    }

    .home-schedule-title {
        font-size: 0.98rem;
    }

    .home-schedule-grid {
        gap: 0.55rem;
    }

    .home-schedule-item strong {
        font-size: 0.88rem;
    }
}

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

.history-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.7rem 0.45rem;
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neu-text);
    text-decoration: none;
}

.history-tab span {
    min-width: 1.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(108, 140, 255, 0.12);
    color: var(--neu-accent);
    font-size: 0.68rem;
    text-align: center;
}

.history-tab.active {
    color: var(--neu-accent);
    box-shadow: var(--shadow-in-sm);
}

.history-card {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--neu-surface);
    box-shadow: var(--shadow-out-sm);
}

@media (min-width: 1024px) {
    .user-bottom-bar {
        display: none !important;
    }

    .user-app .app-main {
        padding-bottom: 0;
    }
}

/* ============================================================
   Page enter / leave animations
   ============================================================ */
.page-shell {
    transition: opacity 0.22s ease, transform 0.22s ease;
}

body.page-loading .page-shell {
    opacity: 0;
}

body.page-ready .page-shell {
    opacity: 1;
}

body.page-leaving .page-shell {
    opacity: 0;
    transform: translateY(-10px);
}

.page-reveal {
    opacity: 0;
    transform: translateY(18px);
    will-change: opacity, transform;
}

.page-reveal.page-reveal-side {
    transform: translateX(-14px);
}

.page-reveal.page-reveal-nav {
    transform: translateY(28px);
}

body.page-ready .page-reveal {
    animation: page-reveal-in 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--reveal-delay, 0ms);
}

body.page-ready .page-reveal.page-reveal-side {
    animation-name: page-reveal-side-in;
}

body.page-ready .page-reveal.page-reveal-nav {
    animation-name: page-reveal-nav-in;
}

@keyframes page-reveal-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes page-reveal-side-in {
    from {
        opacity: 0;
        transform: translateX(-14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes page-reveal-nav-in {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-shell,
    .page-reveal {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

