* {
    box-sizing: border-box;
}

html {
    direction: rtl;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
    line-height: 1.7;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 250px;
    background: #111827;
    color: #ffffff;
    padding: 24px 18px;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
}

.sidebar-brand {
    margin-bottom: 28px;
}

.sidebar-brand-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.sidebar-brand-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.sidebar-section {
    margin-top: 24px;
}

.sidebar-section-title {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav a {
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 8px;
    display: block;
}

.sidebar-nav a:hover {
    background: #1f2937;
    text-decoration: none;
}

.main-area {
    width: calc(100% - 250px);
    margin-right: 250px;
    min-height: 100vh;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    min-height: 70px;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.page-content {
    padding: 28px;
    max-width: 1500px;
    margin: 0 auto;
}

h1 {
    margin-top: 0;
    font-size: 28px;
}

h2 {
    margin-top: 30px;
    font-size: 21px;
}

h3 {
    font-size: 17px;
}


.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.045);
    transition: box-shadow 0.2s ease;
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}


.stat-card {
    background: linear-gradient(145deg, #ffffff, #f9fbff);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
}


.stat-label {
    font-size: 13px;
    color: #6b7280;
}

.stat-value {
    margin-top: 8px;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    margin: 16px 0;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
    vertical-align: top;
}

th {
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

tbody tr:hover {
    background: #f9fafb;
}

form {
    margin: 12px 0;
}

input,
select,
textarea {
    width: 100%;
    max-width: 700px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
}

button,
.btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    background: #2563eb;
    color: #ffffff;
    display: inline-block;
    text-decoration: none;
}

button:hover,
.btn:hover {
    opacity: 0.92;
    text-decoration: none;
}

.btn-secondary {
    background: #4b5563;
}

.btn-danger {
    background: #dc2626;
}

.btn-success {
    background: #059669;
}

.logout-button {
    background: #374151;
    padding: 8px 12px;
}

.messages {
    margin-bottom: 20px;
}

.message {
    background: #ffffff;
    border-right: 4px solid #2563eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
}

.message.success {
    border-right-color: #059669;
}

.message.error {
    border-right-color: #dc2626;
}

.message.warning {
    border-right-color: #d97706;
}

.status-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    background: #e5e7eb;
}

hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 30px 0;
}

ul.errorlist {
    color: #b91c1c;
    padding-right: 20px;
}

.empty-state {
    background: #ffffff;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    color: #6b7280;
}

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

    .sidebar {
        width: 210px;
    }

    .main-area {
        width: calc(100% - 210px);
        margin-right: 210px;
    }
}

@media (max-width: 700px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
    }

    .main-area {
        width: 100%;
        margin-right: 0;
    }

    .topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .page-content {
        padding: 18px;
    }

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

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.public-page-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.public-page-content > * {
    width: 100%;
    max-width: 460px;
}

.public-page-content form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.public-page-content h1,
.public-page-content h2 {
    text-align: center;
}

.public-page-content button {
    width: 100%;
    margin-top: 12px;
}

/* =========================================
   Dashboard UI
   ========================================= */

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

.page-heading h1 {
    margin-bottom: 4px;
}

.page-description {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-section {
    margin-bottom: 34px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    font-size: 20px;
}

.section-heading p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.section-badge {
    background: #eef2ff;
    color: #4338ca;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.stats-grid {
    grid-template-columns: repeat(
        auto-fit,
        minmax(190px, 1fr)
    );
}

.stat-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 120px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: #d1d5db;
}

.stat-card-primary::before {
    background: #2563eb;
}

.stat-card-success::before {
    background: #059669;
}

.stat-card-warning::before {
    background: #d97706;
}

.stat-card-danger::before {
    background: #dc2626;
}

.stat-card-info::before {
    background: #0891b2;
}

.stat-card-neutral::before {
    background: #6b7280;
}

.stat-card-icon {
    min-width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 22px;
    font-weight: bold;
}

.stat-footer {
    color: #9ca3af;
    font-size: 11px;
    margin-top: 3px;
}

.analytics-summary {
    background: #111827;
    color: #ffffff;
    border-radius: 16px;
    padding: 24px;
}

.analytics-summary-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-summary-main p {
    margin: 4px 0 0;
    color: #9ca3af;
    font-size: 13px;
}

.analytics-big-number {
    font-size: 46px;
    line-height: 1;
    font-weight: 800;
    color: #ffffff;
}

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

.analytics-mini-card {
    background: #1f2937;
    padding: 14px;
    border-radius: 10px;
}

.analytics-mini-card span {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 5px;
}

.analytics-mini-card strong {
    font-size: 22px;
}

.table-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.dashboard-table {
    margin: 0;
    border-radius: 0;
}

.dashboard-table th {
    background: #f8fafc;
    font-size: 12px;
}

.dashboard-table td {
    text-align: center;
    font-size: 13px;
}

.dashboard-table th:first-child,
.dashboard-table td:first-child {
    text-align: right;
}

.province-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #111827;
}

.province-link:hover {
    text-decoration: none;
    color: #2563eb;
}

.province-avatar {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
}

.number-success {
    color: #047857;
    font-weight: 700;
}

.number-danger {
    color: #dc2626;
    font-weight: 700;
}

.table-note {
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 11px;
}

.text-link {
    font-size: 13px;
    font-weight: 700;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #111827;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.recent-item:hover {
    border-color: #93c5fd;
    transform: translateX(-2px);
    text-decoration: none;
}

.recent-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-meta {
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

.recent-arrow {
    color: #9ca3af;
}

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

.quick-action-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: #111827;
}

.quick-action-card:hover {
    border-color: #93c5fd;
    text-decoration: none;
}

.quick-action-card p {
    color: #6b7280;
    font-size: 12px;
    margin: 4px 0 0;
}

.quick-action-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

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

@media (max-width: 700px) {
    .page-heading {
        flex-direction: column;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1;
        text-align: center;
    }

    .analytics-summary-main {
        align-items: flex-start;
    }

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

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Representative Dashboard
   ========================================= */

.representative-province-card {
    background: linear-gradient(
        135deg,
        #1d4ed8,
        #2563eb
    );
    color: #ffffff;
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.representative-province-label {
    font-size: 12px;
    opacity: 0.75;
}

.representative-province-name {
    font-size: 24px;
    font-weight: 700;
    margin-top: 4px;
}

.representative-province-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* =========================================
   Tasks & Assignments
   ========================================= */

.detail-toolbar {
    margin-bottom: 16px;
}

.back-link {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.back-link:hover {
    color: #2563eb;
    text-decoration: none;
}


/* Filters */

.filter-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 28px;
}

.filter-panel form {
    margin: 0;
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
}

.form-field input,
.form-field select {
    max-width: none;
    width: 100%;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.btn-light {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}


/* Tables */

.app-table {
    margin: 0;
    border-radius: 0;
}

.app-table th {
    background: #f8fafc;
    font-size: 12px;
}

.app-table td {
    font-size: 13px;
    vertical-align: middle;
}

.primary-table-link {
    color: #111827;
    font-weight: 700;
}

.primary-table-link:hover {
    color: #2563eb;
    text-decoration: none;
}

.table-action-cell {
    text-align: left;
    white-space: nowrap;
}

.table-action-link {
    display: inline-block;
    padding: 5px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
}

.table-action-link:hover {
    text-decoration: none;
    background: #dbeafe;
}

.muted-text {
    color: #9ca3af;
}


/* Status */

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill-large {
    padding: 7px 13px;
    font-size: 12px;
}

.status-success {
    background: #d1fae5;
    color: #047857;
}

.status-success-soft {
    background: #ecfdf5;
    color: #059669;
}

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

.status-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.status-info {
    background: #cffafe;
    color: #0e7490;
}

.status-neutral {
    background: #f3f4f6;
    color: #4b5563;
}


/* Detail cards */

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

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

.info-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 17px;
}

.info-label {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 22px;
}

.info-value-small {
    font-size: 14px;
}

.content-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 28px;
}

.content-card-header {
    padding: 13px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 700;
}

.content-card-body {
    padding: 20px;
}

.task-description {
    line-height: 2;
}


/* Action cards */

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

.action-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #111827;
}

.action-card:hover {
    text-decoration: none;
    border-color: #60a5fa;
}

.action-card p {
    margin: 3px 0 0;
    color: #6b7280;
    font-size: 12px;
}

.action-card-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 11px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.action-card-success {
    border-color: #a7f3d0;
}

.action-card-success .action-card-icon {
    background: #ecfdf5;
    color: #059669;
}


/* Timeline */

.timeline-strip {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    margin-bottom: 20px;
    overflow: hidden;
}

.timeline-strip-item {
    padding: 15px 18px;
    border-left: 1px solid #e5e7eb;
}

.timeline-strip-item:last-child {
    border-left: 0;
}

.timeline-strip-item span {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-bottom: 3px;
}

.timeline-strip-item strong {
    font-size: 13px;
}

.text-danger {
    color: #dc2626;
}

.text-success {
    color: #059669;
}


/* Alerts */

.alert-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-right: 4px solid #64748b;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 13px;
}

.alert-box p {
    margin: 5px 0 0;
}

.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    border-right-color: #059669;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-right-color: #d97706;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    border-right-color: #dc2626;
}


/* Workflow */

.workflow-callout {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.workflow-callout p {
    color: #6b7280;
    margin: 4px 0 0;
    font-size: 12px;
}

.inline-action-form {
    margin: 0;
}


/* Submission */

.submission-summary-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.submission-version {
    font-size: 24px;
}


/* Secretariat review */

.review-entry-card {
    background: #111827;
    color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.review-entry-card h2 {
    margin: 3px 0;
}

.review-entry-card p {
    color: #9ca3af;
    margin: 4px 0 0;
    font-size: 12px;
}

.review-entry-label {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
}


/* Manager Evaluation */

.management-evaluation-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
}

.evaluation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.evaluation-meta {
    color: #6b7280;
    font-size: 11px;
    margin-top: 6px;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(
        4,
        minmax(0, 1fr)
    );
    gap: 12px;
    margin-top: 20px;
}

.score-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
}

.score-card span {
    display: block;
    color: #6b7280;
    font-size: 11px;
}

.score-card strong {
    display: block;
    font-size: 27px;
    margin-top: 4px;
}

.score-card-highlight {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.score-card-highlight strong {
    color: #1d4ed8;
}

.evaluation-details-grid {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    gap: 10px;
    margin: 20px 0;
}

.evaluation-details-grid > div {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
}

.evaluation-details-grid span {
    display: block;
    color: #6b7280;
    font-size: 10px;
}

.evaluation-details-grid strong {
    font-size: 12px;
}

.ai-analysis-card {
    margin-top: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.ai-analysis-card .evaluation-details-grid,
.ai-analysis-card .ai-summary {
    margin-right: 16px;
    margin-left: 16px;
}

.ai-summary {
    background: #f8fafc;
    padding: 14px;
    border-radius: 9px;
    margin-bottom: 16px;
}

.ai-summary p {
    margin: 5px 0 0;
    color: #4b5563;
    font-size: 12px;
}

.finalization-status {
    margin-top: 22px;
}

.finalization-status h3 {
    margin-bottom: 10px;
}


/* Responsive */

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

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

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

@media (max-width: 700px) {
    .filter-grid,
    .detail-grid,
    .detail-grid-4,
    .action-panel,
    .score-grid,
    .evaluation-details-grid,
    .timeline-strip {
        grid-template-columns: 1fr;
    }

    .timeline-strip-item {
        border-left: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .timeline-strip-item:last-child {
        border-bottom: 0;
    }

    .workflow-callout,
    .submission-summary-card,
    .review-entry-card,
    .evaluation-header {
        flex-direction: column;
        align-items: stretch;
    }

    .workflow-callout .btn,
    .submission-summary-card .btn,
    .review-entry-card .btn,
    .evaluation-header .btn {
        text-align: center;
    }

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

    .filter-actions button,
    .filter-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* =========================================
   Submission & Review Desk
   ========================================= */

.review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
}

.review-main-column {
    min-width: 0;
}

.review-side-column {
    min-width: 0;
}

.review-side-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    position: sticky;
    top: 92px;
}

.review-side-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 18px;
}

.report-content-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
}

.report-text {
    line-height: 2.1;
    font-size: 14px;
    color: #374151;
}

.report-text p:first-child {
    margin-top: 0;
}

.report-text p:last-child {
    margin-bottom: 0;
}


/* Attachments */

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

.attachment-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #111827;
}

.attachment-card:hover {
    text-decoration: none;
    border-color: #93c5fd;
}

.attachment-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.attachment-info {
    min-width: 0;
}

.attachment-info strong {
    display: block;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.attachment-info span {
    display: block;
    color: #6b7280;
    font-size: 10px;
    margin-top: 2px;
}


/* Assessment */

.evaluation-policy {
    color: #6b7280;
    font-size: 11px;
}

.review-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    margin-top: 18px;
}

.review-form-header h3 {
    margin: 0;
}

.review-form-header p {
    color: #6b7280;
    font-size: 12px;
    margin: 4px 0 16px;
}


/* AI */

.ai-current-score {
    background: #111827;
    color: #ffffff;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-current-score span {
    color: #9ca3af;
    font-size: 12px;
}

.ai-current-score strong {
    font-size: 30px;
}

.ai-attempts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-attempt-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
}

.ai-attempt-selected {
    border: 2px solid #60a5fa;
    background: #f8fbff;
}

.ai-attempt-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.selected-badge {
    margin-right: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 9px;
    font-weight: 700;
}

.ai-selected-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 11px;
    margin-top: 12px;
}


/* Readiness */

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

.readiness-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 14px;
}

.readiness-item span {
    display: block;
    color: #6b7280;
    font-size: 10px;
    margin-bottom: 4px;
}

.readiness-item strong {
    font-size: 12px;
}

.final-score-panel {
    background: #111827;
    color: #ffffff;
    border-radius: 15px;
    padding: 24px;
    text-align: center;
}

.final-score-panel span {
    display: block;
    color: #9ca3af;
    font-size: 11px;
}

.final-score-panel strong {
    display: block;
    font-size: 44px;
    line-height: 1.2;
    margin: 8px 0;
}

.final-score-panel p {
    margin: 0;
    color: #9ca3af;
    font-size: 11px;
}


/* Audit */

.audit-timeline {
    position: relative;
}

.audit-item {
    position: relative;
    display: flex;
    gap: 14px;
    padding-bottom: 18px;
}

.audit-item:not(:last-child)::before {
    content: "";
    position: absolute;
    right: 6px;
    top: 13px;
    bottom: 0;
    width: 1px;
    background: #e5e7eb;
}

.audit-dot {
    width: 13px;
    height: 13px;
    min-width: 13px;
    border-radius: 50%;
    background: #2563eb;
    margin-top: 5px;
    z-index: 1;
}

.audit-content {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 12px 14px;
}

.audit-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.audit-header span,
.audit-meta {
    color: #6b7280;
    font-size: 10px;
}

.audit-description {
    background: #f8fafc;
    border-radius: 7px;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 11px;
}


/* Decisions */

.decision-block h3 {
    margin: 0 0 4px;
}

.decision-block > p {
    color: #6b7280;
    font-size: 11px;
    margin: 0 0 12px;
}

.decision-block textarea,
.decision-block input,
.decision-block select {
    width: 100%;
}

.decision-block button {
    width: 100%;
}

.decision-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9ca3af;
    font-size: 10px;
    margin: 20px 0;
}

.decision-divider::before,
.decision-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}


/* Version History */

.version-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.version-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
}

.version-marker {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
}

.version-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 17px;
}

.version-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.version-card-header h3 {
    margin: 0;
}

.version-date {
    color: #6b7280;
    font-size: 10px;
    margin-top: 3px;
}

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

.version-meta-grid > div {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
}

.version-meta-grid span {
    display: block;
    color: #6b7280;
    font-size: 9px;
}

.version-meta-grid strong {
    font-size: 11px;
}

.version-actions {
    display: flex;
    gap: 8px;
}


/* Responsive */

@media (max-width: 1100px) {
    .review-layout {
        grid-template-columns: 1fr;
    }

    .review-side-card {
        position: static;
    }

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

@media (max-width: 700px) {
    .attachment-list,
    .readiness-grid,
    .version-meta-grid {
        grid-template-columns: 1fr;
    }

    .ai-attempt-header,
    .audit-header,
    .version-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .version-item {
        grid-template-columns: 1fr;
    }

    .version-marker {
        width: 40px;
        height: 40px;
    }
}

/* =========================================
   Report Editor & Final Submit
   ========================================= */

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.editor-main-column {
    min-width: 0;
}

.editor-side-column {
    min-width: 0;
}

.report-editor-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
}

.report-editor-card form {
    margin: 0;
}

.report-editor-field textarea {
    width: 100%;
    max-width: none;
    min-height: 360px;
    line-height: 2;
    padding: 16px;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.editor-help {
    color: #6b7280;
    font-size: 11px;
}


/* Upload */

.upload-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 14px;
}

.upload-info strong {
    font-size: 14px;
}

.upload-info p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 11px;
}

.upload-form {
    margin: 0;
}

.upload-input input[type="file"] {
    width: 100%;
    max-width: none;
    margin-bottom: 9px;
}

.upload-form button {
    width: 100%;
}

.attachment-management-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.attachment-management-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.attachment-management-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.attachment-actions {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.attachment-actions .btn {
    padding: 7px 11px;
    font-size: 11px;
}


/* Editor side */

.editor-side-card {
    background: #111827;
    color: #ffffff;
    border-radius: 16px;
    padding: 22px;
    position: sticky;
    top: 92px;
}

.editor-side-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.editor-side-card h3 {
    margin: 0;
    font-size: 18px;
}

.editor-side-card p {
    margin: 6px 0 18px;
    color: #9ca3af;
    font-size: 12px;
}

.editor-submit-link {
    display: block;
    text-align: center;
}

.editor-warning {
    border-top: 1px solid #374151;
    margin-top: 18px;
    padding-top: 14px;
    color: #fbbf24;
    font-size: 10px;
    line-height: 1.8;
}


/* Form errors */

.form-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    margin: 8px 0;
}


/* Submit */

.submit-warning-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 22px;
}

.submit-warning-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: #fef3c7;
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
}

.submit-warning-card strong {
    color: #92400e;
}

.submit-warning-card p {
    color: #78350f;
    margin: 4px 0 0;
    font-size: 12px;
}

.final-submit-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

.final-submit-header {
    padding: 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.final-submit-header h2 {
    margin: 5px 0;
}

.final-submit-header p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.final-submit-step {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
}

.final-submit-form {
    padding: 22px;
    margin: 0;
}

.confirmation-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
}

.confirmation-box:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.confirmation-control {
    padding-top: 2px;
}

.confirmation-control input {
    width: auto;
    margin: 0;
}

.confirmation-text strong {
    display: block;
    font-size: 13px;
}

.confirmation-text small {
    display: block;
    color: #6b7280;
    margin-top: 3px;
    font-size: 10px;
}

.final-submit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


/* Responsive */

@media (max-width: 1000px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-side-card {
        position: static;
    }

    .upload-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .editor-actions,
    .attachment-management-card,
    .final-submit-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .attachment-actions {
        width: 100%;
    }

    .attachment-actions .btn,
    .attachment-actions form,
    .attachment-actions button {
        width: 100%;
        text-align: center;
    }

    .editor-actions button,
    .final-submit-actions .btn,
    .final-submit-actions button {
        width: 100%;
        text-align: center;
    }

    .report-editor-field textarea {
        min-height: 280px;
    }
}

/* =========================================
   Analytics & Drill-down
   ========================================= */

.analytics-hero {
    background: linear-gradient(
        135deg,
        #111827,
        #1f2937
    );
    color: #ffffff;
    border-radius: 18px;
    padding: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}

.analytics-hero h1 {
    margin: 4px 0;
    color: #ffffff;
}

.analytics-hero p {
    margin: 0;
    color: #9ca3af;
    font-size: 12px;
}

.analytics-eyebrow {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
}

.analytics-hero-mark {
    width: 74px;
    height: 74px;
    min-width: 74px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
}

.analytics-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 28px;
    font-size: 11px;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(150px, 1fr)
    );
    gap: 12px;
}

.analytics-kpi {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 17px;
}

.analytics-kpi span {
    display: block;
    color: #6b7280;
    font-size: 10px;
}

.analytics-kpi strong {
    display: block;
    margin-top: 5px;
    font-size: 26px;
}

.analytics-kpi-highlight {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.analytics-kpi-highlight span {
    color: #9ca3af;
}

.analytics-table td {
    text-align: center;
}

.analytics-table th:first-child,
.analytics-table td:first-child {
    text-align: right;
}

.analytics-person-link {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #111827;
}

.analytics-person-link:hover {
    text-decoration: none;
    color: #2563eb;
}

.analytics-person-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.analytics-two-column {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 20px;
}

.analytics-list,
.analytics-assessment-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.analytics-list-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: #111827;
}

.analytics-list-item:hover {
    border-color: #93c5fd;
    text-decoration: none;
}

.analytics-list-item strong {
    display: block;
    font-size: 12px;
}

.analytics-list-item span {
    display: block;
    color: #6b7280;
    font-size: 10px;
    margin-top: 3px;
}

.analytics-list-date {
    color: #6b7280;
    font-size: 10px;
    white-space: nowrap;
}

.analytics-assessment-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    padding: 14px;
}

.analytics-assessment-item > div:first-child strong {
    display: block;
    font-size: 12px;
}

.analytics-assessment-item > div:first-child span {
    color: #6b7280;
    font-size: 10px;
}

.analytics-score-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.analytics-score-row > span {
    flex: 1;
    background: #f8fafc;
    border-radius: 7px;
    padding: 7px;
    color: #6b7280;
    font-size: 9px;
}

.analytics-score-row strong {
    display: block;
    color: #111827;
    font-size: 13px;
}

.representative-profile {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 17px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
}

.representative-profile h1 {
    margin: 2px 0 6px;
}

.representative-profile-avatar {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 20px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 29px;
    font-weight: 800;
}

.representative-profile-meta {
    display: flex;
    gap: 18px;
    color: #6b7280;
    font-size: 11px;
}

.representative-profile-meta strong {
    color: #111827;
}

.analytics-score-table td {
    text-align: center;
}

.analytics-score-table th:first-child,
.analytics-score-table td:first-child {
    text-align: right;
}

.analytics-final-score {
    font-size: 15px;
    font-weight: 800;
    color: #1d4ed8;
}

@media (max-width: 900px) {
    .analytics-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .analytics-hero {
        align-items: flex-start;
    }

    .analytics-hero-mark {
        width: 54px;
        height: 54px;
        min-width: 54px;
        font-size: 23px;
    }

    .representative-profile {
        align-items: flex-start;
    }

    .representative-profile-avatar {
        width: 54px;
        height: 54px;
        min-width: 54px;
        font-size: 22px;
    }

    .representative-profile-meta {
        flex-direction: column;
        gap: 3px;
    }

    .analytics-score-row {
        flex-direction: column;
    }
}

/* =========================================
   Operational Forms & Comparison
   ========================================= */

.operation-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 22px;
    align-items: start;
}

.operation-form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
}

.operation-form-card form {
    margin: 0;
}

.operation-form-intro {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.operation-form-intro p {
    color: #6b7280;
    font-size: 12px;
    margin: 4px 0 0;
}

.operation-field {
    margin-bottom: 18px;
}

.operation-field input,
.operation-field select,
.operation-field textarea {
    max-width: none;
    width: 100%;
}

.operation-field textarea {
    min-height: 220px;
    line-height: 2;
}

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

.operation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e5e7eb;
    padding-top: 18px;
    margin-top: 6px;
}

.operation-help-card {
    background: #111827;
    color: #ffffff;
    border-radius: 16px;
    padding: 22px;
    position: sticky;
    top: 92px;
}

.operation-help-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-bottom: 15px;
}

.operation-help-card h3 {
    margin: 0 0 8px;
}

.operation-help-card p {
    color: #9ca3af;
    font-size: 11px;
    margin: 7px 0;
}


/* Issue */

.issue-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 13px;
    margin-bottom: 20px;
}

.issue-warning-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 11px;
    background: #fef3c7;
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}

.issue-warning p {
    color: #78350f;
    font-size: 11px;
    margin: 3px 0 0;
}

.issue-task-title {
    margin-top: 0;
}

.issue-description {
    line-height: 2;
    color: #374151;
}

.issue-version {
    margin-top: 16px;
    color: #6b7280;
    font-size: 11px;
}


/* Comparison */

.comparison-summary {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
}

.comparison-version {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
}

.comparison-version span,
.comparison-version small {
    display: block;
    color: #6b7280;
    font-size: 10px;
}

.comparison-version strong {
    display: block;
    font-size: 32px;
    margin: 4px 0;
}

.comparison-version-new {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.comparison-version-new strong {
    color: #2563eb;
}

.comparison-arrow {
    text-align: center;
    color: #9ca3af;
    font-size: 25px;
}

.comparison-table {
    table-layout: fixed;
}

.comparison-table th:first-child {
    width: 135px;
}

.comparison-text-cell {
    line-height: 1.9;
    white-space: normal;
    min-width: 250px;
}

.comparison-row-replace {
    background: #fffbeb;
}

.comparison-row-delete {
    background: #fff7f7;
}

.comparison-row-insert {
    background: #f6fef9;
}

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

.comparison-attachment-column {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.comparison-column-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

.attachment-list-single {
    grid-template-columns: 1fr;
}

.comparison-empty {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 42px 24px;
    text-align: center;
}

.comparison-empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 17px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
}

.comparison-empty h2 {
    margin: 0 0 6px;
}

.comparison-empty p {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 18px;
}


@media (max-width: 900px) {
    .operation-form-layout {
        grid-template-columns: 1fr;
    }

    .operation-help-card {
        position: static;
    }
}

@media (max-width: 700px) {
    .form-grid-2,
    .comparison-attachments {
        grid-template-columns: 1fr;
    }

    .operation-actions {
        flex-direction: column;
    }

    .operation-actions .btn,
    .operation-actions button {
        width: 100%;
        text-align: center;
    }

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

/* =========================================
   Confirmation Pages
   ========================================= */

.confirmation-page-card {
    max-width: 820px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 22px;
}

.confirmation-page-icon {
    width: 60px;
    height: 60px;
    border-radius: 17px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    font-weight: 800;
}

.confirmation-page-icon-success {
    background: #ecfdf5;
    color: #059669;
}

.confirmation-page-content h2 {
    margin-top: 0;
}

.confirmation-page-content > p {
    color: #6b7280;
    font-size: 12px;
}

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

.confirmation-info-grid > div {
    background: #f8fafc;
    border-radius: 9px;
    padding: 12px;
}

.confirmation-info-grid span {
    display: block;
    color: #6b7280;
    font-size: 10px;
}

.confirmation-info-grid strong {
    font-size: 12px;
}

.confirmation-page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


/* =========================================
   Login
   ========================================= */

.public-page-content {
    max-width: none;
    padding: 0;
    background: #f4f6f9;
}

.public-page-content > * {
    max-width: none;
}

.login-shell {
    width: min(980px, calc(100% - 40px));
    min-height: 560px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    direction: ltr;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(17, 24, 39, 0.08);
}

.login-brand-panel {
    background-image:
        linear-gradient(
            to top,
            rgba(10, 25, 55, 0.90) 0%,
            rgba(10, 25, 55, 0.50) 38%,
            rgba(10, 25, 55, 0.03) 100%
        ),
        var(--login-hero);

    background-size: cover;
    background-position: center, left center;
    background-repeat: no-repeat;

    color: #ffffff;
    padding: 40px 36px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    direction: rtl;
    text-align: right;
}

.login-brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 25px;
}

.login-eyebrow {
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 700;
}

.login-brand-panel h1 {
    color: #ffffff;
    font-size: 30px;
    line-height: 1.6;
    margin: 8px 0 12px;
}

.login-brand-panel p {
    color: #cbd5e1;
    font-size: 13px;
    line-height: 2;
    margin: 0;
}

.login-brand-footer {
    margin-top: 45px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 16px;
    color: #94a3b8;
    font-size: 10px;
}

.login-form-panel {
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    direction: rtl;
}

.login-form-header {
    margin-bottom: 24px;
}

.login-form-header h2 {
    margin: 0;
    font-size: 25px;
}

.login-form-header p {
    color: #6b7280;
    font-size: 12px;
    margin: 5px 0 0;
}

.login-form {
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.login-field {
    margin-bottom: 17px;
}

.login-field input {
    width: 100%;
    max-width: none;
    height: 46px;
}

.login-submit {
    width: 100%;
    height: 46px;
    margin-top: 5px;
    font-weight: 700;
}

.login-security-note {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    color: #9ca3af;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 750px) {
    .confirmation-page-card {
        grid-template-columns: 1fr;
    }

    .confirmation-info-grid {
        grid-template-columns: 1fr;
    }

    .confirmation-page-actions {
        flex-direction: column;
    }

    .confirmation-page-actions .btn,
    .confirmation-page-actions button {
        width: 100%;
        text-align: center;
    }

    .login-shell {
        grid-template-columns: 1fr;
        margin: 20px auto;
    }

    .login-brand-panel {
        padding: 32px 28px;
    }

    .login-brand-panel h1 {
        font-size: 23px;
    }

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

    .login-form-panel {
        padding: 32px 28px;
    }
}

    .comparison-arrow {
        transform: rotate(-90deg);
    }
}

/* =========================================
   System Scoring Policy
   ========================================= */

.system-policy-active {
    background: #111827;
    color: #ffffff;
    border-radius: 17px;
    padding: 22px;
    margin-bottom: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.system-policy-active h2 {
    color: #ffffff;
    margin: 3px 0;
}

.system-policy-active p {
    color: #9ca3af;
    margin: 0;
    font-size: 11px;
}

.system-policy-active-label {
    color: #86efac;
    font-size: 10px;
    font-weight: 700;
}

.system-policy-active-weights {
    display: grid;
    grid-template-columns: repeat(4, 105px);
    gap: 8px;
}

.system-policy-active-weights > div {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px;
}

.system-policy-active-weights span {
    display: block;
    color: #9ca3af;
    font-size: 9px;
}

.system-policy-active-weights strong {
    display: block;
    font-size: 17px;
    margin-top: 3px;
}

.system-policy-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    align-items: start;
}

.system-policy-create-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    position: sticky;
    top: 92px;
}

.system-policy-create-card h2 {
    margin: 0;
}

.system-policy-create-card > p {
    color: #6b7280;
    font-size: 10px;
    margin: 5px 0 18px;
}

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

.system-policy-activate-box {
    margin: 6px 0 16px;
}

.system-policy-submit {
    width: 100%;
    height: 43px;
}

.inline-form {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.button-link {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

@media (max-width: 1100px) {
    .system-policy-layout {
        grid-template-columns: 1fr;
    }

    .system-policy-create-card {
        position: static;
    }

    .system-policy-active {
        align-items: flex-start;
        flex-direction: column;
    }

    .system-policy-active-weights {
        width: 100%;
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 650px) {
    .system-policy-active-weights,
    .system-weight-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Phase 2: guided task issuance, RTL and responsive. */
.issue-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 22px; }
.issue-step { display:flex; align-items:center; justify-content:center; gap:10px; padding:13px 9px; border:1px solid #dce3ed; border-radius:12px; background:#f7f9fc; color:#526275; font-size:.92rem; font-weight:600; }
.issue-step-number { display:inline-flex; align-items:center; justify-content:center; flex:0 0 30px; width:30px; height:30px; border-radius:50%; border:1px solid currentColor; }
.issue-step.is-current { border-color:#2463a6; background:#edf5ff; color:#174e89; }
.issue-step.is-complete { color:#13643b; background:#eff9f2; border-color:#b9dfc5; }
.issue-flow-note { margin:12px 0; padding:10px 14px; border-inline-start:3px solid #7c9dbf; background:#f5f8fc; border-radius:6px; }
.issue-readiness { margin:20px 0; padding:16px 20px; border:1px solid #dce3ed; border-radius:12px; background:#fff; }
.issue-readiness h2 { margin:0 0 8px; font-size:1.1rem; }
.issue-readiness ul { padding-inline-start:24px; margin:8px 0 12px; }
.issue-ready { color:#13643b; font-weight:600; }
@media (max-width:650px) { .issue-steps { grid-template-columns:1fr; gap:6px; } .issue-step { justify-content:flex-start; } }

/* Sidebar notifications */

.sidebar-notification {
    padding: 12px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.notification-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    background: rgba(128, 128, 128, 0.08);
    color: inherit;
    transition: background 0.2s ease;
}

.notification-link:hover {
    background: rgba(128, 128, 128, 0.16);
}

.notification-icon {
    font-size: 26px;
    line-height: 1;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.notification-text strong {
    font-size: 14px;
}

.notification-text small {
    font-size: 11px;
    opacity: 0.75;
}

.notification-text .notification-alert {
    color: #dc3545;
    font-weight: 700;
    opacity: 1;
}

.notification-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    height: 25px;
    padding: 0 6px;
    border-radius: 50px;
    background: #dc3545;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* Modern, restrained design: one surface language across the application. */
:root { --ui-accent:#1764a4; --ui-accent-deep:#114a7b; --ui-border:#dde6ef; --ui-shadow:0 8px 32px rgba(28,53,79,.055); }
body { background:#f5f8fc; color:#172f47; }
a { color:var(--ui-accent); }
button, .btn, input, select, textarea { transition:box-shadow .15s ease,border-color .15s ease, background .15s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:3px solid #8cbbec; outline-offset:2px; }
.sidebar { background:linear-gradient(172deg,#112b43,#1a3952); }
.sidebar-nav a:hover,.sidebar-nav a:focus-visible { background:rgba(255,255,255,.13); }
.topbar { box-shadow:0 2px 14px rgba(16,49,74,.03); }
.signup-line { margin-top:16px; color:#52667b; font-size:14px; text-align:center; }
.signup-line a { font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.correspondence-info { background:#e9f4ff; border:1px solid #c7dff4; border-right:4px solid #2b79b7; color:#234967; border-radius:12px; padding:14px 18px; margin:12px 0 20px; }
.correspondence-search,.correspondence-form-card,.correspondence-detail,.audit-panel { background:#fff; border:1px solid var(--ui-border); border-radius:18px; box-shadow:var(--ui-shadow); }
.correspondence-search { padding:18px; margin-bottom:16px; }
.correspondence-search label { font-weight:600; display:block; margin-bottom:8px; }
.correspondence-search-row { display:flex; gap:10px; }
.correspondence-search-row input { flex:1; min-width:0; }
.correspondence-search-row input,.correspondence-search-row button { border:1px solid var(--ui-border); padding:10px 14px; border-radius:10px; }
.correspondence-search-row button { background:var(--ui-accent); color:#fff; }
.thread-list { background:#fff; border:1px solid var(--ui-border); border-radius:18px; box-shadow:var(--ui-shadow); overflow:hidden; }
.thread-row { display:flex; align-items:center; padding:18px; gap:15px; color:#172f47; border-bottom:1px solid #edf1f6; }
.thread-row:last-child { border-bottom:0; }
.thread-row:hover { background:#f5f9fd; text-decoration:none; }
.thread-avatar { background:#e8f2ff; color:#185c96; border-radius:14px; font-size:24px; flex:0 0 48px; height:48px; display:grid; place-items:center; }
.thread-row-body { min-width:0; flex:1; }
.thread-row-title { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.thread-row-title strong { color:#172f47; font-size:1rem; }
.thread-meta { color:#667c90; font-size:.85rem; margin-top:4px; overflow-wrap:anywhere; }
.thread-date { color:#73889c; font-size:.8rem; white-space:nowrap; }
.thread-tag { display:inline-flex; border-radius:50px; background:#e9f2fb; color:#225c8a; font-size:.78rem; font-weight:600; padding:2px 9px; }
.correspondence-empty { text-align:center; padding:50px 20px; color:#61778c; }
.correspondence-form-card { padding:clamp(18px,3vw,34px); max-width:1050px; }
.simple-section-head h1 { margin:0 0 6px; }
.simple-section-head p { color:#677e91; margin:0 0 24px; }
.correspondence-two-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 24px; }
.correspondence-two-columns .wide-field { grid-column:1 / -1; }
.correspondence-form .form-field label,.chat-reply label { display:block; font-weight:600; margin-bottom:7px; }
.correspondence-form .form-field input:not([type=file]),.correspondence-form .form-field select,.correspondence-form .form-field textarea,.chat-reply textarea { width:100%; border:1px solid #cbd8e5; border-radius:11px; background:#fff; color:#1d354a; padding:10px 13px; }
.correspondence-form .form-field small { display:block; color:#697e91; font-size:.8rem; margin-top:5px; }
.correspondence-form .form-field select[multiple] { min-height:142px; }
.correspondence-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.correspondence-detail { overflow:hidden; }
.thread-header { padding:22px clamp(18px,3vw,30px); border-bottom:1px solid var(--ui-border); }
.thread-heading { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.thread-heading h1 { margin:0; font-size:1.4rem; overflow-wrap:anywhere; }
.thread-heading p { width:100%; color:#60778a; margin:0 0 6px; font-size:.85rem; }
.thread-links { display:flex; flex-wrap:wrap; gap:10px 24px; font-size:.88rem; color:#344e65; }
.participant-chips { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.participant-chips span { background:#f0f5f9; padding:4px 11px; border-radius:50px; font-size:.82rem; }
.conversation-timeline { min-height:250px; max-height:65vh; overflow-y:auto; padding:25px 20px; display:flex; flex-direction:column; gap:16px; background:#fbfdff; }
.chat-bubble { align-self:flex-start; max-width:min(80%,750px); width:fit-content; padding:13px 17px; border-radius:15px 15px 4px 15px; border:1px solid #dfe7ef; background:#fff; box-shadow:0 3px 12px rgba(20,51,84,.04); }
.chat-bubble.chat-self { align-self:flex-end; border-color:#c6dfef; background:#e8f5fc; border-radius:15px 15px 15px 4px; }
.chat-byline { display:flex; align-items:center; flex-wrap:wrap; gap:8px 18px; margin-bottom:7px; font-size:.82rem; }
.chat-byline time { color:#667d91; font-size:.78rem; }
.chat-content { white-space:normal; overflow-wrap:anywhere; line-height:1.95; }
.attached-file { display:inline-block; margin-top:10px; background:#fff; border:1px solid #bbd7eb; border-radius:9px; padding:5px 10px; }
.chat-reply { padding:20px; border-top:1px solid var(--ui-border); }
.chat-reply-footer { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:14px; margin-top:10px; }
.chat-reply-footer label { font-size:.85rem; }
.audit-panel { margin-top:18px; padding:16px 22px; }
.audit-panel summary { cursor:pointer; font-weight:700; }
.audit-entry { display:flex; flex-wrap:wrap; gap:8px 20px; border-bottom:1px solid #edf0f4; padding:10px 0; font-size:.85rem; }
@media(max-width:700px){ .thread-row{align-items:flex-start;flex-wrap:wrap;} .thread-date{margin-right:60px;} .correspondence-two-columns{grid-template-columns:1fr;} .correspondence-two-columns .wide-field{grid-column:auto;} .chat-bubble{max-width:96%;} .conversation-timeline{padding:14px 9px;} .correspondence-search-row{flex-direction:column;} .thread-heading h1{font-size:1.1rem;} }

/* Checkboxes are simpler than a keyboard-specific multi-select. */
.correspondence-form .form-field #id_recipients { max-height:200px; overflow-y:auto; border:1px solid var(--ui-border); padding:12px; border-radius:12px; background:#fbfdff; }
.correspondence-form .form-field #id_recipients label { display:flex; align-items:center; gap:9px; font-weight:400; margin:4px 0; cursor:pointer; }
.correspondence-form .form-field #id_recipients input { width:18px; height:18px; accent-color:var(--ui-accent); }

/* Action-first dashboards: details only when needed. */

/* Modern action-first dashboard */

.dashboard-start {
    margin-bottom: 28px;
}

.dashboard-start-head h1 {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.5;
    color: #142e47;
    margin: 0 0 6px;
}

.dashboard-start-head p {
    margin: 0 0 20px;
    color: #71859a;
    font-size: 0.95rem;
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-shortcut {
    display: flex;
    flex-direction: column;
    gap: 10px;

    min-height: 170px;
    padding: 25px;

    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #f3f8fd 100%
    );

    border: 1px solid #d9e6f0;
    border-right: 4px solid #3485bb;
    border-radius: 18px;

    color: #24475f;

    box-shadow:
        0 5px 22px rgba(20, 56, 88, 0.065);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.dashboard-shortcut:hover {
    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #eaf4fc 100%
    );

    border-color: #a4c9e3;

    box-shadow:
        0 12px 30px rgba(20, 65, 105, 0.13);

    transform: translateY(-4px);
    text-decoration: none;
}

.dashboard-shortcut:focus-visible {
    outline: 3px solid #6caee0;
    outline-offset: 3px;
}

.dashboard-shortcut.urgent {
    border-right-color: #dda13a;
    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #fffaf0 100%
    );
}

.dashboard-shortcut-number,
.dashboard-shortcut-symbol {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.3;
    color: #176da8;
}

.dashboard-shortcut.urgent .dashboard-shortcut-number {
    color: #ae741d;
}

.dashboard-shortcut strong {
    color: #19364f;
    font-size: 1.07rem;
    font-weight: 700;
}

.dashboard-shortcut small {
    color: #71869a;
    font-size: 0.87rem;
    line-height: 1.8;
}

.dashboard-expand { margin-top:20px; }
.dashboard-expand>summary { display:block; cursor:pointer; padding:12px 18px; border:1px solid var(--ui-border); border-radius:11px; background:#eff5fa; color:#274e6b; font-weight:600; width:fit-content; }
.dashboard-expand[open]>summary { margin-bottom:20px; }
.dashboard-expand-inner { display:flow-root; }
@media (max-width:780px){ .dashboard-shortcuts{grid-template-columns:1fr;} .dashboard-shortcut{min-height:100px;padding:16px;} }
/* Global navigation back button */
.topbar-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.global-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 7px 14px;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.global-back:hover {
    background: #eaf2ff;
    border-color: #a7c7f5;
    color: #175cd3;
    text-decoration: none;
}

@media (max-width: 700px) {
    .topbar-navigation {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Sidebar Pin / Unpin */

.sidebar-pin-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.sidebar-pin-toggle:hover {
    background: rgba(255,255,255,.17);
}

.sidebar-pin-glyph {
    font-size: 22px;
    line-height: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    font-size: 19px;
    line-height: 1.3;
}

.sidebar-nav-label {
    min-width: 0;
}

/* Collapsed desktop sidebar */

.sidebar-is-collapsed .sidebar {
    width: 76px;
    padding: 18px 10px;
}

.sidebar-is-collapsed .main-area {
    width: calc(100% - 76px);
    margin-right: 76px;
}

/* Smooth sidebar content animation */

.sidebar-brand,
.sidebar-section-title {
    overflow: hidden;
    opacity: 1;
    white-space: nowrap;
    transition:
        max-height 0.55s ease,
        opacity 0.35s ease,
        margin 0.55s ease,
        padding 0.55s ease;
}

.sidebar-brand {
    max-height: 140px;
}

.sidebar-section-title {
    max-height: 60px;
}

.sidebar-nav-label,
.sidebar-pin-caption {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    max-width: 260px;
    opacity: 1;

    transition:
        max-width 0.55s ease,
        opacity 0.35s ease;
}

.sidebar-is-collapsed .sidebar-brand,
.sidebar-is-collapsed .sidebar-section-title {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

.sidebar-is-collapsed .sidebar-nav-label,
.sidebar-is-collapsed .sidebar-pin-caption {
    max-width: 0;
    opacity: 0;
}

.sidebar-is-collapsed .sidebar-nav a {
    gap: 0;
}

.sidebar-is-collapsed .notification-text,
.sidebar-is-collapsed .notification-count {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-brand,
    .sidebar-section-title,
    .sidebar-nav-label,
    .sidebar-pin-caption {
        transition: none;
    }
}

.sidebar-is-collapsed .sidebar-pin-toggle {
    width: 46px;
    margin: 0 auto 16px;
    padding: 8px;
}

.sidebar-is-collapsed .sidebar-section {
    margin-top: 16px;
}

.sidebar-is-collapsed .sidebar-nav a {
    justify-content: center;
    padding: 12px 5px;
}

.sidebar-is-collapsed .sidebar-nav-icon {
    font-size: 22px;
}

.sidebar-is-collapsed .sidebar-notification {
    padding: 8px 0;
}

.sidebar-is-collapsed .notification-link {
    justify-content: center;
    padding: 10px 4px;
}

.sidebar-is-collapsed .logout-button {
    width: 100%;
    min-height: 42px;
    padding: 6px;
    font-size: 0;
}

.sidebar-is-collapsed .logout-button::before {
    content: "⎋";
    font-size: 23px;
}

/* Mobile layout */

@media (max-width: 700px) {
    .sidebar-is-collapsed .sidebar {
        position: static;
        width: 100%;
        padding: 12px 16px;
    }

    .sidebar-is-collapsed .main-area {
        width: 100%;
        margin-right: 0;
    }

    .sidebar-is-collapsed .sidebar-section,
    .sidebar-is-collapsed .sidebar-notification {
        display: none;
    }

    .sidebar-is-collapsed .sidebar-pin-toggle {
        margin: 0;
    }
}
/* Smooth Sidebar Pin / Unpin Animation */

.sidebar {
    transition:
        width 0.55s cubic-bezier(0.25, 0.1, 0.25, 1),
        padding 0.55s ease;
}

.main-area {
    transition:
        margin-right 0.55s cubic-bezier(0.25, 0.1, 0.25, 1),
        width 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Smooth navigation hover */

.sidebar-nav a {
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .main-area,
    .sidebar-nav a {
        transition: none;
    }
}
/* Notification envelope: unread = red, otherwise white */

.sidebar .notification-link .notification-icon {
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    transition: color 0.25s ease;
}

.sidebar .notification-link .notification-icon.notification-icon-unread {
    color: #ff4545;
}
/* Compact notification icon - no text */

.sidebar .sidebar-notification {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0 2px;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.sidebar .sidebar-notification .notification-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    margin: 0;
    gap: 0;
    border-radius: 9px;
}

/* Hide all notification text and count */

.sidebar .sidebar-notification .notification-text,
.sidebar .sidebar-notification .notification-count {
    display: none !important;
}

/* Smaller envelope */

.sidebar .sidebar-notification .notification-icon {
    font-size: 18px;
    line-height: 1;
}

/* Keep envelope visible on collapsed mobile sidebar */

@media (max-width: 700px) {
    .sidebar-is-collapsed .sidebar-notification {
        display: flex;
    }
}
/* Reduce space between mail icon and main menu */
.sidebar .sidebar-notification + .sidebar-section {
    margin-top: 4px;
}


/* ======================================
   FARAMAK UI - SIDEBAR & TOPBAR
   ====================================== */

/* Sidebar */
.sidebar {
    background: linear-gradient(
        165deg,
        #102940 0%,
        #173b58 60%,
        #1c4866 100%
    );

    border-left: 1px solid rgba(255,255,255,.08);

    box-shadow:
        -4px 0 24px rgba(15, 35, 55, .08);
}

.sidebar-brand {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-brand-title {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -.3px;
}

.sidebar-brand-subtitle {
    color: #a9c4d9;
}

.sidebar-section-title {
    color: #9dbbd0;
    font-size: 12px;
}

/* Navigation links */
.sidebar-nav a {
    border-radius: 12px;
    border: 1px solid transparent;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,.11);
    border-color: rgba(255,255,255,.10);
    color: #ffffff;
    text-decoration: none;
    transform: translateX(-3px);
}

.sidebar-nav a.active,
.sidebar-nav a[aria-current="page"] {
    background: rgba(73, 159, 218, .18);
    border-color: rgba(131, 192, 234, .24);
    color: #ffffff;
    font-weight: 700;
}

.sidebar-nav a:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* Top header */
.topbar {
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #dce7f0;

    box-shadow:
        0 3px 16px rgba(25, 56, 82, .035);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.topbar-title {
    color: #193a55;
    font-weight: 800;
    letter-spacing: -.2px;
}

.topbar-user {
    color: #425c72;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .sidebar-nav a {
        transition: none;
        transform: none;
    }
}


/* ======================================
   MODERN TABLES & FORMS
   ====================================== */

/* Tables */
.page-content table {
    border: 1px solid #dce7f0;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(20, 56, 88, 0.05);
}

.page-content table th {
    background: #edf4fa;
    color: #254761;
    font-weight: 700;
    padding: 15px 16px;
    border-bottom: 1px solid #d8e5ef;
}

.page-content table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e8eef4;
    color: #334e63;
}

.page-content table tbody tr {
    transition: background 0.2s ease;
}

.page-content table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.page-content table tbody tr:hover {
    background: #eff7ff;
}

/* Form controls */
.page-content form :is(
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    select,
    textarea
) {
    background: #ffffff;
    color: #243d53;
    border: 1px solid #cfdeea;
    border-radius: 11px;
    padding: 11px 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.page-content form :is(
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    select,
    textarea
):focus {
    outline: none;
    border-color: #4d9bcf;
    box-shadow: 0 0 0 3px rgba(77, 155, 207, 0.14);
}

/* Form labels */
.page-content form label {
    color: #29475f;
    font-weight: 600;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .page-content table tbody tr,
    .page-content form input,
    .page-content form select,
    .page-content form textarea {
        transition: none;
    }
}


/* ======================================
   FINAL UI POLISH - BUTTONS & MOBILE
   ====================================== */

/* Interactive buttons */
.page-content :is(
    button,
    .btn,
    input[type="submit"]
) {
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        filter .2s ease;
}

.page-content :is(
    button,
    .btn,
    input[type="submit"]
):not(:disabled):not([aria-disabled="true"]):hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 6px 16px rgba(21, 64, 99, .12);
}

.page-content :is(
    button,
    .btn,
    input[type="submit"]
):focus-visible {
    outline: 3px solid #77b9e5;
    outline-offset: 3px;
}

.page-content :is(
    button,
    .btn,
    input[type="submit"]
):disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Tablet & mobile */
@media (max-width: 780px) {
    .page-content {
        padding: 16px 12px;
    }

    .page-content .card,
    .page-content .stat-card {
        padding: 16px;
    }

    .dashboard-shortcuts {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-shortcut {
        min-height: 120px;
        padding: 18px;
    }

    .page-content form :is(
        input,
        select,
        textarea
    ) {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-content h1 {
        font-size: 1.45rem;
    }

    .page-content h2 {
        font-size: 1.2rem;
    }

    .dashboard-start-head h1 {
        font-size: 1.45rem;
    }
}

/* Respect accessibility settings */
@media (prefers-reduced-motion: reduce) {
    .page-content :is(
        button,
        .btn,
        input[type="submit"]
    ) {
        transition: none;
    }

    .page-content :is(
        button,
        .btn,
        input[type="submit"]
):hover {
        transform: none;
    }
}


/* ==========================================
   MOBILE SIDEBAR - RESPONSIVE NAVIGATION
   ========================================== */

.mobile-menu-toggle,
.mobile-menu-close,
.mobile-menu-backdrop {
    display: none;
}

@media (max-width: 780px) {

    .app-shell {
        display: block;
    }

    body .main-area,
    body.sidebar-is-collapsed .main-area {
        width: 100% !important;
        margin-right: 0 !important;
    }

    body .sidebar,
    body.sidebar-is-collapsed .sidebar {
        display: block !important;
        position: fixed !important;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(84vw, 320px) !important;
        height: 100dvh;
        margin: 0 !important;
        z-index: 1102;
        overflow-y: auto;
        visibility: hidden;
        transform: translateX(105%) !important;
        transition: transform .25s ease !important;
    }

    body.mobile-menu-open .sidebar,
    body.mobile-menu-open.sidebar-is-collapsed .sidebar {
        visibility: visible;
        transform: translateX(0) !important;
    }

    
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    position: sticky;
    top: 0;
    right: auto;

    width: 100%;
    height: 56px;
    margin: 0;
    padding: 12px 18px;

    z-index: 1050;

    border: 0;
    border-bottom: 1px solid #d5e4f0;
    border-radius: 0;

    background: #ffffff;
    color: #173b58;

    font-weight: 700;
    box-shadow: 0 2px 10px rgba(15, 35, 55, .08);
    cursor: pointer;
}

    .mobile-menu-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1100;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(10, 25, 40, .55);
    }

    body.mobile-menu-open .mobile-menu-backdrop {
        display: block;
    }

    body.mobile-menu-open .mobile-menu-toggle {
        visibility: hidden;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .sidebar-pin-toggle {
        display: none !important;
    }

    .mobile-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        z-index: 2;
        width: 100%;
        margin-bottom: 20px;
        padding: 12px;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: 10px;
        background: rgba(255,255,255,.12);
        color: #ffffff;
        cursor: pointer;
    }

    .topbar {
    padding-right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .sidebar {
        transition: none !important;
    }
}
