:root {
    --ink: #17233c;
    --muted: #6f7b91;
    --primary: #3155d9;
    --primary-dark: #233da3;
    --accent: #16b8a6;
    --surface: #ffffff;
    --line: #e7ebf3;
    --shadow: 0 14px 40px rgba(28, 45, 88, .08);
}

* { box-sizing: border-box; }
body {
    min-height: 100vh;
    color: var(--ink);
    background: #f5f7fc;
    background-image: radial-gradient(circle at 90% 0%, rgba(49, 85, 217, .08), transparent 28rem),
                      radial-gradient(circle at 10% 30%, rgba(22, 184, 166, .06), transparent 24rem);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    line-height: 1.8;
}

.app-navbar {
    min-height: 76px;
    background: linear-gradient(115deg, #182442 0%, #263d83 58%, #3155d9 100%);
    box-shadow: 0 8px 24px rgba(23, 35, 60, .18);
}
.navbar-brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; letter-spacing: -.2px; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: rgba(255,255,255,.15); }
.complex-context { display: inline-flex; align-items: center; gap: .5rem; margin-right: .25rem; }
.user-chip { color: rgba(255,255,255,.9) !important; font-size: .9rem; }
.logout-btn { border-radius: 10px; }
.app-content { padding-bottom: 3rem; }
.layout-switcher {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 11px;
    background: rgba(0,0,0,.14);
}
.layout-switcher-btn {
    border: 0;
    border-radius: 8px;
    padding: .28rem .55rem;
    color: rgba(255,255,255,.78);
    background: transparent;
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
}
.layout-switcher-btn i { margin-left: .2rem; }
.layout-switcher-btn[aria-pressed="true"] {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 2px 7px rgba(0,0,0,.14);
}

h3, h4 { font-weight: 800; letter-spacing: -.35px; }
h3 i, h4 i { color: var(--primary); margin-left: .45rem; }
h5, h6 { font-weight: 700; }
.card {
    border: 1px solid rgba(231, 235, 243, .9);
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}
.dashboard-card { color: inherit; text-decoration: none; display: block; height: 100%; }
.dashboard-card .card { height: 100%; min-height: 185px; display: flex; align-items: center; justify-content: center; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.dashboard-card:hover .card { transform: translateY(-5px); border-color: rgba(49,85,217,.25); box-shadow: 0 18px 42px rgba(38,61,131,.16); }
.card-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: .8rem; border-radius: 17px; color: var(--primary); background: #edf1ff; font-size: 1.8rem; }
.card-icon.disabled { color: #aeb6c8; background: #f0f2f6; }
.dashboard-card.disabled { opacity: .55; pointer-events: none; }
.reports-card-disabled { opacity: .72; }
.dashboard-card p { max-width: 260px; margin-right: auto; margin-left: auto; }

.btn { border-radius: 10px; font-weight: 600; padding: .55rem 1rem; }
.btn-primary { border-color: var(--primary); background: var(--primary); }
.btn-primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.btn-success { background: #159b88; border-color: #159b88; }
.form-control, .form-select { min-height: 46px; border: 1px solid #dce2ee; border-radius: 11px; padding: .6rem .85rem; color: var(--ink); background-color: #fbfcff; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .22rem rgba(49,85,217,.12); background: #fff; }
.form-label { color: #3c4963; font-weight: 600; }
.form-text, .text-muted { color: var(--muted) !important; }
.alert { border: 0; border-radius: 14px; box-shadow: 0 8px 22px rgba(28,45,88,.06); }
.badge { border-radius: 8px; padding: .45em .7em; font-weight: 600; }
.table { vertical-align: middle; }
.table thead th { color: #53617b; font-size: .85rem; font-weight: 700; white-space: nowrap; border-bottom-width: 1px; }
.table tbody tr { border-color: #edf0f6; }
.table tbody tr:hover { background-color: #f8faff; }
.table-responsive { border-radius: 12px; }
.card:has(> .table) { overflow-x: auto; }
.card:has(> .table) > .table { min-width: 720px; }
details { border-color: var(--line) !important; background: #fbfcff; }
summary { color: var(--ink); padding: .25rem; }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 20px 60px rgba(23,35,60,.2); }
.modal-header { border-bottom-color: var(--line); }
.modal-footer { border-top-color: var(--line); }
hr { border-color: var(--line); opacity: 1; }

@media (max-width: 576px) {
    .app-navbar { min-height: 68px; }
    .navbar-brand { min-width: 0; font-size: .9rem; }
    .navbar-brand > span:not(.brand-mark):not(.complex-context) { display: none; }
    .brand-mark { width: 33px; height: 33px; border-radius: 10px; }
    .complex-context { gap: .3rem; }
    .user-chip { display: none; }
    .app-content { padding-right: 1rem; padding-left: 1rem; }
    .card { border-radius: 15px; }
    .dashboard-card .card { min-height: 150px; }
    .btn-lg { width: 100%; margin-bottom: .5rem; }
    .table { font-size: .86rem; }
    .layout-switcher-btn span { display: none; }
    .layout-switcher-btn { padding: .3rem .48rem; }
}
