@font-face {
    font-family: VazirFallback;
    src: local("Tahoma");
}

:root {
    --taxi-navy: #0d2436;
    --taxi-navy-deep: #081820;
    --taxi-navy-mid: #163a52;
    --taxi-navy-soft: #1e4f6a;
    --taxi-gold: #c9a44c;
    --taxi-gold-strong: #d4af37;
    --taxi-gold-hover: #b08a32;
    --taxi-gold-soft: #f3ead2;
    --taxi-gold-mist: #f8f3e6;
    --taxi-ink: #1c2833;
    --taxi-muted: #5e6d79;
    --taxi-surface: #f5f2eb;
    --taxi-card: #fffdf8;
    --taxi-border: #e3dcd0;
    --taxi-line: #d4cbb8;
    --taxi-link: #1e4f6a;
    --taxi-on-gold: #0d2436;
    --taxi-shadow: rgba(13, 36, 54, .08);
    --taxi-shadow-strong: rgba(13, 36, 54, .16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f6f7fb;
    color: #1f2937;
    font-family: VazirFallback, Tahoma, Arial, sans-serif;
    line-height: 1.7;
}

a {
    color: #2563eb;
    text-decoration: none;
}

.topbar {
    background: #111827;
    color: white;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

    .topbar a, .topbar button {
        color: white;
    }

.brand {
    font-weight: 800;
    font-size: 20px;
}

nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.sidebar {
    width: 280px;
    flex: 0 0 280px;
    min-height: 100vh;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    background: #111827;
    color: white;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

    .sidebar a, .sidebar button {
        color: white;
    }

.brand {
    font-weight: 800;
    font-size: 20px;
}

.sidebar-user {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .06);
}

.sidebar-avatar, .profile-photo-large {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .35);
}

.sidebar-avatar-placeholder, .profile-photo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: white;
    font-weight: 900;
}

.sidebar-user-text {
    min-width: 0;
}

    .sidebar-user-text strong,
    .sidebar-user-text span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar-user-text span {
        color: #cbd5e1;
        font-size: 13px;
    }

.sidebar-nav {
    display: grid;
    gap: 6px;
}

    .sidebar-nav a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 10px;
        color: #e5e7eb;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .sidebar-nav a:hover {
        background: rgba(255, 255, 255, .09);
        color: white;
    }

    .sidebar-nav a.active {
        background: #2563eb;
        color: white;
    }

.sidebar-logout {
    margin-top: auto;
}

    .sidebar-logout .link-button {
        width: 100%;
        text-align: right;
        padding: 10px 12px;
        border-radius: 10px;
        background: rgba(220, 38, 38, .16);
        color: #fecaca;
    }

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto;
    padding: 0px 20px;
}

.app-shell > .container {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-container {
    min-height: 100vh;
    display: grid;
    align-content: start;
}

.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
    margin-bottom: 18px;
    overflow-x: auto;
}

.auth-card {
    max-width: 460px;
    margin: 60px auto;
    background: white;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

h1 {
    font-size: 26px;
    margin: 0 0 18px;
}

h2 {
    font-size: 19px;
    margin: 0 0 12px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: white;
}

textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.full {
    grid-column: 1 / -1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 16px;
    background: #e5e7eb;
    color: #1f2937;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 40px;
    min-width: fit-content;
}

.btn:hover {
    background: #d1d5db;
    border-color: #9ca3af;
}

.btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn.primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn.primary:hover {
    background: #1d4ed8;
    border-color: #1e40af;
}

.btn.primary:focus {
    outline-color: #2563eb;
}

.btn.secondary {
    background: #f9fafb;
    color: #1f2937;
    border-color: #d1d5db;
}

.btn.secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn.danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fee2e2;
}

.btn.danger:hover {
    background: #fee2e2;
    border-color: #fecaca;
}

.btn.danger:focus {
    outline-color: #ef4444;
}

.btn.success {
    background: #dcfce7;
    color: #166534;
    border-color: #d1fae5;
}

.btn.success:hover {
    background: #d1fae5;
    border-color: #a7f3d0;
}

.btn.warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fef3c7;
}

.btn.warning:hover {
    background: #fef3c7;
    border-color: #fde68a;
}

.btn.info {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn.info:hover {
    background: #bfdbfe;
    border-color: #93c5fd;
}

.btn.small {
    padding: 6px 12px;
    min-height: 32px;
    font-size: 0.875rem;
    gap: 6px;
}

.btn.large {
    padding: 12px 24px;
    min-height: 48px;
    font-size: 1.125rem;
}

.btn.icon-only {
    padding: 8px;
    min-width: 40px;
    justify-content: center;
}

/* Button group styling */
.btn-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 1000;
}

.modal-content {
    width: min(920px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: white;
    padding: 24px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .2);
}

.modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.details th {
    text-align: left;
    padding: 10px 12px;
    width: 220px;
    color: #374151;
}

.details td {
    padding: 10px 12px;
}

.company-attachments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.attachment-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.attachment-category {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.category-title {
    font-weight: 700;
    color: #111827;
}

.attachment-category-list {
    display: grid;
    gap: 10px;
}

.attachment-empty {
    color: #6b7280;
    padding: 12px;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    text-align: center;
    background: #f9fafb;
}

.attachment-item {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    background: #fafafa;
    display: grid;
    gap: 8px;
}

    .attachment-item a {
        color: #1f2937;
        text-decoration: none;
        word-break: break-word;
    }

.attachment-meta {
    color: #374151;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.attachment-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
}

}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

    .alert.success {
        background: #ecfdf5;
        color: #047857;
        border: 1px solid #a7f3d0;
    }

    .alert.warning {
        background: #fff7ed;
        color: #9a3412;
        border: 1px solid #fed7aa;
    }

.validation {
    color: #dc2626;
    font-size: 13px;
}

.muted {
    color: #6b7280;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-hero {
    background: linear-gradient(135deg, #ffffff 0%, #eef6ff 48%, #effcf4 100%);
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .dashboard-hero h1 {
        margin-bottom: 8px;
    }

    .dashboard-hero p {
        margin: 0;
        color: #4b5563;
        max-width: 680px;
    }

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat {
    background: white;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

    .stat::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 4px;
        background: #2563eb;
    }

    .stat span {
        display: block;
        font-size: 30px;
        font-weight: 900;
        color: #111827;
    }

    .stat small {
        display: block;
        color: #6b7280;
        font-weight: 800;
        margin-bottom: 6px;
    }

    .stat label {
        color: #6b7280;
        margin: 0;
        font-size: 13px;
    }

.stat-total::before {
    background: #2563eb;
}

.stat-open::before {
    background: #f59e0b;
}

.stat-referred::before {
    background: #0d9488;
}

.stat-answered::before {
    background: #16a34a;
}

.stat-escalated::before {
    background: #dc2626;
}

.card-header, .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    /*min-width: 760px;*/
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
    vertical-align: top;
}

th {
    background: #f9fafb;
    font-weight: 800;
}

.table-actions {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

    .table-actions a,
    .table-actions button {
        margin-left: 0;
        margin-right: 0;
        padding: 6px 12px;
        font-size: 0.9rem;
        border-radius: 10px;
        min-height: 32px;
    }

    .table-actions a:last-child,
    .table-actions button:last-child {
        margin-right: 0;
    }

/* Button group styling */
.btn-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Danger button style for delete actions */
.btn.danger {
    background: #fef2f2;
    border-color: #fee2e2;
    color: #b91c1c;
}

.btn.danger:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Success button style for approve/activate actions */
.btn.success {
    background: #dcfce7;
    border-color: #d1fae5;
    color: #166534;
}

.btn.success:hover {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: #14532d;
}

/* Warning button style for reject/deactivate actions */
.btn.warning {
    background: #fffbeb;
    border-color: #fef3c7;
    color: #92400e;
}

.btn.warning:hover {
    background: #fef3c7;
    border-color: #fde68a;
    color: #78350f;
}

/* Info button style for view/details actions */
.btn.info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.btn.info:hover {
    background: #bfdbfe;
    border-color: #93c5fd;
    color: #1e40af;
}

    /* Responsive table actions */
    @media (max-width: 768px) {
        .table-actions {
            justify-content: flex-end;
            gap: 4px;
        }
        
        .table-actions a,
        .table-actions button {
            margin-left: 0;
            margin-right: 4px;
            padding: 4px 8px;
            font-size: 0.8rem;
            flex: 1 1 auto;
            text-align: center;
        }
    }

.badge {
    display: inline-block;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 4px 10px;
    font-size: 13px;
    white-space: nowrap;
}

.status-registered {
    background: #f1f5f9;
    color: #334155;
}

.status-referred {
    background: #ecfeff;
    color: #0e7490;
}

.status-answered {
    background: #ecfdf5;
    color: #047857;
}

.status-closed {
    background: #eef2ff;
    color: #4338ca;
}

.status-rejected {
    background: #fef2f2;
    color: #b91c1c;
}

.status-escalated {
    background: #fff1f2;
    color: #be123c;
}

.status-public {
    background: #eff6ff;
    color: #1d4ed8;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 12px;
    align-items: end;
}

.report-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.report-tabs {
    justify-content: flex-end;
}

.report-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

dl {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px 14px;
}

dt {
    color: #6b7280;
    font-weight: 800;
}

dd {
    margin: 0;
}

.detail-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.attachment-list {
    margin: 0;
    padding-right: 18px;
}

    .attachment-list li {
        margin-bottom: 6px;
    }

    .attachment-list .muted {
        display: inline-block;
        margin-right: 8px;
        font-size: 13px;
    }

.check-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

    .check-list label, .checkbox {
        font-weight: 500;
        display: flex;
        gap: 8px;
        align-items: center;
    }

        .check-list input, .checkbox input {
            width: auto;
        }

.profile-form {
    display: grid;
    gap: 20px;
}

.profile-photo-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-photo-large {
    width: 86px;
    height: 86px;
    border-color: #e5e7eb;
}

.profile-section-title {
    font-weight: 900;
    color: #111827;
    padding-top: 4px;
}

.auth-card-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 18px;
    padding-top: 16px;
}

.public-track-shell {
    width: min(1100px, 100%);
    margin: 34px auto;
}

.public-portal-shell {
    width: min(1120px, 100%);
    margin: 28px auto;
}

.public-portal-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

    .public-portal-top h1 {
        margin-bottom: 4px;
    }

    .public-portal-top p {
        margin: 0;
    }

.public-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 18px;
}

.public-tab {
    min-height: 48px;
    border-radius: 10px;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

    .public-tab.active {
        background: white;
        color: #111827;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    }

.public-tab-panel {
    display: grid;
    gap: 18px;
}

.public-empty-state {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.featured-notice {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
}

    .featured-notice img {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 7;
        object-fit: cover;
        background: #e5e7eb;
    }

.featured-notice-body {
    padding: 26px;
}

    .featured-notice-body span,
    .notice-card-large span {
        display: block;
        color: #6b7280;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .featured-notice-body h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .featured-notice-body p {
        margin: 0;
        color: #374151;
    }

    .featured-notice-body .featured-summary {
        color: #111827;
        font-weight: 800;
        margin-bottom: 10px;
    }

.notice-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.notice-card-large {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

    .notice-card-large img {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 8;
        object-fit: cover;
        background: #e5e7eb;
    }

    .notice-card-large div {
        padding: 18px;
    }

    .notice-card-large h3 {
        margin: 0 0 8px;
        font-size: 18px;
    }

    .notice-card-large p {
        margin: 0;
        color: #4b5563;
    }

    .notice-card-large details {
        margin-top: 10px;
    }

    .notice-card-large summary {
        color: #2563eb;
        cursor: pointer;
        font-weight: 800;
    }

.public-track-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.public-track-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.public-news-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

    .public-news-panel .card-header {
        margin-bottom: 8px;
    }

.public-track-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

    .public-track-header h1 {
        margin-bottom: 4px;
    }

    .public-track-header p {
        margin: 0;
    }

.tracking-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.public-shortcuts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.notice-list {
    display: grid;
    gap: 12px;
}

.notice-item {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

    .notice-item:first-child {
        border-top: 0;
        padding-top: 0;
    }

    .notice-item span {
        display: block;
        color: #6b7280;
        font-size: 13px;
        margin-bottom: 2px;
    }

    .notice-item h3 {
        margin: 0 0 4px;
        font-size: 16px;
    }

    .notice-item p {
        margin: 0;
        color: #4b5563;
    }

    .notice-item details {
        margin-top: 8px;
    }

    .notice-item summary {
        color: #2563eb;
        cursor: pointer;
        font-weight: 700;
    }

.public-result-grid,
.public-response-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

    .public-result-grid div,
    .public-response-grid section {
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 14px;
        background: #f9fafb;
    }

    .public-result-grid span,
    .public-result-grid strong {
        display: block;
    }

.public-response-grid {
    margin-top: 16px;
}

    .public-response-grid h3 {
        margin: 0 0 8px;
        font-size: 16px;
    }

    .public-response-grid p {
        margin: 0;
    }

.timeline {
    display: grid;
    gap: 10px;
}

.timeline-item {
    border-right: 3px solid #2563eb;
    padding: 8px 14px 10px 0;
}

    .timeline-item span {
        display: block;
        color: #6b7280;
        font-size: 13px;
    }

    .timeline-item strong {
        display: block;
        margin: 2px 0;
    }

    .timeline-item p {
        margin: 0;
        color: #4b5563;
    }

.rate-search {
    margin-top: 4px;
}

.rate-result-grid {
    display: grid;
    gap: 12px;
}

.rate-result-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #f9fafb;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
}

    .rate-result-item span,
    .rate-result-item strong {
        display: block;
    }

    .rate-result-item p {
        grid-column: 1 / -1;
        margin: 0;
        color: #4b5563;
    }

.rate-result-featured {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
}

    .rate-result-featured div:last-child strong {
        color: #047857;
        font-size: 22px;
    }

.rate-admin-result {
    margin-top: 14px;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    color: #047857;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

    .rate-admin-result strong {
        font-size: 22px;
    }

.form-checkbox {
    align-self: end;
    margin-bottom: 4px;
}

.notice-admin-thumb {
    width: 96px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    display: block;
}

.notice-admin-preview {
    width: min(360px, 100%);
    aspect-ratio: 16 / 8;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

@media (max-width: 800px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        height: auto;
        position: relative;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .dashboard-hero,
    .public-portal-top,
    .public-track-header {
        display: block;
    }

        .dashboard-actions,
        .public-portal-top .btn {
            margin-top: 14px;
        }

    .form-grid, .stats-grid, .details-grid, .filter-bar, .report-filter, .public-tabs, .public-track-grid, .notice-card-grid, .public-result-grid, .public-response-grid, .tracking-search-row, .rate-result-item, .rate-result-featured {
        grid-template-columns: 1fr;
    }

    .profile-photo-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    dl {
        grid-template-columns: 1fr;
    }
}

tr.deadline-warning > td {
    background: #fef9c3;
    border-color: #fde047;
}

tr.deadline-overdue > td {
    background: #fee2e2;
    border-color: #fca5a5;
}

.deadline-alarm {
    display: inline-flex;
    align-items: center;
    margin-inline-start: .45rem;
    padding: .2rem .5rem;
    border: 1px solid #eab308;
    border-radius: 999px;
    background: #facc15;
    color: #713f12;
    font-size: .75rem;
    font-weight: 800;
    animation: deadline-pulse 1.35s ease-in-out infinite;
}

.deadline-alarm.overdue {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

@keyframes deadline-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, .16); }
    50% { box-shadow: 0 0 0 6px rgba(234, 179, 8, .28); }
}

@media (prefers-reduced-motion: reduce) {
    .deadline-alarm { animation: none; }
}

.datepicker-plot-area {
    z-index: 2000 !important;
    font-family: VazirFallback, Tahoma, Arial, sans-serif;
}

    .datepicker-plot-area .datepicker-day-view,
    .datepicker-plot-area .datepicker-month-view,
    .datepicker-plot-area .datepicker-year-view {
        direction: rtl;
    }

.file-uploader {
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    padding: 14px;
    display: grid;
    gap: 12px;
}

.file-uploader-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.file-uploader-input {
    flex: 1 1 260px;
}

.file-uploader-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.attachment-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .attachment-list li {
        margin-bottom: 0;
    }

.attachment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.link-button.danger,
.attachment-delete-btn,
.file-uploader-clear {
    color: #b91c1c;
    text-decoration: none;
    border: 1px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
}

.link-button.danger:hover,
.attachment-delete-btn:hover,
.file-uploader-clear:hover {
    text-decoration: underline;
    color: #991b1b;
}

.link-button.danger:focus,
.attachment-delete-btn:focus,
.file-uploader-clear:focus {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.attachment-item {
    min-height: 168px;
    align-content: start;
}

    .attachment-item:not(:has(.attachment-thumb))::before {
        content: "فایل";
        display: grid;
        place-items: center;
        width: 100%;
        aspect-ratio: 4 / 3;
        border-radius: 12px;
        background: #e5e7eb;
        color: #475569;
        font-weight: 700;
    }

.radio-card-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
    cursor: pointer;
}

    .radio-card:has(input:checked) {
        border-color: #2563eb;
        background: #eff6ff;
        color: #1d4ed8;
        font-weight: 700;
    }

.iran-plate-control {
    display: inline-block;
    max-width: 100%;
}

.iran-plate.iran-plate--editor,
.iran-plate.iran-plate--display {
    display: inline-grid;
    grid-template-columns: 60px 72px 92px 96px 62px 72px;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    max-width: 100%;
    border: 2px solid #111827;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    direction: ltr;
    line-height: 1.2;
    vertical-align: middle;
}

.iran-plate > .iran-plate-flag,
.iran-plate > .iran-plate-iran,
.iran-plate > .plate-part {
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    border: 0;
    border-left: 1px solid #111827;
    border-radius: 0;
    padding: 0 8px;
    background: #fff;
    color: #111827;
    text-align: center;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
}

.iran-plate > .iran-plate-flag {
    border-left: 0;
    background: #1d4ed8;
    color: #fff;
    font-size: .78rem;
}

.iran-plate > .iran-plate-iran {
    font-size: .85rem;
}

.iran-plate select.plate-part {
    padding: 0 6px;
    text-align-last: center;
}

.iran-plate input.plate-part:focus,
.iran-plate select.plate-part:focus {
    position: relative;
    z-index: 1;
    outline: 3px solid #2563eb;
    outline-offset: -3px;
}

.iran-plate.iran-plate--compact {
    grid-template-columns: 34px 36px 44px 50px 42px 36px;
    border-width: 1px;
    border-radius: 6px;
}

.iran-plate--compact > .iran-plate-flag,
.iran-plate--compact > .iran-plate-iran,
.iran-plate--compact > .plate-part {
    min-height: 30px;
    padding: 0 3px;
    font-size: .78rem;
}

.iran-plate--compact > .iran-plate-flag {
    font-size: .52rem;
}

.iran-plate--compact > .iran-plate-iran {
    font-size: .62rem;
}

.iran-plate.iran-plate--raw {
    grid-template-columns: minmax(130px, auto);
}

.iran-plate > .iran-plate-raw {
    display: grid;
    place-items: center;
    min-height: 30px;
    padding: 4px 12px;
    color: #111827;
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.iran-plate-empty {
    color: #6b7280;
}

@media (max-width: 640px) {
    .iran-plate-control,
    .iran-plate.iran-plate--editor {
        width: 100%;
    }

    .iran-plate.iran-plate--editor {
        grid-template-columns: minmax(42px, .8fr) minmax(46px, 1fr) minmax(62px, 1.2fr) minmax(68px, 1.3fr) minmax(44px, .8fr) minmax(46px, 1fr);
    }

    .iran-plate--editor > .iran-plate-flag,
    .iran-plate--editor > .iran-plate-iran,
    .iran-plate--editor > .plate-part {
        min-height: 46px;
        padding-inline: 4px;
        font-size: .92rem;
    }

    .iran-plate--editor > .iran-plate-flag {
        font-size: .65rem;
    }
}

.app-title-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 22px;
    padding: 16px 18px;
    background: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, .28), transparent 28%), linear-gradient(135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(37, 99, 235, .28), inset 0 1px 0 rgba(255, 255, 255, .26);
    font-weight: 900;
    letter-spacing: -.02em;
    text-align: center;
}

    .app-title-card::before {
        content: "";
        position: absolute;
        inset: auto -28px -42px auto;
        width: 110px;
        height: 110px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .12);
        z-index: -1;
    }

    .app-title-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .2) 42%, transparent 58%);
        transform: translateX(68%);
        z-index: -1;
    }

    .app-title-card span {
        display: block;
        line-height: 1.55;
    }

.sidebar .app-title-card {
    width: 100%;
    min-height: 86px;
    font-size: 1.12rem;
}

.public-app-title {
    min-width: min(100%, 460px);
    padding: 20px 28px;
    font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.tracking-slip .subtitle {
    display: inline-flex;
    margin-top: 8px;
    border-radius: 14px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .12));
    color: #1d4ed8;
    font-weight: 800;
}

/* Public portal visual refinement: align the title card with the existing light/blue theme. */
.public-portal-top {
    align-items: center;
    border: 1px solid #dbe3ef;
    border-radius: 24px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .86));
    box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
}

.app-title-card {
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    background: radial-gradient(circle at 12% 18%, rgba(59, 130, 246, .18), transparent 30%), linear-gradient(135deg, #ffffff 0%, #eff6ff 58%, #dbeafe 100%);
    color: #1e3a8a;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .12), inset 0 1px 0 rgba(255, 255, 255, .85);
}

    .app-title-card::before {
        background: rgba(37, 99, 235, .08);
    }

    .app-title-card::after {
        background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .42) 44%, transparent 62%);
    }

.sidebar .app-title-card {
    border-color: rgba(147, 197, 253, .32);
    background: radial-gradient(circle at 14% 20%, rgba(96, 165, 250, .22), transparent 32%), linear-gradient(135deg, rgba(30, 58, 138, .82), rgba(30, 64, 175, .5));
    color: #f8fafc;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.public-app-title {
    min-width: 0;
    width: min(100%, 520px);
    padding: 16px 24px;
    font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

.public-tabs {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 6px;
    border-color: #dbe3ef;
    background: rgba(241, 245, 249, .9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 24px rgba(15, 23, 42, .05);
}

.public-tab {
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

    .public-tab:hover {
        background: rgba(255, 255, 255, .72);
        color: #1d4ed8;
    }

    .public-tab.active {
        color: #1e3a8a;
        box-shadow: 0 10px 20px rgba(37, 99, 235, .12);
    }

@media (max-width: 800px) {
    .public-portal-top {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

        .public-portal-top .btn {
            width: max-content;
            margin-top: 0;
        }

    .public-tabs {
        grid-template-columns: repeat(4, minmax(132px, 1fr));
        overflow-x: auto;
        scrollbar-width: thin;
    }
}

/* ===== Document-style RTL registration forms ===== */
.doc-form {
    border: 1px solid #9ca3af;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    margin-bottom: 20px;
    direction: rtl;
}

.doc-form-header {
    background: #d9ead3;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: start;
    border-bottom: 1px solid #9ca3af;
}

.doc-form-meta {
    font-size: 13px;
    line-height: 1.9;
    color: #1f2937;
}

.doc-form-meta span {
    color: #4b5563;
}

.doc-form-title {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    align-self: center;
}

.doc-form-body {
    padding: 16px 18px 20px;
}

.doc-form-section-title {
    font-weight: 700;
    margin: 0 0 14px;
    font-size: 15px;
}

.doc-form-banner {
    background: #d9ead3;
    padding: 8px 14px;
    font-weight: 700;
    border: 1px solid #9ca3af;
    border-left: none;
    border-right: none;
    margin: 16px -18px;
}

.doc-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    margin-bottom: 12px;
    align-items: start;
}

.doc-form-row.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-form-row.full {
    grid-template-columns: 1fr;
}

.doc-field {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
}

.doc-field.stacked {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.doc-field.stacked .doc-label {
    margin-bottom: 4px;
}

.doc-field label,
.doc-label {
    margin: 0;
    white-space: nowrap;
    font-weight: 600;
    font-size: 14px;
}

.doc-field input,
.doc-field select,
.doc-field textarea {
    border-radius: 4px;
    padding: 6px 10px;
    min-height: 34px;
}

.doc-req {
    color: #dc2626;
    font-weight: 800;
    font-size: 16px;
}

.doc-radios,
.doc-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.doc-radios label,
.doc-checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.doc-radios input,
.doc-checks input {
    width: auto;
    min-height: auto;
}

.doc-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-date input {
    max-width: 160px;
    direction: ltr;
    text-align: center;
}

.doc-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.doc-time input {
    width: 48px;
    text-align: center;
    direction: ltr;
}

.doc-attach-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
    align-items: center;
}

.doc-attach-row input[type="file"] {
    padding: 4px;
}

.doc-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 18px;
    flex-wrap: wrap;
}

.doc-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.doc-add:hover {
    background: #1d4ed8;
    color: #fff;
}

.doc-search-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    border: 1px solid #9ca3af;
    background: #fff;
}

.doc-search-labels {
    background: #f5f0e6;
}

.doc-search-labels div,
.doc-search-inputs div {
    padding: 10px 12px;
    border-bottom: 1px solid #d1d5db;
    min-height: 46px;
    display: flex;
    align-items: center;
}

.doc-search-labels div:last-child,
.doc-search-inputs div:last-child {
    border-bottom: none;
}

.doc-search-inputs select {
    border-radius: 2px;
}

.transport-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #d1d5db;
    margin-bottom: 16px;
}

.transport-tabs a {
    padding: 10px 18px;
    color: #374151;
    border: 1px solid transparent;
    border-bottom: none;
    background: #f3f4f6;
    margin-left: 4px;
}

.transport-tabs a.active {
    background: #fff;
    border-color: #d1d5db;
    border-top: 3px solid #2563eb;
    font-weight: 700;
    color: #1e3a8a;
}

@media (max-width: 900px) {
    .doc-form-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .doc-form-row,
    .doc-form-row.three {
        grid-template-columns: 1fr;
    }

    .doc-field {
        grid-template-columns: 1fr auto;
    }

    .doc-field label {
        grid-column: 1 / -1;
    }

    .doc-attach-row {
        grid-template-columns: 1fr;
    }

    .doc-search-layout {
        grid-template-columns: 1fr;
    }
}

/* Hierarchical sidebar groups */
.sidebar-nav .nav-group {
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    overflow: hidden;
}

.sidebar-nav .nav-group summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    color: #e5e7eb;
    font-weight: 600;
    user-select: none;
}

.sidebar-nav .nav-group summary::-webkit-details-marker {
    display: none;
}

.sidebar-nav .nav-group summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform .18s ease;
    margin-left: 4px;
}

.sidebar-nav .nav-group[open] summary::after {
    transform: rotate(-135deg);
}

.sidebar-nav .nav-group summary:hover {
    background: rgba(255, 255, 255, .08);
    color: white;
}

.sidebar-nav .nav-group-items {
    display: grid;
    gap: 2px;
    padding: 0 6px 8px;
}

.sidebar-nav .nav-group-items a {
    padding: 8px 12px;
    font-size: .94rem;
    color: #cbd5e1;
}

.page-subtitle {
    margin: 6px 0 0;
}

.role-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.role-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.role-card-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.role-card-header p {
    margin: 4px 0 0;
}

.role-count-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 6px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .85rem;
    font-weight: 700;
}

.role-permission-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.permission-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 5px 9px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: .82rem;
}

.permission-chip.muted-chip {
    color: #64748b;
    background: #f1f5f9;
}

.role-card-actions {
    margin-top: auto;
}

.permissions-page-header {
    align-items: flex-start;
}

.permissions-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.permissions-toolbar p {
    margin: 0;
}

.permissions-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.permission-groups {
    display: grid;
    gap: 16px;
}

.permission-group {
    padding: 0;
    overflow: hidden;
}

.permission-group-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.permission-group-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.permission-group-header p {
    margin: 4px 0 0;
}

.permission-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.permission-group-toggle input {
    width: auto;
}

.permission-items {
    display: grid;
    gap: 10px;
    padding: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.permission-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.permission-item:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.permission-item.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, .12);
}

.permission-item input {
    width: auto;
    margin-top: 3px;
    flex: 0 0 auto;
}

.permission-item-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.permission-item-body strong {
    color: #0f172a;
}

.permission-item-body span {
    color: #64748b;
    font-size: .9rem;
    line-height: 1.5;
}

.permission-item-body code {
    display: inline-block;
    width: fit-content;
    margin-top: 2px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: .78rem;
}

.permissions-footer {
    position: sticky;
    bottom: 12px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #e5e7eb;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.role-create-form {
    max-width: 720px;
}

/* User admin forms */
.user-admin-form {
    display: grid;
    gap: 16px;
}

.user-admin-section {
    padding: 18px;
}

.user-admin-section-header {
    margin-bottom: 16px;
}

.user-admin-section-header h2,
.user-role-picker-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.user-admin-section-header p,
.user-role-picker-header p {
    margin: 6px 0 0;
}

.user-identity-card {
    padding: 16px 18px;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-identity-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.user-identity h2 {
    margin: 0;
    font-size: 1.15rem;
}

.user-identity p {
    margin: 4px 0 0;
}

.user-role-picker-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.user-role-group {
    margin-top: 14px;
}

.user-role-group h3 {
    margin: 0 0 10px;
    font-size: .92rem;
    color: #64748b;
    font-weight: 700;
}

.user-role-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.user-role-option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    margin: 0;
    font-weight: 500;
}

.user-role-option:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.user-role-option.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, .12);
}

.user-role-option input {
    width: auto;
    margin-top: 3px;
    flex: 0 0 auto;
}

.user-role-option-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.user-role-option-body strong {
    color: #0f172a;
    line-height: 1.4;
}

.user-role-option-body code {
    display: inline-block;
    width: fit-content;
    padding: 2px 6px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .78rem;
}

.user-assignment-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.user-assignment-field .field-help {
    margin: 0 0 8px;
    font-size: .88rem;
}

.table-card {
    overflow-x: auto;
}

.users-table td {
    vertical-align: middle;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .82rem;
    font-weight: 700;
}

.status-pill.is-active {
    background: #ecfdf5;
    color: #047857;
}

.status-pill.is-inactive {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 700px) {
    .user-role-picker-header,
    .permissions-toolbar,
    .permission-group-header,
    .permissions-page-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== هویت سازمانی تاکسیرانی تهران: نفتی + طلایی ===== */
body {
    background: var(--taxi-surface);
    color: var(--taxi-ink);
}

a {
    color: var(--taxi-link);
}

    a:hover {
        color: var(--taxi-gold-hover);
    }

.topbar,
.sidebar {
    background:
        radial-gradient(circle at 18% 0%, rgba(201, 164, 76, .18), transparent 42%),
        linear-gradient(180deg, var(--taxi-navy-mid) 0%, var(--taxi-navy) 22%, var(--taxi-navy-deep) 100%);
    color: #f8f4ea;
}

.sidebar {
    border-inline-end: 1px solid rgba(201, 164, 76, .22);
}

.sidebar-user {
    border-color: rgba(201, 164, 76, .28);
    background: rgba(255, 255, 255, .06);
}

.sidebar-avatar,
.profile-photo-large {
    border-color: rgba(201, 164, 76, .45);
}

.sidebar-avatar-placeholder,
.profile-photo-placeholder,
.user-identity-avatar {
    background: var(--taxi-gold);
    color: var(--taxi-on-gold);
}

.sidebar-user-text span {
    color: #d7c9a8;
}

.sidebar-nav a {
    color: #efe6d4;
}

    .sidebar-nav a:hover {
        background: rgba(201, 164, 76, .14);
        color: var(--taxi-gold-strong);
    }

    .sidebar-nav a.active {
        background: var(--taxi-gold);
        color: var(--taxi-on-gold);
        font-weight: 700;
    }

.sidebar-nav .nav-group {
    background: rgba(8, 24, 32, .28);
    border-color: rgba(201, 164, 76, .14);
}

.sidebar-nav .nav-group summary {
    color: #efe6d4;
}

    .sidebar-nav .nav-group summary:hover {
        background: rgba(201, 164, 76, .12);
        color: var(--taxi-gold-strong);
    }

.sidebar-nav .nav-group-items a {
    color: #d7c9a8;
}

.sidebar-logout .link-button {
    background: rgba(220, 38, 38, .16);
    color: #fecaca;
}

.card,
.auth-card,
.public-empty-state,
.featured-notice,
.notice-card-large,
.public-track-panel,
.public-news-panel,
.role-card {
    background: var(--taxi-card);
    border-color: var(--taxi-border);
    box-shadow: 0 10px 28px var(--taxi-shadow);
}

.auth-container {
    background:
        radial-gradient(circle at 12% 8%, rgba(201, 164, 76, .2), transparent 34%),
        radial-gradient(circle at 92% 96%, rgba(13, 36, 54, .1), transparent 38%),
        var(--taxi-surface);
}

.auth-card {
    border-top: 3px solid var(--taxi-gold);
}

input, select, textarea {
    border-color: var(--taxi-line);
    background: #fffdf8;
}

    input:focus, select:focus, textarea:focus {
        outline: 2px solid var(--taxi-gold);
        outline-offset: 1px;
        border-color: var(--taxi-gold);
    }

.btn {
    background: #ece6d8;
    color: var(--taxi-ink);
    border-color: transparent;
}

    .btn:hover {
        background: #ddd4c2;
        border-color: var(--taxi-line);
    }

    .btn:focus {
        outline-color: var(--taxi-gold);
    }

    .btn.primary {
        background: var(--taxi-navy);
        color: #f8f4ea;
        border-color: var(--taxi-navy);
    }

        .btn.primary:hover {
            background: var(--taxi-navy-soft);
            border-color: var(--taxi-navy-mid);
        }

        .btn.primary:focus {
            outline-color: var(--taxi-gold);
        }

    .btn.secondary {
        background: var(--taxi-gold-mist);
        color: var(--taxi-ink);
        border-color: var(--taxi-border);
    }

    .btn.info {
        background: var(--taxi-gold-soft);
        color: var(--taxi-navy);
        border-color: #e4d3a4;
    }

        .btn.info:hover {
            background: #ead9a8;
            border-color: #d4c08a;
            color: var(--taxi-navy-deep);
        }

.modal-content {
    background: var(--taxi-card);
    box-shadow: 0 24px 60px var(--taxi-shadow-strong);
}

.attachment-category,
.attachment-item {
    border-color: var(--taxi-border);
    background: var(--taxi-card);
}

.category-title,
.profile-section-title {
    color: var(--taxi-navy);
}

.dashboard-hero {
    background: linear-gradient(135deg, #fffdf8 0%, var(--taxi-gold-mist) 46%, #e7eef2 100%);
    border: 1px solid var(--taxi-border);
}

    .dashboard-hero p {
        color: var(--taxi-muted);
    }

.stat {
    background: var(--taxi-card);
    border-color: var(--taxi-border);
}

    .stat::before,
    .stat-total::before {
        background: var(--taxi-gold);
    }

    .stat span {
        color: var(--taxi-navy);
    }

th {
    background: var(--taxi-gold-mist);
}

.badge,
.status-public,
.role-count-badge {
    background: var(--taxi-gold-soft);
    color: var(--taxi-navy);
}

.status-closed {
    background: #e7eef2;
    color: var(--taxi-navy-soft);
}

.notice-card-large summary,
.notice-item summary {
    color: var(--taxi-link);
}

.timeline-item {
    border-right-color: var(--taxi-gold);
}

.radio-card:has(input:checked) {
    border-color: var(--taxi-gold);
    background: var(--taxi-gold-mist);
    color: var(--taxi-navy);
}

.iran-plate input.plate-part:focus,
.iran-plate select.plate-part:focus {
    outline-color: var(--taxi-gold);
}

.app-title-card {
    border: 1px solid rgba(201, 164, 76, .45);
    background:
        radial-gradient(circle at 14% 18%, rgba(212, 175, 55, .28), transparent 32%),
        linear-gradient(135deg, var(--taxi-navy-mid) 0%, var(--taxi-navy) 55%, #123044 100%);
    color: #f8f4ea;
    box-shadow: 0 16px 34px rgba(13, 36, 54, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}

    .app-title-card::before {
        background: rgba(212, 175, 55, .16);
    }

    .app-title-card::after {
        background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .22) 44%, transparent 62%);
    }

.sidebar .app-title-card {
    border-color: rgba(201, 164, 76, .35);
    background:
        radial-gradient(circle at 16% 20%, rgba(212, 175, 55, .26), transparent 34%),
        linear-gradient(135deg, #1a4660, #0d2436 70%);
    color: #f8f4ea;
}

.public-portal-top {
    border: 1px solid var(--taxi-border);
    background: linear-gradient(135deg, rgba(255, 253, 248, .96), rgba(243, 234, 210, .72));
    box-shadow: 0 18px 40px var(--taxi-shadow);
}

.public-app-title,
.public-portal-top .app-title-card {
    border: 1px solid #e4d3a4;
    background:
        radial-gradient(circle at 12% 18%, rgba(201, 164, 76, .22), transparent 30%),
        linear-gradient(135deg, #fffdf8 0%, var(--taxi-gold-mist) 58%, #ead9a8 100%);
    color: var(--taxi-navy);
    box-shadow: 0 14px 30px rgba(201, 164, 76, .16), inset 0 1px 0 rgba(255, 255, 255, .85);
}

.tracking-slip .subtitle {
    background: linear-gradient(135deg, rgba(201, 164, 76, .16), rgba(13, 36, 54, .08));
    color: var(--taxi-navy);
}

.public-tabs {
    border-color: var(--taxi-border);
    background: rgba(243, 234, 210, .55);
}

.public-tab {
    color: var(--taxi-ink);
}

    .public-tab:hover {
        color: var(--taxi-navy-soft);
        background: rgba(255, 253, 248, .8);
    }

    .public-tab.active {
        background: #fffdf8;
        color: var(--taxi-navy);
        box-shadow: 0 10px 20px rgba(201, 164, 76, .16);
    }

.doc-form {
    border-color: var(--taxi-line);
}

.doc-form-header,
.doc-form-banner {
    background: var(--taxi-gold-soft);
    border-color: var(--taxi-line);
}

.doc-search-labels {
    background: var(--taxi-gold-mist);
}

.doc-add {
    background: var(--taxi-navy);
    color: #f8f4ea;
}

    .doc-add:hover {
        background: var(--taxi-navy-soft);
        color: #f8f4ea;
    }

.transport-tabs a.active {
    border-top-color: var(--taxi-gold);
    color: var(--taxi-navy);
}

.permission-item:hover,
.user-role-option:hover {
    border-color: var(--taxi-gold);
    background: var(--taxi-gold-mist);
}

.permission-item.is-selected,
.user-role-option.is-selected {
    border-color: var(--taxi-gold);
    background: var(--taxi-gold-soft);
    box-shadow: 0 0 0 1px rgba(201, 164, 76, .22);
}

.file-uploader {
    border-color: var(--taxi-line);
    background: var(--taxi-gold-mist);
}
