﻿:root {
    --primary: #00A884;
    --primary-dark: #019373;
    --bg: #F2F4F5;
    --card: #fff;
    --border: #E7EBEE;
    --muted: #6B7280;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Arabic", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: #222;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
}

/* هدرها کمی ضخیم‌تر */
h1, h2, h3 {
    font-weight: 700;
}

/* متن عمومی */
.card, .pill, .row, button, input, select {
    font-weight: 400;
}

    /* اعداد ستونی هم‌عرض */
    .row div:last-child, .num {
        font-variant-numeric: tabular-nums;
    }

.bold {
    font-weight: 600;
}

/* ==== سایر استایل‌هایی که خودت داشتی ==== */
.app-header {
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

    .app-header h1 {
        flex: 1;
        text-align: center;
        font-size: 16px;
    }

    .app-header .back {
        background: none;
        border: 0;
        color: #fff;
        font-size: 20px;
        visibility: hidden;
    }

        .app-header .back.show {
            visibility: visible;
        }

.main {
    padding: 12px;
    max-width: 520px;
    margin: 0 auto;
}

.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin: 12px 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 12px;
    font-family: 'Vazirmatn';
}

    .pill input, .pill select {
        border: none;
        outline: none;
        background: transparent;
        font: inherit;
        width: 120px;
        text-align: center;
    }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    padding: 12px 14px;
    margin-bottom: 12px;
}

    .card h2 {
        margin: 0 0 6px 0;
        font-size: 15px;
    }

.row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

    .row:last-child {
        border-bottom: none;
    }

    .row .k {
        color: var(--muted);
        font-size: 13px;
    }

.link {
    color: #007bff;
    text-decoration: none;
}

    .link:active {
        opacity: .75;
    }
/* ===== App header ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #10b981;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

    /* ===== Back button (pill, glassy) ===== */
    .app-header .back {
        position: absolute;
        inset-inline-start: 12px; /* راست در RTL، چپ در LTR */
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        border-radius: 9999px;
        border: 1px solid rgba(255,255,255,.55);
        background: rgba(255,255,255,.16);
        color: #fff;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        cursor: pointer;
        transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
        
        font-family: 'Vazirmatn';
    }

        .app-header .back::before {
            content: "";
            width: 16px;
            height: 16px;
            display: inline-block;
            background: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white">\
<path d="M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>') center/16px 16px no-repeat;
            /* در حالت RTL فلش به سمت راست برگرده */
            transform: scaleX(-1);
        }

html[dir="ltr"] .app-header .back::before {
    transform: none;
}

.app-header .back:hover {
    background: rgba(255,255,255,.24);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.app-header .back:active {
    transform: translateY(0);
    box-shadow: none;
}

/* نمایش/عدم نمایش با کلاس موجود پروژه */
.app-header .back:not(.show) {
    display: none;
}
