/* =========================================================
   Kevan Premium PWA – Mobile-First Stylesheet
   Mimics the Android React Native app design
   ========================================================= */

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

/* SVG icons should inherit color and align with text */
svg { vertical-align: middle; flex-shrink: 0; }
.action-btn svg, button svg { vertical-align: -2px; }

:root {
    --bg: #0a0a0a;
    --card: rgba(255,255,255,0.05);
    --card-border: rgba(255,255,255,0.08);
    --primary: #e50914;
    --primary-hover: #f6121d;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.5);
    --text-dim: rgba(255,255,255,0.3);
    --input-bg: rgba(255,255,255,0.08);
    --input-border: rgba(255,255,255,0.1);
    --radius: 14px;
    --radius-sm: 12px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

#app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* ---------- Screen Container ---------- */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.screen.hidden { display: none; }
.screen.fade-in { animation: fadeIn 0.35s ease forwards; }
.screen.fade-out { animation: fadeOut 0.25s ease forwards; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.97); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideOutLeft { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes dotBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- Splash Screen ---------- */
.splash {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: var(--bg);
}
.splash-logo {
    text-align: center;
    animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.splash-netflix {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 6px;
}
.splash-divider {
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin: 14px auto;
}
.splash-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.splash-brand {
    position: absolute;
    bottom: calc(60px + var(--safe-bottom));
    text-align: center;
    animation: fadeIn 0.6s 0.6s ease forwards;
    opacity: 0;
}
.splash-brand-name {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
}
.splash-version {
    font-size: 12px;
    color: rgba(255,255,255,0.2);
    margin-top: 4px;
}

/* ---------- Onboarding Screen ---------- */
.onboarding {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
    padding-top: var(--safe-top);
}
.onboarding-skip {
    position: absolute;
    top: calc(16px + var(--safe-top));
    right: 24px;
    z-index: 10;
    padding: 8px 16px;
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.onboarding-slider {
    flex: 1;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.onboarding-slider::-webkit-scrollbar { display: none; }
.onboarding-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    position: relative;
}
.slide-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    opacity: 0.08;
    top: 20%;
}
.slide-icon {
    width: 120px;
    height: 120px;
    border-radius: 35px;
    background: var(--card);
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}
.slide-emoji {
    font-size: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-title {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.slide-desc {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    line-height: 24px;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.onboarding-bottom {
    padding: 0 24px calc(50px + var(--safe-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
}
.onboarding-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 30px;
}
.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}
.onboarding-dot.active {
    width: 24px;
}
.onboarding-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    border-radius: var(--radius);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}
.onboarding-btn:active { transform: scale(0.97); }

/* ---------- Login Screen ---------- */
.login {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    padding-top: calc(24px + var(--safe-top));
    padding-bottom: calc(24px + var(--safe-bottom));
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo .netflix-text {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 4px;
}
.login-logo .brand-text {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
}
.login-logo .title-text {
    font-size: 22px;
    font-weight: 700;
    margin-top: 10px;
}
.login-card {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--card-border);
}
.input-group {
    margin-bottom: 18px;
}
.input-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    display: block;
}
.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--input-border);
    padding: 0 14px;
    transition: border-color 0.2s;
}
.input-wrapper:focus-within {
    border-color: var(--primary);
}
.input-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
    color: var(--text-muted);
}
.input-field {
    flex: 1;
    height: 50px;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}
.input-field::placeholder { color: var(--text-dim); }
.eye-btn {
    background: none;
    border: none;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
}
.error-box {
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    animation: popIn 0.3s ease;
}
.error-text {
    color: #f87171;
    font-size: 13px;
}
.login-btn {
    width: 100%;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.login-btn:active { transform: scale(0.97); }
.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.forgot-btn {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
}
.login-footer {
    text-align: center;
    color: rgba(255,255,255,0.2);
    font-size: 12px;
    margin-top: 32px;
}

/* ---------- Spinner ---------- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ---------- Dashboard (Main App) ---------- */
.dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    padding: calc(12px + var(--safe-top)) 16px 12px;
    gap: 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--card-border);
    z-index: 50;
    flex-shrink: 0;
}
.hamburger {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.hamburger-line {
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.6);
    border-radius: 1px;
}
.header-info { flex: 1; }
.header-logo {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 3px;
}
.header-date {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Scrollable Content */
.app-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: var(--safe-bottom, 0px);
}

/* Pull to Refresh */
.ptr-indicator {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 13px;
    display: none;
}
.ptr-indicator.visible { display: block; }

/* Status Badge */
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.5);
}
.status-text {
    font-size: 13px;
    color: var(--text-muted);
}
.warning-badge {
    background: rgba(245,158,11,0.15);
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: auto;
}
.warning-badge-text {
    font-size: 11px;
    color: #f59e0b;
    font-weight: 600;
}

/* Section Title */
.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: rgba(255,255,255,0.8);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--card-border);
}
.stat-icon-bg {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.stat-icon { display: inline-flex; align-items: center; justify-content: center; }
.stat-value {
    font-size: 22px;
    font-weight: 800;
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.menu-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--card-border);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s, background 0.15s;
}
.menu-card:active {
    transform: scale(0.96);
    background: rgba(255,255,255,0.08);
}
.menu-icon-bg {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.menu-icon { display: inline-flex; align-items: center; justify-content: center; }
.menu-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}
.menu-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---------- Sidebar ---------- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.sidebar-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 75%;
    max-width: 320px;
    background: #111114;
    border-right: 1px solid var(--card-border);
    z-index: 101;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 16px rgba(0,0,0,0.5);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    padding: calc(20px + var(--safe-top)) 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.sidebar-logo {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 3px;
}
.sidebar-brand {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
    margin-bottom: 18px;
}
.sidebar-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(229,9,20,0.2);
    border: 1px solid rgba(229,9,20,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}
.sidebar-username {
    font-size: 15px;
    font-weight: 700;
}
.sidebar-role {
    display: inline-block;
    background: rgba(229,9,20,0.15);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 8px;
}
.sidebar-divider {
    padding: 20px 20px 8px;
}
.sidebar-divider-text {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.sidebar-item {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    gap: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: inherit;
    font-family: inherit;
}
.sidebar-item:active { background: rgba(255,255,255,0.05); }
.sidebar-item.active { background: rgba(229,9,20,0.08); }
.sidebar-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.sidebar-item-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    flex: 1;
}
.sidebar-item.active .sidebar-item-title {
    color: #fff;
    font-weight: 700;
}
.sidebar-item-bar {
    width: 3px;
    height: 20px;
    border-radius: 2px;
    position: absolute;
    right: 0;
}

/* ---------- Feature Screen ---------- */
.feature-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
}
.feature-header {
    display: flex;
    align-items: center;
    padding: calc(12px + var(--safe-top)) 16px 12px;
    gap: 12px;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}
.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.feature-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}
.feature-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-bottom));
}

/* ---------- Premium Alert / Modal ---------- */
.alert-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.alert-overlay.visible {
    opacity: 1;
    pointer-events: all;
}
.alert-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}
.alert-card {
    width: 100%;
    max-width: 340px;
    border-radius: 24px;
    background: #1a1a1a;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.alert-glow {
    height: 3px;
    width: 100%;
}
.alert-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.alert-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.alert-title {
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}
.alert-message {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    line-height: 20px;
    margin-bottom: 24px;
}
.alert-btn-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.alert-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.alert-btn.cancel {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}
.alert-btn.ok {
    color: #fff;
    width: 100%;
}

/* ---------- Skeleton Loader ---------- */
.skeleton {
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ---------- Loading Dots ---------- */
.loading-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: dotBounce 1.4s ease-in-out infinite;
}
.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}
.empty-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-muted);
}
.empty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.empty-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 22px;
}

/* ---------- Info Card / Detail Card ---------- */
.info-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.info-row:last-child { border-bottom: none; }
.info-label {
    font-size: 13px;
    color: var(--text-muted);
}
.info-value {
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Action Button ---------- */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s;
}
.action-btn:active { transform: scale(0.97); }
.action-btn.primary { background: var(--primary); color: #fff; }
.action-btn.secondary {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid var(--card-border);
}

/* ---------- Select / Dropdown ---------- */
.select-wrapper {
    position: relative;
}
.select-field {
    width: 100%;
    height: 50px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    padding: 0 14px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-family: inherit;
}
.select-field:focus {
    outline: none;
    border-color: var(--primary);
}

/* ---------- Owner Email Chips ---------- */
.chips-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.chips-scroll::-webkit-scrollbar { display: none; }
.email-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.email-chip:active,
.email-chip.active {
    background: rgba(229,9,20,0.15);
    border-color: rgba(229,9,20,0.4);
    color: #fff;
}

/* ---------- Toast ---------- */
.toast-container {
    position: fixed;
    top: calc(16px + var(--safe-top));
    left: 16px;
    right: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    background: #1a1a1a;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: all;
    animation: slideUp 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-msg { font-size: 14px; flex: 1; }

/* ---------- Add to Home Screen Banner ---------- */
.install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-top: 1px solid var(--card-border);
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-bottom));
    z-index: 150;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideUp 0.4s ease;
}
.install-banner-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.install-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(229,9,20,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #e50914;
}
.install-text { flex: 1; }
.install-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}
.install-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 18px;
}
.install-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}
.install-steps {
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 14px;
}
.install-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.install-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---------- Responsive (iPad etc) ---------- */
@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .menu-grid { grid-template-columns: repeat(3, 1fr); }
    .login-content { max-width: 420px; margin: 0 auto; }
    .onboarding-slide { padding: 0 80px; }
}

/* ---------- Report Feature ---------- */
.report-tabs {
    display: flex;
    gap: 0;
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 12px;
    border: 1px solid var(--card-border);
}
.report-tab {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.report-tab.active {
    background: var(--primary);
    color: #fff;
}
.report-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.report-photo-upload {
    border: 2px dashed var(--input-border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.report-photo-upload:active {
    border-color: var(--primary);
}
.report-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
}
.report-photo-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
}

/* Small action buttons for report management */
.action-btn.small {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
    text-align: center;
}

/* ---------- Receipt Modal ---------- */
.receipt-overlay {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.receipt-overlay.visible {
    opacity: 1;
    pointer-events: all;
}
.receipt-overlay .alert-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
}
.receipt-card {
    width: 100%;
    max-width: 420px;
    margin: 24px 16px;
    border-radius: 24px;
    background: #1a1a2e;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    position: relative;
    z-index: 1;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.receipt-glow {
    height: 4px;
    background: linear-gradient(90deg, #e50914, #ff6b35, #e50914);
}
.receipt-header {
    padding: 28px 24px 16px;
    text-align: center;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.receipt-logo {
    font-size: 22px;
    font-weight: 900;
    color: #e50914;
    letter-spacing: -1px;
}
.receipt-tagline {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 2px;
}
.receipt-status {
    margin: 16px 24px;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}
.receipt-status-icon {
    width: 40px;
    height: 40px;
    background: rgba(34,197,94,0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    color: #22c55e;
}
.receipt-status-text {
    font-size: 15px;
    font-weight: 700;
    color: #22c55e;
}
.receipt-status-date {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}
.receipt-section {
    padding: 0 24px;
    margin-bottom: 14px;
}
.receipt-section-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.receipt-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
}
.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.receipt-row-key {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}
.receipt-row-val {
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-align: right;
}
.receipt-row-val.red { color: #e50914; }
.receipt-row-val.green { color: #22c55e; }
.receipt-account-box {
    margin: 0 24px 12px;
    background: rgba(229,9,20,0.06);
    border: 1px solid rgba(229,9,20,0.15);
    border-radius: 14px;
    padding: 14px;
}
.receipt-account-box .receipt-section-label {
    padding: 0;
    margin-bottom: 10px;
}
.receipt-account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.receipt-account-row:not(:last-child) {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 8px;
    margin-bottom: 4px;
}
.receipt-account-label {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}
.receipt-account-value {
    font-size: 13px;
    font-weight: 600;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-all;
    text-align: right;
    max-width: 65%;
    display: flex;
    align-items: center;
    gap: 6px;
}
.receipt-account-value .pw-hidden {
    color: rgba(255,255,255,0.2);
    font-style: italic;
    font-family: inherit;
}
.receipt-copy-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    flex-shrink: 0;
}
.receipt-copy-btn:active {
    background: rgba(255,255,255,0.2);
    color: white;
}
.receipt-warning {
    margin: 0 24px 14px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}
.receipt-warning strong { color: #ef4444; }
.receipt-warning.yellow {
    background: rgba(234,179,8,0.08);
    border-color: rgba(234,179,8,0.2);
}
.receipt-warning.yellow strong { color: #eab308; }
.receipt-terms {
    margin: 0 24px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px;
}
.receipt-terms-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.receipt-terms ol {
    margin: 0;
    padding-left: 18px;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    line-height: 1.7;
}
.receipt-terms ol strong { color: rgba(255,255,255,0.6); }
.receipt-terms .terms-warn {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    color: #ef4444;
    font-size: 10px;
    font-weight: 600;
}
.receipt-dashed {
    border: none;
    border-top: 1px dashed rgba(255,255,255,0.08);
    margin: 14px 24px;
}
.receipt-payment {
    padding: 0 24px;
    margin-bottom: 16px;
}
.receipt-payment-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}
.receipt-payment-row .label {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}
.receipt-payment-row .value {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}
.receipt-payment-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 0;
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.receipt-payment-total .label {
    font-size: 14px;
    font-weight: 700;
    color: white;
}
.receipt-payment-total .value {
    font-size: 14px;
    font-weight: 800;
    color: #22c55e;
}
.receipt-footer {
    padding: 16px 24px 20px;
    text-align: center;
    border-top: 1px dashed rgba(255,255,255,0.08);
}
.receipt-footer p {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    margin: 0;
    line-height: 1.6;
}
.receipt-actions {
    display: flex;
    gap: 10px;
    padding: 0 24px 24px;
}
.receipt-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.receipt-actions .btn-back {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
}
.receipt-actions .btn-ok {
    background: linear-gradient(135deg, #e50914, #b8070f);
    color: white;
}
