@font-face{
    font-family:"Vazirmatn";
    src:url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight:400;
    font-style:normal;
    font-display:swap;
}

@font-face{
    font-family:"Vazirmatn";
    src:url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight:700;
    font-style:normal;
    font-display:swap;
}

/* =========================================================
   ROOT
   ========================================================= */

:root{
    --primary:#8e5ca3;
    --primary-light:#b3a2d8;
    --primary-dark:#6b2e7e;
    --primary-deep:#4a1f54;

    --bg:#f7f5fa;
    --surface:#ffffff;
    --surface-2:#f1edf5;

    --text:#241c29;
    --text-muted:#756b7c;

    --border:#e2dce7;
    --nav-bg:rgba(255,255,255,.82);
    --nav-border:rgba(142,92,163,.20);

    --success:#38a169;
    --danger:#d64545;
    --warning:#d69e2e;

    --shadow:0 8px 30px rgba(74,31,84,.08);
}

:root[data-theme="light"]{
    --bg:#f7f5fa;
    --surface:#ffffff;
    --surface-2:#f1edf5;

    --text:#241c29;
    --text-muted:#756b7c;

    --border:#e2dce7;
    --nav-bg:rgba(255,255,255,.82);
    --nav-border:rgba(142,92,163,.20);
}

:root[data-theme="dark"]{
    --bg:#17131a;
    --surface:#211b24;
    --surface-2:#2a2330;

    --text:#f4eef7;
    --text-muted:#b8aebe;

    --border:#3a3040;
    --nav-bg:rgba(33,27,36,.88);
    --nav-border:rgba(179,162,216,.20);
}

@media(prefers-color-scheme:dark){
    :root:not([data-theme]){
        --bg:#17131a;
        --surface:#211b24;
        --surface-2:#2a2330;

        --text:#f4eef7;
        --text-muted:#b8aebe;

        --border:#3a3040;
        --nav-bg:rgba(33,27,36,.88);
        --nav-border:rgba(179,162,216,.20);
    }
}

/* =========================================================
   RESET
   ========================================================= */

*{
    box-sizing:border-box;
    font-family:"Vazirmatn",sans-serif;
}

html{
    margin:0;
    padding:0;
    min-height:100%;
    background:var(--bg);
    color:var(--text);
    scroll-behavior:smooth;
}

body{
    margin:0;
    padding:0;
    min-height:100%;
    background:var(--bg);
    color:var(--text);
    font-family:"Vazirmatn",sans-serif;
    transition:
        background .2s ease,
        color .2s ease;
    overflow-x:hidden;
}

html{max-width:100%;overflow-x:hidden}

button,
input,
select,
textarea{
    font:inherit;
}

button{
    cursor:pointer;
}

a{
    color:inherit;
}

/* =========================================================
   PAGE
   ========================================================= */

.page{
    width:100%;
    max-width:560px;
    min-height:100vh;

    margin:0 auto;

    padding:
        18px
        16px
        92px;

    background:transparent;
}

.page-wide{
    width:100%;
    max-width:650px;

    margin:0 auto;

    padding:
        18px
        16px
        92px;
}

.page-full{
    width:100%;
    min-height:100vh;
    padding-bottom:92px;
}

/* =========================================================
   COMMON
   ========================================================= */

.hidden{
    display:none !important;
}

.text-muted{
    color:var(--text-muted);
}

.card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow);
}

.icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:none;
}

.icon svg{
    width:100%;
    height:100%;
    display:block;
}

/* =========================================================
   THEME SWITCH
   ========================================================= */

.theme-toggle{
    width:42px;
    height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:0;

    border:1px solid var(--border);
    border-radius:50%;

    background:var(--surface);
    color:var(--text);

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.theme-toggle:hover{
    border-color:var(--primary);
    color:var(--primary);
}

.theme-toggle:active{
    transform:scale(.94);
}

.theme-toggle .icon{
    width:21px;
    height:21px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn{
    min-height:44px;

    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    padding:0 16px;

    border:1px solid transparent;
    border-radius:10px;

    font-size:14px;
    font-weight:700;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.btn:active{
    transform:scale(.97);
}

.btn-primary{
    background:var(--primary);
    color:#fff;
}

.btn-primary:hover{
    background:var(--primary-dark);
}

.btn-secondary{
    background:var(--surface-2);
    color:var(--text);
    border-color:var(--border);
}

.btn-secondary:hover{
    border-color:var(--primary);
    color:var(--primary);
}

/* =========================================================
   FLOATING BOTTOM NAVIGATION
   ========================================================= */

.bottom-nav{
    position:fixed !important;

    left:50% !important;
    right:auto !important;

    bottom:10px !important;

    width:560px !important;
    max-width:calc(100% - 20px) !important;

    height:58px !important;

    margin:0 !important;
    padding:0 8px !important;

    transform:translateX(-50%) !important;

    z-index:10000 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:space-around !important;

    background:var(--nav-bg);

    border:1px solid var(--nav-border);
    border-radius:5px;

    box-shadow:
        0 8px 30px rgba(0,0,0,.10),
        inset 0 1px 0 rgba(255,255,255,.18);

    backdrop-filter:blur(18px) saturate(140%);
    -webkit-backdrop-filter:blur(18px) saturate(140%);
}

.bottom-nav .nav-item{
    position:relative;

    flex:0 0 46px !important;

    width:46px !important;
    height:46px !important;
    min-width:46px !important;
    min-height:46px !important;

    margin:0 !important;
    padding:0 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    border:0;
    border-radius:5px;

    background:transparent;
    color:var(--text-muted);

    text-decoration:none;

    transition:
        color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.bottom-nav .nav-item:hover{
    color:var(--primary);
    background:rgba(142,92,163,.10);
}

.bottom-nav .nav-item.active{
    color:var(--primary);
    background:rgba(142,92,163,.14);
}

.bottom-nav .nav-item:active{
    transform:scale(.93);
}

.bottom-nav .nav-item:focus-visible{
    outline:2px solid var(--primary);
    outline-offset:2px;
}

.bottom-nav .nav-item .icon{
    width:23px;
    height:23px;
}

.bottom-nav .nav-item .icon svg{
    width:100%;
    height:100%;
    display:block;
}

.bottom-nav .nav-badge{
    position:absolute;

    top:2px;
    right:2px;
}

/* =========================================================
   MOBILE NAV
   ========================================================= */

@media(max-width:480px){

    .bottom-nav{
        width:calc(100% - 20px) !important;
        height:56px !important;

        padding:0 5px !important;
    }

    .bottom-nav .nav-item{
        flex:0 0 44px !important;

        width:44px !important;
        height:44px !important;
        min-width:44px !important;
        min-height:44px !important;
    }

    .bottom-nav .nav-item .icon{
        width:22px;
        height:22px;
    }
}

/* =========================================================
   SMALL SCREEN
   ========================================================= */

@media(max-width:360px){

    .page{
        padding-left:12px;
        padding-right:12px;
    }

    .bottom-nav{
        width:calc(100% - 16px) !important;
    }
}
