/* =============================================
   RAMAZON TRACKER — Premium Design System v2
   Remix Icons + Glassmorphism + Gender Themes
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

/* === CSS Variables === */
:root {
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-arabic: 'Amiri', serif;
    --gold: #d4a843;
    --gold-light: #f0d78c;
    --gold-dark: #b08a2e;
    --white: #ffffff;
    --white-5: rgba(255, 255, 255, 0.05);
    --white-8: rgba(255, 255, 255, 0.08);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-15: rgba(255, 255, 255, 0.15);
    --white-20: rgba(255, 255, 255, 0.2);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* === MALE THEME — Deep Night Blue === */
body.theme-male {
    --bg-primary: #070b1e;
    --bg-secondary: #0d1233;
    --bg-card: rgba(13, 18, 51, 0.6);
    --bg-card-hover: rgba(20, 28, 70, 0.75);
    --bg-glass: rgba(13, 18, 51, 0.4);
    --accent: #5b8cff;
    --accent-light: #8cb4ff;
    --accent-bg: rgba(91, 140, 255, 0.1);
    --accent-glow: rgba(91, 140, 255, 0.3);
    --gradient-start: #070b1e;
    --gradient-mid: #0d1540;
    --gradient-end: #151b5e;
    --sidebar-bg: rgba(7, 11, 30, 0.97);
    --border-color: rgba(91, 140, 255, 0.15);
    --border-hover: rgba(91, 140, 255, 0.35);
    --text-primary: #f0f4ff;
    --text-secondary: rgba(240, 244, 255, 0.65);
    --text-muted: rgba(240, 244, 255, 0.35);
    --input-bg: rgba(91, 140, 255, 0.06);
    --input-border: rgba(91, 140, 255, 0.2);
    --nav-active: rgba(91, 140, 255, 0.15);
    --topbar-bg: rgba(7, 11, 30, 0.92);
    --bottomnav-bg: rgba(7, 11, 30, 0.95);
}

/* === FEMALE THEME — Rose Night === */
body.theme-female {
    --bg-primary: #140a18;
    --bg-secondary: #231030;
    --bg-card: rgba(35, 16, 48, 0.6);
    --bg-card-hover: rgba(50, 22, 65, 0.75);
    --bg-glass: rgba(35, 16, 48, 0.4);
    --accent: #e07aab;
    --accent-light: #f4a5c8;
    --accent-bg: rgba(224, 122, 171, 0.1);
    --accent-glow: rgba(224, 122, 171, 0.3);
    --gradient-start: #140a18;
    --gradient-mid: #2a1240;
    --gradient-end: #3d1a52;
    --sidebar-bg: rgba(20, 10, 24, 0.97);
    --border-color: rgba(224, 122, 171, 0.15);
    --border-hover: rgba(224, 122, 171, 0.35);
    --text-primary: #fff0f6;
    --text-secondary: rgba(255, 240, 246, 0.65);
    --text-muted: rgba(255, 240, 246, 0.35);
    --input-bg: rgba(224, 122, 171, 0.06);
    --input-border: rgba(224, 122, 171, 0.2);
    --nav-active: rgba(224, 122, 171, 0.15);
    --topbar-bg: rgba(20, 10, 24, 0.92);
    --bottomnav-bg: rgba(20, 10, 24, 0.95);
}

/* === GUEST THEME === */
body.theme-guest {
    --bg-primary: #070b1e;
    --bg-secondary: #0d1233;
    --bg-card: rgba(13, 18, 51, 0.6);
    --bg-card-hover: rgba(20, 28, 70, 0.75);
    --bg-glass: rgba(13, 18, 51, 0.4);
    --accent: #d4a843;
    --accent-light: #f0d78c;
    --accent-bg: rgba(212, 168, 67, 0.1);
    --accent-glow: rgba(212, 168, 67, 0.3);
    --gradient-start: #070b1e;
    --gradient-mid: #0d1540;
    --gradient-end: #151b5e;
    --border-color: rgba(212, 168, 67, 0.15);
    --border-hover: rgba(212, 168, 67, 0.35);
    --text-primary: #f0f4ff;
    --text-secondary: rgba(240, 244, 255, 0.65);
    --text-muted: rgba(240, 244, 255, 0.35);
    --input-bg: rgba(212, 168, 67, 0.06);
    --input-border: rgba(212, 168, 67, 0.2);
    --topbar-bg: rgba(7, 11, 30, 0.92);
    --bottomnav-bg: rgba(7, 11, 30, 0.95);
    --sidebar-bg: rgba(7, 11, 30, 0.97);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, var(--gradient-mid) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--gradient-end) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, var(--gradient-mid) 0%, transparent 40%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

/* === Stars Background === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 25% 45%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1.5px 1.5px at 50% 15%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 65% 60%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 80% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 90% 70%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 15% 75%, rgba(255, 255, 255, 0.18), transparent),
        radial-gradient(1.5px 1.5px at 40% 85%, rgba(255, 255, 255, 0.22), transparent),
        radial-gradient(1px 1px at 70% 90%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 95% 50%, rgba(212, 168, 67, 0.2), transparent);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 0;
    animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.6;
    }
}

@keyframes moonGlow {
    0% {
        filter: drop-shadow(0 0 8px var(--gold)) brightness(1);
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 20px var(--gold)) brightness(1.15);
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* === Layout ===  */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* === Desktop Sidebar === */
.sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--sidebar-bg);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand .brand-icon {
    font-size: 2.2rem;
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
    animation: moonGlow 3s ease-in-out infinite alternate;
}

.sidebar-brand h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.3px;
}

.sidebar-brand .arabic {
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Sidebar Navigation */
.sidebar-nav {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.sidebar-nav a:hover {
    color: var(--text-primary);
    background: var(--white-8);
}

.sidebar-nav a.active {
    color: var(--accent-light);
    background: var(--nav-active);
    font-weight: 600;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav a i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar User */
.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0 8px;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.sidebar-user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-logout {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--danger);
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    font-family: var(--font-main);
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
    animation: fadeInUp 0.4s ease;
}

/* === Mobile Top Bar === */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: var(--topbar-bg);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 52px;
}

.mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-topbar-brand i {
    font-size: 1.2rem;
    color: var(--gold);
    animation: moonGlow 3s ease-in-out infinite alternate;
}

.mobile-topbar-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gold);
    flex: 1;
}

.mobile-topbar-user {
    flex-shrink: 0;
}

/* === Bottom Navigation Bar === */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bottomnav-bg);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-color);
    height: 60px;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    align-items: center;
    justify-content: space-around;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-main);
    transition: var(--transition-fast);
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex: 1;
    max-width: 80px;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    line-height: 1;
    transition: var(--transition-fast);
}

.bottom-nav-item .bottom-nav-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: var(--transition-fast);
}

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

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2.5px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
    box-shadow: var(--shadow-glow) var(--accent-glow);
}

.bottom-nav-item.active i {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

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

/* === Mobile Profile Popup === */
.mobile-logout-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px 80px;
}

.mobile-logout-menu.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.mobile-logout-card {
    width: 100%;
    max-width: 360px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Page Header === */
.page-header {
    margin-bottom: 28px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.page-header h2 i {
    color: var(--gold);
    font-size: 1.3rem;
}

.page-header p {
    color: var(--text-secondary);
    margin-top: 4px;
    font-size: 0.9rem;
}

/* === Cards === */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--white-15), transparent);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card:hover::before {
    opacity: 1;
}

/* === Stat Cards Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    text-align: center;
    padding: 20px 16px;
    position: relative;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
}

.stat-card .stat-icon i {
    font-size: 1.2rem;
    color: var(--accent-light);
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* === Streak Badge === */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.05));
    border: 1px solid rgba(212, 168, 67, 0.25);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--gold);
    font-size: 0.85rem;
}

.streak-badge i {
    color: #ff6b35;
    animation: fireAnim 0.6s ease-in-out infinite alternate;
}

@keyframes fireAnim {
    0% {
        transform: scale(1) rotate(-5deg);
    }

    100% {
        transform: scale(1.2) rotate(5deg);
    }
}

/* === Checklist === */
.checklist {
    list-style: none;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--white-5);
    transition: var(--transition-fast);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item:hover {
    background: var(--white-5);
    border-radius: var(--radius-sm);
}

.checklist-item .habit-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.checklist-item .habit-icon i {
    font-size: 1rem;
    color: var(--accent-light);
}

.checklist-item .habit-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.checklist-item .habit-input {
    flex-shrink: 0;
}

/* Custom Checkbox */
.custom-check {
    position: relative;
    width: 24px;
    height: 24px;
}

.custom-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.custom-check .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 7px;
    background: var(--input-bg);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-check input:checked+.checkmark {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.custom-check input:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'remixicon';
    color: white;
    font-size: 13px;
    font-weight: 400;
}

.custom-check input:hover+.checkmark {
    border-color: var(--accent-light);
}

/* Number Input */
.number-input {
    width: 72px;
    padding: 7px 10px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-main);
    text-align: center;
    transition: var(--transition);
    font-weight: 600;
}

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

/* === Progress Bar === */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--white-8);
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    letter-spacing: -0.1px;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
    filter: brightness(1.1);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0e27;
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
    font-weight: 700;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 168, 67, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-bg);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
}

.btn-danger {
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* === Form Elements === */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
    background: var(--white-5);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    width: 100%;
    padding: 11px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-main);
    transition: var(--transition);
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23888' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-error {
    color: var(--danger);
    font-size: 0.78rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === Gender Select === */
.gender-select {
    display: flex;
    gap: 14px;
}

.gender-option {
    flex: 1;
    position: relative;
}

.gender-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gender-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.gender-option label:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.gender-option input:checked+label {
    border-color: var(--gold);
    background: rgba(212, 168, 67, 0.08);
    box-shadow: 0 0 24px rgba(212, 168, 67, 0.15);
}

.gender-option .gender-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
}

.gender-option .gender-icon i {
    color: var(--accent-light);
}

.gender-option .gender-text {
    font-weight: 600;
    font-size: 0.92rem;
}

/* === Auth Pages === */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 36px;
    animation: fadeInUp 0.4s ease;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    opacity: 0.3;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header .auth-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.05));
    border: 1px solid rgba(212, 168, 67, 0.2);
    animation: moonGlow 3s ease-in-out infinite alternate;
}

.auth-header .auth-icon i {
    font-size: 1.6rem;
    color: var(--gold);
}

.auth-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gold);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--gold);
    font-weight: 600;
}

/* === Alert === */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
}

.alert i {
    font-size: 1rem;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: var(--success);
}

.alert-error {
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--danger);
}

/* === Date Navigation === */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.date-nav a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-8);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.date-nav a:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--border-color);
}

.date-nav .current-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    min-width: 150px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.today-badge {
    font-size: 0.65rem;
    background: var(--success-bg);
    color: var(--success);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* === Goals === */
.goal-card {
    margin-bottom: 14px;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.goal-title {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.goal-title i {
    color: var(--accent-light);
    font-size: 1rem;
}

.goal-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 2px;
}

/* === Weekly Chart === */
.chart-bar-group {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 130px;
    padding: 0 2px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-bar-track {
    flex: 1;
    width: 100%;
    max-width: 32px;
    background: var(--white-5);
    border-radius: 6px 6px 0 0;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.chart-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--gold), var(--accent));
    border-radius: 6px 6px 0 0;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 3px;
    position: relative;
}

.chart-bar-fill::after {
    content: attr(data-percent) '%';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

.chart-bar-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-align: center;
    font-weight: 500;
}

/* === Tab Switcher === */
.tabs {
    display: inline-flex;
    gap: 2px;
    background: var(--white-5);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.tab-link {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-link i {
    font-size: 0.95rem;
}

.tab-link:hover {
    color: var(--text-primary);
}

.tab-link.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* === Report Stats === */
.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.missed-list {
    list-style: none;
}

.missed-list li {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--white-5);
}

.missed-list li i {
    color: var(--danger);
    font-size: 0.85rem;
}

/* === Top Habits === */
.top-habit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--white-5);
}

.top-habit:last-child {
    border-bottom: none;
}

.top-habit .rank {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.top-habit .rank.gold {
    background: rgba(212, 168, 67, 0.15);
    color: var(--gold);
    border: 1px solid rgba(212, 168, 67, 0.2);
}

.top-habit .habit-info {
    flex: 1;
    font-size: 0.9rem;
}

.top-habit .habit-count {
    font-weight: 700;
    color: var(--gold);
    font-size: 0.88rem;
}

/* === Welcome Page === */
.welcome-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.2), rgba(212, 168, 67, 0.05));
    border: 2px solid rgba(212, 168, 67, 0.25);
    animation: moonGlow 3s ease-in-out infinite alternate;
}

.welcome-icon i {
    font-size: 2.2rem;
    color: var(--gold);
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.welcome-arabic {
    font-family: var(--font-arabic);
    font-size: 1.3rem;
    color: var(--gold-light);
    opacity: 0.7;
    margin-bottom: 20px;
}

.welcome-desc {
    max-width: 480px;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 36px;
    line-height: 1.7;
}

.welcome-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    max-width: 640px;
    margin-top: 50px;
}

.welcome-feature {
    padding: 20px 14px;
    text-align: center;
}

.welcome-feature .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
}

.welcome-feature .feature-icon i {
    font-size: 1.15rem;
    color: var(--accent-light);
}

.welcome-feature h3 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.welcome-feature p {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* === Grid Helpers === */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--gold);
    font-size: 1rem;
}

.mt-24 {
    margin-top: 24px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--gold);
}

.text-success {
    color: var(--success);
}

.text-muted {
    color: var(--text-muted);
}

/* === Add Form === */
.add-form-card {
    border: 1px dashed var(--border-color);
    background: transparent;
}

.add-form-card:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.inline-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.inline-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 140px;
}

/* === Sticky Save Button === */
.sticky-save {
    position: sticky;
    bottom: 16px;
    z-index: 30;
    padding: 0;
}

@media (max-width: 768px) {
    .sticky-save {
        position: fixed;
        bottom: 68px;
        left: 0;
        right: 0;
        z-index: 90;
        padding: 8px 14px;
        background: linear-gradient(180deg, transparent, var(--bg-primary) 30%);
        padding-top: 24px;
    }
}

/* === Ramadan Badge === */
.ramadan-badge {
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.05));
    border: 1px solid rgba(212, 168, 67, 0.25);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* === Quick Navigation === */
.quick-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 4px 4px 4px;
}

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

.quick-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.quick-nav-btn i {
    font-size: 0.9rem;
}

.quick-nav-btn:hover,
.quick-nav-btn:active {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent-light);
}

.quick-nav-btn.qn-active {
    background: linear-gradient(135deg, var(--gold), #e6a817);
    border-color: var(--gold);
    color: #000;
    font-weight: 600;
}

/* === Saharlik / Iftorlik Grid === */
.suhoor-iftar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.si-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.si-suhoor {
    border-color: rgba(91, 140, 255, 0.2);
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.08), rgba(91, 140, 255, 0.02));
}

.si-iftar {
    border-color: rgba(212, 168, 67, 0.2);
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.08), rgba(212, 168, 67, 0.02));
}

.si-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.si-suhoor .si-icon {
    color: #7da1ff;
}

.si-iftar .si-icon {
    color: var(--gold);
}

.si-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.si-time {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 4px 0;
    font-variant-numeric: tabular-nums;
}

.si-suhoor .si-time {
    color: #7da1ff;
}

.si-iftar .si-time {
    color: var(--gold);
}

.si-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* === Dua Cards === */
.dua-card {
    padding: 14px !important;
}

.dua-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.dua-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.dua-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dua-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dua-body {
    background: var(--white-5);
    border-radius: 10px;
    padding: 14px;
}

.dua-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.15rem;
    line-height: 2.2;
    color: var(--gold-light);
    text-align: right;
    direction: rtl;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--white-5);
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.dua-translit {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    font-style: italic;
}

.dua-meaning {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* === Tree Card === */
.tree-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}

.tree-scene {
    position: relative;
    height: 140px;
    border-radius: 12px;
    background: linear-gradient(180deg, #0a1628 0%, #132040 40%, #1a2a4f 70%, #1e3355 100%);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.theme-female .tree-scene {
    background: linear-gradient(180deg, #1a0f20 0%, #2a1830 40%, #351e3d 70%, #3d2245 100%);
}

/* Stars */
.tree-stars span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.2;
        transform: scale(0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Ground */
.tree-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 22px;
    background: linear-gradient(180deg, #2d4a1a, #1e3312);
    border-radius: 50% 50% 0 0;
}

.tree-ground::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(180deg, rgba(74, 124, 89, 0.4), transparent);
    border-radius: 50%;
}

/* Tree Wrapper */
.tree-wrapper {
    position: relative;
    z-index: 2;
    margin-bottom: 14px;
}

/* Stage 0: Seed */
.tree-seed {
    position: relative;
    width: 22px;
    height: 18px;
    margin: 0 auto;
}

.seed-body {
    width: 22px;
    height: 18px;
    background: radial-gradient(ellipse, #c9a03c, #8b6914);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    box-shadow: 0 0 12px rgba(201, 160, 60, 0.3);
    animation: seedPulse 2s ease-in-out infinite;
}

.seed-shine {
    position: absolute;
    top: 3px;
    left: 5px;
    width: 6px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

@keyframes seedPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 0 18px rgba(201, 160, 60, 0.5);
    }
}

/* Stage 1: Sprout */
.tree-sprout {
    position: relative;
    width: 40px;
    height: 50px;
    margin: 0 auto;
}

.sprout-stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 28px;
    background: linear-gradient(180deg, #5cb868, #3d7a4a);
    border-radius: 2px;
    animation: sproutGrow 3s ease-in-out infinite alternate;
}

.sprout-leaf {
    position: absolute;
    width: 16px;
    height: 10px;
    background: #4a9c5a;
    border-radius: 0 50% 50% 0;
    top: 8px;
}

.sprout-leaf-l {
    left: 2px;
    transform: rotate(-35deg);
    background: linear-gradient(135deg, #5cb868, #4a9c5a);
}

.sprout-leaf-r {
    right: 2px;
    border-radius: 50% 0 0 50%;
    transform: rotate(35deg);
    background: linear-gradient(225deg, #5cb868, #4a9c5a);
}

@keyframes sproutGrow {
    0% {
        transform: translateX(-50%) scaleY(0.95);
    }

    100% {
        transform: translateX(-50%) scaleY(1.05);
    }
}

/* Stage 2: Young sapling */
.tree-young {
    position: relative;
    width: 60px;
    height: 80px;
    margin: 0 auto;
}

.young-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 35px;
    background: linear-gradient(180deg, #6B4226, #5a3a1a);
    border-radius: 3px;
}

.young-crown {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: radial-gradient(ellipse, #4a9c5a, #3d7a4a);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(74, 156, 90, 0.3);
}

.young-crown-light {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: radial-gradient(ellipse, rgba(92, 184, 104, 0.5), transparent);
    border-radius: 50%;
}

/* Stage 3: Medium tree */
.tree-medium {
    position: relative;
    width: 80px;
    height: 110px;
    margin: 0 auto;
}

.med-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 45px;
    background: linear-gradient(180deg, #6B4226, #4a2e16);
    border-radius: 4px;
}

.med-branch {
    position: absolute;
    width: 18px;
    height: 4px;
    background: #5a3a1a;
    border-radius: 2px;
}

.med-branch-l {
    bottom: 35px;
    left: 12px;
    transform: rotate(-30deg);
}

.med-branch-r {
    bottom: 28px;
    right: 12px;
    transform: rotate(30deg);
}

.med-crown {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 55px;
    background: radial-gradient(ellipse, #3d8a4f, #2d6e3f);
    border-radius: 50%;
    box-shadow: 0 6px 24px rgba(61, 138, 79, 0.3);
}

.med-crown-light {
    position: absolute;
    top: 12px;
    left: 22px;
    width: 22px;
    height: 22px;
    background: radial-gradient(ellipse, rgba(74, 170, 90, 0.5), transparent);
    border-radius: 50%;
}

.med-crown-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 30px;
    background: radial-gradient(ellipse, rgba(85, 168, 101, 0.6), transparent);
    border-radius: 50%;
}

/* Stage 4: Big tree */
.tree-big {
    position: relative;
    width: 100px;
    height: 130px;
    margin: 0 auto;
}

.big-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 52px;
    background: linear-gradient(180deg, #5a3a1a, #3d2410);
    border-radius: 5px;
}

.big-branch {
    position: absolute;
    width: 22px;
    height: 5px;
    background: #4a2e16;
    border-radius: 3px;
}

.big-branch-l {
    bottom: 44px;
    left: 16px;
    transform: rotate(-25deg);
}

.big-branch-r {
    bottom: 36px;
    right: 16px;
    transform: rotate(25deg);
}

.big-crown {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 78px;
    height: 70px;
    background: radial-gradient(ellipse, #2d6e3f, #1e5530);
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(45, 110, 63, 0.4);
}

.big-crown-2 {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 40px;
    height: 38px;
    background: radial-gradient(ellipse, rgba(61, 138, 79, 0.7), transparent);
    border-radius: 50%;
}

.big-crown-3 {
    position: absolute;
    top: 12px;
    right: 8px;
    width: 35px;
    height: 32px;
    background: radial-gradient(ellipse, rgba(74, 156, 90, 0.5), transparent);
    border-radius: 50%;
}

.big-crown-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 35px;
    background: radial-gradient(ellipse, rgba(92, 184, 104, 0.4), transparent);
    border-radius: 50%;
}

/* Stage 5: Paradise tree */
.tree-paradise {
    position: relative;
    width: 110px;
    height: 140px;
    margin: 0 auto;
}

.para-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 55px;
    background: linear-gradient(180deg, #6B4226, #3d2410);
    border-radius: 6px;
}

.para-branch {
    position: absolute;
    width: 24px;
    height: 5px;
    background: #5a3a1a;
    border-radius: 3px;
}

.para-branch-l {
    bottom: 46px;
    left: 14px;
    transform: rotate(-25deg);
}

.para-branch-r {
    bottom: 38px;
    right: 14px;
    transform: rotate(25deg);
}

.para-crown {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 88px;
    height: 78px;
    background: radial-gradient(ellipse, #2d8a4f, #1a6035);
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(212, 168, 67, 0.2), 0 8px 30px rgba(45, 138, 79, 0.4);
}

.para-crown-2 {
    position: absolute;
    top: 10px;
    left: 6px;
    width: 45px;
    height: 42px;
    background: radial-gradient(ellipse, rgba(74, 170, 90, 0.6), transparent);
    border-radius: 50%;
}

.para-crown-3 {
    position: absolute;
    top: 14px;
    right: 6px;
    width: 40px;
    height: 36px;
    background: radial-gradient(ellipse, rgba(92, 184, 104, 0.5), transparent);
    border-radius: 50%;
}

.para-crown-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 38px;
    background: radial-gradient(ellipse, rgba(110, 200, 120, 0.5), transparent);
    border-radius: 50%;
}

.para-glow {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(212, 168, 67, 0.15), transparent 70%);
    border-radius: 50%;
    animation: paraGlow 3s ease-in-out infinite alternate;
}

@keyframes paraGlow {
    0% {
        opacity: 0.5;
        transform: translateX(-50%) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }
}

.para-flower {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #f7c948, #e6a817);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(247, 201, 72, 0.6);
    animation: flowerPulse 2s ease-in-out infinite alternate;
    z-index: 3;
}

.para-flower:nth-child(odd) {
    background: radial-gradient(circle, #ff8fab, #e05780);
    box-shadow: 0 0 8px rgba(255, 143, 171, 0.5);
}

@keyframes flowerPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.para-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    z-index: 4;
    animation: particleRise 3s ease-in-out infinite;
}

@keyframes particleRise {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-35px) scale(0.3);
    }
}

/* Tree Info */
.tree-info {
    margin-top: 12px;
    text-align: center;
}

.tree-stage-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tree-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--white-5);
    border-radius: 3px;
    overflow: hidden;
}

.tree-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9c5a, var(--gold));
    border-radius: 3px;
    transition: width 0.8s ease;
}

.tree-percent {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    min-width: 32px;
}

.tree-detail {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.tree-motivation {
    margin-top: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.08), rgba(212, 168, 67, 0.03));
    border-radius: 8px;
    border: 1px solid rgba(212, 168, 67, 0.12);
}

.tree-motivation p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 500;
    line-height: 1.4;
}

/* === Responsive === */

@media (min-width: 769px) {

    .mobile-topbar,
    .bottom-nav,
    .mobile-logout-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-topbar {
        display: flex;
    }

    .main-content {
        padding: 70px 16px 100px 16px;
        overflow-x: hidden;
    }

    .quick-nav {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .bottom-nav {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 64px 14px 72px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px 10px;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }

    .stat-card .stat-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }

    .stat-card .stat-icon i {
        font-size: 1rem;
    }

    .stat-card .stat-label {
        font-size: 0.68rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .inline-form {
        flex-direction: column;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

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

    .chart-bar-group {
        height: 100px;
    }

    .tree-scene {
        height: 130px;
    }

    .si-time {
        font-size: 1.35rem;
    }

    .si-card {
        padding: 12px 8px;
    }

    .dua-card {
        padding: 12px !important;
    }

    .dua-arabic {
        font-size: 1.05rem;
        line-height: 2;
    }

    .section-title {
        margin-top: 16px !important;
        margin-bottom: 8px !important;
    }

    .mb-24 {
        margin-bottom: 16px !important;
    }

    .auth-card {
        padding: 24px;
    }

    .page-header h2 {
        font-size: 1.2rem;
    }

    .page-header p {
        font-size: 0.82rem;
    }

    .card {
        padding: 16px;
        border-radius: 14px;
    }

    .checklist-item {
        padding: 12px;
        gap: 10px;
    }

    .checklist-item .habit-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .checklist-item .habit-icon i {
        font-size: 0.85rem;
    }

    .checklist-item .habit-name {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 0.95rem;
    }

    .streak-badge {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .goal-header {
        flex-direction: column;
        gap: 8px;
    }

    .chart-bar-fill::after {
        font-size: 0.55rem;
        top: -16px;
    }

    .date-nav {
        gap: 10px;
    }

    .date-nav .current-date {
        font-size: 0.9rem;
    }
}

@media (max-width: 420px) {
    .stats-grid {
        gap: 8px;
    }

    .stat-card .stat-value {
        font-size: 1.2rem;
    }

    .welcome-features {
        grid-template-columns: 1fr;
    }

    .gender-select {
        flex-direction: column;
    }

    .bottom-nav-item {
        max-width: 64px;
    }

    .bottom-nav-item .bottom-nav-label {
        font-size: 0.55rem;
    }
}