/* ============================================================
   Font Face
============================================================ */

@font-face {
    font-family: "vazir";
    src: url(../assets/font/Vazir.ttf);
    font-display: swap;
}

/* ============================================================
   Root Variables
============================================================ */

:root {
    color-scheme: light;

    /* Brand Colors */
    --color-primary: #216e89;
    --color-primary-light: #4f9ea5;
    --color-primary-dark: #184f61;

    --color-accent: #7fb86a;
    --color-accent-light: #a4d18f;

    --color-background: #f8f7f2;
    --color-surface: #ffffff;
    --color-surface-elevated: #ffffff;
    --color-surface-hover: #f3f6f5;

    --color-text: #18343d;
    --color-text-secondary: #64777c;
    --color-text-muted: #93a2a5;

    --color-border: #dde7e4;
    --color-border-strong: #c7d4d0;

    /* Typography */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 22px;
    --font-size-2xl: 28px;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.6;

    /* Spacing */
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;

    /* Layout */
    --header-height: 72px;
    --page-padding: 32px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Shadow */
    --shadow-xs: 0 1px 3px rgba(24, 52, 61, 0.05);
    --shadow-sm: 0 2px 10px rgba(24, 52, 61, 0.06), 0 1px 2px rgba(24, 52, 61, 0.04);
    --shadow-md: 0 8px 24px rgba(24, 52, 61, 0.08), 0 2px 6px rgba(24, 52, 61, 0.05);
    --shadow-lg: 0 16px 40px rgba(24, 52, 61, 0.12), 0 4px 10px rgba(24, 52, 61, 0.06);

    /* Motion */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 0.15s;
    --duration-base: 0.25s;
}

/* ============================================================
   Dark Theme
============================================================ */

:root[data-theme="dark"] {
    color-scheme: dark;

    --color-primary: #5fb3cc;
    --color-primary-light: #7cc4d8;
    --color-primary-dark: #3d8ea6;

    --color-accent: #93cf7e;
    --color-accent-light: #b3dea3;

    --color-background: #0f1a1d;
    --color-surface: #16262b;
    --color-surface-elevated: #1c2f35;
    --color-surface-hover: #203339;

    --color-text: #e8f0f1;
    --color-text-secondary: #9bb0b4;
    --color-text-muted: #6d8388;

    --color-border: #24373d;
    --color-border-strong: #32484e;

    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.28);
}

/* ============================================================
   Reset & Base Styles
============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "vazir", sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    min-height: 100vh;
    line-height: var(--line-height-normal);
    transition: background-color var(--duration-base) var(--ease-standard),
                color var(--duration-base) var(--ease-standard);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ============================================================
   Selection
============================================================ */

::selection {
    background: var(--color-primary-light);
    color: #ffffff;
}

/* ============================================================
   Scrollbar
============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* ============================================================
   Focus
============================================================ */

:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
}

/* ============================================================
   Page Container (for routes that need full height)
============================================================ */

#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page-content {
    flex: 1;
    min-height: 0;
    width: 100%;
}

.auth-page-content {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   Page Not Found
============================================================ */

.page-not-found {
    width: 100%;
    height: 100%;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    text-align: center;
}

.page-not-found h1 {
    font-size: var(--font-size-2xl);
    color: var(--color-text);
}

.page-not-found p {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
}

.page-not-found a {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
    border: 1px solid var(--color-primary);
    padding: 10px 24px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.page-not-found a:hover {
    background: var(--color-primary);
    color: #ffffff;
}