/* ==================== OT MANAGER - MOBILE & WEB CLIENT STYLES ==================== */
/* Premium Dark Glassmorphism Design System v3 — Ultra Sharp & Dynamic */

:root {
    /* Deep, Rich Dark Palette */
    --bg-primary: #020205;
    --bg-secondary: #050510;
    --bg-card: rgba(14, 15, 28, 0.72);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-hover: rgba(255, 255, 255, 0.09);
    --bg-input: rgba(255, 255, 255, 0.025);
    
    --text: #f0f0fa;
    --text-sub: #a3a3c8;
    --text-muted: #55557a;
    --text-white: #ffffff;
    
    /* Neon Accents — Boosted Saturation */
    --green: #0dd98b;
    --green-light: #3aeaa6;
    --green-dark: #059669;
    --green-glow: rgba(13, 217, 139, 0.25);
    --gradient-green: linear-gradient(135deg, #0dd98b 0%, #059669 100%);
    --gradient-green-glow: linear-gradient(135deg, #3aeaa6 0%, #0dd98b 100%);
    
    --purple: #7c7fff;
    --purple-light: #a5a8ff;
    --purple-glow: rgba(124, 127, 255, 0.22);
    --gradient-purple: linear-gradient(135deg, #7c7fff 0%, #5b5eeb 100%);
    
    --cyan: #06d6d6;
    --cyan-glow: rgba(6, 214, 214, 0.18);
    
    --red: #f04848;
    --red-glow: rgba(240, 72, 72, 0.22);
    --gradient-red: linear-gradient(135deg, #f04848 0%, #d92626 100%);
    
    --orange: #f5a623;
    --orange-glow: rgba(245, 166, 35, 0.22);
    
    /* Glass Borders — Razor Sharp Double-Border System */
    --border: rgba(255, 255, 255, 0.07);
    --border-inner: rgba(255, 255, 255, 0.14);
    --border-glow: rgba(13, 217, 139, 0.35);
    --border-focus: rgba(13, 217, 139, 0.55);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 22px 55px rgba(0, 0, 0, 0.6);
    --shadow-glow-green: 0 0 40px rgba(13, 217, 139, 0.06);
    
    /* Layout Constants */
    --radius: 20px;
    --radius-sm: 14px;
    --radius-lg: 28px;
    --nav-height: 72px;
    --header-height: 64px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --transition: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================== BASE RESET & GLOBALS ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #020205;
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100%;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background: radial-gradient(circle at top left, #04120e 0%, #020205 50%), radial-gradient(circle at bottom right, #070718 0%, #020205 60%);
    pointer-events: none;
}

/* ==================== AMBIENT GLOW ORBS — High-Compatibility Version ==================== */
.bg-glow-orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.85; /* Increased opacity to compensate for lack of blend-mode */
    will-change: transform;
    pointer-events: none;
    /* Soft fallback blur that is light on GPU */
    filter: blur(50px);
    -webkit-filter: blur(50px);
}

.orb-1 {
    top: -15%;
    left: -15%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(13, 217, 139, 0.15) 0%, rgba(13, 217, 139, 0.08) 25%, rgba(5, 150, 105, 0.02) 55%, transparent 75%);
    animation: orbDrift1 22s ease-in-out infinite alternate;
}

.orb-2 {
    bottom: -20%;
    right: -15%;
    width: 75vw;
    height: 75vw;
    background: radial-gradient(circle, rgba(124, 127, 255, 0.12) 0%, rgba(124, 127, 255, 0.06) 30%, rgba(91, 94, 235, 0.02) 60%, transparent 80%);
    animation: orbDrift2 28s ease-in-out infinite alternate;
}

.orb-3 {
    top: 25%;
    left: 35%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(6, 214, 214, 0.1) 0%, rgba(6, 214, 214, 0.04) 30%, rgba(8, 145, 178, 0.01) 60%, transparent 75%);
    animation: orbDrift3 25s ease-in-out infinite alternate;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ==================== ANIMATIONS ==================== */
@keyframes orbDrift1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(7vw, 6vh, 0) scale(1.15); }
}

@keyframes orbDrift2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-9vw, -7vh, 0) scale(1.18); }
}

@keyframes orbDrift3 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(6vw, -9vh, 0) scale(1.1); }
}

@keyframes shimmerSweep {
    0% { transform: translateX(-180%) skewX(-25deg); }
    30%, 100% { transform: translateX(180%) skewX(-25deg); }
}

@keyframes btnGlowPulse {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(13, 217, 139, 0.35), 0 0 0 0 rgba(58, 234, 166, 0);
    }
    50% {
        box-shadow: 0 8px 35px rgba(13, 217, 139, 0.55), 0 0 18px rgba(58, 234, 166, 0.2);
    }
}

@keyframes activePillIn {
    from { transform: scale(0.75); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes navGlowBreathe {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes fadeIn {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.93); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseBorder {
    0%, 100% { border-color: rgba(13, 217, 139, 0.15); box-shadow: 0 0 12px rgba(13, 217, 139, 0.05); }
    50% { border-color: rgba(13, 217, 139, 0.5); box-shadow: 0 0 24px rgba(13, 217, 139, 0.2); }
}

@keyframes pulseRing {
    0% { transform: scale(0.93); opacity: 0.7; }
    50% { transform: scale(1.07); opacity: 0.35; }
    100% { transform: scale(0.93); opacity: 0.7; }
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes inputGlowIn {
    from { box-shadow: 0 0 0 0 rgba(13, 217, 139, 0); }
    to { box-shadow: 0 0 0 5px rgba(13, 217, 139, 0.12), 0 8px 22px rgba(13, 217, 139, 0.08); }
}

/* ==================== SPLASH SCREEN ==================== */
.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-primary);
    display: none;
    align-items: center;
    justify-content: center;
}

.splash.active {
    display: flex;
}

.splash-content {
    text-align: center;
    animation: fadeInUp 0.8s var(--bounce);
}

.splash-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    position: relative;
}

.splash-icon::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 217, 139, 0.18) 0%, transparent 68%);
    animation: pulseRing 3s ease-in-out infinite;
    z-index: -1;
}

.splash-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 35px var(--green-glow));
}

.splash-content h1 {
    font-size: 34px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green-light), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1.2px;
}

.splash-content p {
    color: var(--text-sub);
    font-size: 14px;
    margin-top: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    opacity: 0.75;
}

.splash-loader {
    width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    margin: 40px auto 0;
    overflow: hidden;
    position: relative;
    border: 0.5px solid rgba(255, 255, 255, 0.03);
}

.loader-bar {
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--green-light), var(--cyan));
    border-radius: 4px;
    animation: loading 1.5s ease-in-out infinite;
}

/* ==================== SCREENS ==================== */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease;
}

#screen-app.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==================== LANDING & LOGIN PAGE ==================== */
#screen-login {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-primary);
}

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 2, 5, 0.82);
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
}

.logo-svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 6px 18px var(--green-glow));
}

.logo-text {
    font-size: 23px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green-light), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.8px;
}

.landing-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100dvh - var(--header-height));
    box-sizing: border-box;
}

.landing-left-side {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: auto 0;
}

/* ==================== LOGIN CARD — Double-Border Glass ==================== */
.login-page-card {
    background: linear-gradient(145deg, rgba(16, 17, 34, 0.85) 0%, rgba(7, 8, 16, 0.8) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 24px 50px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.04),
        var(--shadow-glow-green);
    width: 100%;
    transition: var(--transition);
    animation: cardEntrance 0.6s var(--bounce);
}

/* Inner glow border highlight - Beautiful Multicolor Neon */
.login-page-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(6, 214, 214, 0.2) 30%, rgba(13, 217, 139, 0.35) 70%, rgba(124, 127, 255, 0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h1 {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, var(--text-white) 25%, var(--text-sub) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-sub);
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
    opacity: 0.85;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-register-hint {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 16px;
    font-weight: 500;
    opacity: 0.85;
}

.login-version-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 20px;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ==================== FORMS & INPUTS — Interactive Physics ==================== */
.mobile-form .form-group,
#form-ot .form-group,
#form-edit-ot .form-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-form label,
#form-ot label,
#form-edit-ot label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-sub);
    letter-spacing: 0.3px;
    margin-left: 4px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.35s var(--bounce);
}

.input-wrapper input {
    padding-left: 46px !important;
}

/* Label & Icon Glow on Focus */
.form-group:focus-within label {
    color: var(--green-light);
    transform: translateX(2px);
}

.input-wrapper:focus-within .input-icon {
    color: var(--green-light);
    transform: translateY(-50%) scale(1.1);
    filter: drop-shadow(0 0 6px rgba(58, 234, 166, 0.4));
}

.mobile-form input,
.mobile-form select,
.mobile-form textarea,
#form-ot input[type="date"],
#form-ot input[type="time"],
#form-ot input[type="number"],
#form-ot textarea,
#form-edit-ot input[type="date"],
#form-edit-ot input[type="time"],
#form-edit-ot input[type="number"],
#form-edit-ot textarea {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-form input:focus,
.mobile-form select:focus,
.mobile-form textarea:focus,
#form-ot input:focus,
#form-ot textarea:focus,
#form-edit-ot input:focus,
#form-edit-ot textarea:focus {
    border-color: var(--green-light);
    box-shadow: 
        0 0 0 4px rgba(13, 217, 139, 0.12),
        0 4px 18px rgba(13, 217, 139, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.mobile-form input::placeholder,
#form-ot textarea::placeholder,
#form-edit-ot textarea::placeholder {
    color: var(--text-muted);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-error {
    color: var(--red);
    font-size: 13.5px;
    text-align: center;
    margin-top: 14px;
    min-height: 20px;
    font-weight: 700;
}

/* ==================== BUTTONS — Metallic Shimmer & Living Glow ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.35s var(--bounce);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #0dd98b 0%, #06b9b9 100%);
    color: var(--text-white);
    box-shadow: 0 6px 24px rgba(13, 217, 139, 0.32);
    overflow: hidden;
    z-index: 1;
    animation: btnGlowPulse 3.5s infinite ease-in-out;
    letter-spacing: 0.2px;
}

/* Metallic shimmer sweep */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -180%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0.4),
        rgba(255, 255, 255, 0.18),
        transparent
    );
    transform: skewX(-25deg);
    animation: shimmerSweep 3.5s infinite ease-in-out;
    z-index: 2;
    pointer-events: none;
}

/* Edge highlight for depth */
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 3;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(13, 217, 139, 0.45), 0 0 15px rgba(58, 234, 166, 0.2);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 4px 16px rgba(13, 217, 139, 0.3);
}

.btn-danger {
    background: var(--gradient-red);
    color: var(--text-white);
    box-shadow: 0 6px 22px rgba(240, 72, 72, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 30px rgba(240, 72, 72, 0.45);
}

.btn-danger:active {
    transform: translateY(0) scale(0.96);
}

.btn-warning {
    background: linear-gradient(135deg, var(--orange) 0%, #d97706 100%);
    color: var(--text-white);
    box-shadow: 0 6px 22px rgba(245, 166, 35, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 30px rgba(245, 166, 35, 0.45);
}

.btn-warning:active {
    transform: translateY(0) scale(0.96);
}

.btn-ghost {
    background: var(--bg-glass);
    color: var(--text-sub);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-glass-hover);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-ghost:active {
    transform: scale(0.96);
}

.btn-full {
    width: 100%;
}

/* ==================== MOBILE CLIENT HEADER ==================== */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: calc(16px + var(--safe-top));
    background: rgba(3, 3, 8, 0.82);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 50;
    position: sticky;
    top: 0;
}

/* Subtle bottom glow line */
.mobile-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13, 217, 139, 0.2), transparent);
    pointer-events: none;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.header-greeting {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-white);
}

.header-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.3s var(--bounce);
    outline: none;
    position: relative;
    overflow: hidden;
}

.header-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.header-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.header-btn:active {
    transform: scale(0.9);
}

/* Offline Connection Badge */
#app-connection-badge {
    box-shadow: 0 0 12px rgba(240, 72, 72, 0.15);
    animation: pulse 2s infinite;
}

/* ==================== SCROLL CONTAINER ==================== */
.mobile-main {
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 30px);
}

.tab-content {
    display: none;
    padding: 20px 16px 0;
    animation: fadeInUp 0.5s var(--bounce);
}

.tab-content.active {
    display: block;
}

/* Sync Banner */
#sync-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(245, 166, 35, 0.04);
    border: 1px solid rgba(245, 166, 35, 0.18);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--orange);
    box-shadow: 0 4px 14px rgba(245, 166, 35, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ==================== HOME PAGE COMPONENTS ==================== */
/* Info Cards — Double-Border Glass */
.info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.info-card {
    background: linear-gradient(145deg, rgba(22, 24, 48, 0.75) 0%, rgba(10, 11, 22, 0.7) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 24px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 0.35s var(--bounce);
    animation: cardEntrance 0.5s var(--bounce) backwards;
}

.info-card:nth-child(2) {
    animation-delay: 0.08s;
}

/* Inner glow border */
.info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.info-card:hover {
    transform: translateY(-3px) scale(1.015);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 14px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.info-card-icon {
    font-size: 24px;
    line-height: 1;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.info-card:hover .info-card-icon {
    border-color: rgba(13, 217, 139, 0.2);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 10px rgba(13, 217, 139, 0.08);
}

.info-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.info-value {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-white);
}

/* ==================== PREMIUM CARD PANELS — Double-Border Glass ==================== */
.card {
    background: linear-gradient(145deg, rgba(22, 24, 48, 0.75) 0%, rgba(10, 11, 22, 0.7) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 18px 45px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 0 rgba(255, 255, 255, 0.04);
    transition: var(--transition);
    animation: cardEntrance 0.55s var(--bounce) backwards;
}

/* Inner double-border highlight */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.02) 35%, transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.form-card {
    border-color: rgba(13, 217, 139, 0.12);
    box-shadow: 
        0 18px 45px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(13, 217, 139, 0.03),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
}

/* Green tint gradient border for OT form */
.form-card::before {
    background: linear-gradient(145deg, rgba(13, 217, 139, 0.25) 0%, rgba(255, 255, 255, 0.06) 30%, transparent 55%);
}

.card-title {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-white);
    letter-spacing: -0.3px;
}

.card-title svg {
    color: var(--green-light);
    filter: drop-shadow(0 0 8px rgba(58, 234, 166, 0.35));
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.card-title-row .card-title {
    margin-bottom: 0;
}

/* ==================== TOGGLE SWITCH — Elastic Bounce ==================== */
.toggle-row {
    margin-bottom: 22px;
}

.toggle-label {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-bottom: 0 !important;
    transition: all 0.3s ease;
}

.toggle-label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.toggle-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.toggle-text strong {
    font-size: 15px;
    color: var(--text-white);
}

.toggle-text small {
    font-size: 12px;
    color: var(--text-sub);
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    transition: all 0.4s var(--bounce);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 4px;
    transition: transform 0.4s cubic-bezier(0.34, 1.7, 0.64, 1), width 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--green);
    border-color: rgba(13, 217, 139, 0.5);
    box-shadow: 0 0 18px rgba(13, 217, 139, 0.45);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), 0 0 8px rgba(13, 217, 139, 0.3);
}

.toggle-switch:active .toggle-slider::before {
    width: 27px;
}

/* ==================== OT PREVIEW PANEL ==================== */
.ot-preview {
    background: rgba(13, 217, 139, 0.025);
    border: 1px solid rgba(13, 217, 139, 0.1);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
}

.ot-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13, 217, 139, 0.2), transparent);
}

.preview-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-sub);
}

.preview-row-val {
    font-weight: 700;
    color: var(--text-white);
}

.preview-total {
    font-size: 14.5px;
    padding-top: 14px;
    border-top: 1px dashed rgba(13, 217, 139, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-total strong {
    color: var(--green-light);
    font-size: 28px;
    font-weight: 900;
    text-shadow: 0 0 18px rgba(58, 234, 166, 0.35);
}

/* ==================== HISTORY TAB ==================== */
.history-list {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 2px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.history-item {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInUp 0.45s var(--bounce) backwards;
}

.history-main-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.history-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.history-date {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-white);
}

.history-total {
    font-size: 19px;
    font-weight: 900;
    color: var(--green-light);
    text-shadow: 0 0 10px rgba(58, 234, 166, 0.2);
    line-height: 1.2;
}

.history-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.htag {
    font-size: 9px;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: 12px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.htag-lunch {
    background: rgba(13, 217, 139, 0.1);
    color: var(--green-light);
    border: 1px solid rgba(13, 217, 139, 0.18);
}

.htag-evening {
    background: rgba(124, 127, 255, 0.1);
    color: var(--purple-light);
    border: 1px solid rgba(124, 127, 255, 0.18);
}

.history-note {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.015);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.04);
    margin-top: 4px;
    font-style: italic;
}

.history-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.action-link {
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.edit-link {
    color: var(--green-light);
}
.edit-link:hover {
    color: var(--green);
    text-decoration: underline;
}

.delete-link {
    color: var(--red);
}
.delete-link:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

.action-sep {
    color: var(--text-muted);
    font-size: 10px;
    opacity: 0.5;
}
.btn-delete-sm:hover {
    background: rgba(240, 72, 72, 0.08);
    border-color: var(--red);
    transform: translateY(-1px);
}

.btn-delete-sm:active {
    transform: scale(0.95);
}

.history-summary {
    margin-top: 22px;
    padding: 18px 14px;
    background: rgba(13, 217, 139, 0.04);
    border: 1px solid rgba(13, 217, 139, 0.1);
    border-radius: var(--radius-sm);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 8px;
    position: relative;
}

.history-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13, 217, 139, 0.15), transparent);
}

.history-summary:empty {
    display: none;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.summary-label {
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-val {
    color: var(--green-light);
    font-size: 17px;
    font-weight: 800;
}

.empty-state {
    text-align: center;
    padding: 56px 16px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.18;
}

.empty-state p {
    font-size: 14px;
}

/* ==================== PROFILE TAB ==================== */
.profile-header {
    text-align: center;
    padding: 28px 16px 24px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
    font-weight: 900;
    color: var(--text-white);
    margin: 0 auto 16px;
    box-shadow: 0 10px 30px var(--green-glow);
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 1.5px solid rgba(13, 217, 139, 0.2);
    animation: pulseBorder 3s infinite;
}

.profile-avatar::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px solid rgba(13, 217, 139, 0.08);
    animation: pulseBorder 3s infinite 0.5s;
}

.profile-header h2 {
    font-size: 23px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.3px;
}

.profile-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.profile-ver-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-sub);
    border-radius: 20px;
    margin-top: 12px;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.stat-item {
    text-align: center;
    padding: 22px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s var(--bounce);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.stat-item:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
    color: var(--text-white);
}

.stat-highlight {
    color: var(--green-light);
    text-shadow: 0 0 18px rgba(58, 234, 166, 0.3);
}

.stat-text {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Regulations List */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--bounce);
}

.rule-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.rule-icon {
    font-size: 22px;
    line-height: 1;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rule-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rule-text strong {
    font-size: 13.5px;
    color: var(--text-white);
}

.rule-text span {
    font-size: 12px;
    color: var(--text-sub);
}

/* ==================== FLOATING BOTTOM NAVIGATION — Pill Bar ==================== */
.bottom-nav {
    position: fixed;
    bottom: 18px;
    left: 16px;
    right: 16px;
    height: 66px;
    border-radius: 22px;
    background: rgba(7, 8, 16, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    z-index: 100;
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.6),
        0 -4px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    transition: var(--transition);
    overflow: hidden;
}

/* Top edge highlight */
.bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s var(--bounce);
    position: relative;
    outline: none;
    z-index: 2;
    letter-spacing: 0.2px;
}

.nav-item svg {
    color: var(--text-muted);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.25s ease, filter 0.3s ease;
}

.nav-item.active {
    color: var(--green-light);
}

.nav-item.active svg {
    transform: scale(1.2) translateY(-3px);
    color: var(--green-light);
    filter: drop-shadow(0 0 8px rgba(58, 234, 166, 0.5));
}

/* Floating Glow Capsule on Active Tab */
.nav-item.active::after {
    content: '';
    position: absolute;
    inset: 7px 10px;
    background: radial-gradient(ellipse at center, rgba(13, 217, 139, 0.16) 0%, rgba(13, 217, 139, 0.03) 70%);
    border-radius: 16px;
    border: 1px solid rgba(13, 217, 139, 0.16);
    z-index: -1;
    animation: activePillIn 0.35s var(--bounce);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.06),
        0 0 14px rgba(13, 217, 139, 0.08);
}

/* Bottom glow dot for active tab */
.nav-item.active::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--green-light);
    box-shadow: 0 0 8px rgba(58, 234, 166, 0.6);
    animation: navGlowBreathe 2s ease-in-out infinite;
    z-index: 3;
}

.nav-item:active {
    transform: scale(0.88);
}

/* ==================== TOAST & DIALOG WINDOWS ==================== */
.toast-container {
    position: fixed;
    top: calc(16px + var(--safe-top));
    left: 16px;
    right: 16px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    text-align: center;
    box-shadow: var(--shadow-lg), 0 4px 18px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.45s var(--bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: auto;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.toast-success { background: rgba(13, 217, 139, 0.9); }
.toast-error { background: rgba(240, 72, 72, 0.9); }
.toast-info { background: rgba(124, 127, 255, 0.9); }
.toast-warning { background: rgba(245, 166, 35, 0.9); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-28px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Confirm Dialog — Glass Panel */
.confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 2, 4, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 8000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.confirm-dialog {
    background: linear-gradient(145deg, #0a0b14 0%, #050609 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    width: 100%;
    max-width: 350px;
    text-align: center;
    animation: scaleIn 0.45s var(--bounce);
    position: relative;
    overflow: hidden;
    box-shadow: 
        var(--shadow-lg), 
        0 0 50px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* Inner border highlight */
.confirm-dialog::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.confirm-dialog p {
    font-size: 14.5px;
    margin-bottom: 28px;
    line-height: 1.6;
    color: var(--text-sub);
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions .btn {
    flex: 1;
    padding: 13px;
    font-size: 14px;
}

/* ==================== PULL TO REFRESH ==================== */
.pull-to-refresh {
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: height 0.25s ease, opacity 0.25s ease;
    font-size: 13px;
    color: var(--text-sub);
    opacity: 0;
    width: 100%;
}

.pull-to-refresh.visible {
    height: 54px;
    opacity: 1;
}

.ptr-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.ptr-icon {
    font-size: 16px;
    transition: transform 0.25s var(--bounce);
    display: inline-block;
    color: var(--green-light);
}

.ptr-icon.rotate {
    transform: rotate(180deg);
}

.ptr-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(13, 217, 139, 0.15);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn-link {
    background: none;
    border: none;
    color: var(--green-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    padding: 6px;
    margin-top: 8px;
    display: inline-block;
    transition: var(--transition);
}

.btn-link:active {
    opacity: 0.7;
}

/* Month input (compact) */
.input-sm {
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    font-family: inherit !important;
    outline: none;
    transition: all 0.3s ease;
}

.input-sm:focus {
    border-color: var(--green-light) !important;
    box-shadow: 0 0 0 3px rgba(13, 217, 139, 0.1) !important;
}

/* ==================== LANDING PAGE — Full-Width Elements ==================== */

/* Navigation Links */
.landing-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.3s var(--bounce);
    position: relative;
}

.nav-link:hover {
    color: var(--green-light);
    background: rgba(13, 217, 139, 0.06);
}

.nav-link:active {
    transform: scale(0.95);
}

.nav-link.active {
    color: var(--green-light) !important;
    background: rgba(13, 217, 139, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(13, 217, 139, 0.15);
}

/* Login Tabs */
.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
}

.login-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.35s var(--bounce);
    position: relative;
}

.login-tab.active {
    background: rgba(13, 217, 139, 0.12);
    color: var(--green-light);
    box-shadow: 0 2px 10px rgba(13, 217, 139, 0.1);
}

.login-tab:not(.active):hover {
    color: var(--text-sub);
    background: rgba(255, 255, 255, 0.04);
}

/* Features Section */
.landing-section {
    width: 100%;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.feat-card {
    background: linear-gradient(145deg, rgba(22, 24, 48, 0.5) 0%, rgba(10, 11, 22, 0.4) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 22px 18px;
    position: relative;
    overflow: hidden;
    transition: all 0.35s var(--bounce);
    animation: cardEntrance 0.5s var(--bounce) backwards;
}

.feat-card:nth-child(1) { animation-delay: 0.05s; }
.feat-card:nth-child(2) { animation-delay: 0.1s; }
.feat-card:nth-child(3) { animation-delay: 0.15s; }
.feat-card:nth-child(4) { animation-delay: 0.2s; }

/* Inner glow border */
.feat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, transparent 45%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.feat-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(13, 217, 139, 0.15);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(13, 217, 139, 0.04);
}

.feat-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 12px;
    line-height: 1;
}

.feat-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.feat-card p {
    font-size: 12.5px;
    color: var(--text-sub);
    line-height: 1.5;
    opacity: 0.85;
}

/* Download Cards */
.landing-right-side {
    width: 100%;
}

.download-card {
    background: linear-gradient(145deg, rgba(22, 24, 48, 0.58) 0%, rgba(10, 11, 22, 0.48) 100%);
    backdrop-filter: blur(32px) saturate(220%);
    -webkit-backdrop-filter: blur(32px) saturate(220%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 22px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    transition: all 0.35s var(--bounce);
    animation: cardEntrance 0.6s var(--bounce) backwards;
}

/* Inner border highlight */
.download-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 35%, transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.download-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 28px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.apk-card {
    border-color: rgba(13, 217, 139, 0.1);
}

.apk-card::before {
    background: linear-gradient(145deg, rgba(13, 217, 139, 0.2) 0%, rgba(255, 255, 255, 0.04) 30%, transparent 55%);
}

.exe-card {
    border-color: rgba(124, 127, 255, 0.1);
}

.exe-card::before {
    background: linear-gradient(145deg, rgba(124, 127, 255, 0.2) 0%, rgba(255, 255, 255, 0.04) 30%, transparent 55%);
}

.card-emoji {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
    line-height: 1;
}

.download-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.download-card p {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.5;
    margin-bottom: 16px;
    opacity: 0.85;
}

.platform-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-sub);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Purple button */
.btn-purple {
    background: var(--gradient-purple);
    color: var(--text-white);
    box-shadow: 0 6px 22px rgba(124, 127, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-purple::before {
    content: '';
    position: absolute;
    top: 0;
    left: -180%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    animation: shimmerSweep 4s infinite ease-in-out;
    z-index: 2;
    pointer-events: none;
}

.btn-purple::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 3;
}

.btn-purple:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 35px rgba(124, 127, 255, 0.5), 0 0 18px rgba(165, 168, 255, 0.2);
}

.btn-purple:active {
    transform: translateY(0) scale(0.96);
}

/* QR Code Box */
.qr-box {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-bg {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.qr-bg img {
    width: 120px;
    height: 120px;
    display: block;
    border-radius: 6px;
}

.qr-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==================== RESPONSIVE DESIGN & DESKTOP WRAPPER ==================== */

/* Desktop: Landing page two-column layout */
@media (min-width: 768px) {
    .landing-header {
        padding: 18px 48px;
    }
    .landing-logo {
        margin: 0;
    }
    .landing-container {
        max-width: 1200px;
        flex-direction: column;
        align-items: center;
        gap: 32px;
        padding: 40px 24px 80px;
    }
    #ltab-login.active {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: calc(100vh - var(--header-height) - 180px);
        width: 100%;
    }

    .landing-left-side {
        flex: 1.2;
    }

    .landing-right-side {
        flex: 0.8;
        position: sticky;
        top: 100px;
    }
}

@media (max-width: 768px) {
    .landing-header {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
        align-items: center;
    }
    .landing-nav {
        display: flex !important;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
    }
    .landing-nav::-webkit-scrollbar {
        display: none;
    }
    .landing-nav {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 12px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 480px) {
    #screen-app {
        max-width: 460px;
        margin: 0 auto;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        box-shadow: 0 0 110px rgba(0, 0, 0, 0.75);
        background: var(--bg-secondary);
        position: relative;
    }
    
    #screen-app .bottom-nav {
        max-width: 428px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 18px;
    }
    
    #screen-app .mobile-header {
        max-width: 460px;
        width: 100%;
    }
}

/* iOS Safe Areas support */
@supports (-webkit-touch-callout: none) {
    /* Avoid forcing position: fixed on body as it blocks scroll gestures on Safari iOS */
    body {
        position: relative;
        overflow-x: hidden;
    }
}

/* Custom styles for Landing Tabs & Full-width contents */
.landing-tab-content {
    display: none;
    width: 100%;
    animation: fadeIn 0.4s ease;
}

.landing-tab-content.active {
    display: block;
}

.features-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feat-card-large {
    background: linear-gradient(145deg, rgba(22, 24, 48, 0.55) 0%, rgba(10, 11, 22, 0.45) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feat-card-large:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 217, 139, 0.25);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.feat-icon-large {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 16px;
}

.feat-card-large h3 {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feat-card-large p {
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.6;
}

/* Downloads tab */
.download-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
    justify-content: center;
    width: 100%;
}

.download-card-large {
    background: linear-gradient(145deg, rgba(22, 24, 48, 0.55) 0%, rgba(10, 11, 22, 0.45) 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.35s var(--bounce);
}

.download-card-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

.card-large-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.card-emoji-large {
    font-size: 2.5rem;
}

.platform-badge-large {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-sub);
    margin-top: 4px;
}

.download-desc {
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.65;
}

.qr-box-large {
    margin-top: 24px;
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qr-bg-large {
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    width: 140px;
    height: 140px;
}

.qr-bg-large img {
    width: 120px;
    height: 120px;
    display: block;
}

/* Changelog Timeline */
.changelog-timeline {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 20px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.changelog-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 28px;
    position: relative;
    transition: var(--transition);
}

.changelog-item:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
}

.changelog-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    background: var(--gradient-green);
    color: var(--text-white);
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.changelog-date {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 10px;
}

.changelog-list {
    margin-top: 14px;
    padding-left: 18px;
    color: var(--text-sub);
    font-size: 13.5px;
}

.changelog-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Terms & Privacy card */
.terms-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px 36px;
    color: var(--text-sub);
    font-size: 14px;
    line-height: 1.7;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.terms-card h3 {
    color: var(--text-white);
    font-size: 16px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 10px;
}

.terms-card h3:first-of-type {
    margin-top: 0;
}

.terms-card p {
    margin-bottom: 16px;
}

.terms-card ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.terms-card li {
    margin-bottom: 8px;
}

/* Hide update button on web browser platform */
body.is-web-browser #btn-check-update-mobile {
    display: none !important;
}

/* ==================== CUSTOM TIME PICKER BOTTOM SHEET ==================== */
.custom-time-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-sm);
    padding: 15px 18px;
    width: 100%;
    height: 54px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-time-input:hover {
    border-color: rgba(13, 217, 139, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.custom-time-input .time-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
}

/* Bottom Sheet Overlay */
.sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 2, 5, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-overlay.active {
    display: flex;
    opacity: 1;
}

/* Bottom Sheet Container */
.sheet-container {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, rgba(16, 17, 34, 0.98) 0%, rgba(7, 8, 16, 0.99) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px 28px 0 0;
    padding: 24px;
    padding-bottom: calc(24px + var(--safe-bottom));
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
}

.sheet-overlay.active .sheet-container {
    transform: translateY(0);
}

.sheet-drag-handle {
    width: 42px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: -12px auto 16px;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.sheet-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
    margin: 0;
    letter-spacing: -0.3px;
}

.sheet-time-preview-badge {
    font-size: 15px;
    font-weight: 800;
    color: var(--green-light);
    text-shadow: 0 0 10px var(--green-glow);
    background: rgba(13, 217, 139, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(13, 217, 139, 0.25);
    font-family: monospace;
    margin-left: auto;
    margin-right: 12px;
}

.sheet-close-btn {
    background: transparent;
    border: none;
    font-size: 26px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 6px;
    line-height: 1;
}

.sheet-close-btn:hover {
    color: var(--text);
}

/* Picker Row and Swipe Strip */
.picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    width: 100%;
}

.picker-row-label {
    width: 44px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    flex-shrink: 0;
}

.scroll-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-grow: 1;
    padding: 4px 0;
}

.scroll-strip::-webkit-scrollbar {
    display: none;
}

.strip-btn {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    outline: none;
    user-select: none;
}

.strip-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
}

.strip-btn.selected {
    background: var(--gradient-green);
    color: var(--text-white);
    border: none;
    box-shadow: 0 4px 12px var(--green-glow);
    font-size: 15px;
    font-weight: 850;
}

/* Presets inside Sheet */
.sheet-presets-section {
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
}

.sheet-presets-section .presets-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sheet-presets-section .presets-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sheet-presets-section .preset-btn {
    flex: 1;
    min-width: 54px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-sub);
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.sheet-presets-section .preset-btn:hover {
    background: rgba(13, 217, 139, 0.08);
    color: var(--green-light);
    border-color: rgba(13, 217, 139, 0.3);
}

/* Sheet Footer */
.sheet-footer {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 14px;
}

.sheet-footer .btn {
    flex: 1;
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 12px;
}

/* ==================== WEB LANDING PAGE — Navigation, Tabs, Cards ==================== */

/* Landing Navigation Bar */
.landing-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.landing-nav::-webkit-scrollbar {
    display: none;
}

.landing-nav .nav-link {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.landing-nav .nav-link:hover {
    color: var(--text-sub);
    background: rgba(255, 255, 255, 0.04);
}

.landing-nav .nav-link.active {
    color: var(--green-light);
    background: rgba(13, 217, 139, 0.1);
}

/* Login Tabs (Nhân viên / Quản trị viên) */
.login-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
}

.login-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
}

.login-tab:hover {
    color: var(--text-sub);
}

.login-tab.active {
    background: rgba(13, 217, 139, 0.12);
    color: var(--green-light);
    box-shadow: 0 2px 8px rgba(13, 217, 139, 0.1);
}

/* Landing Tab Content — ẩn các tab không active */
.landing-tab-content {
    display: none;
    width: 100%;
    animation: fadeInUp 0.4s ease;
}

.landing-tab-content.active {
    display: block;
}

/* Landing Sections */
.landing-section {
    padding: 20px 0;
}

.section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    color: var(--text-white);
}

/* ==================== FEATURES GRID ==================== */
.features-grid-large {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.feat-card-large {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.35s ease;
}

.feat-card-large:hover {
    border-color: rgba(13, 217, 139, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feat-icon-large {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.feat-card-large h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.feat-card-large p {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.6;
}

/* ==================== DOWNLOAD CARDS ==================== */
.download-grid-large {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.download-card-large {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s ease;
}

.download-card-large:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
}

.card-large-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.card-emoji-large {
    font-size: 36px;
    flex-shrink: 0;
}

.card-large-header h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.3px;
}

.platform-badge-large {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    background: rgba(13, 217, 139, 0.12);
    color: var(--green-light);
    border-radius: 8px;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

.download-desc {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.6;
}

/* QR Code Box */
.qr-box-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.qr-bg-large {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    display: inline-flex;
}

.qr-bg-large img {
    width: 120px;
    height: 120px;
    border-radius: 4px;
}

.qr-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Button purple */
.btn-purple {
    background: var(--gradient-purple);
    color: var(--text-white);
    box-shadow: 0 6px 22px rgba(124, 127, 255, 0.3);
}

.btn-purple:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 10px 30px rgba(124, 127, 255, 0.45);
}

.btn-purple:active {
    transform: translateY(0) scale(0.96);
}

/* ==================== CHANGELOG TIMELINE ==================== */
.changelog-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.changelog-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    position: relative;
}

.changelog-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 12px;
    background: rgba(13, 217, 139, 0.12);
    color: var(--green-light);
    border-radius: 8px;
    letter-spacing: 0.3px;
}

.changelog-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 10px;
}

.changelog-list {
    margin-top: 12px;
    padding-left: 20px;
}

.changelog-list li {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.7;
    margin-bottom: 4px;
}

/* ==================== TERMS CARD ==================== */
.terms-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
}

.terms-card h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 12px;
    margin-top: 20px;
    letter-spacing: -0.3px;
}

.terms-card h3:first-child {
    margin-top: 0;
}

.terms-card p {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.7;
    margin-bottom: 12px;
}

.terms-card ul {
    padding-left: 20px;
    margin-bottom: 8px;
}

.terms-card li {
    font-size: 13.5px;
    color: var(--text-sub);
    line-height: 1.7;
    margin-bottom: 8px;
}

/* ==================== RESPONSIVE — Desktop/Tablet Web ==================== */
@media (min-width: 768px) {
    .landing-header {
        padding: 16px 40px;
    }

    .landing-logo {
        margin: 0;
    }

    .landing-container {
        max-width: 900px;
        padding: 40px 32px;
    }

    .login-page-card {
        max-width: 440px;
        margin: 0 auto;
        padding: 40px 32px;
    }

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

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

    .section-title {
        font-size: 26px;
    }
}

@media (min-width: 1200px) {
    .landing-container {
        max-width: 1100px;
    }

    .features-grid-large {
        grid-template-columns: repeat(3, 1fr);
    }

    .download-grid-large {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== HOME TAB — App Review & Features ==================== */
.app-review-container {
    display: flex;
    align-items: center;
    gap: 48px;
    width: 100%;
    margin-bottom: 20px;
}

.app-review-text {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.badge-new {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    background: rgba(13, 217, 139, 0.08);
    color: var(--green-light);
    border: 1px solid rgba(13, 217, 139, 0.2);
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.app-review-text h2 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.35;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-sub) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.app-review-text p {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
}

.review-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.review-bullets li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.bullet-icon {
    font-size: 20px;
    margin-top: 2px;
}

.review-bullets li strong {
    font-size: 14.5px;
    color: var(--text-white);
}

.review-bullets li p {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 2px;
}

.app-review-image {
    flex: 0.8;
    display: flex;
    justify-content: center;
    position: relative;
}

.review-mockup {
    width: 100%;
    max-width: 340px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(13, 217, 139, 0.08);
    transition: var(--transition);
}

.review-mockup:hover {
    transform: scale(1.03) rotate(0.5deg);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.7),
        0 0 50px rgba(13, 217, 139, 0.15);
}

/* ==================== TIMELINE — Lively Release Info ==================== */
#ltab-release .changelog-timeline {
    position: relative;
    padding-left: 36px;
    border-left: 2px dashed rgba(13, 217, 139, 0.25);
    margin-left: 10px;
    margin-top: 32px;
    gap: 36px;
}

#ltab-release .changelog-item {
    background: linear-gradient(145deg, rgba(25, 26, 45, 0.45) 0%, rgba(14, 15, 28, 0.35) 100%);
    border-radius: 22px;
    padding: 28px;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

#ltab-release .changelog-item::before {
    content: '🚀';
    position: absolute;
    left: -50px;
    top: 28px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020205;
    border: 2px solid var(--green);
    border-radius: 50%;
    font-size: 11px;
    box-shadow: 0 0 10px var(--green-glow);
    z-index: 2;
}

#ltab-release .changelog-item:nth-child(even)::before {
    content: '🔧';
    border-color: var(--purple-light);
    box-shadow: 0 0 10px var(--purple-glow);
}

#ltab-release .changelog-item:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 217, 139, 0.35);
    box-shadow: 
        0 20px 48px rgba(0, 0, 0, 0.45),
        0 0 20px rgba(13, 217, 139, 0.06);
}

/* ==================== LOGIN SPLIT SCREEN ==================== */
.login-tab-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 64px;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto;
}

.login-sidebar-info {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--text);
    text-align: left;
}

.login-sidebar-info h2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-sub) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-sidebar-info p {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
}

.sidebar-stats {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.stat-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--green-light);
}

.stat-lbl {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.login-main-card {
    flex: 0.8;
    width: 100%;
    max-width: 420px;
}



/* Responsive adjustment for Mobile/Tablet */
@media (max-width: 900px) {
    .app-review-container {
        flex-direction: column-reverse;
        gap: 32px;
        text-align: center;
    }
    
    .app-review-text {
        text-align: center;
        align-items: center;
    }
    
    .badge-new {
        align-self: center;
    }
    
    .review-mockup {
        max-width: 280px;
    }

    .login-tab-container {
        flex-direction: column;
        gap: 30px;
        margin: 10px auto;
    }

    .login-sidebar-info {
        display: none; /* Hide sidebar info to keep login card clean on mobile screen */
    }
    
    .login-main-card {
        flex: 1;
        width: 100%;
    }
    
    #ltab-release .changelog-timeline {
        padding-left: 28px;
        margin-left: 5px;
    }
    
    #ltab-release .changelog-item::before {
        left: -40px;
    }
}

/* Safari Input and Form Alignment Fixes */
.mobile-form input,
.mobile-form select,
.mobile-form textarea,
#form-ot input,
#form-ot textarea,
#form-edit-ot input,
#form-edit-ot textarea {
    -webkit-appearance: none;
    appearance: none;
    line-height: normal; /* Fix vertical alignment on Safari */
}

/* Ensure consistent height for all primary inputs */
.mobile-form input:not([type="checkbox"]):not([type="radio"]),
.mobile-form select,
#form-ot input[type="date"],
#form-ot input[type="month"],
#form-ot input[type="number"],
#form-edit-ot input[type="date"],
#form-edit-ot input[type="month"],
#form-edit-ot input[type="number"] {
    height: 54px;
    box-sizing: border-box;
}

/* Specific styling for month filter input on History tab */
.input-sm {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    color: var(--text-white);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    font-family: inherit;
    height: 36px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.input-sm:focus {
    border-color: var(--green-light);
    background: rgba(255, 255, 255, 0.07);
}

#screen-login {
    background: transparent !important;
}

/* ==================== LANDING PAGE PREMIUM DECORATIONS ==================== */
body.landing-page {
    overflow-x: hidden;
}

body.landing-page #screen-login {
    background: transparent !important;
}

.landing-bg-decorations {
    position: fixed;
    inset: 0;
    z-index: -2; /* Behind everything except body background */
    pointer-events: none;
    overflow: hidden;
}

.tech-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    opacity: 0.8;
}

.floating-bg-mockup {
    position: absolute;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: rgba(5, 5, 12, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0.18; /* Soft background blend */
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: transform, opacity;
}

/* Mobile phone mockup on the left */
.mockup-left {
    width: 250px;
    height: 512px;
    left: -60px;
    top: 22%;
    transform: rotate(15deg);
    animation: driftLeft 24s ease-in-out infinite alternate;
    background-image: url('resources/ot_manager_app_review.png');
    background-size: cover;
    background-position: center;
}

/* Desktop dashboard mockup on the right */
.mockup-right {
    width: 580px;
    height: 340px;
    right: -140px;
    bottom: 12%;
    transform: rotate(-10deg);
    animation: driftRight 30s ease-in-out infinite alternate;
    background-image: url('resources/ot_manager_desktop_mockup.png');
    background-size: cover;
    background-position: center;
}

/* Animations for floating assets */
@keyframes driftLeft {
    0% {
        transform: rotate(15deg) translate(0, 0);
    }
    100% {
        transform: rotate(18deg) translate(15px, 30px);
    }
}

@keyframes driftRight {
    0% {
        transform: rotate(-10deg) translate(0, 0);
    }
    100% {
        transform: rotate(-7deg) translate(-25px, -20px);
    }
}

/* Hide background mockups on small screens to prevent visual clutter */
@media (max-width: 768px) {
    .floating-bg-mockup {
        display: none;
    }
}

