/* ===== Clean Corporate + Glassmorphic Design System ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --mesh-1: #e0e7ff;
    --mesh-2: #ede9fe;
    --mesh-3: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.72);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-blue: #3b82f6;
    --accent-violet: #8b5cf6;
    --shadow-soft: 0 10px 40px -12px rgba(99, 102, 241, 0.18), 0 4px 16px -4px rgba(15, 23, 42, 0.06);
    --mobile-nav-height: 4.25rem;
    --app-header-height: 3.75rem;
    --planning-input-height: 4.25rem;
    --field-control-min-height: 3rem;
    --field-control-height: 3.25rem;
    --field-control-padding-x: 0.875rem;
    --field-control-line-height: 1.35;
}

body {
    font-family: 'Vazirmatn', 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    color: var(--text-primary);
    background-color: var(--mesh-3);
    background-image:
        radial-gradient(ellipse 80% 60% at 10% 0%, var(--mesh-1) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 10%, var(--mesh-2) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, #dbeafe 0%, transparent 45%),
        linear-gradient(165deg, #f8fafc 0%, #eef2ff 40%, #f1f5f9 100%);
    background-attachment: fixed;
}

#main-container {
    width: 100%;
    max-width: 100%;
    background: transparent;
    box-shadow: none;
}

@media (min-width: 768px) {
    #main-container {
        max-width: 720px;
    }
}

@media (min-width: 1024px) {
    #main-container {
        max-width: 1200px;
    }
}

@media (min-width: 1280px) {
    #main-container {
        max-width: 1280px;
    }
}

.app-shell {
    min-height: 100vh;
    overflow: visible;
}

.desktop-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .app-shell {
        display: flex;
        flex-direction: row-reverse;
    }

    .app-main-column {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        width: 220px;
        flex-shrink: 0;
        border-left: 1px solid var(--glass-border);
        background: rgba(255, 255, 255, 0.42);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        padding: 1.5rem 0.75rem;
        gap: 0.35rem;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        box-shadow: var(--shadow-soft);
    }

    .desktop-sidebar .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        padding: 11px 14px;
        font-size: 0.8125rem;
        font-weight: 500;
        gap: 10px;
        transform: none;
        color: #334155;
        border-radius: 9999px;
        background: transparent;
    }

    .desktop-sidebar .nav-item svg {
        width: 1.25rem;
        height: 1.25rem;
        color: #1e293b;
        stroke: #1e293b;
    }

    .desktop-sidebar .nav-item.active {
        transform: none;
        background: rgba(255, 255, 255, 0.75);
        color: var(--text-primary);
        box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    }
}

.mobile-nav-shell {
    position: fixed;
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 1.25rem), calc(100vw - 1.25rem));
    max-width: none;
    z-index: 60;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow:
        0 12px 40px -8px rgba(15, 23, 42, 0.18),
        0 4px 12px rgba(99, 102, 241, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    padding: 0.35rem 0.4rem;
    box-sizing: border-box;
}

.mobile-bottom-nav {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    min-height: var(--mobile-nav-height);
    z-index: 1;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding-bottom: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.15rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-bottom-nav::-webkit-scrollbar {
    display: none;
}

#mobile-nav .nav-item {
    flex: 1 1 0;
    min-width: clamp(3.25rem, 14vw, 5.5rem);
    max-width: none;
    padding: clamp(0.35rem, 1.2vw, 0.5rem) clamp(0.25rem, 1vw, 0.65rem);
    font-size: clamp(0.58rem, 2.2vw, 0.7rem);
}

#mobile-nav .nav-item svg {
    width: clamp(1.15rem, 4.5vw, 1.5rem);
    height: clamp(1.15rem, 4.5vw, 1.5rem);
}

