:root {
    --mdf-navbar-bg: #3b3b3b;
    --mdf-red: #c62828;
    --mdf-red-hover: #a61f1f;
}

body {
    background: #f4f7fb;
}

body.auth-page {
    background:
        radial-gradient(circle at top, rgba(198, 40, 40, 0.12), transparent 30rem),
        #f4f7fb;
    min-height: 100vh;
}

.page-shell {
    max-width: 1500px;
}

.auth-brand {
    color: var(--mdf-red);
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-mdf {
    background-color: var(--mdf-navbar-bg);
}

.nav-mdf .navbar-brand,
.nav-mdf .nav-link {
    color: #ffffff;
}

.mdf-brand-title {
    font-weight: 700;
}

.mdf-brand-branch {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    font-weight: 400;
}

.nav-mdf .nav-link {
    border-radius: 0.5rem;
    margin-left: 0.5rem;
    padding: 0.65rem 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-mdf .nav-link:hover,
.nav-mdf .nav-link:focus {
    color: #ffffff;
    background-color: var(--mdf-red-hover);
}

.nav-mdf-active {
    background-color: var(--mdf-red);
    color: #ffffff !important;
}

.nav-mdf .navbar-toggler {
    color: #ffffff;
}

.nav-mdf .navbar-toggler-icon {
    filter: invert(1);
}

.mdf-header-nav {
    column-gap: 0.375rem;
}

.mdf-header-user-area {
    gap: 1rem;
    margin-left: 1.5rem;
}

.mdf-header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}

.mdf-header-user-name {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
}

.mdf-header-user-area .btn {
    margin-left: 0.25rem;
}

.card {
    border: 0;
    border-radius: 1rem;
}

.table thead th {
    white-space: nowrap;
}

.admin-table {
    table-layout: auto;
    width: 100%;
}

.admin-table th.admin-status-col,
.admin-table td.admin-status-col {
    width: 1%;
    white-space: nowrap;
}

.admin-table th.admin-actions-col,
.admin-table td.admin-actions-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.admin-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.admin-actions form {
    margin: 0;
}

.admin-actions .btn {
    white-space: nowrap;
}

.admin-table tr.inactive-row {
    opacity: 0.7;
}

.search-form .form-control {
    min-width: 260px;
}

.report-matrix-table {
    table-layout: fixed;
    width: 100%;
}

.report-matrix-table th:first-child,
.report-matrix-table td:first-child {
    width: 28%;
}

.report-matrix-table th:not(:first-child),
.report-matrix-table td:not(:first-child) {
    width: auto;
}

.report-matrix-table .total-column {
    background-color: var(--bs-secondary-bg-subtle);
    font-weight: 600;
}

.report-matrix-table .summary-row-active > th,
.report-matrix-table .summary-row-active > td {
    background-color: #f8f9fa;
}

.report-matrix-table .summary-row-total > th,
.report-matrix-table .summary-row-total > td {
    background-color: #eef1f4;
    border-top: 2px solid #cfd6dd;
}

.documents-filename {
    display: block;
    max-width: 32rem;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.share-modal-open {
    overflow: hidden;
}

.share-toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1080;
    min-width: 10rem;
    max-width: 20rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(33, 37, 41, 0.94);
    color: #fff;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.share-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.share-toast.error {
    background: rgba(176, 32, 37, 0.96);
}

.share-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1085;
    background: rgba(15, 23, 42, 0.45);
}

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.share-modal-card {
    width: min(32rem, 100%);
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
}
