:root {
    --brand: #1b6ec2;
    --brand-dark: #14549a;
    --brand-light: #e8f1fb;
    --surface: #ffffff;
    --bg: #f5f7fa;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e9f0;
    --radius: 0.75rem;
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    /* "Estedad FD" (Farsi Digits) is listed first on purpose: it renders every
       digit with Persian glyphs (۰-۹) without touching the C# formatting code.
       Plain "Estedad" stays as the fallback for glyphs the FD cut lacks. */
    font-family: "Estedad FD", "Estedad", Tahoma, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn, .card-title {
    font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* ---------- Navbar ---------- */
a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: keep-all;
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding-block: .6rem;
}

.navbar-brand {
    font-weight: 800;
    color: var(--brand) !important;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.navbar-brand svg {
    flex-shrink: 0;
}

.navbar .nav-link {
    color: var(--text);
    font-weight: 500;
    border-radius: .5rem;
    padding: .45rem .9rem !important;
    transition: background-color .15s ease, color .15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    background-color: var(--brand-light);
    color: var(--brand-dark);
}

.navbar .nav-link.active {
    background-color: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 700;
}

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: .65rem;
    box-shadow: var(--shadow-md);
    padding: .4rem;
}

.dropdown-item {
    border-radius: .45rem;
    padding: .5rem .9rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--brand-light);
    color: var(--brand-dark);
}

.navbar-text {
    font-size: .875rem;
    color: var(--text-muted);
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: .55rem;
    font-weight: 600;
    padding: .45rem 1.1rem;
}

.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .1rem white, 0 0 0 .25rem #258cfb;
}

/* ---------- Forms ---------- */
/* Every form label across the app is fixed at 12px. Absolute (not rem) so it
   stays 12px regardless of the responsive html font-size above. */
label,
.form-label,
.form-check-label,
.col-form-label {
    font-size: 12px;
}

.form-control, .form-select {
    border-radius: .55rem;
    border-color: var(--border);
    padding: .5rem .85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---------- Tables ---------- */
.table {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 700;
    border-bottom: none;
    white-space: nowrap;
}

/* ---------- Footer ---------- */
.footer {
    flex-shrink: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    padding-block: 1rem;
    font-size: .875rem;
    margin-top: 3rem;
}

.footer a {
    color: var(--brand);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
