body {
    background: #f5f7fb;
    color: #172033;
}

.documents-page-heading {
    align-items: flex-start;
}

.documents-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #64748b;
    font-size: 0.92rem;
}

.documents-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.documents-breadcrumb a:hover {
    color: #0d6efd;
}

.documents-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 34px;
}

.documents-summary-card {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 2px 18px;
    min-height: 142px;
    padding: 22px;
    color: #172033;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.documents-summary-card::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 3px;
    background: currentColor;
}

.documents-summary-icon {
    grid-row: 1 / span 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 12px;
    font-size: 2rem;
    background: color-mix(in srgb, currentColor 14%, #ffffff);
}

.documents-summary-label {
    align-self: end;
    color: #334155;
    font-size: 0.96rem;
    font-weight: 700;
}

.documents-summary-card strong {
    color: currentColor;
    font-size: 2rem;
    line-height: 1;
}

.documents-summary-card small {
    color: #64748b;
    font-size: 0.84rem;
}

.document-summary-blue {
    color: #0d6efd;
}

.document-summary-green {
    color: #16a34a;
}

.document-summary-orange {
    color: #f59e0b;
}

.document-summary-purple {
    color: #7c3aed;
}

.document-summary-slate {
    color: #64748b;
}

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

.documents-section h3,
.documents-card-header h3 {
    margin: 0;
    color: #172033;
    font-size: 1.16rem;
    font-weight: 800;
}

.documents-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin-top: 18px;
}

.documents-category-card {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 38px;
    grid-template-rows: auto 1fr auto;
    gap: 14px 18px;
    min-height: 178px;
    padding: 22px;
    color: #172033;
    text-decoration: none;
    border: 1px solid color-mix(in srgb, currentColor 28%, #ffffff);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.documents-category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 82%, color-mix(in srgb, currentColor 16%, transparent) 0 26%, transparent 27%),
        linear-gradient(135deg, color-mix(in srgb, currentColor 10%, #ffffff), #ffffff 74%);
    opacity: 0.9;
    pointer-events: none;
}

.documents-category-card > * {
    position: relative;
}

.documents-category-card:hover {
    color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.documents-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    color: currentColor;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid color-mix(in srgb, currentColor 24%, #ffffff);
    border-radius: 50%;
    font-size: 1.7rem;
}

.documents-category-title {
    align-self: center;
    color: #172033;
    font-size: 1rem;
    font-weight: 800;
}

.documents-category-count {
    grid-column: 1 / 3;
    align-self: end;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.documents-category-count strong {
    color: #0f2442;
    font-size: 2rem;
    line-height: 1;
}

.documents-category-count span,
.documents-category-date {
    color: #475569;
    font-size: 0.86rem;
}

.documents-category-date {
    grid-column: 1 / 3;
}

.documents-category-arrow {
    grid-column: 3;
    grid-row: 3;
    align-self: end;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: currentColor;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.documents-category-blue,
.documents-category-cyan {
    color: #0d6efd;
}

.documents-category-green,
.documents-category-lime {
    color: #16a34a;
}

.documents-category-orange,
.documents-category-amber {
    color: #f59e0b;
}

.documents-category-red {
    color: #ef4444;
}

.documents-category-purple {
    color: #7c3aed;
}

.documents-table-card,
.documents-form-card,
.documents-preview-card,
.documents-side-card,
.documents-detail-card {
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.documents-table-card {
    overflow: hidden;
}

.documents-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 0 22px;
    border-bottom: 1px solid #e8eef6;
}

.documents-card-header a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0d6efd;
    font-weight: 800;
    text-decoration: none;
}

.documents-card-header span {
    color: #64748b;
    font-size: 0.9rem;
}

.documents-table {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
}

.documents-table th,
.documents-table td {
    padding: 14px 16px;
    overflow: hidden;
    color: #172033;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    border-color: #e8eef6;
}

.documents-table td:first-child {
    min-width: 0;
    white-space: nowrap;
}

.documents-table th {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.documents-table th:nth-child(1),
.documents-table td:nth-child(1) {
    width: 82px;
}

.documents-table th:nth-child(2),
.documents-table td:nth-child(2) {
    width: 130px;
}

.documents-table th:nth-child(3),
.documents-table td:nth-child(3) {
    width: 25%;
}

.documents-table th:nth-child(4),
.documents-table td:nth-child(4) {
    width: 150px;
}

.documents-table th:nth-child(5),
.documents-table td:nth-child(5) {
    width: 90px;
}

.documents-table th:nth-child(6),
.documents-table td:nth-child(6) {
    width: 120px;
}

.documents-table th:nth-child(7),
.documents-table td:nth-child(7) {
    width: 136px;
}

.documents-table th:nth-last-child(1),
.documents-table td:nth-last-child(1) {
    width: 174px;
}

.documents-title-cell a {
    display: block;
    color: #0d6efd;
    font-weight: 800;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-title-cell span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-file-type,
.document-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
}

.document-file-type-pdf {
    color: #dc2626;
    background: #fee2e2;
}

.document-file-type-word {
    color: #2563eb;
    background: #dbeafe;
}

.document-file-type-excel {
    color: #16a34a;
    background: #dcfce7;
}

.document-file-type-ppt {
    color: #ea580c;
    background: #ffedd5;
}

.document-file-type-image,
.document-file-type-file {
    color: #64748b;
    background: #f1f5f9;
}

.document-status-success {
    color: #15803d;
    background: #dcfce7;
}

.document-status-warning {
    color: #b45309;
    background: #fef3c7;
}

.document-status-purple {
    color: #6d28d9;
    background: #ede9fe;
}

.document-status-muted {
    color: #475569;
    background: #e2e8f0;
}

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

.documents-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.documents-row-actions .btn,
.documents-row-actions form {
    display: inline-flex;
}

.documents-empty-row {
    height: 130px;
    text-align: center;
    white-space: normal !important;
}

.documents-empty-row strong,
.documents-empty-row span {
    display: block;
}

.documents-empty-row span {
    margin-top: 4px;
    color: #64748b;
}

.documents-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.8fr) minmax(190px, 0.8fr) auto;
    gap: 18px;
    align-items: end;
}

.documents-form-card {
    padding: 24px;
}

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

.documents-upload-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.documents-upload-box label {
    display: grid;
    place-items: center;
    min-height: 160px;
    padding: 24px;
    color: #0d6efd;
    text-align: center;
    border: 2px dashed #b8c8df;
    border-radius: 8px;
    background: #f8fbff;
    cursor: pointer;
}

.documents-upload-box i {
    font-size: 2.3rem;
}

.documents-upload-box strong {
    color: #0d6efd;
    font-size: 1rem;
}

.documents-upload-box span,
.documents-upload-box small {
    color: #64748b;
}

.documents-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.documents-form-actions .btn,
.documents-side-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 8px;
}

.documents-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.documents-detail-card {
    display: grid;
    gap: 4px;
    min-height: 116px;
    padding: 18px;
}

.documents-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #0d6efd;
    background: #eef5ff;
    border-radius: 10px;
    font-size: 1.25rem;
}

.documents-detail-card small {
    color: #64748b;
    font-weight: 700;
}

.documents-detail-card strong {
    color: #172033;
    font-size: 0.98rem;
}

.documents-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    align-items: start;
}

.documents-detail-heading {
    align-items: start;
}

.documents-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.documents-title-row h2 {
    margin: 0;
}

.documents-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: #0d6efd;
    background: #eaf3ff;
    border: 1px solid #cfe1ff;
    border-radius: 50%;
    font-size: 1.55rem;
}

.documents-main-card {
    padding: 22px;
    background: #ffffff;
    border: 1px solid #dde7f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.documents-main-card-title h3 {
    margin: 0 0 18px;
    color: #172033;
    font-size: 1rem;
    font-weight: 900;
}

.documents-file-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid #dce6f4;
    border-radius: 8px 8px 0 0;
    background: #fbfdff;
}

.documents-file-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 8px;
    font-size: 2.35rem;
}

.documents-file-hero strong {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.documents-file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #64748b;
}

.documents-pdf-preview-shell {
    min-height: 640px;
    padding: 24px;
    background: #f3f7fc;
    border: 1px solid #dce6f4;
    border-top: 0;
    border-radius: 0 0 8px 8px;
}

.documents-preview-frame {
    display: block;
    width: 100%;
    min-height: 640px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.documents-preview-image {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    padding: 18px;
}

.documents-preview-placeholder {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 560px;
    padding: 32px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #bfd3ee;
    border-radius: 8px;
}

.documents-preview-placeholder i {
    color: #0d6efd;
    font-size: 4rem;
}

.documents-preview-placeholder strong {
    color: #172033;
}

.documents-side-panel {
    display: grid;
    gap: 16px;
}

.documents-side-card {
    padding: 20px;
}

.documents-side-card h3 {
    margin: 0 0 14px;
    color: #172033;
    font-size: 1rem;
    font-weight: 800;
}

.documents-side-card p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
    white-space: pre-line;
}

.documents-file-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.documents-file-card strong {
    overflow-wrap: anywhere;
}

.documents-file-card small {
    color: #64748b;
}

.documents-info-list {
    display: grid;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    overflow: hidden;
}

.documents-info-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    min-height: 54px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e9f3;
}

.documents-info-list > div:last-child {
    border-bottom: 0;
}

.documents-info-list span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 800;
}

.documents-info-list i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #0d6efd;
    background: #eef5ff;
    border-radius: 8px;
}

.documents-info-list strong {
    color: #172033;
    font-size: 0.92rem;
    text-align: right;
}

.documents-note-card {
    background: #f4f8ff;
    border-color: #bcd6ff;
}

.documents-side-actions {
    display: grid;
    gap: 10px;
}

.documents-side-actions form,
.documents-side-actions .btn {
    width: 100%;
}

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

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

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

@media (max-width: 992px) {
    .documents-summary-grid,
    .documents-category-grid,
    .documents-detail-grid,
    .documents-form-grid,
    .documents-filter-grid,
    .documents-detail-layout {
        grid-template-columns: 1fr;
    }

    .documents-file-hero {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .documents-file-hero .dropdown {
        margin-left: 0 !important;
    }

    .documents-pdf-preview-shell {
        min-height: 420px;
        padding: 12px;
    }

    .documents-preview-frame,
    .documents-preview-placeholder {
        min-height: 420px;
    }

    .documents-info-list > div {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .documents-info-list strong {
        text-align: left;
    }

    .documents-table {
        min-width: 0;
    }

    .documents-table thead {
        display: none;
    }

    .documents-table,
    .documents-table tbody,
    .documents-table tr,
    .documents-table td {
        display: block;
        width: 100% !important;
    }

    .documents-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .documents-table tbody tr {
        padding: 12px;
        border: 1px solid #e2e9f3;
        border-radius: 8px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    }

    .documents-table tbody td {
        display: grid;
        grid-template-columns: minmax(130px, 34%) minmax(0, 1fr);
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px solid #edf2f7;
        white-space: normal;
    }

    .documents-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.8rem;
        font-weight: 800;
    }

    .documents-table tbody td:last-child {
        border-bottom: 0;
    }

    .documents-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .documents-summary-card,
    .documents-category-card {
        grid-template-columns: 1fr;
    }

    .documents-category-count,
    .documents-category-date,
    .documents-category-arrow {
        grid-column: 1;
    }

    .documents-category-arrow {
        justify-self: start;
    }

    .documents-card-header,
    .documents-form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .documents-card-header {
        padding: 16px;
    }

    .documents-form-actions .btn {
        width: 100%;
    }

    .documents-table tbody td {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.navbar-brand {
    color: #172033;
}

.navbar-brand-logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.navbar .container {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.metric-box {
    background: #ffffff;
    border: 1px solid #dee5ef;
    border-radius: 8px;
    padding: 18px;
}

.metric-box strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-top: 8px;
}

.metric-label {
    color: #637083;
    font-size: 0.9rem;
}

.metric-box-success {
    border-left: 5px solid #198754;
}

.metric-box-danger {
    border-left: 5px solid #dc3545;
}

.metric-box-warning {
    border-left: 5px solid #ffc107;
}

.table td,
.table th {
    white-space: nowrap;
}

.table td:first-child {
    min-width: 240px;
    white-space: normal;
}

.dashboard-filter,
.actions-panel {
    background: #ffffff;
    border: 1px solid #dee5ef;
    border-radius: 8px;
}

.dashboard-filter {
    margin-bottom: 18px;
    padding: 16px;
}

.actions-panel {
    overflow: visible;
}

.actions-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #e3eaf3;
}

.action-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 112px;
    gap: 18px;
    align-items: center;
    min-height: 116px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e1e8f2;
    border-left: 5px solid #adb5bd;
    border-radius: 8px;
}

.action-row-success {
    border-left-color: #198754;
}

.action-row-warning {
    border-left-color: #ffc107;
}

.action-row-danger {
    border-left-color: #dc3545;
}

.action-row-main {
    min-width: 0;
}

.action-title {
    color: #172033;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.action-title:hover {
    color: #0d6efd;
}

.action-description {
    display: -webkit-box;
    margin: 0;
    color: #637083;
    font-size: 0.92rem;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.action-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 10px;
    color: #637083;
    font-size: 0.86rem;
}

.action-meta strong {
    color: #28364a;
    font-weight: 700;
}

.action-meta a {
    color: #0d6efd;
    text-decoration: none;
}

.action-row-due {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.action-due-label {
    color: #637083;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.action-row-due strong {
    color: #172033;
    font-size: 1rem;
}

.action-delay {
    color: #dc3545;
    font-size: 0.82rem;
    font-weight: 700;
}

.action-row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.action-row-actions .btn {
    min-width: 104px;
}

.action-empty {
    display: grid;
    gap: 4px;
    padding: 42px 18px;
    color: #637083;
    text-align: center;
}

.action-empty strong {
    color: #172033;
}

.notification-menu {
    width: min(420px, calc(100vw - 24px));
    min-width: min(360px, calc(100vw - 24px));
    max-width: 420px;
}

.notification-menu .dropdown-item {
    white-space: normal;
}

.notification-item {
    display: grid;
    gap: 4px;
    line-height: 1.35;
}

.notification-message {
    color: #172033;
    overflow-wrap: anywhere;
    white-space: normal;
}

.notification-time {
    color: #64748b;
    font-size: 0.78rem;
}

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

.login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
    background: #f6f8fc;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}

.login-card {
    width: min(100%, 440px);
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.login-card-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e7edf5;
}

.login-brand-logo {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.login-card-brand strong,
.login-card-brand span {
    display: block;
}

.login-card-brand strong {
    color: #111827;
    font-size: 1.05rem;
    font-weight: 800;
}

.login-card-brand span {
    color: #64748b;
    font-size: 0.88rem;
}

.login-card h2 {
    margin: 0;
    color: #111827;
    font-size: 1.45rem;
    font-weight: 800;
}

.login-card .form-label {
    color: #172033;
    font-weight: 700;
}

.login-card .form-control {
    min-height: 46px;
    padding-left: 42px;
    border-color: #d8e2ef;
    border-radius: 8px;
}

.login-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 8px;
    font-weight: 800;
}

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

.login-input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 2;
    color: #64748b;
    transform: translateY(-50%);
}

.login-alert-stack {
    margin-bottom: 18px;
}

.dashboard-body {
    background: #f6f8fc;
}

.dashboard-app {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    min-height: 100vh;
    background: #f6f8fc;
}

.dashboard-sidebar {
    background: #ffffff;
    border-right: 1px solid #e1e8f2;
    box-shadow: 8px 0 28px rgba(27, 39, 59, 0.04);
}

.dashboard-sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px 16px;
}

.dashboard-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 112px;
    margin-bottom: 20px;
    color: #111827;
    font-size: 1.03rem;
}

.dashboard-brand-logo {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.dashboard-brand-icon,
.dashboard-profile-avatar,
.dashboard-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #0d6efd;
    font-weight: 800;
}

.dashboard-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.35rem;
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.24);
}

.dashboard-sidebar-nav {
    display: grid;
    gap: 8px;
}

.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 14px;
    color: #334155;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
}

.dashboard-nav-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    color: #52627a;
    font-size: 1.1rem;
}

.dashboard-nav-item:hover,
.dashboard-nav-item.active {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #cfe1ff;
}

.dashboard-nav-item:hover i,
.dashboard-nav-item.active i {
    color: #0d6efd;
}

.dashboard-sidebar-bottom {
    display: grid;
    gap: 0;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e5ebf4;
}

.dashboard-sidebar-bottom .dashboard-sidebar-user {
    margin-top: 0;
}

.sidebar-quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-bottom: 14px;
    padding: 0 12px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
}

.sidebar-quick-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    color: #52627a;
    font-size: 1.05rem;
}

.sidebar-quick-link:hover,
.sidebar-quick-link.active {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #cfe1ff;
}

.sidebar-quick-link:hover i,
.sidebar-quick-link.active i {
    color: #0d6efd;
}

.assigned-sidebar-link span:not(.assigned-count-badge),
.notification-sidebar-link span:not(.sidebar-count-badge) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assigned-count-badge,
.sidebar-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-left: auto;
    padding: 0 7px;
    color: #0d6efd;
    background: #dbeafe;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.dashboard-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 18px 4px 14px;
    border-top: 1px solid #e5ebf4;
}

.dashboard-sidebar-user strong,
.dashboard-sidebar-user span {
    display: block;
}

.dashboard-sidebar-user strong {
    color: #172033;
    font-size: 0.95rem;
}

.dashboard-sidebar-user span {
    color: #637083;
    font-size: 0.84rem;
}

.dashboard-avatar,
.dashboard-profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.dashboard-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 12px;
    color: #334155;
    text-decoration: none;
    border-top: 1px solid #e5ebf4;
}

.dashboard-logout:hover {
    color: #0d6efd;
}

.dashboard-main {
    min-width: 0;
    min-height: 100vh;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #172033;
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
}

.dashboard-mobile-menu-button {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1040;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.dashboard-content {
    padding: 34px 36px 34px;
}

.dashboard-content-flush {
    min-height: 100vh;
    padding: 0;
}

.dashboard-alert-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
}

.dashboard-alert-stack .alert {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding-inline: 20px 48px;
    border-radius: 8px;
}

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

.dashboard-page-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.dashboard-page-heading p {
    margin: 5px 0 0;
    color: #64748b;
}

.dashboard-page-heading .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    border-radius: 8px;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.dashboard-stat-card {
    position: relative;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 18px;
    min-height: 112px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.dashboard-stat-card::after {
    content: "";
    position: absolute;
    right: 26px;
    bottom: 22px;
    width: 78px;
    height: 30px;
    border-right: 4px solid currentColor;
    border-bottom: 4px solid currentColor;
    border-radius: 0 0 28px 0;
    opacity: 0.22;
    transform: skewX(-25deg);
}

.dashboard-stat-card .stat-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 12px;
    font-size: 2rem;
}

.dashboard-stat-card .stat-label {
    align-self: end;
    color: #334155;
    font-size: 0.92rem;
    font-weight: 700;
}

.dashboard-stat-card strong {
    color: currentColor;
    font-size: 2rem;
    line-height: 1.05;
}

.dof-dashboard-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.dof-dashboard-metrics .dashboard-stat-card {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 12px;
    min-height: 86px;
    padding: 16px;
}

.dof-dashboard-metrics .dashboard-stat-card::after {
    right: 18px;
    bottom: 16px;
    width: 48px;
    height: 20px;
    border-right-width: 3px;
    border-bottom-width: 3px;
}

.dof-dashboard-metrics .dashboard-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 1.35rem;
}

.dof-dashboard-metrics .dashboard-stat-card .stat-label {
    font-size: 0.82rem;
    line-height: 1.2;
}

.dof-dashboard-metrics .dashboard-stat-card strong {
    font-size: 1.55rem;
}

.dof-nonconformity-cell {
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: normal;
}

.dof-dashboard-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

.dof-dashboard-table th,
.dof-dashboard-table td {
    padding: 14px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dof-dashboard-table .dof-nonconformity-cell {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
}

.dof-dashboard-table .dashboard-action-title-cell a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dof-dashboard-table thead th {
    line-height: 1.25;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.dof-dashboard-table th:nth-child(1),
.dof-dashboard-table td:nth-child(1) {
    width: 11%;
}

.dof-dashboard-table th:nth-child(2),
.dof-dashboard-table td:nth-child(2) {
    width: 23%;
}

.dof-dashboard-table th:nth-child(3),
.dof-dashboard-table td:nth-child(3) {
    width: 10%;
}

.dof-dashboard-table th:nth-child(4),
.dof-dashboard-table td:nth-child(4) {
    width: 12%;
}

.dof-dashboard-table th:nth-child(5),
.dof-dashboard-table td:nth-child(5) {
    width: 8%;
}

.dof-dashboard-table th:nth-child(6),
.dof-dashboard-table td:nth-child(6) {
    width: 11%;
}

.dof-dashboard-table th:nth-child(7),
.dof-dashboard-table td:nth-child(7) {
    width: 6%;
}

.dof-dashboard-table th:nth-child(8),
.dof-dashboard-table td:nth-child(8) {
    width: 5%;
}

.dof-dashboard-table th:nth-child(9),
.dof-dashboard-table td:nth-child(9) {
    width: 14%;
}

.dof-dashboard-table .dof-responsible-cell {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.25;
}

.dof-responsible-name,
.dof-responsible-name span {
    display: block;
}

.dof-dashboard-table .status-pill {
    min-height: 28px;
    padding: 5px 8px;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

.dof-dashboard-table .dashboard-row-actions {
    min-width: 0;
    justify-content: flex-end;
}

.dof-dashboard-table .dashboard-row-actions .btn {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 0.8rem;
}

.dof-dashboard-table .dof-approval-request-btn {
    justify-content: center;
    min-width: 168px;
    border-color: #198754;
    box-shadow: 0 8px 18px rgba(25, 135, 84, 0.18);
    line-height: 1.15;
    white-space: normal;
}

.stat-primary {
    color: #0d6efd;
}

.stat-success {
    color: #198754;
}

.stat-warning {
    color: #f59f00;
}

.stat-info {
    color: #0d6efd;
}

.stat-danger {
    color: #dc3545;
}

.stat-primary .stat-icon {
    background: #eaf2ff;
}

.stat-success .stat-icon {
    background: #dff6ea;
}

.stat-warning .stat-icon {
    background: #fff3cd;
}

.stat-info .stat-icon {
    background: #eef5ff;
}

.stat-danger .stat-icon {
    background: #fde7ea;
}

.dashboard-filter-card,
.dashboard-table-card {
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.dashboard-filter-card {
    margin-bottom: 20px;
    padding: 20px;
}

.dashboard-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(170px, 1fr) minmax(210px, 1fr) minmax(170px, 1fr) auto;
    gap: 20px;
    align-items: end;
}

.dashboard-filter-card .form-label {
    color: #172033;
    font-weight: 700;
}

.dashboard-search-control {
    position: relative;
}

.dashboard-search-control i {
    position: absolute;
    left: 14px;
    top: 50%;
    color: #64748b;
    transform: translateY(-50%);
}

.dashboard-search-control .form-control {
    padding-left: 42px;
}

.dashboard-filter-card .form-control,
.dashboard-filter-card .form-select {
    min-height: 44px;
    border-color: #d8e2ef;
    border-radius: 8px;
}

.dashboard-filter-actions {
    display: flex;
    gap: 12px;
}

.dashboard-filter-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    min-width: 108px;
    border-radius: 8px;
}

.dashboard-table-card {
    container-type: inline-size;
    overflow: hidden;
}

.dashboard-table {
    color: #172033;
}

.dashboard-table thead th {
    padding: 18px 22px;
    color: #111827;
    background: #fbfcfe;
    border-bottom: 1px solid #e1e8f2;
    font-size: 0.92rem;
}

.dashboard-table tbody td {
    padding: 18px 22px;
    border-bottom: 1px solid #e7edf5;
    vertical-align: middle;
}

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

.dashboard-action-title-cell {
    min-width: 280px;
    white-space: normal;
}

.dashboard-action-title-cell a,
.dashboard-action-title-cell span {
    display: block;
}

.dashboard-action-title-cell a {
    color: #0d6efd;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
}

.dashboard-action-title-cell span {
    margin-top: 5px;
    color: #64748b;
    line-height: 1.45;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill-success {
    color: #087443;
    background: #ddf5e8;
    border-color: #bce8ce;
}

.status-pill-warning {
    color: #9a6700;
    background: #fff3cd;
    border-color: #ffe2a4;
}

.status-pill-info {
    color: #0f766e;
    background: #e8f8f6;
    border-color: #b8ebe6;
}

.status-pill-danger {
    color: #b4232f;
    background: #fde7ea;
    border-color: #fac5cb;
}

.status-pill-muted {
    color: #475569;
    background: #edf2f7;
    border-color: #dce5ef;
}

.btn-soft-primary {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #b8d3ff;
}

.dashboard-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 190px;
}

.dashboard-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    border-radius: 7px;
    font-weight: 700;
}

.dashboard-table-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 22px;
    color: #334155;
    border-top: 1px solid #e1e8f2;
}

.dashboard-empty-row {
    padding: 46px 22px !important;
    color: #64748b;
    text-align: center;
}

.dashboard-empty-row strong,
.dashboard-empty-row span {
    display: block;
}

.dashboard-empty-row strong {
    color: #172033;
}

.assigned-page-heading {
    align-items: flex-start;
}

.assigned-page-shell {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

.assigned-page-shell .dashboard-page-heading,
.assigned-page-shell .assigned-filter-card,
.assigned-page-shell .assigned-tabs-card,
.assigned-page-shell .assigned-table-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.assigned-scope-dropdown .btn {
    min-width: 235px;
    justify-content: center;
}

.assigned-scope-dropdown .dropdown-menu {
    min-width: 235px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.assigned-scope-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    color: #334155;
    font-weight: 700;
}

.assigned-scope-dropdown .dropdown-item.active,
.assigned-scope-dropdown .dropdown-item:active {
    color: #0d6efd;
    background: #eef5ff;
}

.assigned-filter-card {
    padding: 18px;
}

.assigned-filter-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1.25fr) repeat(3, minmax(100px, 0.7fr)) repeat(2, minmax(118px, 0.74fr)) auto;
    gap: 12px;
    align-items: end;
}

.assigned-filter-actions {
    gap: 8px;
}

.assigned-filter-actions .btn {
    min-width: 86px;
    padding-inline: 12px;
}

.assigned-date-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.assigned-tabs-card {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 18px;
    min-height: 56px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.assigned-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 56px;
    padding: 0 14px;
    color: #475569;
    font-weight: 800;
    text-decoration: none;
}

.assigned-tab::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 2px;
    background: transparent;
    border-radius: 999px;
}

.assigned-tab.active,
.assigned-tab:hover {
    color: #0d6efd;
}

.assigned-tab.active::after {
    background: #0d6efd;
}

.assigned-table-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.assigned-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.assigned-table {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
}

.assigned-page-col-module {
    width: 120px;
}

.assigned-page-col-task {
    width: 40%;
}

.assigned-page-col-department {
    width: 160px;
}

.assigned-page-col-date {
    width: 140px;
}

.assigned-page-col-status {
    width: 140px;
}

.assigned-page-col-priority {
    width: 100px;
}

.assigned-page-col-actions {
    width: 80px;
}

.assigned-table thead th {
    padding: 14px 16px;
    white-space: nowrap;
}

.assigned-table tbody td {
    padding: 16px;
    overflow: hidden;
}

.assigned-table thead th:last-child,
.assigned-table tbody td:last-child {
    text-align: center;
}

.assigned-page-row {
    position: relative;
    border-left: 3px solid transparent;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.assigned-page-row:hover {
    background: #f8fbff;
}

.assigned-page-row:hover > td {
    background: #f8fbff;
}

.assigned-page-row-action {
    border-left-color: #0d6efd;
}

.assigned-page-row-action > td:first-child {
    border-left: 3px solid #0d6efd;
}

.assigned-page-row-audit {
    border-left-color: #f59f00;
}

.assigned-page-row-audit > td:first-child {
    border-left: 3px solid #f59f00;
}

.assigned-page-row-if {
    border-left-color: #8b5cf6;
}

.assigned-page-row-if > td:first-child {
    border-left: 3px solid #8b5cf6;
}

.assigned-page-module-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 102px;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.assigned-page-module-badge i {
    font-size: 0.95rem;
}

.assigned-page-module-action {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #c7dbff;
}

.assigned-page-module-audit {
    color: #b76b00;
    background: #fff7e6;
    border-color: #ffe1a3;
}

.assigned-page-module-if {
    color: #6d28d9;
    background: #f3ebff;
    border-color: #dcc7ff;
}

.assigned-module-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 5px 10px;
    color: #334155;
    background: #eef2f7;
    border: 1px solid #dde6f2;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

.assigned-module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 1rem;
}

.assigned-module-success .assigned-module-icon {
    color: #087443;
    background: #ddf5e8;
}

.assigned-module-warning .assigned-module-icon {
    color: #b76b00;
    background: #fff3cd;
}

.assigned-module-purple .assigned-module-icon {
    color: #6d28d9;
    background: #f1e9ff;
}

.assigned-task-cell small {
    display: inline-flex;
    width: fit-content;
    margin-top: 7px;
    padding: 4px 8px;
    color: #475569;
    background: #edf2f7;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
}

.assigned-task-cell {
    min-width: 0;
    white-space: normal;
}

.assigned-task-cell a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 0.96rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assigned-task-cell span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.assigned-due-date,
.assigned-due-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assigned-due-date {
    color: #334155;
    font-weight: 700;
    white-space: nowrap;
}

.assigned-due-meta {
    margin-top: 5px;
    font-size: 0.84rem;
    font-weight: 800;
}

.assigned-due-muted {
    color: #64748b;
}

.assigned-due-warning {
    color: #d97706;
}

.assigned-due-danger {
    color: #dc3545;
}

.assigned-due-success {
    color: #198754;
}

.assigned-page-status,
.assigned-page-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.assigned-page-status i,
.assigned-page-priority i {
    font-size: 0.82rem;
}

.assigned-page-status-completed {
    color: #087443;
    background: #ddf5e8;
    border-color: #bce8ce;
}

.assigned-page-status-active {
    color: #0f766e;
    background: #dff7fa;
    border-color: #aee7ef;
}

.assigned-page-status-open {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #b8d3ff;
}

.assigned-page-status-pending {
    color: #9a6700;
    background: #fff3cd;
    border-color: #ffe2a4;
}

.assigned-page-status-danger {
    color: #b4232f;
    background: #fde7ea;
    border-color: #fac5cb;
}

.assigned-page-status-planned {
    color: #6d28d9;
    background: #f3ebff;
    border-color: #dcc7ff;
}

.assigned-page-status-neutral {
    color: #475569;
    background: #edf2f7;
    border-color: #dce5ef;
}

.assigned-page-priority-low {
    color: #087443;
    background: #ddf5e8;
    border-color: #bce8ce;
}

.assigned-page-priority-medium {
    color: #9a6700;
    background: #fff3cd;
    border-color: #ffe2a4;
}

.assigned-page-priority-high {
    color: #b4232f;
    background: #fde7ea;
    border-color: #fac5cb;
}

.assigned-page-priority-critical {
    color: #ffffff;
    background: #991b1b;
    border-color: #7f1d1d;
}

.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.priority-pill-danger {
    color: #b4232f;
    background: #fde7ea;
    border-color: #fac5cb;
}

.priority-pill-warning {
    color: #9a6700;
    background: #fff3cd;
    border-color: #ffe2a4;
}

.priority-pill-info {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #b8d3ff;
}

.priority-pill-muted {
    color: #475569;
    background: #edf2f7;
    border-color: #dce5ef;
}

.assigned-row-actions {
    min-width: auto;
}

.assigned-detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #172033;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
}

.assigned-detail-button:hover {
    color: #0d6efd;
    background: #eef5ff;
    border-color: #b8d3ff;
}

.assigned-table-footer {
    align-items: center;
}

.assigned-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assigned-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #ffffff;
    background: #0d6efd;
    border-radius: 8px;
    font-weight: 800;
}

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

    .assigned-filter-actions {
        grid-column: auto;
    }
}

@container (max-width: 1120px) {
    .dof-dashboard-table {
        table-layout: auto;
    }

    .dof-dashboard-table thead {
        display: none;
    }

    .dof-dashboard-table,
    .dof-dashboard-table tbody,
    .dof-dashboard-table tr,
    .dof-dashboard-table td {
        display: block;
        width: 100% !important;
    }

    .dof-dashboard-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .dof-dashboard-table tbody tr {
        padding: 12px;
        background: #ffffff;
        border: 1px solid #e2e9f3;
        border-radius: 8px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    }

    .dof-dashboard-table tbody td {
        display: grid;
        grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 10px 0;
        border-bottom: 1px solid #edf2f7;
    }

    .dof-dashboard-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.8rem;
        font-weight: 800;
    }

    .dof-dashboard-table tbody td:last-child {
        border-bottom: 0;
    }

    .dof-dashboard-table .dashboard-action-title-cell {
        min-width: 0;
    }

    .dof-dashboard-table .dashboard-row-actions {
        justify-content: flex-start;
    }

    .dof-dashboard-table .dashboard-empty-row::before {
        display: none;
    }
}

.app-card,
.app-form-card {
    margin-bottom: 20px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.app-card-header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.1rem;
    font-weight: 800;
}

.app-card-header p {
    margin: 4px 0 0;
    color: #64748b;
    line-height: 1.4;
}

.app-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    color: #0d6efd;
    background: #eaf2ff;
    border-radius: 8px;
    font-size: 1.35rem;
}

.app-card-footer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e7edf5;
}

.app-heading-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.app-heading-actions .btn,
.app-form-actions .btn,
.app-inline-form .btn,
.closure-review-box .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 8px;
    font-weight: 700;
}

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

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

.app-form-card .form-label,
.app-card .form-label {
    color: #172033;
    font-weight: 700;
}

.app-form-card .form-control,
.app-form-card .form-select,
.app-card .form-control,
.app-card .form-select {
    min-height: 44px;
    border-color: #d8e2ef;
    border-radius: 8px;
}

.app-file-box {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    background: #f8fbff;
    border: 1px dashed #bfd2ec;
    border-radius: 8px;
}

.app-file-box > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #0d6efd;
    background: #eaf2ff;
    border-radius: 8px;
    font-size: 1.3rem;
}

.sub-action-inline-progress {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 5px 9px;
    color: #0f4fbf;
    background: #eef5ff;
    border: 1px solid #cfe1ff;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.sub-action-inline-progress small {
    color: #475569;
    font-size: 0.74rem;
}

.sub-action-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.sub-action-summary-grid > div {
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
}

.sub-action-summary-grid span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.sub-action-summary-grid strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 1.35rem;
    line-height: 1;
}

.sub-action-progress {
    height: 10px;
    margin-top: 14px;
    overflow: hidden;
    background: #e9eff8;
    border-radius: 999px;
}

.sub-action-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #29a3ff);
    border-radius: inherit;
}

.sub-action-builder {
    display: grid;
    gap: 14px;
}

.sub-action-builder-list {
    display: grid;
    gap: 12px;
}

.sub-action-builder-item {
    padding: 16px;
    background: #f8fbff;
    border: 1px solid #dce7f5;
    border-radius: 8px;
}

.sub-action-builder-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.sub-action-builder-head strong {
    color: #172033;
}

.sub-action-builder-head .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-row-actions form {
    margin: 0;
}

.dof-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 314px;
    gap: 20px;
    align-items: start;
}

.dof-form-card,
.dof-side-card {
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.dof-form-card {
    padding: 22px;
}

.dof-card-icon {
    color: #0f9f9a;
    background: #e8f8f6;
}

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

.dof-form-card .form-label {
    color: #172033;
    font-weight: 800;
}

.dof-form-card .form-control,
.dof-form-card .form-select {
    min-height: 44px;
    border-color: #d8e2ef;
    border-radius: 8px;
}

.dof-section-divider {
    margin: 22px -22px;
    border-top: 1px solid #e7edf5;
}

.dof-textarea-stack {
    display: grid;
    gap: 18px;
}

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

.dof-textarea-field {
    position: relative;
}

.dof-textarea-field textarea {
    min-height: 86px;
    padding-bottom: 28px;
    resize: vertical;
}

.dof-counter {
    position: absolute;
    right: 12px;
    bottom: 8px;
    color: #64748b;
    font-size: 0.78rem;
    pointer-events: none;
}

.dof-upload-box {
    display: grid;
    place-items: center;
    gap: 5px;
    margin-top: 18px;
    padding: 22px;
    color: #475569;
    text-align: center;
    background: #fbfdff;
    border: 2px dashed #bfd2ec;
    border-radius: 8px;
    cursor: pointer;
}

.dof-upload-box:hover {
    border-color: #0d6efd;
    background: #f4f9ff;
}

.dof-upload-box.is-dragging {
    border-color: #0f9f9a;
    background: #eefbf9;
}

.dof-upload-box i {
    color: #0d6efd;
    font-size: 2rem;
}

.dof-upload-box strong {
    color: #0d6efd;
}

.dof-upload-box small {
    color: #64748b;
}

.dof-upload-box input {
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
}

.dof-side-panel {
    display: grid;
    gap: 16px;
}

.dof-side-card {
    padding: 20px;
}

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

.dof-side-title i {
    color: #0f9f9a;
    font-size: 1.25rem;
}

.dof-side-title h3 {
    margin: 0;
    color: #111827;
    font-size: 1.03rem;
    font-weight: 800;
}

.dof-side-card p {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.45;
}

.dof-status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    color: #9a6700;
    background: #fff6df;
    border: 1px solid #f8d98c;
    border-radius: 8px;
}

.dof-status-box i {
    font-size: 1.45rem;
}

.dof-status-box strong,
.dof-status-box span {
    display: block;
}

.dof-status-box strong {
    color: #334155;
}

.dof-status-box span {
    color: #64748b;
    font-size: 0.82rem;
}

.dof-approval-flow {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: dof-step;
}

.dof-approval-flow li {
    position: relative;
    min-height: 58px;
    padding-left: 44px;
    counter-increment: dof-step;
}

.dof-approval-flow li::before {
    content: counter(dof-step);
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 800;
}

.dof-approval-flow li.is-active::before {
    color: #ffffff;
    background: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 0 0 5px rgba(13, 110, 253, 0.14), 0 8px 18px rgba(13, 110, 253, 0.25);
}

.dof-approval-flow li.is-complete::before {
    color: #ffffff;
    background: #0f9f6e;
    border-color: #0f9f6e;
}

.dof-approval-flow li.is-rejected::before {
    color: #ffffff;
    background: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 0 0 5px rgba(220, 53, 69, 0.12), 0 8px 18px rgba(220, 53, 69, 0.2);
}

.dof-approval-flow li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 30px;
    width: 2px;
    height: 26px;
    background: #cbd5e1;
}

.dof-approval-flow strong,
.dof-approval-flow span {
    display: block;
}

.dof-approval-flow strong {
    color: #334155;
    font-size: 0.9rem;
}

.dof-approval-flow span {
    color: #64748b;
    font-size: 0.82rem;
}

.dof-approval-flow small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.78rem;
}

.dof-checklist {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dof-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 0.9rem;
}

.dof-checklist i {
    color: #94a3b8;
}

.dof-detail-heading {
    align-items: flex-start;
}

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

.dof-detail-info-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 92px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.dof-detail-info-icon,
.dof-detail-content-icon,
.dof-evidence-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.dof-detail-info-icon {
    width: 46px;
    height: 46px;
    color: #0d6efd;
    background: #eaf2ff;
    font-size: 1.25rem;
}

.dof-detail-info-card > div > span:first-child {
    display: block;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 800;
}

.dof-detail-info-card strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 1.02rem;
    overflow-wrap: anywhere;
}

.dof-detail-info-card .status-pill {
    margin-top: 4px;
}

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

.dof-detail-main,
.dof-detail-side {
    display: grid;
    gap: 14px;
}

.dof-detail-content-card,
.dof-detail-side-card {
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.dof-detail-content-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
}

.dof-detail-content-card + .dof-detail-content-card {
    margin-top: 0;
}

.dof-detail-content-icon {
    width: 58px;
    height: 58px;
    font-size: 1.55rem;
}

.dof-detail-content-icon.tone-teal {
    color: #0f9f9a;
    background: #e8f8f6;
}

.dof-detail-content-icon.tone-green {
    color: #198754;
    background: #e7f7eb;
}

.dof-detail-content-icon.tone-blue {
    color: #0d6efd;
    background: #eaf2ff;
}

.dof-detail-content-icon.tone-purple {
    color: #7c3aed;
    background: #f1e9ff;
}

.dof-detail-content-card h3,
.dof-detail-side-title h3 {
    margin: 0;
    color: #111827;
    font-size: 1.04rem;
    font-weight: 800;
}

.dof-detail-content-card small,
.dof-detail-side-title p {
    display: block;
    margin-top: 3px;
    color: #64748b;
    line-height: 1.4;
}

.dof-detail-content-card p {
    margin: 12px 0 0;
    color: #334155;
    line-height: 1.55;
}

.dof-detail-side-card {
    padding: 18px;
}

.dof-detail-side-title {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.dof-detail-side-title > i {
    color: #0f9f9a;
    font-size: 1.35rem;
}

.dof-detail-approval-flow li:last-child {
    min-height: 34px;
}

.dof-evidence-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    color: #0d6efd;
    text-decoration: none;
    background: #f8fbff;
    border: 1px solid #bfd2ec;
    border-radius: 8px;
}

.dof-evidence-link:hover {
    color: #0b5ed7;
    background: #eef5ff;
    border-color: #8bbcff;
}

.dof-evidence-link-inline {
    display: inline-flex;
    max-width: 100%;
    margin-top: 12px;
}

.dof-evidence-file-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    color: #0d6efd;
    background: #eaf2ff;
}

.dof-evidence-name {
    min-width: 0;
    overflow: hidden;
    color: #0d6efd;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dof-detail-empty-note {
    padding: 14px;
    color: #64748b;
    background: #f8fbff;
    border: 1px dashed #bfd2ec;
    border-radius: 8px;
}

.dof-detail-summary {
    display: grid;
}

.dof-detail-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #e7edf5;
}

.dof-detail-summary > div:first-child {
    padding-top: 0;
}

.dof-detail-summary > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dof-detail-summary span {
    color: #64748b;
    font-weight: 800;
}

.dof-detail-summary strong {
    color: #111827;
    text-align: right;
}

.dof-rejection-card {
    border-color: #f4c2c7;
    background: #fff7f8;
}

.dof-rejection-card .dof-detail-side-title > i {
    color: #dc3545;
}

.dof-rejection-card p {
    margin: 0;
    color: #842029;
    line-height: 1.55;
}

.dof-rejection-card small {
    display: block;
    margin-top: 10px;
    color: #9f3a45;
}

.dof-detail-revision-card,
.dof-detail-comments-card {
    margin-top: 20px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.audit-flow-heading {
    align-items: flex-start;
}

.audit-flow-audit-no,
.audit-selector-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    color: #0d6efd;
    background: #eef5ff;
    border: 1px solid #cfe1ff;
    border-radius: 8px;
    font-weight: 800;
}

.audit-selector {
    position: relative;
}

.audit-selector-button {
    border: 1px solid #cfe1ff;
}

.audit-selector-menu {
    width: min(420px, calc(100vw - 32px));
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.audit-selector-title {
    padding: 8px 10px 12px;
    color: #111827;
    font-size: 0.9rem;
    font-weight: 800;
}

.audit-selector-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
    padding: 6px;
    border-radius: 8px;
}

.audit-selector-row.is-active {
    background: #eef5ff;
}

.audit-selector-link {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 8px;
    color: #334155;
    text-decoration: none;
}

.audit-selector-link strong {
    color: #0d6efd;
}

.audit-selector-link span {
    overflow: hidden;
    color: #64748b;
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-selector-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #dc3545;
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
}

.audit-selector-empty {
    padding: 14px 10px;
    color: #64748b;
    font-size: 0.9rem;
}

.audit-access-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.audit-access-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: #0d6efd;
    background: #eef5ff;
    border-radius: 8px;
    font-size: 1.5rem;
}

.audit-access-card h3 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 800;
}

.audit-access-card p {
    margin: 0;
    color: #64748b;
}

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

.audit-dashboard-table .dashboard-row-actions form {
    margin: 0;
}

.audit-dashboard-progress {
    display: grid;
    gap: 7px;
    min-width: 120px;
}

.audit-dashboard-progress span {
    color: #334155;
    font-weight: 800;
}

.audit-dashboard-progress div {
    height: 8px;
    overflow: hidden;
    background: #e8eef8;
    border-radius: 999px;
}

.audit-dashboard-progress i {
    display: block;
    height: 100%;
    background: #0d6efd;
    border-radius: inherit;
}

.audit-report-body {
    min-height: 100vh;
    margin: 0;
    color: #111827;
    background: #e9eef6;
    font-family: Arial, sans-serif;
}

.audit-report-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #dbe5f2;
    backdrop-filter: blur(10px);
}

.audit-report-toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
}

.audit-report-toolbar-button.is-primary {
    color: #ffffff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.audit-report-page {
    width: 210mm;
    min-height: 297mm;
    margin: 22px auto;
    padding: 14mm;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

.audit-report-cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 2px solid #0d6efd;
}

.audit-report-kicker {
    display: block;
    color: #0d6efd;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.audit-report-cover h1 {
    margin: 5px 0;
    color: #0f172a;
    font-size: 2rem;
    font-weight: 900;
}

.audit-report-cover h1.audit-report-document-title {
    font-size: 1rem;
    line-height: 1.35;
}

.audit-report-cover p {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    font-weight: 700;
}

.audit-report-status {
    min-width: 42mm;
    padding: 10px 12px;
    color: #0d6efd;
    background: #eef5ff;
    border: 1px solid #cfe1ff;
    border-radius: 8px;
}

.audit-report-status span,
.audit-report-summary-grid span,
.audit-report-result-grid span,
.audit-report-signatures span {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
}

.audit-report-status strong,
.audit-report-summary-grid strong,
.audit-report-result-grid strong,
.audit-report-signatures strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 0.94rem;
}

.audit-report-summary-grid,
.audit-report-result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.audit-report-summary-grid > div,
.audit-report-result-grid > div {
    min-height: 52px;
    padding: 9px 10px;
    background: #f8fbff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
}

.audit-report-section {
    margin-top: 16px;
}

.audit-report-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.audit-report-section-head h2 {
    margin: 0;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 900;
}

.audit-report-section-head span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
}

.audit-report-question-list {
    display: grid;
    gap: 10px;
}

.audit-report-question {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 12px;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
}

.audit-report-question-title {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.audit-report-question-title > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #ffffff;
    background: #0d6efd;
    border-radius: 50%;
    font-size: 0.86rem;
    font-weight: 900;
}

.audit-report-question h3 {
    margin: 0;
    color: #111827;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.35;
}

.audit-report-question-title p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.8rem;
}

.audit-report-result {
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.audit-report-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.audit-report-detail-grid div {
    padding: 8px;
    background: #f8fbff;
    border-radius: 8px;
}

.audit-report-detail-grid dt {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.audit-report-detail-grid dd {
    margin: 3px 0 0;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 800;
}

.audit-report-note {
    margin-top: 8px;
    padding: 9px 10px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
}

.audit-report-note strong {
    display: block;
    margin-bottom: 3px;
    color: #334155;
    font-size: 0.78rem;
}

.audit-report-note p {
    margin: 0;
    color: #111827;
    font-size: 0.86rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.audit-report-linked-records {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.audit-report-linked-records span {
    padding: 6px 8px;
    color: #0d6efd;
    background: #eef5ff;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.audit-report-signatures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.audit-report-signatures div {
    min-height: 82px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.audit-report-signatures strong {
    margin-top: 30px;
    border-top: 1px solid #94a3b8;
    padding-top: 7px;
}

.audit-report-empty {
    padding: 18px;
    color: #64748b;
    background: #f8fbff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    text-align: center;
    font-weight: 800;
}

.audit-progress-card,
.audit-question-card,
.audit-history-card,
.audit-action-bar {
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.audit-progress-card {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
    padding: 18px 22px;
}

.audit-observer-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.audit-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #64748b;
    font-size: 0.92rem;
}

.audit-progress-meta strong {
    color: #334155;
}

.audit-progress-track {
    height: 8px;
    background: #e8eef8;
    border-radius: 999px;
    overflow: hidden;
}

.audit-progress-track span {
    display: block;
    height: 100%;
    background: #0d6efd;
    border-radius: inherit;
    transition: width 0.2s ease;
}

.audit-flow-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 20px;
    align-items: start;
    padding-bottom: 90px;
}

.audit-question-card {
    padding: 20px;
}

.audit-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.audit-section-label {
    color: #111827;
    font-weight: 800;
}

.audit-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 8px;
    color: #ffffff;
    background: #0d6efd;
    border-radius: 50%;
    font-weight: 800;
}

.audit-required-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1e3a8a;
    font-weight: 800;
}

.audit-question-fields,
.audit-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.audit-question-card .form-label {
    color: #172033;
    font-weight: 800;
}

.audit-question-card .form-control,
.audit-question-card .form-select {
    min-height: 44px;
    border-color: #d8e2ef;
    border-radius: 8px;
}

.audit-current-question {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 18px;
    margin: 20px 0;
    padding: 28px;
    background: #f8fbff;
    border: 1px solid #cfe1ff;
    border-radius: 8px;
}

.audit-question-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #0d6efd;
    background: #ffffff;
    border: 2px solid #0d6efd;
    border-radius: 50%;
    font-size: 1.3rem;
}

.audit-current-question h3 {
    margin: 2px 0 24px;
    color: #0f1f44;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.45;
}

.audit-current-question-body {
    min-width: 0;
}

.audit-expected-answer {
    margin: -6px 0 20px;
    padding: 14px 16px;
    color: #0f5132;
    background: #eaf8f0;
    border: 1px solid #bfe8d1;
    border-radius: 8px;
}

.audit-expected-answer strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.audit-expected-answer p {
    margin: 0;
    color: #14532d;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.audit-answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.audit-answer-label {
    grid-column: 1 / -1;
    color: #172033;
    font-weight: 800;
}

.audit-answer-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    min-height: 58px;
    padding: 13px 14px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    cursor: pointer;
}

.audit-answer-option.audit-tone-success {
    background: #f6fffb;
    border-color: #bdebd2;
}

.audit-answer-option.audit-tone-warning {
    background: #fffaf0;
    border-color: #f8d99a;
}

.audit-answer-option.audit-tone-danger {
    background: #fff6f6;
    border-color: #f4b8be;
}

.audit-answer-option strong {
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.audit-answer-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.audit-answer-option > span {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
}

.audit-locked-field {
    color: #334155;
    background: #f8fbff;
    font-weight: 700;
}

.audit-answer-option.is-selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.audit-answer-option.is-selected > span {
    border-color: currentColor;
    background: currentColor;
    box-shadow: inset 0 0 0 4px #ffffff;
}

.audit-answer-option.audit-tone-success.is-selected {
    color: #198754;
    border-color: #28a866;
}

.audit-answer-option.audit-tone-danger.is-selected {
    color: #dc3545;
    border-color: #dc3545;
}

.audit-answer-option.audit-tone-warning.is-selected {
    color: #b77900;
    border-color: #f0ad2c;
}

.audit-answer-option.audit-tone-secondary.is-selected {
    color: #64748b;
    border-color: #94a3b8;
}

.audit-textarea-field {
    position: relative;
}

.audit-textarea-field textarea {
    min-height: 96px;
    padding-bottom: 28px;
    resize: vertical;
}

.audit-counter {
    position: absolute;
    right: 12px;
    bottom: 8px;
    color: #64748b;
    font-size: 0.78rem;
    pointer-events: none;
}

.audit-history-card {
    padding: 20px;
}

.audit-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.audit-history-head h3 {
    margin: 0;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 800;
}

.audit-history-head p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 0.86rem;
}

.audit-history-head > span {
    flex: 0 0 auto;
    padding: 8px 10px;
    color: #334155;
    background: #f8fbff;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 800;
}

.audit-history-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.audit-history-list a {
    display: grid;
    grid-template-columns: 30px 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 66px;
    padding: 10px;
    color: #334155;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
}

.audit-history-list li.is-active a {
    background: #eef5ff;
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.08);
}

.audit-history-state,
.audit-history-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
}

.audit-history-state {
    width: 26px;
    height: 26px;
    color: #94a3b8;
    border: 1px solid #cbd5e1;
}

.audit-history-list li.is-complete .audit-history-state {
    color: #198754;
    border-color: #28a866;
}

.audit-history-list li.is-active .audit-history-state {
    color: #ffffff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.audit-history-number {
    width: 40px;
    height: 40px;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.audit-history-text {
    display: -webkit-box;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.audit-history-result {
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.audit-history-list small {
    grid-column: 3 / -1;
    margin-top: -4px;
    color: #64748b;
    font-size: 0.76rem;
}

.audit-tone-success {
    color: #198754;
    background: #e7f7eb;
}

.audit-tone-danger {
    color: #dc3545;
    background: #fff0f1;
}

.audit-tone-warning {
    color: #b77900;
    background: #fff6df;
}

.audit-tone-secondary {
    color: #64748b;
    background: #f1f5f9;
}

.audit-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, 1fr);
    gap: 16px;
    margin: 20px -32px -34px;
    padding: 16px 32px;
    border-radius: 0;
}

.audit-action-bar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    border-radius: 8px;
    font-weight: 800;
}

.audit-nonconformity-button.is-urgent {
    color: #ffffff;
    background: #fd7e14;
    border-color: #fd7e14;
    box-shadow: 0 10px 24px rgba(253, 126, 20, 0.2);
}

.audit-nonconformity-button.is-hidden {
    display: none;
}

.audit-builder-form {
    display: grid;
    gap: 18px;
}

.audit-builder-card {
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.audit-builder-card .form-label {
    color: #172033;
    font-weight: 800;
}

.audit-builder-card .form-control,
.audit-builder-card .form-select {
    min-height: 44px;
    border-color: #d8e2ef;
    border-radius: 8px;
}

.audit-builder-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.audit-question-count-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.audit-question-count-control .btn,
.audit-builder-section-head .btn,
.audit-builder-question-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    font-weight: 800;
}

.audit-builder-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.audit-builder-section-head h3 {
    margin: 0;
    color: #111827;
    font-size: 1.18rem;
    font-weight: 800;
}

.audit-builder-section-head p {
    margin: 4px 0 0;
    color: #64748b;
}

.audit-builder-question-list {
    display: grid;
    gap: 14px;
}

.audit-builder-question {
    padding: 18px;
    background: #fbfdff;
    border: 1px solid #dfe8f4;
    border-radius: 8px;
}

.audit-builder-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.audit-builder-question-head strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    font-size: 1rem;
}

.audit-builder-question-head strong span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #ffffff;
    background: #0d6efd;
    border-radius: 50%;
    font-size: 0.85rem;
}

.audit-builder-question-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

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

.audit-builder-question-text {
    grid-column: 1 / -1;
}

.audit-builder-question-topic {
    grid-column: 1 / -1;
}

.audit-builder-question textarea {
    min-height: 92px;
    resize: vertical;
}

.app-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e7edf5;
}

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

.permission-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    min-height: 86px;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    cursor: pointer;
}

.permission-card:hover {
    border-color: #b8d3ff;
    background: #f3f8ff;
}

.permission-card .form-check-input {
    margin-top: 3px;
}

.permission-card strong,
.permission-card small {
    display: block;
}

.permission-card strong {
    color: #172033;
    font-weight: 800;
}

.permission-card small {
    margin-top: 3px;
    color: #64748b;
    line-height: 1.35;
}

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

.detail-metric-card {
    display: grid;
    gap: 8px;
    min-height: 96px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.detail-metric-card span {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 700;
}

.detail-metric-card strong {
    color: #111827;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.detail-metric-danger {
    border-left: 5px solid #dc3545;
}

.app-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

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

.evidence-item {
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
}

.evidence-item-wide {
    grid-column: 1 / -1;
}

.evidence-item span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
}

.evidence-item p {
    margin: 0;
    overflow-wrap: anywhere;
}

.evidence-danger {
    background: #fff7f8;
    border-color: #fac5cb;
}

.closure-review-box {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding: 16px;
    background: #fbfcfe;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
}

.comment-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.comment-item {
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
}

.comment-item > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-item small {
    color: #64748b;
}

.comment-item p {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .dashboard-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.timeline-item {
    border-left: 4px solid #0d6efd;
    padding-left: 14px;
}

.org-fullscreen {
    min-height: calc(100vh - 57px);
    background: #eef3f8;
}

.app-org-panel {
    min-height: calc(100vh - 218px);
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.app-org-panel .org-shell {
    min-height: calc(100vh - 292px);
}

.dashboard-content-flush .app-org-panel {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-content-flush .app-org-panel .org-shell {
    height: calc(100vh - 65px);
    min-height: calc(100vh - 65px);
}

.dashboard-content-flush .org-map {
    min-height: 100%;
}

.org-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: #ffffff;
    border-bottom: 1px solid #dce5ef;
}

.org-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.org-zoom-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
    padding: 4px 8px;
    background: #f8fafc;
    border: 1px solid #dce5ef;
    border-radius: 8px;
}

.org-zoom-range {
    width: 130px;
}

.org-zoom-value {
    min-width: 42px;
    color: #46556a;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: right;
}

.org-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: calc(100vh - 138px);
}

.org-map {
    position: relative;
    overflow: hidden;
    background-color: #f8fbff;
    background-image:
        linear-gradient(#e5edf6 1px, transparent 1px),
        linear-gradient(90deg, #e5edf6 1px, transparent 1px);
    background-size: 28px 28px;
    cursor: grab;
    user-select: none;
}

.org-map:active {
    cursor: grabbing;
}

.org-canvas {
    position: absolute;
    left: 0;
    top: 0;
    min-width: 1800px;
    min-height: 1100px;
    transform-origin: 0 0;
}

.org-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.org-line {
    fill: none;
    stroke: #6b7f97;
    stroke-width: 3;
    stroke-linecap: round;
}

.org-node {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 240px;
    min-height: 104px;
    padding: 13px 15px;
    color: #172033;
    text-align: left;
    background: #ffffff;
    border: 1px solid #d6e0ec;
    border-top: 5px solid #0d6efd;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(27, 39, 59, 0.14);
    cursor: grab;
    touch-action: none;
}

.org-node:active {
    cursor: grabbing;
}

.org-node.is-selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.18), 0 18px 40px rgba(27, 39, 59, 0.18);
}

.org-node-department {
    min-height: 42px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-block: 7px;
    background: #ffffff;
    border-color: #d6e0ec;
    border-top-color: var(--org-node-color, #198754);
    box-shadow: 0 9px 20px rgba(27, 39, 59, 0.1);
}

.org-node-name {
    font-weight: 800;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.org-node-title {
    color: #637083;
    font-size: 0.9rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.org-node-count {
    align-self: flex-start;
    margin-top: 3px;
    padding: 3px 8px;
    color: #28425f;
    background: #eaf2ff;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.org-node-department .org-node-count {
    margin-top: 0;
    color: #14532d;
    background: #dcfce7;
    white-space: nowrap;
}

.org-snap-guide {
    position: absolute;
    z-index: 4;
    display: none;
    pointer-events: none;
    background: #0d6efd;
    opacity: 0.7;
}

.org-snap-guide.is-visible {
    display: block;
}

.org-snap-guide-v {
    top: 0;
    width: 2px;
}

.org-snap-guide-h {
    left: 0;
    height: 2px;
}

.org-empty {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: min(360px, calc(100% - 48px));
    padding: 24px;
    color: #637083;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #b9c6d8;
    border-radius: 8px;
    transform: translate(-50%, -50%);
}

.org-inspector {
    padding: 18px;
    background: #ffffff;
    border-left: 1px solid #dce5ef;
    overflow-y: auto;
}

.orientation-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.orientation-stage,
.orientation-panel {
    background: #ffffff;
    border: 1px solid #dee5ef;
    border-radius: 8px;
}

.orientation-stage {
    overflow: hidden;
}

.orientation-scroll {
    min-height: 660px;
    max-height: calc(100vh - 230px);
    overflow: auto;
    scroll-behavior: smooth;
    background-color: #f8fafc;
    background-image:
        linear-gradient(#e8edf5 1px, transparent 1px),
        linear-gradient(90deg, #e8edf5 1px, transparent 1px);
    background-size: 32px 32px;
}

.orientation-zoom-space {
    position: relative;
    min-width: 100%;
    min-height: 100%;
}

.orientation-board {
    position: relative;
    min-width: 1200px;
    min-height: 760px;
    transform-origin: 0 0;
}

.orientation-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.orientation-line {
    fill: none;
    stroke: #5f748d;
    stroke-width: 3;
    stroke-linecap: round;
}

.orientation-node {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 220px;
    min-height: 88px;
    padding: 12px 14px;
    color: #172033;
    text-align: left;
    background: #ffffff;
    border: 1px solid #d8e1ee;
    border-left: 6px solid #0d6efd;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(23, 32, 51, 0.12);
    cursor: grab;
    touch-action: none;
}

.orientation-node-department {
    min-height: 46px;
    justify-content: center;
    background: #ffffff;
    border-color: color-mix(in srgb, var(--orientation-node-color, #198754) 45%, #d6e0ec);
    border-left-color: var(--orientation-node-color, #198754);
}

.orientation-zoom-label {
    min-width: 68px;
    color: #172033;
    opacity: 1;
}

.orientation-node:active {
    cursor: grabbing;
}

.orientation-node.is-selected {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.16), 0 16px 34px rgba(23, 32, 51, 0.16);
}

.orientation-node-name {
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.orientation-node-title {
    color: #637083;
    font-size: 0.92rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.orientation-node-count {
    align-self: flex-start;
    margin-top: 4px;
    padding: 3px 8px;
    color: #14532d;
    background: #dcfce7;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
}

.orientation-empty {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: min(360px, calc(100% - 48px));
    padding: 24px;
    color: #637083;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #b9c6d8;
    border-radius: 8px;
    transform: translate(-50%, -50%);
}

.orientation-panel {
    position: sticky;
    top: 86px;
    padding: 18px;
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    html,
    body.audit-report-body {
        width: 210mm;
        min-height: 297mm;
        background: #ffffff !important;
    }

    .audit-report-toolbar {
        display: none !important;
    }

    .audit-report-page {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .audit-report-question,
    .audit-report-section,
    .audit-report-signatures {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .audit-report-question {
        margin-bottom: 8px;
    }

    .audit-report-cover {
        padding-top: 0;
    }

    .audit-report-summary-grid > div,
    .audit-report-result-grid > div,
    .audit-report-detail-grid div,
    .audit-report-note,
    .audit-report-question,
    .audit-report-signatures div {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

@media (max-width: 576px) {
    .metric-box strong {
        font-size: 1.6rem;
    }

    .notification-menu {
        width: calc(100vw - 24px);
        min-width: 0;
    }
}

@media (max-width: 992px) {
    .login-shell {
        padding: 24px;
    }

    .dashboard-app {
        display: block;
    }

    .dashboard-sidebar .offcanvas-body {
        min-height: auto;
    }

    .dashboard-content {
        padding: 74px 18px 28px;
    }

    .dashboard-content-flush {
        min-height: calc(100vh - 64px);
        padding: 0;
    }

    .dashboard-content-flush .app-org-panel {
        min-height: calc(100vh - 64px);
    }

    .dashboard-content-flush .app-org-panel .org-shell {
        height: auto;
        min-height: auto;
    }

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

    .dof-dashboard-metrics,
    .audit-dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sub-action-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dof-dashboard-table {
        table-layout: auto;
    }

    .dof-dashboard-table thead {
        display: none;
    }

    .dof-dashboard-table,
    .dof-dashboard-table tbody,
    .dof-dashboard-table tr,
    .dof-dashboard-table td {
        display: block;
        width: 100% !important;
    }

    .dof-dashboard-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .dof-dashboard-table tbody tr {
        padding: 12px;
        background: #ffffff;
        border: 1px solid #e2e9f3;
        border-radius: 8px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    }

    .dof-dashboard-table tbody td {
        display: grid;
        grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 10px 0;
        border-bottom: 1px solid #edf2f7;
    }

    .dof-dashboard-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.8rem;
        font-weight: 800;
    }

    .dof-dashboard-table tbody td:last-child {
        border-bottom: 0;
    }

    .dof-dashboard-table .dashboard-action-title-cell {
        min-width: 0;
    }

    .dof-dashboard-table .dashboard-row-actions {
        justify-content: flex-start;
    }

    .dof-dashboard-table .dashboard-empty-row::before {
        display: none;
    }

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

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

    .dashboard-filter-actions {
        grid-column: 1 / -1;
    }

    .assigned-filter-actions {
        grid-column: 1 / -1;
    }

    .assigned-tabs-card {
        overflow-x: auto;
    }

    .assigned-table {
        min-width: 0;
    }

    .assigned-table thead {
        display: none;
    }

    .assigned-table,
    .assigned-table tbody,
    .assigned-table tr,
    .assigned-table td {
        display: block;
        width: 100% !important;
    }

    .assigned-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .assigned-table tbody tr {
        padding: 12px 12px 12px 16px;
        background: #ffffff;
        border: 1px solid #e2e9f3;
        border-radius: 8px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    }

    .assigned-table tbody td {
        display: grid;
        grid-template-columns: minmax(120px, 32%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 10px 0;
        border-bottom: 1px solid #edf2f7;
    }

    .assigned-table tbody td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 0.8rem;
        font-weight: 800;
    }

    .assigned-table tbody td:last-child {
        border-bottom: 0;
    }

    .assigned-table .dashboard-action-title-cell {
        min-width: 0;
    }

    .assigned-table .dashboard-empty-row::before {
        display: none;
    }

    .app-heading-actions {
        justify-content: flex-start;
    }

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

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

    .dof-detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .dof-layout {
        grid-template-columns: 1fr;
    }

    .audit-flow-layout {
        grid-template-columns: 1fr;
    }

    .audit-builder-main-grid,
    .audit-builder-question-grid {
        grid-template-columns: 1fr;
    }

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

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

    .action-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .action-row-actions {
        align-items: stretch;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .action-row-actions .dropdown,
    .action-row-actions .btn,
    .action-row-actions .dropdown-toggle {
        flex: 1 1 150px;
    }

    .org-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .org-toolbar-actions {
        justify-content: flex-start;
    }

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

    .org-map {
        min-height: 620px;
    }

    .app-org-panel,
    .app-org-panel .org-shell {
        min-height: auto;
    }

    .org-inspector {
        border-left: 0;
        border-top: 1px solid #dce5ef;
    }

    .orientation-workspace {
        grid-template-columns: 1fr;
    }

    .orientation-panel {
        position: static;
    }

    .orientation-scroll {
        min-height: 520px;
        max-height: none;
    }
}

@media (max-width: 576px) {
    .login-shell {
        padding: 18px;
    }

    .login-card {
        padding: 22px;
    }

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

    .dashboard-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-page-heading h2 {
        font-size: 1.65rem;
    }

    .dashboard-page-heading .btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-metrics,
    .dof-dashboard-metrics,
    .audit-dashboard-metrics,
    .sub-action-summary-grid,
    .dashboard-filter-grid,
    .assigned-filter-grid,
    .app-form-grid,
    .audit-question-fields,
    .audit-detail-grid,
    .dof-grid,
    .dof-two-column,
    .detail-metrics,
    .dof-detail-info-grid,
    .evidence-grid {
        grid-template-columns: 1fr;
    }

    .app-card,
    .app-form-card,
    .dof-form-card,
    .dof-side-card {
        padding: 18px;
    }

    .audit-question-card,
    .audit-history-card,
    .audit-builder-card {
        padding: 18px;
    }

    .audit-current-question {
        grid-template-columns: 1fr;
        padding: 20px;
    }

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

    .audit-answer-options {
        grid-template-columns: 1fr;
    }

    .audit-progress-meta,
    .audit-question-head,
    .audit-history-head,
    .audit-builder-section-head,
    .audit-builder-question-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .audit-builder-question-actions,
    .audit-question-count-control {
        width: 100%;
    }

    .audit-builder-question-actions .btn,
    .audit-question-count-control .btn {
        width: 100%;
    }

    .audit-history-list a {
        grid-template-columns: 28px 38px minmax(0, 1fr);
    }

    .audit-history-result {
        grid-column: 3 / -1;
        justify-self: start;
    }

    .audit-action-bar {
        grid-template-columns: 1fr;
        margin-inline: -12px;
        padding: 12px;
    }

    .app-card-header {
        flex-direction: column;
    }

    .sub-action-builder-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .app-heading-actions,
    .app-form-actions {
        flex-direction: column;
    }

    .app-heading-actions .btn,
    .app-heading-actions form,
    .app-form-actions .btn,
    .app-inline-form .btn {
        width: 100%;
    }

    .dof-detail-info-card,
    .dof-detail-content-card {
        grid-template-columns: 1fr;
    }

    .dof-dashboard-table tbody td {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .dof-detail-content-icon {
        width: 50px;
        height: 50px;
    }

    .dashboard-stat-card {
        min-height: 104px;
        padding: 18px;
    }

    .dashboard-filter-actions {
        flex-direction: column;
    }

    .assigned-date-range {
        grid-template-columns: 1fr;
    }

    .assigned-table tbody td {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .assigned-table-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .assigned-scope-dropdown,
    .assigned-scope-dropdown .btn {
        width: 100%;
    }

    .dashboard-filter-actions .btn {
        width: 100%;
    }

    .dashboard-table thead th,
    .dashboard-table tbody td {
        padding: 14px 16px;
    }

    .dashboard-row-actions {
        justify-content: flex-start;
    }

    .actions-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .action-list {
        padding: 10px;
    }

    .action-row {
        padding: 14px;
    }

    .action-row-actions {
        flex-direction: column;
    }

    .org-toolbar {
        padding: 12px;
    }

    .org-toolbar-actions,
    .org-zoom-control {
        width: 100%;
    }

    .org-zoom-control {
        min-width: 0;
    }

    .org-zoom-range {
        flex: 1;
        width: auto;
    }

    .org-node {
        width: 220px;
    }

    .orientation-node {
        width: 210px;
    }

    .orientation-scroll {
        min-height: 460px;
    }
}
