/* =========================================================
   Tivan Core - app.css
   مسیر:
   C:\xampp\htdocs\dashboard\public\assets\css\app.css

   نسخه بازنویسی‌شده:
   - حفظ Login Big Hero نسخه قدیمی
   - منوی Sidebar / Drilldown مثل نسخه اول: سفید، فقط حاشیه، بدون رنگ فعال
   - حذف وابستگی رنگ منوی فعال به mobile_fab_bg
   - حفظ Topbar Panels، Captcha، 2FA، Google Auth، QR، Security UI
   - حفظ فرم‌ها، جدول‌ها، کارت‌ها، Settings Router و Responsive
========================================================= */

/* =========================
   Fonts
========================= */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --primary: #6d5dfc;
    --primary-dark: #4f46e5;
    --primary-2: #4f46e5;
    --primary-3: #4338ca;
    --primary-soft: rgba(109, 93, 252, 0.14);

    --secondary: #14b8a6;

    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;

    --success: #166534;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;

    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;

    --info: #2563eb;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    --text: #111827;
    --text-2: #1f2937;
    --muted: #6b7280;
    --muted-2: #94a3b8;

    --border: #e5e7eb;
    --border-2: #dbe1ea;
    --field: #f9fafb;

    --white: #ffffff;
    --dark: #0f172a;
    --bg: #f6f8fb;

    --app-header-bg: #ffffff;
    --app-header-text: #1f2937;

    /*
       فقط برای دکمه شناور موبایل.
       منوی اصلی از این رنگ استفاده نمی‌کند.
    */
    --mobile-fab-bg: #ef394e;

    --login-theme-color: #4f46e5;

    --topbar-height: 56px;
    --sidebar-width: 248px;

    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --shadow-xs: 0 4px 14px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 35px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.14);
}

/* =========================
   Base
========================= */

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(109, 93, 252, 0.045), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.04), transparent 26%),
        var(--bg);
    direction: rtl;
    font-size: 15px;
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    line-height: 1.6;
}

img {
    max-width: 100%;
}

::selection {
    background: rgba(109, 93, 252, 0.18);
    color: #111827;
}

[hidden],
.hidden {
    display: none !important;
}

/* =========================
   Utilities
========================= */

.text-center {
    text-align: center;
}

.text-muted,
.muted {
    color: var(--muted);
}

.ltr,
.ltr-cell {
    direction: ltr;
    unicode-bidi: plaintext;
}

.content-card,
.page-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.content-card-soft {
    background:
        radial-gradient(circle at 10% 10%, rgba(109, 93, 252, 0.06), transparent 30%),
        #fff;
}

.page-header,
.page-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.page-header h1,
.section-title {
    margin: 0;
    font-size: 22px;
    color: #111827;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-header p,
.section-subtitle {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 13.5px;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================
   Alerts
========================= */

.alert {
    position: relative;
    padding: 13px 15px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.8;
}

.alert i {
    margin-left: 6px;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid var(--warning-border);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

/* =========================================================
   Flash Panel
========================================================= */

.flash-panel {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    animation: flashSlideDown 0.28s ease both;
}

.flash-panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    background: #4f46e5;
}

.flash-panel-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 17px;
}

.flash-panel-body {
    flex: 1;
    min-width: 0;
}

.flash-panel-title {
    display: block;
    margin-bottom: 2px;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

.flash-panel-text {
    color: #4b5563;
    font-size: 13.5px;
    line-height: 1.8;
}

.flash-panel-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.flash-panel-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.flash-success {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #bbf7d0;
}

.flash-success::before {
    background: #16a34a;
}

.flash-success .flash-panel-icon {
    background: #dcfce7;
    color: #15803d;
}

.flash-error,
.flash-danger {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
    border-color: #fecaca;
}

.flash-error::before,
.flash-danger::before {
    background: #dc2626;
}

.flash-error .flash-panel-icon,
.flash-danger .flash-panel-icon {
    background: #fee2e2;
    color: #dc2626;
}

.flash-warning {
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
    border-color: #fde68a;
}

.flash-warning::before {
    background: #f59e0b;
}

.flash-warning .flash-panel-icon {
    background: #fef3c7;
    color: #b45309;
}

.flash-info {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border-color: #bfdbfe;
}

.flash-info::before {
    background: #2563eb;
}

.flash-info .flash-panel-icon {
    background: #dbeafe;
    color: #2563eb;
}

@keyframes flashSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Login / Big Hero / 2FA / Captcha
========================================================= */

.login-body {
    overflow-x: hidden;
    min-height: 100vh;
}

.login-logo-wrap {
    display: none !important;
}

.login-shell {
    min-height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    background:
        radial-gradient(circle at 10% 20%, rgba(109, 93, 252, 0.08), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(20, 184, 166, 0.08), transparent 30%),
        #f5f7fb;
}

.login-shell-modern {
    min-height: 100vh;
    width: 100%;
}

.login-panel {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.login-form-wrap {
    width: 100%;
    max-width: 430px;
}

.login-brand-mobile {
    display: none;
}

.login-heading {
    margin-bottom: 28px;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.login-heading h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.35;
    color: var(--text);
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #374151;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    pointer-events: none;
}

.input-icon svg,
.password-toggle svg,
.btn-login svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.form-control {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--border);
    background: var(--field);
    border-radius: 15px;
    padding: 0 48px 0 48px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
}

select.form-control {
    padding-left: 14px;
    padding-right: 14px;
}

.form-control::placeholder {
    color: #a1a1aa;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 5px rgba(109, 93, 252, 0.12);
}

.password-toggle {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.password-toggle:hover {
    background: #eef2ff;
    color: var(--primary-dark);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 22px;
    font-size: 14px;
}

.remember-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    user-select: none;
}

.remember-box input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-dark);
}

.btn-login {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--login-theme-color), #4f46e5);
    color: white;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 18px 30px rgba(79, 70, 229, 0.26);
    transition: 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(79, 70, 229, 0.32);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
}

.visitor-ip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.visitor-ip strong {
    color: #374151;
    direction: ltr;
    unicode-bidi: plaintext;
}

/* Captcha */

.captcha-box {
    margin: 0 0 18px;
    padding: 13px;
    border-radius: 16px;
    border: 1px solid #c7d2fe;
    background:
        radial-gradient(circle at 100% 0%, rgba(109, 93, 252, 0.08), transparent 30%),
        #eef2ff;
}

.captcha-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.captcha-question strong {
    color: #3730a3;
    font-size: 14px;
}

.captcha-question span {
    color: #475569;
    font-size: 12.5px;
}

.captcha-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #c7d2fe;
    background: #fff;
    border-radius: 13px;
    padding: 0 12px;
    direction: ltr;
    text-align: center;
    font-weight: 800;
    font-size: 18px;
    outline: none;
}

.captcha-input:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.12);
}

/* 2FA */

.twofa-method-box {
    padding: 13px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
}

.twofa-method-box strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 8px;
}

.twofa-method-box span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    padding: 5px 0;
    border-top: 1px dashed #e2e8f0;
}

.twofa-method-box span:first-of-type {
    border-top: 0;
}

/* Login Hero - نسخه قدیمی */

.login-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 70px;
    color: white;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(79, 70, 229, 0.86)),
        linear-gradient(135deg, #784ba2 0%, #667eea 100%);
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 590px;
}

.brand-card {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    margin-bottom: 34px;
}

.brand-card strong,
.login-brand-mobile strong {
    display: block;
    font-size: 15px;
}

.brand-card span,
.login-brand-mobile span {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,0.72);
    font-size: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #dbeafe);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 14px 25px rgba(0,0,0,0.18);
}

.brand-mark-lg {
    width: 48px;
    height: 48px;
}

.hero-logo-box {
    width: 60px;
    height: 60px;
    min-width: 60px;
    max-width: 60px;
    max-height: 60px;
    border-radius: 18px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    overflow: hidden;
}

.hero-logo {
    width: 100%;
    height: 100%;
    max-width: 46px;
    max-height: 46px;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.hero-content p {
    margin: 0;
    max-width: 520px;
    color: rgba(255,255,255,0.78);
    font-size: 17px;
    line-height: 2;
}

.hero-features {
    margin-top: 36px;
    display: grid;
    gap: 14px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.feature-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--secondary);
    box-shadow: 0 0 0 7px rgba(20, 184, 166, 0.14);
    flex: 0 0 auto;
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.48;
}

.hero-glow-one {
    width: 320px;
    height: 320px;
    left: -90px;
    top: -90px;
    background: rgba(20, 184, 166, 0.35);
}

.hero-glow-two {
    width: 260px;
    height: 260px;
    right: 10%;
    bottom: -110px;
    background: rgba(255, 255, 255, 0.18);
}

/* =========================================================
   Layout / Header / Sidebar / Footer
========================================================= */

.layout-body {
    min-height: 100vh;
    background: #f6f8fb;
    color: #1f2937;
    padding: 0;
    margin: 0;
}

.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--topbar-height);
    z-index: 1600;
    background: var(--app-header-bg);
    color: var(--app-header-text);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    overflow: visible !important;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 1 auto;
}

.topbar-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar-title strong {
    color: var(--app-header-text);
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-title span {
    color: rgba(31, 41, 55, 0.75);
    font-size: 12px;
    margin-top: 2px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    position: relative;
    overflow: visible !important;
    flex-wrap: nowrap !important;
    min-width: 0;
}

.topbar-dropdown-wrap,
.user-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--app-header-text);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: 0.18s ease;
    font-size: 15px;
}

.topbar-icon-btn:hover,
.topbar-icon-btn[aria-expanded="true"] {
    background: #f3f4f6;
    color: var(--primary-dark);
}

.topbar-badge {
    display: none;
    position: absolute;
    top: 1px;
    left: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    z-index: 5;
}

.topbar-badge.is-visible {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.topbar-badge:not(.is-visible) {
    display: none !important;
}

.today-box {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 11px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--app-header-text);
    white-space: nowrap;
    max-width: 48vw;
}

.today-box i {
    color: var(--primary-dark);
}

#persianDateText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.today-box b,
#persianClockText {
    direction: ltr;
    unicode-bidi: plaintext;
    color: var(--app-header-text);
    font-size: 13px;
    min-width: 72px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

/* Topbar Panels */

.topbar-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    width: 390px;
    max-width: calc(100vw - 24px);
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148,163,184,.28);
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    border-radius: 20px;
    padding: 12px;
    z-index: 9999;
}

.topbar-panel[hidden] {
    display: none !important;
}

.topbar-panel.is-open {
    display: block !important;
    animation: tivanPanelIn .16s ease-out;
}

@keyframes tivanPanelIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.topbar-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 8px 12px;
    border-bottom: 1px solid rgba(148,163,184,.18);
    margin-bottom: 8px;
}

.topbar-panel-title strong {
    color: #0f172a;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.topbar-panel-title small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.8;
}

.topbar-panel-title-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.topbar-mini-link {
    border: 1px solid rgba(148,163,184,.28);
    background: rgba(248,250,252,.85);
    color: #475569;
    text-decoration: none;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    white-space: nowrap;
}

.topbar-mini-link:hover {
    background: #eef2ff;
    color: var(--primary-dark);
}

.topbar-panel-list {
    display: grid;
    gap: 8px;
    max-height: min(65vh, 520px);
    overflow: auto;
    padding-left: 2px;
}

.topbar-panel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(248,250,252,.92);
    color: #334155;
    text-decoration: none;
    border: 1px solid rgba(226,232,240,.75);
    transition: all .16s ease;
}

.topbar-panel-item:hover {
    background: #eef2ff;
    color: #3730a3;
    transform: translateY(-1px);
}

.topbar-panel-item > span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.8;
    min-width: 0;
}

.topbar-panel-item small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.topbar-panel-item b {
    min-width: 30px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 12px;
    padding: 0 8px;
    flex-shrink: 0;
}

.topbar-panel-item.is-danger b {
    background: #fee2e2;
    color: #b91c1c;
}

.topbar-panel-item.is-warning b {
    background: #fef3c7;
    color: #b45309;
}

.topbar-panel-item.is-success b {
    background: #dcfce7;
    color: #15803d;
}

.topbar-panel-empty {
    padding: 18px 12px;
    border-radius: 16px;
    background: rgba(248,250,252,.92);
    border: 1px dashed rgba(148,163,184,.35);
    color: #64748b;
    text-align: center;
    font-size: 13px;
    line-height: 2;
}

/* User Dropdown */

.user-dropdown-wrap {
    position: relative;
}

.user-chip {
    height: 40px;
    min-width: 190px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 13px;
    padding: 4px 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    color: var(--app-header-text);
    transition: 0.18s ease;
}

.user-chip:hover,
.user-chip[aria-expanded="true"] {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.user-avatar-img,
.user-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex: 0 0 auto;
}

.user-avatar-fallback {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-chip-text {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.user-chip-text strong {
    display: block;
    color: var(--app-header-text);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip-text small {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-top: 1px;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: auto;
    width: 270px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 10000;
}

.user-dropdown[hidden] {
    display: none !important;
}

.user-dropdown.is-open {
    display: block !important;
}

.user-dropdown-header {
    padding: 10px 11px;
    border-radius: 12px;
    background: #f9fafb;
    margin-bottom: 6px;
}

.user-dropdown-header strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

.user-dropdown-header span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #6b7280;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13.5px;
}

.user-dropdown a:hover {
    background: #f9fafb;
    color: #374151;
    text-decoration: none;
}

.user-dropdown hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 6px 0;
}

.user-dropdown .danger-link {
    color: #dc2626;
}

.user-menu-badge {
    margin-right: auto;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* Sidebar */

.sidebar {
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    width: var(--sidebar-width);
    z-index: 1200;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease;
    border-top-left-radius: 14px;
}

.sidebar.is-closed {
    transform: translateX(100%);
}

.sidebar-inner {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 8px 70px;
}

.sidebar-mobile-head {
    display: none;
}

.menu-back {
    width: 100%;
    border: 1px dashed #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 11px;
    padding: 9px 10px;
    margin-bottom: 10px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.menu-back:hover {
    background: #f9fafb;
}

/* Drilldown Menu - سفید، فقط حاشیه، بدون رنگ فعال */

.drilldown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drilldown-menu li {
    margin-bottom: 6px;
}

.drilldown-item {
    width: 100%;
    min-height: 43px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    border-radius: 12px;
    padding: 7px 9px;
    font-family: inherit;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.16s ease;
}

button.drilldown-item {
    text-align: right;
}

.drilldown-item:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
    text-decoration: none;
}

.drilldown-item.is-active {
    background: #fff !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
    box-shadow: none !important;
    font-weight: 700;
}

.drilldown-item.is-active i,
.drilldown-item.is-active .drilldown-caret {
    color: inherit !important;
}

.drilldown-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drilldown-label i,
.drilldown-icon i {
    width: 18px;
    text-align: center;
    color: inherit;
    flex: 0 0 auto;
}

.drilldown-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drilldown-caret {
    color: inherit;
    opacity: 0.75;
}

.sidebar-footer {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    min-height: 52px;
    border-top: 1px dashed #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
}

.main-content {
    min-height: calc(100vh - var(--topbar-height));
    padding: calc(var(--topbar-height) + 20px) 264px 24px 16px;
    transition: padding-right 0.22s ease;
}

body.sidebar-closed .main-content {
    padding-right: 16px;
}

.mobile-menu-fab {
    display: none;
}

.app-footer {
    min-height: 48px;
    margin-right: var(--sidebar-width);
    padding: 0 18px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    transition: margin-right 0.22s ease;
}

body.sidebar-closed .app-footer {
    margin-right: 0;
}

/* =========================================================
   Buttons
========================================================= */

.btn,
.btn-primary,
.btn-secondary,
.btn-light,
.btn-danger,
.btn-success {
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.18s ease;
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
}

.btn-primary:hover {
    background: #4338ca;
    color: #fff;
}

.btn-secondary {
    background: #111827;
    color: #fff;
}

.btn-secondary:hover {
    background: #030712;
    color: #fff;
}

.btn-light,
.btn {
    background: #f3f4f6;
    color: #374151;
}

.btn-light:hover,
.btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
    color: #fff;
}

.btn i,
.btn-primary i,
.btn-secondary i,
.btn-light i,
.btn-danger i,
.btn-success i {
    font-size: 13px;
}

/* =========================================================
   Tables / Users / Filters
========================================================= */

.filter-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 200px auto;
    gap: 12px;
    align-items: end;
}

.filter-field label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 12px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.data-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    background: #fff;
}

.data-table thead {
    background: #f9fafb;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
    vertical-align: middle;
    font-size: 13.5px;
}

.data-table th {
    color: #374151;
    font-weight: 700;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.empty-table {
    text-align: center !important;
    color: #6b7280;
    padding: 28px !important;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 13px;
    background: linear-gradient(135deg, #6d5dfc, #4f46e5);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: 0 0 auto;
}

.user-cell strong {
    display: block;
    color: #111827;
    font-size: 13.5px;
}

.user-cell small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 12px;
}

/* Badges */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.badge-success {
    background: #ecfdf5;
    color: #047857;
}

.badge-danger {
    background: #fef2f2;
    color: #dc2626;
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
}

.badge-info {
    background: #eff6ff;
    color: #2563eb;
}

.badge-muted {
    background: #f3f4f6;
    color: #6b7280;
}

/* Row actions */

.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.row-actions a,
.row-actions button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    background: #f3f4f6;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.16s ease;
    cursor: pointer;
}

.row-actions a:hover,
.row-actions button:hover {
    background: #e0e7ff;
    color: #4f46e5;
}

.row-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.row-actions .danger-action:hover,
.row-actions button.danger-action:hover {
    background: #fef2f2;
    color: #dc2626;
}

.row-actions .success-action:hover,
.row-actions button.success-action:hover {
    background: #ecfdf5;
    color: #047857;
}

.users-page .data-table td:last-child,
.users-page .data-table th:last-child {
    width: 150px;
}

/* =========================================================
   Forms
========================================================= */

.form-card {
    margin-top: 18px;
}

.form-section {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.form-section h3 {
    margin: 0 0 14px;
    font-size: 16px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #4f46e5;
    display: inline-block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.field label span {
    color: #dc2626;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px;
    padding: 0 12px;
    color: #111827;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.16s ease;
}

.field textarea {
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
    min-height: 92px;
    line-height: 1.8;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #4f46e5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.field input[readonly],
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.field-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.7;
}

.field select[multiple] {
    min-height: 180px;
    padding: 8px;
}

.field select[multiple] option {
    padding: 6px 8px;
    border-radius: 8px;
    margin-bottom: 2px;
}

input[type="date"] {
    direction: ltr;
    text-align: left;
}

input[name="national_code"],
input[name="mobile"] {
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: left;
}

.form-section .alert {
    margin-bottom: 14px;
}

/* Switch */

.switch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.switch-row {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0 12px;
    color: #374151;
    font-size: 13.5px;
    user-select: none;
    cursor: pointer;
}

.switch-row:hover {
    background: #f3f4f6;
}

.switch-row input {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    flex: 0 0 auto;
}

/* Roles */

.roles-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.role-check {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    user-select: none;
    transition: 0.16s ease;
}

.role-check:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.role-check input {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    flex: 0 0 auto;
}

.role-check span {
    display: block;
    min-width: 0;
}

.role-check strong {
    display: block;
    color: #111827;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-check small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 12px;
    direction: ltr;
    unicode-bidi: plaintext;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 18px;
}

/* =========================================================
   Permissions UI
========================================================= */

.permission-module {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 16px;
    padding: 14px;
    margin-top: 14px;
}

.permission-module h4 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 15px;
    direction: ltr;
    unicode-bidi: plaintext;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-module h4::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #14b8a6;
    display: inline-block;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.permission-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 74px;
    transition: 0.16s ease;
}

.permission-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.permission-card strong {
    display: block;
    color: #111827;
    font-size: 13.5px;
}

.permission-card small {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
    direction: ltr;
    unicode-bidi: plaintext;
}

.permission-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.permission-actions label {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 12px;
    color: #374151;
    background: #f3f4f6;
    cursor: pointer;
    user-select: none;
}

.permission-actions label:hover {
    background: #e5e7eb;
}

.permission-actions input {
    width: 14px;
    height: 14px;
    accent-color: #4f46e5;
}

.permission-actions label:first-child {
    background: #ecfdf5;
    color: #047857;
}

.permission-actions label:first-child:hover {
    background: #d1fae5;
}

.permission-actions label:last-child {
    background: #fef2f2;
    color: #dc2626;
}

.permission-actions label:last-child:hover {
    background: #fee2e2;
}

/* =========================================================
   Google Auth / QR / Security UI
========================================================= */

.security-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.security-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--shadow-xs);
}

.security-card strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    margin-bottom: 4px;
}

.security-card span {
    color: #64748b;
    font-size: 12.5px;
}

.qr-box,
.google-auth-box,
.totp-box {
    border: 1px solid #c7d2fe;
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(109, 93, 252, 0.08), transparent 28%),
        #eef2ff;
    padding: 16px;
    margin-top: 14px;
}

.qr-box-title,
.google-auth-box-title,
.totp-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3730a3;
    font-weight: 800;
    margin-bottom: 10px;
}

.qr-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 18px;
    padding: 14px;
    margin: 12px 0;
}

.qr-image-wrap img,
.qr-code-img,
.google-auth-qr img {
    width: 190px;
    height: 190px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.secret-code {
    direction: ltr;
    unicode-bidi: plaintext;
    background: #fff;
    border: 1px dashed #c7d2fe;
    color: #3730a3;
    border-radius: 13px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    word-break: break-all;
}

.security-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 12.8px;
    line-height: 1.9;
}

/* =========================================================
   Settings Router
========================================================= */

.settings-router-page {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
}

.settings-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 18px;
}

.settings-hero {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 24px;
    min-height: 210px;
    margin-bottom: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 10% 10%, rgba(109, 93, 252, 0.18), transparent 32%),
        radial-gradient(circle at 90% 70%, rgba(20, 184, 166, 0.16), transparent 30%),
        linear-gradient(135deg, #111827 0%, #312e81 100%);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.settings-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 40% 45%, #000 0%, transparent 72%);
}

.settings-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    left: -100px;
    bottom: -120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
}

.settings-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.settings-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    margin-bottom: 14px;
}

.settings-hero h1,
.settings-hero h2 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.5;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.settings-hero p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 2;
}

.settings-hero-actions {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-hero-actions .btn-light {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.settings-hero-actions .btn-light:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.settings-side-panel {
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.settings-side-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.settings-side-panel-title i {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
}

.settings-side-panel-title strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
}

.settings-side-panel-title span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.settings-side-panel p {
    margin: 0;
    color: #64748b;
    font-size: 12.8px;
    line-height: 1.9;
}

.settings-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.settings-mini-stat {
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    padding: 10px;
}

.settings-mini-stat b {
    display: block;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.2;
}

.settings-mini-stat span {
    display: block;
    color: #64748b;
    font-size: 11.5px;
    margin-top: 3px;
}

.settings-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 20px 0 12px;
}

.settings-section-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
}

.settings-section-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.settings-card {
    position: relative;
    overflow: hidden;
    min-height: 166px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 17px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: 0.2s ease;
    text-decoration: none;
    color: #111827;
}

.settings-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(109, 93, 252, 0.10), transparent 35%),
        radial-gradient(circle at 100% 100%, rgba(20, 184, 166, 0.07), transparent 28%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.settings-card::after {
    content: "";
    position: absolute;
    left: -35px;
    bottom: -35px;
    width: 105px;
    height: 105px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.08);
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.11);
    border-color: #c7d2fe;
    text-decoration: none;
}

.settings-card:hover::before {
    opacity: 1;
}

.settings-card-top,
.settings-card-body,
.settings-card-footer {
    position: relative;
    z-index: 2;
}

.settings-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.settings-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 22px;
    margin-bottom: 14px;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.06);
    flex: 0 0 auto;
}

.settings-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.settings-card-title,
.settings-card h2 {
    display: block;
    margin: 0 0 7px;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.6;
}

.settings-card-text,
.settings-card p {
    display: block;
    margin: 0;
    color: #6b7280;
    font-size: 12.8px;
    line-height: 1.9;
}

.settings-card-footer {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #4f46e5;
    font-size: 12.5px;
    font-weight: 800;
}

.settings-card-footer i {
    font-size: 12px;
}

.settings-card.is-disabled {
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(0.3);
}

.settings-card.green .settings-card-icon,
.settings-card-icon.green {
    background: #ecfdf5;
    color: #059669;
}

.settings-card.orange .settings-card-icon,
.settings-card-icon.orange {
    background: #fff7ed;
    color: #ea580c;
}

.settings-card.red .settings-card-icon,
.settings-card-icon.red {
    background: #fef2f2;
    color: #dc2626;
}

.settings-card.blue .settings-card-icon,
.settings-card-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.settings-card.purple .settings-card-icon,
.settings-card-icon.purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.settings-card.teal .settings-card-icon,
.settings-card-icon.teal {
    background: #f0fdfa;
    color: #0f766e;
}

/* =========================
   Small Dots
========================= */

.occasion-dot,
.calendar-note-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
    flex-shrink: 0;
}

.occasion-dot {
    background: #4f46e5;
}

.calendar-note-dot {
    background: #2563eb;
}

.calendar-note-done {
    opacity: .62;
}

.calendar-note-done span {
    text-decoration: line-through;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1280px) {
    .settings-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .today-box {
        max-width: 42vw;
    }

    .topbar-title {
        max-width: 210px;
    }

    .login-shell {
        grid-template-columns: 1fr 0.9fr;
    }

    .login-panel {
        padding: 32px 24px;
    }

    .login-hero {
        padding: 46px 34px;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .roles-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .permission-grid {
        grid-template-columns: 1fr;
    }

    .settings-top {
        grid-template-columns: 1fr;
    }

    .settings-side-panel {
        min-height: auto;
    }

    .security-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --topbar-height: 58px;
    }

    .topbar {
        height: var(--topbar-height);
        padding: 0 10px;
    }

    .topbar-title {
        max-width: 145px;
    }

    .topbar-title strong {
        font-size: 13px;
    }

    .topbar-title span {
        display: none;
    }

    .topbar-actions {
        gap: 4px;
    }

    .today-box {
        display: inline-flex !important;
        max-width: 46vw;
        overflow: hidden;
        padding: 0 8px;
        gap: 5px;
        font-size: 11.5px;
    }

    #persianDateText {
        max-width: 34vw;
    }

    .today-box b,
    #persianClockText {
        min-width: 62px;
        font-size: 11.5px;
    }

    .topbar-panel,
    .user-dropdown {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 92px);
        overflow: hidden;
    }

    .topbar-panel-list {
        max-height: calc(100vh - 190px);
    }

    .topbar-actions > .topbar-icon-btn {
        display: none;
    }

    .user-chip {
        min-width: auto;
        width: 40px;
        justify-content: center;
        padding: 4px;
        border-radius: 50%;
    }

    .user-chip-text,
    .user-chip > i {
        display: none !important;
    }

    .sidebar {
        top: 0;
        width: 100%;
        border-radius: 0;
        transform: translateX(100%);
        z-index: 1800;
    }

    .sidebar.is-closed {
        transform: translateX(100%);
    }

    .sidebar.is-mobile-open {
        transform: translateX(0);
    }

    .sidebar-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 4px 12px;
        margin-bottom: 8px;
        border-bottom: 1px solid #e5e7eb;
    }

    .sidebar-mobile-head strong {
        font-size: 14px;
    }

    .sidebar-mobile-head button {
        border: 0;
        background: #f3f4f6;
        color: #374151;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        cursor: pointer;
    }

    .mobile-menu-fab {
        display: inline-flex;
        position: fixed;
        right: 16px;
        bottom: 18px;
        z-index: 1700;
        width: 58px;
        height: 58px;
        border: 0;
        border-radius: 50%;
        background: var(--mobile-fab-bg);
        color: #fff;
        align-items: center;
        justify-content: center;
        font-size: 21px;
        box-shadow: 0 12px 30px rgba(239, 57, 78, 0.35);
        cursor: pointer;
    }

    .main-content {
        padding: calc(var(--topbar-height) + 16px) 12px 20px;
        min-height: 100vh;
    }

    body.sidebar-closed .main-content {
        padding-right: 12px;
    }

    .app-footer {
        margin-right: 0;
        font-size: 12px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .permission-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .permission-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-hero {
        padding: 20px;
        min-height: auto;
    }

    .settings-hero h1,
    .settings-hero h2 {
        font-size: 22px;
    }
}

@media (max-width: 860px) {
    .login-shell {
        display: block;
        min-height: 100vh;
        background:
            radial-gradient(circle at 20% 0%, rgba(79,70,229,0.18), transparent 36%),
            radial-gradient(circle at 90% 90%, rgba(20,184,166,0.13), transparent 35%),
            #f5f7fb;
    }

    .login-hero {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 22px 16px;
        align-items: center;
        background: transparent;
    }

    .login-form-wrap {
        width: 100%;
        max-width: 430px;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 24px;
        padding: 22px;
        box-shadow: 0 18px 45px rgba(15,23,42,0.10);
    }

    .login-heading {
        margin-bottom: 20px;
        text-align: center;
    }

    .login-heading h1 {
        font-size: 24px;
    }

    .login-heading p {
        font-size: 13.5px;
    }

    .login-options {
        align-items: center;
        flex-direction: row;
    }
}

@media (max-width: 760px) {
    .page-toolbar,
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions {
        width: 100%;
    }

    .toolbar-actions .btn,
    .toolbar-actions .btn-primary,
    .toolbar-actions .btn-light,
    .toolbar-actions .btn-secondary,
    .toolbar-actions .btn-danger,
    .toolbar-actions .btn-success {
        width: 100%;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn-secondary,
    .filter-actions .btn-light {
        flex: 1;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14.5px;
    }

    .form-control {
        min-height: 50px;
    }

    .content-card,
    .page-card {
        padding: 16px;
        border-radius: 14px;
    }

    .topbar-title {
        max-width: 110px;
    }

    .today-box {
        font-size: 11px;
    }

    .today-box b,
    #persianClockText {
        font-size: 11px;
    }

    .form-section {
        padding: 14px;
        border-radius: 14px;
    }

    .roles-box {
        grid-template-columns: 1fr;
    }

    .switch-grid {
        flex-direction: column;
    }

    .switch-row {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn,
    .form-actions .btn-primary,
    .form-actions .btn-light,
    .form-actions .btn-secondary,
    .form-actions .btn-danger,
    .form-actions .btn-success {
        width: 100%;
    }

    .permission-module {
        padding: 12px;
        border-radius: 14px;
    }

    .permission-card {
        padding: 11px;
    }

    .permission-actions label {
        flex: 1;
        justify-content: center;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-card {
        min-height: 142px;
    }

    .settings-hero {
        border-radius: 18px;
    }

    .settings-mini-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .login-panel {
        min-height: 100vh;
        padding: 14px;
        align-items: flex-start;
    }

    .login-form-wrap {
        margin-top: 10px;
        padding: 18px;
        border-radius: 20px;
    }

    .login-heading h1 {
        font-size: 21px;
    }

    .login-badge {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-control {
        min-height: 48px;
        font-size: 14px;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 13px;
    }

    .btn-login {
        min-height: 50px;
        font-size: 15px;
    }

    .login-footer {
        margin-top: 18px;
        gap: 8px;
        font-size: 12px;
    }

    .settings-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-hero-actions .btn-light,
    .settings-hero-actions .btn-primary {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .today-box {
        max-width: 50vw;
    }

    #persianDateText {
        max-width: 28vw;
    }

    .topbar-title {
        max-width: 96px;
    }

    .form-section h3 {
        font-size: 15px;
    }

    .field input,
    .field select,
    .field textarea {
        font-size: 13.5px;
    }

    .role-check {
        min-height: 54px;
    }

    .permission-card strong {
        font-size: 13px;
    }

    .permission-card small {
        font-size: 11.5px;
    }
}

@media (max-width: 360px) {
    .login-form-wrap {
        padding: 15px;
    }

    .login-heading h1 {
        font-size: 19px;
    }
}
/* =========================================================
   Tivan Core - Calendar / Forms Fix
   مسیر:
   C:\xampp\htdocs\dashboard\public\assets\css\app.css

   هدف:
   - اصلاح ظاهر فرم تقویم
   - یکسان‌سازی input/select/textarea
   - رفع حالت خام HTML در create.php
========================================================= */

.content-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px dashed rgba(148, 163, 184, .45);
}

.section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
}

.section-subtitle {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 2;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-router-page {
    display: grid;
    gap: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.settings-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 16px;
    border-radius: 20px;
    text-decoration: none;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}

.settings-card-top,
.settings-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.settings-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
}

.settings-card-badge {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(15, 23, 42, .06);
    color: #334155;
}

.settings-card-body {
    display: grid;
    gap: 6px;
    margin: 18px 0;
}

.settings-card-title {
    font-size: 20px;
    font-weight: 950;
    color: #0f172a;
}

.settings-card-text {
    font-size: 12px;
    line-height: 1.9;
    color: #64748b;
}

.settings-card-footer {
    margin-top: auto;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.settings-card.blue .settings-card-icon {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.settings-card.purple .settings-card-icon {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.settings-card.orange .settings-card-icon {
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.settings-card.green .settings-card-icon {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.settings-card.red .settings-card-icon {
    background: linear-gradient(135deg, #dc2626, #fb7185);
}

.settings-card.teal .settings-card-icon {
    background: linear-gradient(135deg, #0f766e, #2dd4bf);
}

.form-section {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .045);
}

.form-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(148, 163, 184, .45);
}

.form-section-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
}

.form-section-head p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 12.5px;
    line-height: 2;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 900;
    color: #334155;
    line-height: 1.9;
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field input[type="color"],
.form-field select,
.form-field textarea,
.form-section input[type="text"],
.form-section input[type="number"],
.form-section input[type="email"],
.form-section input[type="password"],
.form-section input[type="date"],
.form-section input[type="time"],
.form-section input[type="color"],
.form-section select,
.form-section textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.8;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.form-field textarea,
.form-section textarea {
    min-height: 110px;
    resize: vertical;
}

.form-field select,
.form-section select {
    cursor: pointer;
    appearance: auto;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}

.form-field input::placeholder,
.form-field textarea::placeholder,
.form-section input::placeholder,
.form-section textarea::placeholder {
    color: #94a3b8;
}

.form-field input[type="checkbox"],
.form-section input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    accent-color: #4f46e5;
}

.form-check-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px dashed #dbe3ef;
    border-radius: 16px;
    background: #f8fafc;
}

.form-check-item {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin: 0 !important;
    font-weight: 800 !important;
    color: #334155 !important;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn-primary,
.btn-light,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    border-radius: 13px;
    padding: 9px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(79, 70, 229, .22);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(79, 70, 229, .28);
}

.btn-light {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-light:hover {
    background: #eef2ff;
    color: #3730a3;
}

.btn-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.alert {
    border-radius: 16px;
    padding: 12px 14px;
    line-height: 2;
    font-size: 13px;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    vertical-align: top;
    font-size: 13px;
    line-height: 2;
}

.data-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 950;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 900;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-cancelled,
.status-deleted {
    background: #f1f5f9;
    color: #475569;
}

@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .content-card {
        padding: 14px;
        border-radius: 18px;
    }

    .page-toolbar {
        flex-direction: column;
    }

    .toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .settings-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 15px;
        border-radius: 18px;
    }

    .form-field.full-width {
        grid-column: auto;
    }
}