:root {
    --app-bg: #eef3f7;
    --app-surface: rgba(255, 255, 255, 0.82);
    --app-surface-strong: #ffffff;
    --app-border: rgba(31, 41, 55, 0.09);
    --app-border-strong: rgba(15, 23, 42, 0.14);
    --app-text: #102033;
    --app-muted: #5f6f84;
    --app-primary: #0f766e;
    --app-primary-soft: #d6f2ee;
    --app-accent: #f59e0b;
    --app-danger: #dc2626;
    --app-shadow: 0 28px 60px rgba(15, 23, 42, 0.10);
    --app-radius-xl: 28px;
    --app-radius-lg: 22px;
    --app-radius-md: 16px;
    --bs-body-bg: #eef3f7;
    --bs-body-color: #102033;
    --bs-emphasis-color: #102033;
    --bs-secondary-color: #5f6f84;
    --bs-secondary-color-rgb: 95, 111, 132;
    --bs-tertiary-color: #75859a;
    --bs-tertiary-color-rgb: 117, 133, 154;
    --bs-heading-color: #102033;
    --bs-border-color: rgba(31, 41, 55, 0.09);
}

:root[data-theme="dark"] {
    --app-bg: #0b131b;
    --app-surface: rgba(17, 24, 34, 0.88);
    --app-surface-strong: #131c27;
    --app-border: rgba(148, 163, 184, 0.14);
    --app-border-strong: rgba(148, 163, 184, 0.24);
    --app-text: #edf3fa;
    --app-muted: #9db0c4;
    --app-primary: #3bc6a4;
    --app-primary-soft: rgba(59, 198, 164, 0.12);
    --app-accent: #e9b44c;
    --app-danger: #f07b7b;
    --app-shadow: 0 28px 60px rgba(2, 8, 23, 0.52);
    --bs-body-bg: #0b131b;
    --bs-body-color: #edf3fa;
    --bs-emphasis-color: #edf3fa;
    --bs-secondary-color: #9db0c4;
    --bs-secondary-color-rgb: 157, 176, 196;
    --bs-tertiary-color: #8398ad;
    --bs-tertiary-color-rgb: 131, 152, 173;
    --bs-heading-color: #edf3fa;
    --bs-border-color: rgba(148, 163, 184, 0.14);
}

html,
body {
    min-height: 100%;
    overflow-x: clip;
}

body.app-body {
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    color: var(--app-text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.15), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.12), transparent 20%),
        linear-gradient(180deg, #f8fbfd 0%, var(--app-bg) 42%, #edf2f6 100%);
    position: relative;
    overflow-x: clip;
}

html[data-theme="dark"] body.app-body,
body.app-body[data-theme="dark"] {
    color: var(--app-text);
    background:
        radial-gradient(circle at top left, rgba(52, 211, 153, 0.10), transparent 26%),
        radial-gradient(circle at 85% 10%, rgba(251, 191, 36, 0.08), transparent 20%),
        linear-gradient(180deg, #0b1118 0%, var(--app-bg) 42%, #0c141d 100%);
}

html[data-theme="dark"] body.app-body,
html[data-theme="dark"] body.app-body h1,
html[data-theme="dark"] body.app-body h2,
html[data-theme="dark"] body.app-body h3,
html[data-theme="dark"] body.app-body h4,
html[data-theme="dark"] body.app-body h5,
html[data-theme="dark"] body.app-body h6,
html[data-theme="dark"] body.app-body p,
html[data-theme="dark"] body.app-body li,
html[data-theme="dark"] body.app-body label,
body.app-body[data-theme="dark"],
body.app-body[data-theme="dark"] h1,
body.app-body[data-theme="dark"] h2,
body.app-body[data-theme="dark"] h3,
body.app-body[data-theme="dark"] h4,
body.app-body[data-theme="dark"] h5,
body.app-body[data-theme="dark"] h6,
body.app-body[data-theme="dark"] p,
body.app-body[data-theme="dark"] li,
body.app-body[data-theme="dark"] label {
    color: var(--app-text);
}

body.app-body::before,
body.app-body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 340px;
    height: 340px;
    border-radius: 999px;
    filter: blur(20px);
    z-index: -1;
    opacity: 0.8;
}

body.app-body::before {
    top: 76px;
    right: -96px;
    background: rgba(15, 118, 110, 0.09);
}

body.app-body::after {
    bottom: -90px;
    left: -90px;
    background: rgba(245, 158, 11, 0.08);
}

html[data-theme="dark"] body.app-body::before,
body.app-body[data-theme="dark"]::before {
    background: rgba(59, 198, 164, 0.10);
}

html[data-theme="dark"] body.app-body::after,
body.app-body[data-theme="dark"]::after {
    background: rgba(233, 180, 76, 0.08);
}

.app-navbar {
    position: relative;
    z-index: 1200;
    overflow: visible;
    padding: 0.85rem 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.handover-builder {
    display: block;
}

.handover-work-order-list,
.handover-signatory-list {
    display: grid;
    gap: 1rem;
}

.handover-work-order-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.95rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: var(--app-radius-md);
    border: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface-strong) 82%, transparent);
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.handover-work-order-card:hover {
    border-color: color-mix(in srgb, var(--app-primary) 26%, var(--app-border));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.handover-work-order-card input {
    margin-top: 0.2rem;
}

.handover-work-order-content {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    min-width: 0;
}

.handover-work-order-number {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.handover-work-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    color: var(--app-muted);
    font-size: 0.92rem;
}

.handover-work-order-text {
    color: var(--app-text);
}

.handover-signatory-row {
    padding: 1rem 1.05rem;
    border-radius: var(--app-radius-md);
    border: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface-strong) 82%, transparent);
}

.handover-signatory-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.handover-signatory-grid--service {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 18rem) auto;
}

.handover-signatory-field {
    min-width: 0;
}

.handover-signatory-action {
    display: flex;
    align-items: end;
    justify-content: flex-start;
}

.handover-signatory-action .icon-action-btn {
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    .handover-signatory-grid,
    .handover-signatory-grid--service {
        grid-template-columns: 1fr;
    }

    .handover-signatory-action {
        justify-content: flex-start;
    }
}

.handover-content-editor {
    min-height: 26rem;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    line-height: 1.7;
    resize: vertical;
}

.invoice-pricing-stack {
    display: grid;
    gap: 1rem;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: calc(2.25rem + 2px);
    border-radius: 0.75rem;
    border-color: var(--app-border-strong);
    background: color-mix(in srgb, var(--app-surface-strong) 88%, transparent);
    box-shadow: none;
}

.select2-container--bootstrap-5 .select2-selection--single {
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
}

.select2-container--bootstrap-5 .select2-selection__rendered {
    color: var(--app-text);
    line-height: 1.5rem;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 1rem;
    border-color: var(--app-border-strong);
    background: var(--app-surface-strong);
    box-shadow: var(--app-shadow);
    overflow: hidden;
}

.select2-container--bootstrap-5 .select2-search .select2-search__field {
    border-radius: 0.75rem;
    border-color: var(--app-border-strong);
    background: color-mix(in srgb, var(--app-surface-strong) 88%, transparent);
    color: var(--app-text);
}

.select2-container--bootstrap-5 .select2-results__option--selected,
.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
    background: color-mix(in srgb, var(--app-primary) 16%, var(--app-surface-strong));
    color: var(--app-text);
}

.app-select2-dropdown .select2-search {
    padding: 0.75rem;
    background: color-mix(in srgb, var(--app-surface) 72%, transparent);
    border-bottom: 1px solid var(--app-border);
}

.invoice-work-order-block {
    padding: 1rem 1.1rem;
    border-radius: var(--app-radius-md);
    border: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface-strong) 86%, transparent);
}

.invoice-work-order-block.is-hidden {
    display: none;
}

.invoice-work-order-head,
.invoice-part-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14rem;
    gap: 1rem;
    align-items: end;
}

.invoice-work-order-number {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.invoice-price-field .form-label {
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
}

.invoice-part-table {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--app-border);
}

.invoice-part-meta {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.invoice-part-meta span {
    color: var(--app-muted);
    font-size: 0.92rem;
}

.invoice-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.95fr);
    gap: 1.25rem;
    align-items: start;
}

.invoice-editor-pane,
.invoice-preview-pane {
    min-width: 0;
}

.invoice-preview-pane {
    display: grid;
    gap: 0.85rem;
}

.invoice-preview-head {
    display: grid;
    gap: 0.25rem;
}

.invoice-preview-title {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--app-text);
}

.invoice-preview-hint {
    color: var(--app-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.invoice-document-preview {
    display: grid;
    gap: 1rem;
    min-height: 26rem;
    padding: 1.2rem 1.25rem;
    border-radius: calc(var(--app-radius-lg) - 0.15rem);
    border: 1px solid var(--app-border);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--app-surface) 94%, white 6%), color-mix(in srgb, var(--app-surface-strong) 92%, transparent)),
        radial-gradient(circle at top right, color-mix(in srgb, var(--brand-primary) 10%, transparent) 0%, transparent 48%);
    overflow: auto;
}

.invoice-preview-document-title {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--brand-primary-strong);
}

.invoice-preview-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
}

.invoice-preview-meta-row {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--app-radius-md);
    border: 1px solid color-mix(in srgb, var(--app-border) 86%, transparent);
    background: color-mix(in srgb, var(--app-surface-strong) 78%, transparent);
}

.invoice-preview-meta-row span {
    color: var(--app-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.invoice-preview-meta-row strong {
    font-size: 0.98rem;
    color: var(--app-text);
    line-height: 1.4;
}

.invoice-preview-section {
    display: grid;
    gap: 0.7rem;
}

.invoice-preview-section-title {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--app-text);
}

.invoice-preview-section p {
    margin: 0;
    color: var(--app-text);
    line-height: 1.65;
}

.invoice-preview-item {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: var(--app-radius-md);
    border: 1px solid color-mix(in srgb, var(--app-border) 86%, transparent);
    background: color-mix(in srgb, var(--app-surface-strong) 74%, transparent);
}

.invoice-preview-item-header {
    display: flex;
    justify-content: space-between;
    gap: 0.9rem;
    align-items: start;
}

.invoice-preview-item-title {
    font-weight: 800;
    color: var(--app-text);
    line-height: 1.4;
}

.invoice-preview-item-meta {
    display: grid;
    gap: 0.15rem;
    margin-top: 0.3rem;
    color: var(--app-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.invoice-preview-amount {
    flex-shrink: 0;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-primary) 16%, transparent);
    color: var(--brand-primary-strong);
    font-weight: 800;
    font-size: 0.9rem;
}

.invoice-preview-line {
    color: var(--app-text);
    font-size: 0.94rem;
}

.invoice-preview-sublist {
    display: grid;
    gap: 0.55rem;
}

.invoice-preview-table-wrap {
    overflow-x: auto;
}

.invoice-preview-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 34rem;
    border: 1px solid color-mix(in srgb, var(--app-border) 86%, transparent);
    border-radius: calc(var(--app-radius-md) - 0.1rem);
    overflow: hidden;
}

.invoice-preview-table th,
.invoice-preview-table td {
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid color-mix(in srgb, var(--app-border) 82%, transparent);
    text-align: left;
    vertical-align: top;
    font-size: 0.9rem;
    line-height: 1.45;
}

.invoice-preview-table th {
    background: color-mix(in srgb, var(--app-surface-strong) 82%, transparent);
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-preview-table td {
    color: var(--app-text);
    background: color-mix(in srgb, var(--app-surface) 94%, transparent);
}

.invoice-preview-table tbody tr:last-child td {
    border-bottom: none;
}

.invoice-preview-subitem {
    display: grid;
    gap: 0.22rem;
    padding: 0.7rem 0.8rem;
    border-radius: calc(var(--app-radius-md) - 0.2rem);
    background: color-mix(in srgb, var(--app-surface) 92%, transparent);
    border: 1px dashed color-mix(in srgb, var(--app-border) 78%, transparent);
}

.invoice-preview-subitem-title {
    color: var(--app-text);
    font-weight: 700;
    font-size: 0.92rem;
}

.invoice-preview-subitem-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    color: var(--app-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.invoice-preview-list-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--app-radius-md);
    background: color-mix(in srgb, var(--app-surface-strong) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--app-border) 84%, transparent);
    color: var(--app-text);
}

.invoice-preview-list-row strong {
    font-weight: 800;
}

.invoice-preview-total {
    padding: 0.95rem 1rem;
    border-radius: var(--app-radius-md);
    background: color-mix(in srgb, var(--brand-primary) 14%, transparent);
    color: var(--brand-primary-strong);
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.invoice-preview-signatory {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--app-radius-md);
    border: 1px solid color-mix(in srgb, var(--app-border) 84%, transparent);
    background: color-mix(in srgb, var(--app-surface-strong) 70%, transparent);
}

.invoice-preview-signatory-name {
    color: var(--app-text);
    font-weight: 800;
}

.invoice-preview-signatory-meta {
    color: var(--app-muted);
    font-size: 0.9rem;
}

.invoice-preview-signature-line {
    color: var(--app-muted);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.invoice-preview-empty {
    color: var(--app-muted);
    font-size: 0.92rem;
    font-style: italic;
}

@media (max-width: 767.98px) {
    .invoice-content-layout,
    .invoice-work-order-head,
    .invoice-part-row {
        grid-template-columns: 1fr;
    }

    .invoice-preview-meta-grid {
        grid-template-columns: 1fr;
    }

    .invoice-preview-item-header,
    .invoice-preview-list-row {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-preview-table {
        min-width: 0;
    }
}

html[data-theme="dark"] .app-navbar,
body.app-body[data-theme="dark"] .app-navbar {
    background: rgba(8, 14, 20, 0.74);
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    box-shadow: 0 12px 32px rgba(2, 8, 23, 0.38);
}

.app-navbar-shell {
    min-height: 5.4rem;
    gap: 1.15rem;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.app-navbar .container,
.app-navbar .navbar-collapse,
.app-navbar .navbar-nav,
.app-navbar .nav-item.dropdown {
    position: relative;
}

.app-navbar .navbar-collapse {
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.navbar-brand {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--app-text);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: var(--app-text);
}

.brand-mark {
    width: 3rem;
    height: 3rem;
    border-radius: 1.05rem;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(15, 118, 110, 0.76)),
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.08));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 18px 34px rgba(15, 118, 110, 0.22);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    min-width: 0;
}

.brand-title {
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1;
    color: var(--app-text);
}

.brand-subtitle {
    color: var(--app-muted);
    font-size: 0.68rem;
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-nav-list {
    align-items: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

html[data-theme="dark"] .app-nav-list,
body.app-body[data-theme="dark"] .app-nav-list {
    background: rgba(17, 25, 37, 0.72);
    border-color: rgba(148, 163, 184, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.navbar .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    font-weight: 600;
    color: var(--app-muted);
    border-radius: 999px;
    padding: 0.66rem 0.92rem;
    white-space: nowrap;
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
    color: var(--app-text);
    background: rgba(15, 118, 110, 0.10);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

html[data-theme="dark"] .navbar .nav-link:hover,
html[data-theme="dark"] .navbar .nav-link:focus,
html[data-theme="dark"] .navbar .nav-link.active,
body.app-body[data-theme="dark"] .navbar .nav-link:hover,
body.app-body[data-theme="dark"] .navbar .nav-link:focus,
body.app-body[data-theme="dark"] .navbar .nav-link.active {
    background: rgba(59, 198, 164, 0.14);
    box-shadow: inset 0 0 0 1px rgba(59, 198, 164, 0.10);
}

.navbar .nav-link.active {
    font-weight: 700;
}

.navbar .nav-link.dropdown-toggle::after {
    margin-left: 0.5rem;
    vertical-align: middle;
    border-top-width: 0.34em;
    border-right-width: 0.34em;
    border-left-width: 0.34em;
}

.navbar .dropdown-menu {
    position: absolute;
    z-index: 1210;
    min-width: 14rem;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 20px;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
    padding: 0.55rem;
    margin-top: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

html[data-theme="dark"] .navbar .dropdown-menu,
body.app-body[data-theme="dark"] .navbar .dropdown-menu {
    border: 1px solid rgba(148, 163, 184, 0.10);
    background: rgba(14, 22, 31, 0.98);
    box-shadow: 0 22px 48px rgba(2, 8, 23, 0.44);
}

.navbar .dropdown-item {
    border-radius: 12px;
    padding: 0.78rem 0.95rem;
    font-weight: 600;
    color: var(--app-text);
}

.navbar .dropdown-item-grouped {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
}

.navbar .dropdown-item-grouped small {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--app-muted);
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.navbar .dropdown-item.active {
    background: rgba(15, 118, 110, 0.10);
    color: var(--app-text);
}

html[data-theme="dark"] .navbar .dropdown-item:hover,
html[data-theme="dark"] .navbar .dropdown-item:focus,
html[data-theme="dark"] .navbar .dropdown-item.active,
body.app-body[data-theme="dark"] .navbar .dropdown-item:hover,
body.app-body[data-theme="dark"] .navbar .dropdown-item:focus,
body.app-body[data-theme="dark"] .navbar .dropdown-item.active {
    background: rgba(59, 198, 164, 0.14);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0.28rem;
    border-radius: 999px;
}

.lang-switch-track {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.22rem;
    flex-wrap: nowrap;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="dark"] .lang-switch-track,
body.app-body[data-theme="dark"] .lang-switch-track {
    background: rgba(255, 255, 255, 0.06);
}

.lang-switch-btn {
    border: 0;
    background: transparent;
    color: var(--app-muted);
    border-radius: 999px;
    min-width: 2.55rem;
    padding: 0.5rem 0.64rem;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1;
    transition: all 0.18s ease;
}

.lang-switch-btn:hover,
.lang-switch-btn:focus {
    background: rgba(255, 255, 255, 0.78);
    color: var(--app-text);
    outline: none;
}

.lang-switch-btn.is-active {
    background: linear-gradient(135deg, #0f766e, #12908a);
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.22);
}

.user-panel {
    border-radius: 999px;
    padding: 0.35rem 0.4rem 0.35rem 0.35rem;
    max-width: 100%;
}

.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.9rem;
    max-width: 15.5rem;
    padding: 0.3rem 0.45rem 0.3rem 0.3rem;
    text-align: left;
}

.user-menu-toggle::after {
    margin-left: 0.2rem;
    color: var(--app-muted);
}

.user-menu-toggle:hover,
.user-menu-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 118, 110, 0.22);
}

html[data-theme="dark"] .user-menu-toggle:hover,
html[data-theme="dark"] .user-menu-toggle:focus-visible,
body.app-body[data-theme="dark"] .user-menu-toggle:hover,
body.app-body[data-theme="dark"] .user-menu-toggle:focus-visible {
    background: rgba(22, 34, 49, 0.94);
    border-color: rgba(52, 211, 153, 0.24);
}

.user-menu-dropdown {
    min-width: 15rem;
}

.user-menu-dropdown .dropdown-divider {
    margin: 0.45rem 0;
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .user-menu-dropdown .dropdown-divider,
body.app-body[data-theme="dark"] .user-menu-dropdown .dropdown-divider {
    border-color: rgba(148, 163, 184, 0.12);
}

.user-menu-logout {
    color: var(--app-danger) !important;
}

.icon-action-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
}

.icon-action-btn i {
    font-size: 1rem;
    line-height: 1;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    padding: 0;
    border-radius: 50%;
    color: var(--app-text);
}

.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 118, 110, 0.22);
    color: var(--app-text);
}

.theme-toggle-icon {
    position: relative;
    width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #29485a;
    overflow: visible;
}

.theme-toggle-glyph {
    position: absolute;
    width: 1rem;
    height: 1rem;
    transition: opacity 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.theme-toggle-glyph-moon {
    opacity: 1;
    transform: scale(1);
}

.theme-toggle-glyph-sun {
    opacity: 0;
    transform: scale(0.72) rotate(-18deg);
}

.theme-toggle-btn[data-theme="dark"] .theme-toggle-glyph-moon {
    opacity: 0;
    transform: scale(0.72) rotate(18deg);
}

.theme-toggle-btn[data-theme="dark"] .theme-toggle-glyph-sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

html[data-theme="dark"] .theme-toggle-btn,
body.app-body[data-theme="dark"] .theme-toggle-btn {
    color: var(--app-text);
}

html[data-theme="dark"] .theme-toggle-btn:hover,
html[data-theme="dark"] .theme-toggle-btn:focus-visible,
body.app-body[data-theme="dark"] .theme-toggle-btn:hover,
body.app-body[data-theme="dark"] .theme-toggle-btn:focus-visible {
    background: rgba(22, 34, 49, 0.94);
    border-color: rgba(52, 211, 153, 0.24);
}

html[data-theme="dark"] .theme-toggle-icon,
body.app-body[data-theme="dark"] .theme-toggle-icon {
    color: #bfeee1;
}

.nav-utilities {
    align-items: stretch;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 0.6rem !important;
    min-width: 0;
    justify-content: flex-end;
}

.nav-utilities-desktop {
    flex: 0 0 auto;
    margin-left: auto;
}

.nav-utilities-mobile {
    width: 100%;
}

.nav-utility-card {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.nav-utilities > .dropdown {
    min-width: 0;
}

html[data-theme="dark"] .nav-utility-card,
body.app-body[data-theme="dark"] .nav-utility-card {
    background: rgba(17, 25, 37, 0.84);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 14px 28px rgba(2, 8, 23, 0.22);
}

.user-avatar {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(15, 118, 110, 0.10));
    color: var(--app-primary);
    font-weight: 800;
}

.user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 8.4rem;
    padding-right: 0.2rem;
}

@media (max-width: 1499.98px) {
    .app-navbar-shell {
        gap: 0.9rem;
    }

    .brand-subtitle {
        font-size: 0.63rem;
    }

    .app-nav-list {
        gap: 0.22rem;
        padding: 0.28rem;
    }

    .navbar .nav-link {
        min-height: 2.85rem;
        padding: 0.58rem 0.8rem;
        font-size: 0.94rem;
    }

    .nav-utilities {
        gap: 0.45rem !important;
    }

    .theme-toggle-btn {
        width: 2.55rem;
        height: 2.55rem;
    }

    .lang-switch-btn {
        min-width: 2.35rem;
        padding-inline: 0.58rem;
    }

    .user-menu-toggle {
        max-width: 14.2rem;
    }

    .user-meta {
        max-width: 7.2rem;
    }
}

@media (min-width: 992px) {
    .app-navbar > .app-navbar-shell {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand utilities"
            "nav nav";
        align-items: center;
        column-gap: 1rem;
        row-gap: 0.8rem;
    }

    .app-navbar > .app-navbar-shell > .navbar-brand {
        grid-area: brand;
        min-width: 0;
    }

    .app-navbar > .app-navbar-shell > .navbar-collapse {
        grid-area: nav;
        display: block !important;
        flex-basis: auto;
        width: 100%;
        min-width: 0;
    }

    .app-navbar > .app-navbar-shell > .nav-utilities-desktop {
        grid-area: utilities;
        justify-self: end;
        display: flex !important;
        align-items: center;
        flex-wrap: nowrap;
        min-width: 0;
    }

    .app-nav-list {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        margin-right: 0;
        overflow: visible;
    }

    .app-nav-list .nav-item {
        flex: 0 1 auto;
        min-width: 0;
    }

    .navbar .nav-link {
        padding-inline: clamp(0.58rem, 0.82vw, 0.9rem);
        font-size: clamp(0.88rem, 0.72vw, 0.98rem);
    }

    .nav-utilities-desktop .user-menu-toggle {
        max-width: 14.1rem;
    }
}

@media (min-width: 992px) and (max-width: 1339.98px) {
    .app-navbar > .app-navbar-shell {
        column-gap: 0.85rem;
    }

    .brand-copy {
        max-width: 11rem;
    }

    .brand-subtitle {
        font-size: 0.58rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-nav-list {
        gap: 0.18rem;
        padding: 0.26rem;
    }

    .navbar .nav-link {
        min-height: 2.8rem;
        padding-inline: 0.62rem;
        font-size: 0.9rem;
    }

    .nav-utilities-desktop {
        gap: 0.45rem !important;
    }

    .lang-switch-btn {
        min-width: 2.25rem;
        padding-inline: 0.56rem;
    }

    .nav-utilities-desktop .user-menu-toggle {
        max-width: 12.9rem;
    }

    .user-meta {
        max-width: 6.6rem;
    }
}

.user-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    font-size: 0.68rem;
    color: var(--app-muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-panel .btn {
    min-height: 2.65rem;
    padding-inline: 1.05rem;
}

.user-panel .btn-sm {
    font-size: 0.88rem;
}

.page-wrap {
    position: relative;
    z-index: 1;
    padding: 2.2rem 0 3rem;
}

.page-shell {
    position: relative;
}

.page-shell > .alert {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .page-shell > .alert,
body.app-body[data-theme="dark"] .page-shell > .alert {
    border: 1px solid rgba(148, 163, 184, 0.10);
}

html[data-theme="dark"] .alert-success,
body.app-body[data-theme="dark"] .alert-success {
    background: rgba(16, 71, 56, 0.62);
    color: #dbfff3;
}

html[data-theme="dark"] .alert-danger,
body.app-body[data-theme="dark"] .alert-danger {
    background: rgba(104, 33, 43, 0.62);
    color: #ffe0e5;
}

.page-shell h1,
.page-shell h2,
.page-shell h3,
.page-shell .h3,
.page-shell .h5 {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    letter-spacing: -0.04em;
}

.page-shell > .d-flex.justify-content-between.align-items-center.gap-3.mb-4,
.page-shell > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4,
.page-shell .row.justify-content-center .d-flex.justify-content-between.align-items-center.gap-3.mb-4,
.page-shell .row.justify-content-center .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 {
    margin-bottom: 1.65rem !important;
}

.page-shell > .d-flex.justify-content-between.align-items-center.gap-3.mb-4 > div:first-child,
.page-shell > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 > div:first-child,
.page-shell .row.justify-content-center .d-flex.justify-content-between.align-items-center.gap-3.mb-4 > div:first-child,
.page-shell .row.justify-content-center .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 > div:first-child {
    max-width: 780px;
}

.card {
    background: var(--app-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.66) !important;
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow);
    overflow: hidden;
    animation: card-enter 0.28s ease;
}

html[data-theme="dark"] .card,
body.app-body[data-theme="dark"] .card {
    border-color: rgba(148, 163, 184, 0.10) !important;
}

html[data-theme="dark"] .card .card-body::after,
body.app-body[data-theme="dark"] .card .card-body::after {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 45%);
}

.card .card-body {
    position: relative;
}

.card .card-body::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 45%);
    pointer-events: none;
}

.card > * {
    position: relative;
    z-index: 1;
}

.btn {
    border-radius: 999px;
    padding: 0.72rem 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-width: 1px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10);
}

.btn:focus-visible {
    box-shadow: 0 0 0 0.28rem rgba(15, 118, 110, 0.16), 0 14px 28px rgba(15, 23, 42, 0.10);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #0f766e;
    --bs-btn-border-color: #0f766e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0d6b64;
    --bs-btn-hover-border-color: #0d6b64;
    --bs-btn-focus-shadow-rgb: 15, 118, 110;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0c625c;
    --bs-btn-active-border-color: #0c625c;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #7bb9b4;
    --bs-btn-disabled-border-color: #7bb9b4;
    background: linear-gradient(135deg, #0f766e, #12908a);
    border-color: #0f766e;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
    background: linear-gradient(135deg, #0d6b64, #0f766e);
    border-color: #0d6b64;
    color: #fff;
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
    background: linear-gradient(135deg, #0c625c, #0d6b64);
    border-color: #0c625c;
}

.btn-outline-primary {
    --bs-btn-color: #0f766e;
    --bs-btn-border-color: rgba(15, 118, 110, 0.24);
    --bs-btn-hover-color: #0f766e;
    --bs-btn-hover-bg: rgba(15, 118, 110, 0.12);
    --bs-btn-hover-border-color: rgba(15, 118, 110, 0.32);
    --bs-btn-focus-shadow-rgb: 15, 118, 110;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0f766e;
    --bs-btn-active-border-color: #0f766e;
    color: var(--app-primary);
    border-color: rgba(15, 118, 110, 0.24);
    background: rgba(15, 118, 110, 0.07);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.32);
    background: rgba(15, 118, 110, 0.12);
}

html[data-theme="dark"] .btn-outline-primary,
body.app-body[data-theme="dark"] .btn-outline-primary {
    --bs-btn-color: var(--app-primary);
    --bs-btn-border-color: rgba(59, 198, 164, 0.28);
    --bs-btn-hover-color: #05241d;
    --bs-btn-hover-bg: rgba(59, 198, 164, 0.88);
    --bs-btn-hover-border-color: rgba(59, 198, 164, 0.88);
    --bs-btn-active-color: #05241d;
    --bs-btn-active-bg: rgba(59, 198, 164, 0.96);
    --bs-btn-active-border-color: rgba(59, 198, 164, 0.96);
    background: rgba(59, 198, 164, 0.08);
    border-color: rgba(59, 198, 164, 0.22);
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus,
body.app-body[data-theme="dark"] .btn-outline-primary:hover,
body.app-body[data-theme="dark"] .btn-outline-primary:focus {
    color: #05241d;
    border-color: rgba(59, 198, 164, 0.88);
    background: rgba(59, 198, 164, 0.92);
}

.btn-outline-primary:active,
.btn-outline-primary.active,
.show > .btn-outline-primary.dropdown-toggle,
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary {
    color: #fff;
    border-color: #0f766e;
    background: linear-gradient(135deg, #0f766e, #12908a);
}

.btn-outline-secondary,
.btn-outline-danger {
    background: rgba(255, 255, 255, 0.76);
}

.btn-link {
    border-radius: 999px;
}

.form-control,
.form-select {
    min-height: 3rem;
    border-radius: 14px;
    border-color: var(--app-border);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: none;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
body.app-body[data-theme="dark"] .form-control,
body.app-body[data-theme="dark"] .form-select {
    color: var(--app-text);
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(8, 14, 20, 0.72);
}

html[data-theme="dark"] .form-control::placeholder,
body.app-body[data-theme="dark"] .form-control::placeholder {
    color: rgba(159, 176, 196, 0.7);
}

textarea.form-control {
    min-height: auto;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 0.28rem rgba(15, 118, 110, 0.12);
    background: #fff;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
body.app-body[data-theme="dark"] .form-control:focus,
body.app-body[data-theme="dark"] .form-select:focus {
    background: rgba(11, 18, 26, 0.94);
    border-color: rgba(59, 198, 164, 0.40);
    box-shadow: 0 0 0 0.28rem rgba(59, 198, 164, 0.12);
}

.form-label {
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 0.55rem;
}

.form-text {
    color: var(--app-muted);
}

.form-check-input {
    border-color: rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .form-check-input,
body.app-body[data-theme="dark"] .form-check-input {
    background-color: rgba(8, 14, 20, 0.78);
    border-color: rgba(148, 163, 184, 0.22);
}

.form-check-input:checked {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.28);
    --bs-table-hover-bg: rgba(15, 118, 110, 0.06);
    margin-bottom: 0;
}

html[data-theme="dark"] .table,
body.app-body[data-theme="dark"] .table {
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(59, 198, 164, 0.08);
}

html[data-theme="dark"] .table > :not(caption) > * > *,
body.app-body[data-theme="dark"] .table > :not(caption) > * > * {
    color: var(--app-text);
}

html[data-theme="dark"] .table-light,
body.app-body[data-theme="dark"] .table-light {
    --bs-table-bg: rgba(11, 17, 24, 0.54);
    --bs-table-color: var(--app-text);
    --bs-table-border-color: rgba(148, 163, 184, 0.10);
}

.table thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--app-muted);
    border-bottom-width: 1px;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background: rgba(248, 250, 252, 0.74) !important;
}

html[data-theme="dark"] .table thead th,
body.app-body[data-theme="dark"] .table thead th {
    background: rgba(11, 17, 24, 0.54) !important;
    color: var(--app-muted);
    border-color: rgba(148, 163, 184, 0.10);
}

html[data-theme="dark"] .table tbody td,
body.app-body[data-theme="dark"] .table tbody td {
    border-color: rgba(148, 163, 184, 0.08);
}

.table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-color: rgba(15, 23, 42, 0.06);
    vertical-align: middle;
}

.photo-upload-panel {
    padding: 1.35rem;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.document-upload-panel {
    padding: 1.35rem;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .photo-upload-panel,
html[data-theme="dark"] .document-upload-panel,
html[data-theme="dark"] .kpi-tile,
html[data-theme="dark"] .report-filter-panel,
html[data-theme="dark"] .list-filter-panel,
html[data-theme="dark"] .report-hero,
html[data-theme="dark"] .dashboard-report-card,
html[data-theme="dark"] .permissions-hero,
html[data-theme="dark"] .photo-card,
html[data-theme="dark"] .photo-empty-state,
body.app-body[data-theme="dark"] .photo-upload-panel,
body.app-body[data-theme="dark"] .document-upload-panel,
body.app-body[data-theme="dark"] .kpi-tile,
body.app-body[data-theme="dark"] .report-filter-panel,
body.app-body[data-theme="dark"] .list-filter-panel,
body.app-body[data-theme="dark"] .report-hero,
body.app-body[data-theme="dark"] .dashboard-report-card,
body.app-body[data-theme="dark"] .permissions-hero,
body.app-body[data-theme="dark"] .photo-card,
body.app-body[data-theme="dark"] .photo-empty-state {
    background: rgba(17, 25, 37, 0.82);
    border-color: rgba(148, 163, 184, 0.10);
}

html[data-theme="dark"] .dashboard-report-card,
body.app-body[data-theme="dark"] .dashboard-report-card {
    background:
        radial-gradient(circle at top right, rgba(59, 198, 164, 0.14), transparent 22%),
        radial-gradient(circle at left center, rgba(233, 180, 76, 0.10), transparent 18%),
        linear-gradient(180deg, rgba(18, 28, 39, 0.98), rgba(15, 24, 34, 0.96));
}

html[data-theme="dark"] .dashboard-report-card .kpi-tile,
body.app-body[data-theme="dark"] .dashboard-report-card .kpi-tile {
    background: rgba(10, 17, 24, 0.72);
    border-color: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .photo-card,
body.app-body[data-theme="dark"] .photo-card {
    box-shadow: 0 18px 36px rgba(2, 8, 23, 0.30);
}

html[data-theme="dark"] .auth-form-pane,
body.app-body[data-theme="dark"] .auth-form-pane {
    background: rgba(17, 25, 37, 0.92);
}

html[data-theme="dark"] .app-confirm-modal,
body.app-body[data-theme="dark"] .app-confirm-modal {
    background: rgba(17, 25, 37, 0.96);
    border-color: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .pagination .page-link,
body.app-body[data-theme="dark"] .pagination .page-link {
    border-color: rgba(148, 163, 184, 0.10);
    background: rgba(17, 25, 37, 0.88);
    color: var(--app-text);
}

html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-danger,
body.app-body[data-theme="dark"] .btn-outline-secondary,
body.app-body[data-theme="dark"] .btn-outline-danger {
    background: rgba(17, 25, 37, 0.82);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-grid.photo-grid-compact {
    grid-template-columns: repeat(auto-fill, 84px);
    justify-content: flex-start;
    gap: 0.35rem;
}

.photo-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
}

.photo-grid.photo-grid-compact .photo-card {
    width: 84px;
    gap: 0.2rem;
    padding: 0.25rem;
    border-radius: 10px;
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.04);
}

.photo-thumb-link {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    cursor: zoom-in;
}

.photo-thumb-button {
    width: 100%;
    padding: 0;
    background: transparent;
}

.photo-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(245, 158, 11, 0.10));
}

.photo-grid.photo-grid-compact .photo-thumb-link {
    border-radius: 8px;
}

.photo-grid.photo-grid-compact .photo-thumb {
    aspect-ratio: 1 / 1;
}

.photo-grid.photo-grid-compact .photo-name {
    font-size: 0.62rem;
    line-height: 1.15;
}

.photo-grid.photo-grid-compact .photo-size {
    display: none;
}

.photo-meta {
    min-width: 0;
}

.photo-name {
    font-weight: 700;
    color: var(--app-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-size {
    font-size: 0.82rem;
    color: var(--app-muted);
}

.item-list-photo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.item-list-photo-thumb {
    width: 3rem;
    height: 3rem;
    border-radius: .8rem;
    object-fit: cover;
    border: 1px solid rgba(142, 156, 185, 0.18);
    box-shadow: 0 8px 20px rgba(10, 17, 28, 0.18);
}

.item-list-photo-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 3rem;
    padding: .35rem .55rem;
    border-radius: .8rem;
    background: rgba(128, 144, 170, 0.08);
    border: 1px dashed rgba(128, 144, 170, 0.2);
    color: var(--bs-secondary-color);
    font-size: .72rem;
    line-height: 1.1;
    text-align: center;
}

.photo-delete-form {
    display: flex;
    justify-content: flex-end;
}

.photo-empty-state {
    padding: 1rem 1.1rem;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 16px;
    color: var(--app-muted);
    background: rgba(255, 255, 255, 0.65);
}

.document-list {
    display: grid;
    gap: 0.75rem;
}

.documents-page .detail-stat-card {
    min-height: 132px;
}

.documents-block + .documents-block {
    margin-top: 1.25rem;
}

.detail-inline-link {
    color: var(--app-primary);
    text-decoration: none;
    font-weight: 700;
}

.detail-inline-link:hover,
.detail-inline-link:focus-visible {
    color: var(--app-primary-strong);
    text-decoration: underline;
}

.document-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.document-card-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}

.document-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--app-primary) 12%, white 88%);
    color: var(--app-primary);
    flex: 0 0 auto;
    font-size: 1.15rem;
}

.document-meta {
    min-width: 0;
}

.document-name {
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.3;
    word-break: break-word;
}

.document-details {
    margin-top: 0.15rem;
    color: var(--app-muted);
    font-size: 0.85rem;
}

.document-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

html[data-theme="dark"] .document-card,
body.app-body[data-theme="dark"] .document-card {
    background: rgba(17, 25, 37, 0.82);
    border-color: rgba(148, 163, 184, 0.10);
}

html[data-theme="dark"] .document-icon,
body.app-body[data-theme="dark"] .document-icon {
    background: rgba(35, 59, 74, 0.72);
    color: #bdf3e4;
}

@media (max-width: 575.98px) {
    .document-card {
        flex-direction: column;
        align-items: stretch;
    }

    .document-actions {
        justify-content: flex-end;
    }
}

.photo-viewer-modal {
    background: rgba(10, 16, 24, 0.94);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.photo-viewer-meta {
    min-width: 0;
}

.photo-viewer-counter {
    font-size: 0.88rem;
}

.photo-viewer-stage {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 4.5rem;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.photo-viewer-image {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    transform-origin: center center;
    transition: transform 0.16s ease;
    will-change: transform;
    cursor: zoom-in;
}

.photo-viewer-stage.is-zoomed .photo-viewer-image {
    cursor: grab;
}

.photo-viewer-stage.is-dragging .photo-viewer-image {
    cursor: grabbing;
    transition: none;
}

.photo-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    line-height: 1;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.photo-viewer-nav:hover,
.photo-viewer-nav:focus {
    background: rgba(255, 255, 255, 0.22);
}

.photo-viewer-nav:disabled {
    opacity: 0.4;
    cursor: default;
}

.photo-viewer-nav-prev {
    left: 0.75rem;
}

.photo-viewer-nav-next {
    right: 0.75rem;
}

.equipment-hero {
    position: relative;
    padding: 1.5rem;
    border-radius: calc(var(--app-radius-xl) + 2px);
    border: 1px solid var(--app-border);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.10), transparent 24%),
        radial-gradient(circle at left center, rgba(15, 118, 110, 0.10), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.88));
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

.equipment-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.equipment-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.equipment-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--app-text);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.equipment-meta-pill-status-success {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.equipment-meta-pill-status-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.equipment-meta-pill-status-secondary {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.equipment-meta-pill-status-dark {
    background: rgba(31, 41, 55, 0.14);
    color: #1f2937;
}

.equipment-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.equipment-overview-card,
.equipment-spec-card,
.equipment-history-card,
.equipment-work-order-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.equipment-overview-card {
    height: 100%;
    padding: 1.35rem 1.4rem;
    position: relative;
    overflow: hidden;
}

.equipment-overview-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: rgba(15, 118, 110, 0.24);
}

.equipment-overview-card-primary::before {
    background: rgba(15, 118, 110, 0.85);
}

.equipment-overview-card-accent::before {
    background: rgba(245, 158, 11, 0.92);
}

.equipment-overview-card-neutral::before {
    background: rgba(100, 116, 139, 0.72);
}

.equipment-overview-card-danger::before {
    background: rgba(220, 38, 38, 0.82);
}

.equipment-overview-card-warning::before {
    background: rgba(217, 119, 6, 0.88);
}

.equipment-overview-card-success::before {
    background: rgba(5, 150, 105, 0.88);
}

.equipment-overview-label {
    color: var(--app-muted);
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
}

.equipment-overview-value {
    color: var(--app-text);
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.equipment-spec-card {
    height: 100%;
    padding: 1.35rem 1.35rem 1.2rem;
}

.equipment-spec-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.equipment-spec-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-spec-item {
    min-width: 0;
}

.equipment-spec-label {
    color: var(--app-muted);
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}

.equipment-spec-value,
.equipment-history-text,
.equipment-notes {
    color: var(--app-text);
    font-weight: 600;
    word-break: break-word;
}

.equipment-history {
    display: grid;
    gap: 1rem;
}

.equipment-history-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.equipment-history-toolbar-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.1);
    color: var(--app-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.equipment-history-card {
    overflow: hidden;
    padding: 0;
}

.equipment-history-card-head,
.equipment-work-order-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.equipment-history-eyebrow {
    color: var(--app-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.equipment-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    color: var(--app-muted);
    font-size: 0.9rem;
}

.equipment-inline-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.equipment-inline-pill-primary {
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.12);
}

.equipment-inline-pill-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.14);
}

.equipment-inline-pill-danger {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.12);
}

.equipment-inline-pill-success {
    background: rgba(34, 197, 94, 0.10);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.12);
}

.equipment-inline-pill-secondary {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border-color: rgba(100, 116, 139, 0.12);
}

.equipment-inline-pill-dark {
    background: rgba(31, 41, 55, 0.12);
    color: #1f2937;
    border-color: rgba(31, 41, 55, 0.12);
}

.equipment-history-accordion,
.equipment-work-orders-accordion,
.equipment-photo-accordion {
    display: grid;
    gap: 1rem;
}

.equipment-history-accordion .accordion-item,
.equipment-work-orders-accordion .accordion-item,
.equipment-photo-accordion .accordion-item {
    overflow: hidden;
}

.equipment-history-accordion .accordion-item {
    margin: 0;
}

.equipment-history-toggle,
.equipment-work-order-toggle,
.equipment-photo-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: transparent;
    box-shadow: none;
}

.equipment-history-toggle:not(.collapsed),
.equipment-work-order-toggle:not(.collapsed),
.equipment-photo-toggle:not(.collapsed) {
    background: rgba(15, 118, 110, 0.06);
    color: var(--app-text);
    box-shadow: none;
}

.equipment-history-toggle:focus,
.equipment-work-order-toggle:focus,
.equipment-photo-toggle:focus {
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.14);
}

.equipment-history-toggle::after,
.equipment-work-order-toggle::after,
.equipment-photo-toggle::after {
    margin-left: 0.25rem;
}

.equipment-history-toggle-main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 0.2rem;
    text-align: left;
}

.equipment-history-toggle-title {
    color: var(--app-text);
    font-size: 0.97rem;
    font-weight: 800;
    line-height: 1.3;
}

.equipment-history-toggle-side {
    flex: 0 0 auto;
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.10);
}

.equipment-history-accordion .accordion-body,
.equipment-work-orders-accordion .accordion-body,
.equipment-photo-accordion .accordion-body {
    padding: 0 1.1rem 1.1rem;
}

.equipment-history .btn.btn-sm {
    min-height: 2.15rem;
}

.equipment-maintenance-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.equipment-maintenance-action-form {
    min-width: 0;
}

.equipment-maintenance-action-form .equipment-maintenance-action {
    width: 100%;
}

.equipment-maintenance-action {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.72rem 0.9rem;
    border-radius: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
    font-weight: 800;
    white-space: normal;
}

.equipment-history-block {
    padding: 1rem 1.05rem;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
}

.equipment-history-block-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-muted);
    margin-bottom: 0.55rem;
}

.equipment-work-order-card {
    padding: 1rem;
}

.equipment-photo-card {
    background: rgba(255, 255, 255, 0.38);
    border: 1px dashed var(--app-border-strong);
    border-radius: var(--app-radius-md);
}

.equipment-photo-toggle {
    padding: 0.8rem 0.95rem;
}

.equipment-photo-toggle .equipment-history-block-title {
    font-size: 0.76rem;
}

html[data-theme="dark"] .equipment-history-block,
body.app-body[data-theme="dark"] .equipment-history-block {
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .equipment-maintenance-action,
body.app-body[data-theme="dark"] .equipment-maintenance-action {
    box-shadow: none;
}

html[data-theme="dark"] .equipment-hero,
body.app-body[data-theme="dark"] .equipment-hero {
    background:
        radial-gradient(circle at top right, rgba(233, 180, 76, 0.10), transparent 24%),
        radial-gradient(circle at left center, rgba(59, 198, 164, 0.10), transparent 28%),
        linear-gradient(145deg, rgba(19, 28, 39, 0.98), rgba(16, 24, 36, 0.9));
    box-shadow: 0 22px 50px rgba(2, 8, 23, 0.34);
}

html[data-theme="dark"] .equipment-meta-pill,
body.app-body[data-theme="dark"] .equipment-meta-pill {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .equipment-meta-pill-status-success,
body.app-body[data-theme="dark"] .equipment-meta-pill-status-success,
html[data-theme="dark"] .equipment-inline-pill-success,
body.app-body[data-theme="dark"] .equipment-inline-pill-success {
    color: #7ee0a0;
}

html[data-theme="dark"] .equipment-meta-pill-status-warning,
body.app-body[data-theme="dark"] .equipment-meta-pill-status-warning,
html[data-theme="dark"] .equipment-inline-pill-warning,
body.app-body[data-theme="dark"] .equipment-inline-pill-warning {
    color: #f3ca71;
}

html[data-theme="dark"] .equipment-meta-pill-status-secondary,
body.app-body[data-theme="dark"] .equipment-meta-pill-status-secondary,
html[data-theme="dark"] .equipment-inline-pill-secondary,
body.app-body[data-theme="dark"] .equipment-inline-pill-secondary {
    color: #b7c6d5;
}

html[data-theme="dark"] .equipment-meta-pill-status-dark,
body.app-body[data-theme="dark"] .equipment-meta-pill-status-dark,
html[data-theme="dark"] .equipment-inline-pill-dark,
body.app-body[data-theme="dark"] .equipment-inline-pill-dark {
    color: #d5dee8;
}

html[data-theme="dark"] .equipment-inline-pill-primary,
body.app-body[data-theme="dark"] .equipment-inline-pill-primary {
    color: #8ebcff;
}

html[data-theme="dark"] .equipment-inline-pill-danger,
body.app-body[data-theme="dark"] .equipment-inline-pill-danger {
    color: #ff9b9b;
}

html[data-theme="dark"] .equipment-history-toggle:not(.collapsed),
html[data-theme="dark"] .equipment-work-order-toggle:not(.collapsed),
html[data-theme="dark"] .equipment-photo-toggle:not(.collapsed),
body.app-body[data-theme="dark"] .equipment-history-toggle:not(.collapsed),
body.app-body[data-theme="dark"] .equipment-work-order-toggle:not(.collapsed),
body.app-body[data-theme="dark"] .equipment-photo-toggle:not(.collapsed) {
    background: rgba(59, 198, 164, 0.12);
}

html[data-theme="dark"] .equipment-history-toggle-side,
body.app-body[data-theme="dark"] .equipment-history-toggle-side {
    background: rgba(59, 198, 164, 0.12);
}

html[data-theme="dark"] .equipment-photo-card,
body.app-body[data-theme="dark"] .equipment-photo-card {
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .equipment-overview-card,
html[data-theme="dark"] .equipment-spec-card,
html[data-theme="dark"] .equipment-history-card,
html[data-theme="dark"] .equipment-work-order-card,
body.app-body[data-theme="dark"] .equipment-overview-card,
body.app-body[data-theme="dark"] .equipment-spec-card,
body.app-body[data-theme="dark"] .equipment-history-card,
body.app-body[data-theme="dark"] .equipment-work-order-card {
    box-shadow: 0 20px 42px rgba(2, 8, 23, 0.34);
}

@media (max-width: 767.98px) {
    .photo-viewer-stage {
        min-height: 48vh;
        padding: 0.5rem 3.25rem;
    }

    .photo-viewer-nav {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.7rem;
    }

    .equipment-spec-grid {
        grid-template-columns: 1fr;
    }

    .equipment-history-card-head,
    .equipment-work-order-head {
        flex-direction: column;
        align-items: stretch;
    }

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

    .equipment-hero-header {
        flex-direction: column;
        align-items: stretch;
    }

    .equipment-history-toggle,
    .equipment-work-order-toggle,
    .equipment-photo-toggle {
        padding: 0.9rem;
    }

    .equipment-history-toggle-side {
        align-self: flex-start;
    }

    .equipment-history-accordion .accordion-body,
    .equipment-work-orders-accordion .accordion-body,
    .equipment-photo-accordion .accordion-body {
        padding: 0 0.9rem 0.9rem;
    }
}

@media (min-width: 1200px) {
    .equipment-maintenance-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.badge {
    border-radius: 999px;
    padding: 0.48rem 0.72rem;
    font-weight: 700;
}

.dashboard-hero {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24%),
        linear-gradient(135deg, rgba(15, 118, 110, 0.98), rgba(16, 32, 51, 0.96));
    color: #fff;
}

html[data-theme="dark"] .dashboard-hero,
body.app-body[data-theme="dark"] .dashboard-hero {
    background:
        radial-gradient(circle at top right, rgba(233, 180, 76, 0.14), transparent 24%),
        linear-gradient(135deg, rgba(9, 83, 72, 0.98), rgba(10, 21, 33, 0.98));
}

.dashboard-hero .text-body-secondary,
.dashboard-hero .hero-overline {
    color: rgba(255, 255, 255, 0.74) !important;
}

.hero-overline {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
}

.dashboard-hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.88fr);
    gap: 1.5rem;
    align-items: stretch;
}

.dashboard-hero-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-hero-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 0.4rem;
}

.dashboard-hero-signal {
    min-width: 0;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-hero-signal-label {
    display: block;
    font-size: 0.76rem;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.dashboard-hero-signal strong {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.35rem;
    line-height: 1;
    color: #fff;
}

.dashboard-hero-aside {
    min-width: 0;
}

.dashboard-hero-panel {
    height: 100%;
    padding: 1.2rem;
    border-radius: 26px;
    background: rgba(11, 22, 34, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 1rem;
}

.dashboard-hero-panel-head p {
    font-size: 0.94rem;
}

.dashboard-hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-hero-stat-card {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    gap: 0.35rem;
}

.dashboard-hero-stat-card span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.dashboard-hero-stat-card strong {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.8rem;
    line-height: 1;
    color: #fff;
}

.dashboard-hero-finance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding-top: 0.2rem;
}

.dashboard-hero-finance-item {
    padding: 0.9rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    display: grid;
    gap: 0.24rem;
}

.dashboard-hero-finance-item span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 700;
}

.dashboard-hero-finance-item strong {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.08rem;
    line-height: 1.2;
    color: #fff;
}

.dashboard-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-operations-title {
    white-space: nowrap;
    font-size: clamp(1.22rem, 1.08rem + 0.45vw, 1.55rem);
    letter-spacing: -0.02em;
}

.dashboard-priority-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.dashboard-priority-item {
    min-width: 0;
}

.dashboard-alert-card {
    position: relative;
    overflow: hidden;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.dashboard-alert-card .card-body {
    display: grid;
    gap: 0.7rem;
    min-height: 100%;
}

.dashboard-alert-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    opacity: 0.95;
}

.dashboard-alert-icon {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.dashboard-alert-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.dashboard-alert-value {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 2.3rem;
    line-height: 1;
    font-weight: 800;
    color: var(--app-text);
}

.dashboard-alert-copy {
    color: var(--app-muted);
    line-height: 1.5;
}

.dashboard-priority-grid .dashboard-alert-copy {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.dashboard-alert-card:hover,
.dashboard-alert-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
}

.dashboard-alert-card:focus-visible {
    outline: none;
}

.dashboard-alert-card-danger::before {
    background: linear-gradient(180deg, #ef4444, #f97316);
}

.dashboard-alert-card-danger .dashboard-alert-icon {
    background: rgba(239, 68, 68, 0.10);
    color: #dc2626;
}

.dashboard-alert-card-warning::before {
    background: linear-gradient(180deg, #f59e0b, #f97316);
}

.dashboard-alert-card-warning .dashboard-alert-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.dashboard-alert-card-primary::before {
    background: linear-gradient(180deg, #0f766e, #14b8a6);
}

.dashboard-alert-card-primary .dashboard-alert-icon {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.dashboard-alert-card-accent::before {
    background: linear-gradient(180deg, #2563eb, #7c3aed);
}

.dashboard-alert-card-accent .dashboard-alert-icon {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

html[data-theme="dark"] .dashboard-alert-card,
body.app-body[data-theme="dark"] .dashboard-alert-card {
    background: linear-gradient(180deg, rgba(20, 31, 44, 0.98), rgba(16, 25, 36, 0.98));
}

html[data-theme="dark"] .dashboard-alert-card:hover,
html[data-theme="dark"] .dashboard-alert-card:focus-visible,
body.app-body[data-theme="dark"] .dashboard-alert-card:hover,
body.app-body[data-theme="dark"] .dashboard-alert-card:focus-visible {
    box-shadow: 0 24px 50px rgba(2, 8, 23, 0.40);
}

html[data-theme="dark"] .dashboard-alert-card-danger .dashboard-alert-icon,
body.app-body[data-theme="dark"] .dashboard-alert-card-danger .dashboard-alert-icon {
    background: rgba(239, 68, 68, 0.14);
    color: #ffb3b3;
}

html[data-theme="dark"] .dashboard-alert-card-warning .dashboard-alert-icon,
body.app-body[data-theme="dark"] .dashboard-alert-card-warning .dashboard-alert-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #ffd27d;
}

html[data-theme="dark"] .dashboard-alert-card-primary .dashboard-alert-icon,
body.app-body[data-theme="dark"] .dashboard-alert-card-primary .dashboard-alert-icon {
    background: rgba(59, 198, 164, 0.14);
    color: #bdf3e4;
}

html[data-theme="dark"] .dashboard-alert-card-accent .dashboard-alert-icon,
body.app-body[data-theme="dark"] .dashboard-alert-card-accent .dashboard-alert-icon {
    background: rgba(96, 165, 250, 0.14);
    color: #c3dbff;
}

@media (min-width: 768px) {
    .dashboard-priority-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .dashboard-priority-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
    }

    .dashboard-priority-grid .dashboard-alert-card .card-body {
        gap: 0.65rem;
    }

    .dashboard-priority-grid .dashboard-alert-value {
        font-size: 2.05rem;
    }

    .dashboard-priority-grid .dashboard-alert-copy {
        font-size: 0.94rem;
        line-height: 1.45;
    }
}

.metric-card {
    height: 100%;
}

.dashboard-link-card {
    position: relative;
    color: inherit;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.dashboard-link-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 42%);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.dashboard-link-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #0f766e, #12908a);
    opacity: 0.18;
    transform: scaleY(0.28);
    transform-origin: center top;
    transition: transform 0.22s ease, opacity 0.22s ease;
    border-radius: 999px;
    pointer-events: none;
}

.dashboard-link-card .card-body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    gap: 1.15rem;
}

.dashboard-link-card .dashboard-card-arrow {
    position: absolute;
    top: 1.15rem;
    right: 1.2rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.10);
    color: var(--app-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.dashboard-card-top {
    padding-right: 3.4rem;
}

.dashboard-card-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.9rem;
}

.dashboard-card-copy {
    max-width: 58ch;
    font-size: 0.98rem;
    line-height: 1.55;
}

.dashboard-card-footer {
    margin-top: auto;
    padding-top: 0.2rem;
}

.dashboard-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.9rem;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: rgba(15, 118, 110, 0.06);
    color: var(--app-primary);
    font-weight: 800;
    line-height: 1;
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.dashboard-card-cta::after {
    content: "\2192";
    font-size: 0.95rem;
}

.dashboard-link-card-primary {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.03)),
        var(--app-surface-strong);
}

.dashboard-link-card-secondary {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.02), rgba(15, 118, 110, 0.04)),
        var(--app-surface-strong);
}

.dashboard-link-card:hover,
.dashboard-link-card:focus-visible {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 68px rgba(15, 23, 42, 0.18);
    border-color: rgba(15, 118, 110, 0.34) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 252, 251, 0.96));
}

html[data-theme="dark"] .dashboard-link-card::before,
body.app-body[data-theme="dark"] .dashboard-link-card::before {
    background:
        radial-gradient(circle at top right, rgba(59, 198, 164, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%);
}

html[data-theme="dark"] .dashboard-link-card:hover,
html[data-theme="dark"] .dashboard-link-card:focus-visible,
body.app-body[data-theme="dark"] .dashboard-link-card:hover,
body.app-body[data-theme="dark"] .dashboard-link-card:focus-visible {
    box-shadow: 0 30px 68px rgba(2, 8, 23, 0.40);
    border-color: rgba(59, 198, 164, 0.28) !important;
    background:
        linear-gradient(180deg, rgba(20, 31, 44, 0.98), rgba(16, 25, 36, 0.98));
}

html[data-theme="dark"] .dashboard-link-card:hover .text-body-secondary,
html[data-theme="dark"] .dashboard-link-card:focus-visible .text-body-secondary,
body.app-body[data-theme="dark"] .dashboard-link-card:hover .text-body-secondary,
body.app-body[data-theme="dark"] .dashboard-link-card:focus-visible .text-body-secondary {
    color: #c7d5e5 !important;
}

html[data-theme="dark"] .dashboard-link-card:hover .dashboard-card-arrow,
html[data-theme="dark"] .dashboard-link-card:focus-visible .dashboard-card-arrow,
body.app-body[data-theme="dark"] .dashboard-link-card:hover .dashboard-card-arrow,
body.app-body[data-theme="dark"] .dashboard-link-card:focus-visible .dashboard-card-arrow {
    background: linear-gradient(135deg, #2aa787, #3bc6a4);
    color: #041712;
    box-shadow: 0 14px 28px rgba(59, 198, 164, 0.24);
}

html[data-theme="dark"] .dashboard-link-card:hover .metric-label,
html[data-theme="dark"] .dashboard-link-card:focus-visible .metric-label,
html[data-theme="dark"] .dashboard-link-card:hover .metric-value,
html[data-theme="dark"] .dashboard-link-card:focus-visible .metric-value,
body.app-body[data-theme="dark"] .dashboard-link-card:hover .metric-label,
body.app-body[data-theme="dark"] .dashboard-link-card:focus-visible .metric-label,
body.app-body[data-theme="dark"] .dashboard-link-card:hover .metric-value,
body.app-body[data-theme="dark"] .dashboard-link-card:focus-visible .metric-value {
    color: var(--app-primary);
}

.dashboard-link-card:hover::before,
.dashboard-link-card:focus-visible::before {
    opacity: 1;
}

.dashboard-link-card:hover::after,
.dashboard-link-card:focus-visible::after {
    opacity: 1;
    transform: scaleY(1);
}

.dashboard-link-card:hover .dashboard-card-arrow,
.dashboard-link-card:focus-visible .dashboard-card-arrow {
    transform: translateX(6px) scale(1.06);
    background: linear-gradient(135deg, #0f766e, #12908a);
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.22);
}

.dashboard-link-card:hover .metric-label,
.dashboard-link-card:focus-visible .metric-label {
    color: #0f766e;
}

.dashboard-link-card:hover .metric-value,
.dashboard-link-card:focus-visible .metric-value {
    color: #0f766e;
    transform: translateY(-1px);
}

.dashboard-link-card:hover .text-body-secondary,
.dashboard-link-card:focus-visible .text-body-secondary {
    color: #34475d !important;
}

.dashboard-link-card:hover .dashboard-card-cta,
.dashboard-link-card:focus-visible .dashboard-card-cta {
    background: rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.28);
    transform: translateX(4px);
}

.dashboard-link-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.28rem rgba(15, 118, 110, 0.16), 0 30px 68px rgba(15, 23, 42, 0.18);
}

.metric-card .metric-label {
    color: var(--app-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.request-scope-banner {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(15, 118, 110, 0.02)),
        var(--app-surface-strong);
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.detail-page {
    display: grid;
    gap: 1.25rem;
}

.detail-hero,
.detail-card,
.detail-subcard {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    border-radius: 1.75rem;
    box-shadow: var(--app-shadow-soft);
}

.detail-hero {
    padding: 1.5rem;
}

.detail-hero-strong {
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 28%),
        radial-gradient(circle at left center, rgba(56, 189, 248, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.92));
}

.detail-hero-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.detail-hero-copy {
    max-width: 860px;
}

.detail-hero-subtitle {
    color: var(--app-text-muted);
    margin-top: 0.95rem;
    max-width: 720px;
    line-height: 1.65;
}

.detail-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: flex-end;
}

.detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.35rem;
}

.detail-stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.35rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.78);
    padding: 1rem 1.05rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.detail-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #0f766e, #22c1a6);
    opacity: 0.9;
}

.detail-stat-label {
    color: var(--app-text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.detail-stat-value {
    color: var(--app-text-strong);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
}

.detail-kicker {
    color: var(--app-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.detail-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.05;
}

.detail-meta-pills,
.detail-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.detail-meta-pill,
.detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface-alt) 78%, white 22%);
    color: var(--app-text);
    font-weight: 700;
}

.detail-chip small {
    color: var(--app-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.detail-meta-pill-status-primary {
    color: #2256b9;
    background: rgba(34, 86, 185, 0.1);
    border-color: rgba(34, 86, 185, 0.16);
}

.detail-meta-pill-status-success {
    color: #247b4b;
    background: rgba(36, 123, 75, 0.1);
    border-color: rgba(36, 123, 75, 0.16);
}

.detail-meta-pill-status-warning {
    color: #9f6500;
    background: rgba(220, 148, 4, 0.12);
    border-color: rgba(220, 148, 4, 0.18);
}

.detail-meta-pill-status-danger {
    color: #b4232c;
    background: rgba(180, 35, 44, 0.1);
    border-color: rgba(180, 35, 44, 0.16);
}

.detail-meta-pill-status-dark {
    color: #2d3d53;
    background: rgba(45, 61, 83, 0.1);
    border-color: rgba(45, 61, 83, 0.16);
}

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

.detail-card {
    padding: 1.35rem;
}

.detail-media-card {
    overflow: hidden;
}

.detail-card-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-text-strong);
}

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

.detail-info-grid > div {
    display: grid;
    gap: 0.28rem;
}

.detail-span-2 {
    grid-column: span 2;
}

.detail-info-grid span {
    color: var(--app-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.detail-info-grid strong {
    color: var(--app-text);
    font-size: 0.98rem;
    font-weight: 800;
}

.detail-prose {
    color: var(--app-text);
    line-height: 1.7;
}

.detail-prose-stack {
    display: grid;
    gap: 1rem;
}

.detail-prose-stack h3 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--app-text-strong);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-stack {
    display: grid;
    gap: 1rem;
}

.detail-subcard {
    padding: 1.15rem;
}

.detail-subcard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.detail-subcard-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.detail-subcard-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--app-text-strong);
}

.detail-subcard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: var(--app-text-muted);
    margin-top: 0.35rem;
}

.detail-prose-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.detail-prose-grid h3 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--app-text-strong);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--app-surface-alt) 72%, white 28%);
    color: var(--app-text);
    font-weight: 800;
    border: 1px solid var(--app-border);
}

.detail-accordion {
    display: grid;
    gap: 0.9rem;
}

.detail-accordion-item {
    border: 1px solid var(--app-border);
    border-radius: 1.35rem;
    overflow: hidden;
    background: var(--app-surface-alt);
}

.detail-accordion-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.75rem;
    background: color-mix(in srgb, var(--app-surface-alt) 84%, white 16%);
    box-shadow: none;
    padding: 1rem 3.85rem 1rem 1.15rem;
    position: relative;
}

.detail-accordion-toggle:not(.collapsed) {
    background: color-mix(in srgb, var(--app-primary) 8%, var(--app-surface) 92%);
    color: var(--app-text);
    box-shadow: none;
}

.detail-accordion-toggle:focus {
    box-shadow: none;
}

.detail-accordion-toggle::after {
    position: absolute;
    right: 1.15rem;
    top: 50%;
    margin-left: 0;
    transform: translateY(-50%);
}

.detail-accordion-toggle:not(.collapsed)::after {
    transform: translateY(-50%) rotate(-180deg);
}

.detail-accordion-main {
    display: grid;
    gap: 0.18rem;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0.2rem;
}

.detail-accordion-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--app-text-strong);
}

.detail-accordion-subtitle {
    color: var(--app-text-muted);
    font-size: 0.92rem;
    line-height: 1.4;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-accordion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    margin-left: 0;
    padding-right: 0;
    flex: 0 1 auto;
    max-width: min(46%, 34rem);
    justify-self: end;
}

.detail-inline-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.72);
    color: var(--app-text);
    font-size: 0.82rem;
    font-weight: 800;
}

.detail-inline-tag-status-primary {
    color: #2256b9;
}

.detail-inline-tag-status-success {
    color: #247b4b;
}

.detail-inline-tag-status-warning {
    color: #9f6500;
}

.detail-inline-tag-status-dark {
    color: #2d3d53;
}

.detail-accordion-body {
    padding: 1.15rem;
    background: var(--app-surface);
}

.detail-section-divider {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1rem 0 0.85rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--app-border);
}

.detail-section-label {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--app-text-strong);
}

.detail-list {
    display: grid;
    gap: 0.75rem;
}

.detail-list-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface-alt) 80%, white 20%);
}

.detail-list-main,
.detail-list-side {
    display: grid;
    gap: 0.18rem;
}

.detail-list-main strong {
    color: var(--app-text-strong);
}

.detail-list-main span,
.detail-list-side span {
    color: var(--app-text-muted);
    font-size: 0.92rem;
}

html[data-theme="dark"] .detail-meta-pill,
body.app-body[data-theme="dark"] .detail-meta-pill,
html[data-theme="dark"] .detail-chip,
body.app-body[data-theme="dark"] .detail-chip {
    background: color-mix(in srgb, var(--app-surface-alt) 88%, black 12%);
}

html[data-theme="dark"] .detail-hero-strong,
body.app-body[data-theme="dark"] .detail-hero-strong {
    background:
        radial-gradient(circle at top right, rgba(59, 198, 164, 0.12), transparent 30%),
        radial-gradient(circle at left center, rgba(56, 189, 248, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 17, 30, 0.96));
}

html[data-theme="dark"] .detail-stat-card,
body.app-body[data-theme="dark"] .detail-stat-card,
html[data-theme="dark"] .detail-inline-tag,
body.app-body[data-theme="dark"] .detail-inline-tag,
html[data-theme="dark"] .detail-list-item,
body.app-body[data-theme="dark"] .detail-list-item,
html[data-theme="dark"] .detail-count-badge,
body.app-body[data-theme="dark"] .detail-count-badge,
html[data-theme="dark"] .detail-accordion-toggle,
body.app-body[data-theme="dark"] .detail-accordion-toggle {
    background: color-mix(in srgb, var(--app-surface-alt) 90%, black 10%);
}

html[data-theme="dark"] .detail-accordion-toggle:not(.collapsed),
body.app-body[data-theme="dark"] .detail-accordion-toggle:not(.collapsed) {
    background: color-mix(in srgb, var(--app-primary) 12%, var(--app-surface) 88%);
}

@media (max-width: 991.98px) {
    .detail-grid,
    .detail-prose-grid,
    .detail-info-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-span-2 {
        grid-column: span 1;
    }

    .detail-accordion-toggle {
        grid-template-columns: 1fr;
        align-items: flex-start;
        padding-right: 3.4rem;
    }

    .detail-accordion-main {
        width: 100%;
        padding-right: 0;
    }

    .detail-accordion-tags {
        width: 100%;
        margin-left: 0;
        padding-right: 0;
        justify-content: flex-start;
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 575.98px) {
    .detail-stat-grid {
        grid-template-columns: 1fr;
    }
}

.request-scope-overline {
    margin-bottom: 0.3rem;
    color: var(--app-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.request-scope-title {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--app-text);
}

.request-scope-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(15, 118, 110, 0.14);
    color: var(--app-primary);
    font-weight: 700;
    white-space: nowrap;
}

html[data-theme="dark"] .request-scope-banner,
body.app-body[data-theme="dark"] .request-scope-banner {
    background:
        linear-gradient(135deg, rgba(59, 198, 164, 0.10), rgba(59, 198, 164, 0.03)),
        var(--app-surface-strong);
    border-color: rgba(59, 198, 164, 0.14);
}

html[data-theme="dark"] .request-scope-pill,
body.app-body[data-theme="dark"] .request-scope-pill {
    background: rgba(18, 29, 41, 0.88);
    border-color: rgba(59, 198, 164, 0.16);
    color: #bdf3e4;
}

html[data-theme="dark"] .dashboard-card-cta,
body.app-body[data-theme="dark"] .dashboard-card-cta {
    background: rgba(59, 198, 164, 0.10);
    border-color: rgba(59, 198, 164, 0.18);
    color: #bdf3e4;
}

html[data-theme="dark"] .dashboard-link-card:hover .dashboard-card-cta,
html[data-theme="dark"] .dashboard-link-card:focus-visible .dashboard-card-cta,
body.app-body[data-theme="dark"] .dashboard-link-card:hover .dashboard-card-cta,
body.app-body[data-theme="dark"] .dashboard-link-card:focus-visible .dashboard-card-cta {
    background: rgba(59, 198, 164, 0.16);
    border-color: rgba(59, 198, 164, 0.26);
    color: #d5fff2;
}

.metric-card .metric-value {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 2.75rem;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 0;
    transition: color 0.22s ease, transform 0.22s ease;
}

.kpi-tile {
    background: rgba(248, 250, 252, 0.86);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    padding: 1.1rem;
    height: 100%;
}

.dashboard-report-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 22%),
        radial-gradient(circle at left center, rgba(245, 158, 11, 0.08), transparent 18%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.dashboard-report-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #0f766e, #12908a);
    opacity: 0.9;
}

.dashboard-report-head {
    position: relative;
    z-index: 1;
}

.dashboard-report-copy {
    max-width: 760px;
}

.report-overline {
    color: var(--app-primary);
}

.dashboard-report-cta {
    min-height: 3.25rem;
    padding-inline: 1.35rem;
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.18);
}

.dashboard-report-card .kpi-tile {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dashboard-report-card .kpi-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    opacity: 0.9;
}

.dashboard-report-card .kpi-tile::after {
    content: "";
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    opacity: 0.12;
}

.dashboard-report-card .kpi-tile-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.dashboard-report-card .kpi-tile-value {
    font-size: 2rem;
    line-height: 1;
}

.kpi-tile-emerald::before {
    background: linear-gradient(90deg, #0f766e, #34d399);
}

.kpi-tile-emerald::after {
    background: #34d399;
}

.kpi-tile-amber::before {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.kpi-tile-amber::after {
    background: #f59e0b;
}

.kpi-tile-sky::before {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.kpi-tile-sky::after {
    background: #38bdf8;
}

.kpi-tile-slate::before {
    background: linear-gradient(90deg, #334155, #64748b);
}

.kpi-tile-slate::after {
    background: #64748b;
}

.kpi-tile-value {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
}

.auth-screen {
    min-height: calc(100vh - 10rem);
    display: flex;
    align-items: center;
}

.auth-card {
    overflow: hidden;
}

.auth-brand-pane {
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 30%),
        linear-gradient(155deg, rgba(15, 118, 110, 0.98), rgba(16, 32, 51, 0.98));
    color: #fff;
    padding: 2.25rem;
    height: 100%;
}

.auth-brand-pane .auth-brand-kicker {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.auth-brand-pane h1,
.auth-brand-pane h2,
.auth-brand-pane h3,
.auth-form-pane h1,
.brand-title,
.dashboard-hero h1,
.metric-card .metric-value,
.kpi-tile-value {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    letter-spacing: -0.04em;
}

.auth-feature-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.75rem;
}

.auth-feature {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.95rem 1rem;
}

html[data-theme="dark"] .auth-feature,
body.app-body[data-theme="dark"] .auth-feature {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.10);
}

.auth-form-pane {
    padding: 2.25rem;
    background: rgba(255, 255, 255, 0.88);
}

.section-heading h1,
.section-heading h2,
.section-heading .h3 {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    letter-spacing: -0.04em;
}

.section-heading .text-body-secondary,
.text-body-secondary {
    color: var(--app-muted) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .link-dark,
html[data-theme="dark"] .text-reset,
body.app-body[data-theme="dark"] .text-dark,
body.app-body[data-theme="dark"] .link-dark,
body.app-body[data-theme="dark"] .text-reset {
    color: var(--app-text) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary,
body.app-body[data-theme="dark"] .text-muted,
body.app-body[data-theme="dark"] .text-secondary {
    color: var(--app-muted) !important;
}

html[data-theme="dark"] .card-title,
html[data-theme="dark"] .card-text,
html[data-theme="dark"] .modal-content:not(.photo-viewer-modal) .modal-title,
html[data-theme="dark"] .modal-content:not(.photo-viewer-modal) .modal-body,
html[data-theme="dark"] .pagination-summary,
body.app-body[data-theme="dark"] .card-title,
body.app-body[data-theme="dark"] .card-text,
body.app-body[data-theme="dark"] .modal-content:not(.photo-viewer-modal) .modal-title,
body.app-body[data-theme="dark"] .modal-content:not(.photo-viewer-modal) .modal-body,
body.app-body[data-theme="dark"] .pagination-summary {
    color: var(--app-text);
}

html[data-theme="dark"] .form-text,
body.app-body[data-theme="dark"] .form-text {
    color: var(--app-muted);
}

html[data-theme="dark"] .badge.text-bg-light,
body.app-body[data-theme="dark"] .badge.text-bg-light {
    background: rgba(148, 163, 184, 0.14) !important;
    color: #d9e5f1 !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] .badge.text-bg-dark,
body.app-body[data-theme="dark"] .badge.text-bg-dark {
    background: rgba(41, 57, 74, 0.92) !important;
    color: #edf3fa !important;
}

.table-responsive {
    border-radius: inherit;
}

.app-breadcrumbs {
    margin-bottom: 1rem;
}

.app-breadcrumbs .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.app-breadcrumbs .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: var(--app-text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.app-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    color: var(--app-text-muted);
    float: none;
    padding-right: 0.35rem;
}

.app-breadcrumbs .breadcrumb-item a {
    color: var(--app-text);
    text-decoration: none;
}

.app-breadcrumbs .breadcrumb-item a:hover,
.app-breadcrumbs .breadcrumb-item a:focus-visible {
    color: var(--app-primary);
}

.app-breadcrumbs .breadcrumb-item.active {
    color: var(--app-text-muted);
}

html[data-theme="dark"] .app-breadcrumbs .breadcrumb,
body.app-body[data-theme="dark"] .app-breadcrumbs .breadcrumb {
    background: rgba(17, 25, 37, 0.78);
    border-color: rgba(148, 163, 184, 0.10);
    box-shadow: 0 12px 28px rgba(2, 8, 23, 0.22);
}

.report-hero,
.permissions-hero {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.10), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.82));
}

.report-hero-modern {
    border-radius: 32px;
    overflow: hidden;
}

.reports-hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 1.25rem;
    align-items: start;
}

.reports-hero-copy {
    padding-right: 0.5rem;
}

.reports-period-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.10);
    color: var(--app-text);
    border: 1px solid rgba(15, 118, 110, 0.08);
    font-size: 0.84rem;
    font-weight: 700;
}

.reports-live-hint {
    color: var(--app-muted);
    font-size: 0.88rem;
    max-width: 38rem;
}

.report-filter-shell {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(248, 250, 252, 0.76);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.report-filter-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.report-filter-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 0.85rem;
    align-items: end;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

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

.list-filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    align-items: end;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.async-select {
    position: relative;
}

.async-select-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    gap: 0.35rem;
    padding: 0.45rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.async-select-option {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--app-text);
    text-align: left;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.async-select-option:hover,
.async-select-option:focus-visible {
    border-color: rgba(37, 156, 151, 0.18);
    background: rgba(37, 156, 151, 0.08);
    transform: translateY(-1px);
}

.async-select-option-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.async-select-option-meta {
    font-size: 0.82rem;
    color: var(--app-muted);
}

html[data-theme="dark"] .async-select-menu,
body.app-body[data-theme="dark"] .async-select-menu {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .async-select-option:hover,
html[data-theme="dark"] .async-select-option:focus-visible,
body.app-body[data-theme="dark"] .async-select-option:hover,
body.app-body[data-theme="dark"] .async-select-option:focus-visible {
    border-color: rgba(94, 234, 212, 0.16);
    background: rgba(45, 212, 191, 0.12);
}

.live-list-content {
    transition: opacity 0.18s ease;
}

.live-list-content.is-loading {
    opacity: 0.58;
    pointer-events: none;
}

.app-confirm-modal {
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--app-shadow);
}

html[data-theme="dark"] .app-confirm-modal .text-body-secondary,
body.app-body[data-theme="dark"] .app-confirm-modal .text-body-secondary {
    color: #bfd0e2 !important;
}

.app-confirm-modal .modal-title {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.list-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.pagination-summary {
    font-size: 0.9rem;
    color: var(--app-muted);
}

.pagination .page-link {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.85);
    color: var(--app-text);
    border-radius: 999px !important;
    padding-inline: 0.85rem;
    min-width: 2.4rem;
    text-align: center;
    box-shadow: none;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #0f766e, #12908a);
    border-color: #0f766e;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.56);
    color: rgba(95, 111, 132, 0.7);
}

html[data-theme="dark"] .pagination .page-item.disabled .page-link,
body.app-body[data-theme="dark"] .pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(159, 176, 196, 0.48);
}

.report-filter-field,
.report-filter-action {
    min-width: 0;
}

.report-filter-action-group {
    display: flex;
    gap: 0.65rem;
    align-items: end;
    justify-content: flex-end;
    grid-column: 1 / -1;
}

.report-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.report-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.07);
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.report-filter-chip-muted {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.08);
    color: var(--app-muted);
}

.report-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 164px;
}

.report-kpi-card {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.report-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: rgba(15, 118, 110, 0.24);
}

.report-kpi-card-primary::before {
    background: rgba(15, 118, 110, 0.9);
}

.report-kpi-card-warning::before {
    background: rgba(245, 158, 11, 0.92);
}

.report-kpi-card-success::before {
    background: rgba(34, 197, 94, 0.88);
}

.report-kpi-card-danger::before {
    background: rgba(220, 38, 38, 0.85);
}

.report-kpi-card-accent::before {
    background: rgba(37, 99, 235, 0.88);
}

.report-kpi-card-neutral::before {
    background: rgba(100, 116, 139, 0.7);
}

.report-kpi-card-primary-soft::before {
    background: rgba(20, 184, 166, 0.78);
}

.report-stat-label {
    color: var(--app-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.report-stat-value {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 800;
}

.report-section-card {
    border-radius: 26px;
    overflow: hidden;
}

.report-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(248, 250, 252, 0.72);
}

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

.report-table tbody td {
    vertical-align: middle;
}

.permissions-section-head {
    background: rgba(248, 250, 252, 0.74);
}

.permissions-hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 1.25rem;
    align-items: start;
}

.permissions-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.permissions-stat-card,
.permissions-role-card,
.permissions-note-card,
.permissions-section-card {
    border-radius: 24px;
}

.permissions-stat-card {
    padding: 1rem 1.1rem;
    background: rgba(248, 250, 252, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.permissions-stat-label {
    color: var(--app-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.permissions-stat-value {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    color: var(--app-text);
}

.permissions-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.permissions-role-card .card-body {
    padding: 1.1rem 1.15rem;
}

.permissions-role-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.permissions-role-title {
    font-weight: 800;
    color: var(--app-text);
}

.permissions-role-hint {
    margin-top: 0.2rem;
    color: var(--app-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.permissions-role-count {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    color: var(--app-muted);
}

.permissions-role-count strong {
    font-family: "Manrope", "IBM Plex Sans", sans-serif;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--app-text);
}

.permissions-note-title {
    font-weight: 800;
    color: var(--app-text);
    margin-bottom: 0.5rem;
}

.permissions-section-card {
    overflow: hidden;
}

.permissions-section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.permissions-section-count {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.72rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.permissions-permission-label {
    font-weight: 700;
    color: var(--app-text);
}

.permissions-permission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.3rem;
}

.permissions-permission-code,
.permissions-permission-roles {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.25rem 0.62rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.permissions-permission-code {
    background: rgba(15, 23, 42, 0.06);
    color: var(--app-muted);
}

.permissions-permission-roles {
    background: rgba(15, 118, 110, 0.08);
    color: var(--app-text);
}

.permissions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
}

html[data-theme="dark"] .permissions-section-head,
body.app-body[data-theme="dark"] .permissions-section-head {
    background: rgba(11, 17, 24, 0.54);
}

html[data-theme="dark"] .permissions-stat-card,
body.app-body[data-theme="dark"] .permissions-stat-card,
html[data-theme="dark"] .permissions-note-card,
body.app-body[data-theme="dark"] .permissions-note-card,
html[data-theme="dark"] .permissions-permission-code,
body.app-body[data-theme="dark"] .permissions-permission-code {
    background: rgba(17, 25, 37, 0.82);
    border-color: rgba(148, 163, 184, 0.10);
}

html[data-theme="dark"] .permissions-section-count,
body.app-body[data-theme="dark"] .permissions-section-count,
html[data-theme="dark"] .permissions-permission-roles,
body.app-body[data-theme="dark"] .permissions-permission-roles {
    background: rgba(59, 198, 164, 0.12);
    border-color: rgba(59, 198, 164, 0.08);
}

html[data-theme="dark"] .report-filter-shell,
body.app-body[data-theme="dark"] .report-filter-shell {
    background: rgba(17, 25, 37, 0.82);
    border-color: rgba(148, 163, 184, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .report-filter-chip,
body.app-body[data-theme="dark"] .report-filter-chip {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .report-filter-chip-muted,
body.app-body[data-theme="dark"] .report-filter-chip-muted,
html[data-theme="dark"] .reports-period-chip,
body.app-body[data-theme="dark"] .reports-period-chip {
    background: rgba(59, 198, 164, 0.12);
    border-color: rgba(59, 198, 164, 0.08);
}

html[data-theme="dark"] .report-section-head,
body.app-body[data-theme="dark"] .report-section-head {
    background: rgba(11, 17, 24, 0.54);
    border-bottom-color: rgba(148, 163, 184, 0.08);
}

.permissions-table thead th:first-child,
.permissions-table tbody td:first-child {
    min-width: 320px;
}

.permission-cell {
    width: 92px;
}

.permissions-actions {
    position: sticky;
    bottom: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10;
}

html[data-theme="dark"] .permissions-actions,
body.app-body[data-theme="dark"] .permissions-actions {
    background: rgba(17, 25, 37, 0.90);
    border-color: rgba(148, 163, 184, 0.10);
    box-shadow: 0 18px 36px rgba(2, 8, 23, 0.30);
}

.selection-panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.82);
    padding: 0.85rem;
}

html[data-theme="dark"] .selection-panel,
body.app-body[data-theme="dark"] .selection-panel {
    border-color: rgba(148, 163, 184, 0.10);
    background: rgba(17, 25, 37, 0.82);
}

.selection-search {
    background: #fff;
}

html[data-theme="dark"] .selection-search,
body.app-body[data-theme="dark"] .selection-search {
    background: rgba(8, 14, 20, 0.72);
}

.selection-list {
    max-height: 248px;
    overflow-y: auto;
    display: grid;
    gap: 0.55rem;
}

.selection-summary {
    display: grid;
    gap: 0.65rem;
}

.selection-summary-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-text-muted);
}

.selection-summary-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.selection-search-hint {
    margin-bottom: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px dashed rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.56);
    color: var(--app-text-muted);
    font-size: 0.92rem;
}

.selection-summary-empty {
    font-size: 0.94rem;
    color: var(--app-text-muted);
}

.selection-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.45rem 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.10);
    border: 1px solid rgba(15, 118, 110, 0.15);
    color: var(--app-text);
}

.selection-pill-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.selection-pill-title {
    font-weight: 700;
}

.selection-pill-meta {
    color: var(--app-text-muted);
    font-size: 0.86rem;
}

.selection-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.selection-pill-remove:hover,
.selection-pill-remove:focus-visible {
    background: rgba(180, 35, 44, 0.14);
    color: #b4232c;
    transform: scale(1.04);
    outline: none;
}

.selection-item {
    margin: 0;
    padding: 0.85rem 0.95rem 0.85rem 1.6rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.05);
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

html[data-theme="dark"] .selection-item,
body.app-body[data-theme="dark"] .selection-item {
    background: rgba(10, 17, 24, 0.88);
    border-color: rgba(148, 163, 184, 0.08);
}

.selection-item:hover {
    border-color: rgba(15, 118, 110, 0.22);
    background: #fff;
    transform: translateY(-1px);
}

html[data-theme="dark"] .selection-item:hover,
body.app-body[data-theme="dark"] .selection-item:hover {
    border-color: rgba(59, 198, 164, 0.24);
    background: rgba(14, 22, 31, 0.96);
}

.selection-item .form-check-input {
    margin-top: 0.25rem;
}

.selection-item .form-check-label {
    display: grid;
    gap: 0.18rem;
    cursor: pointer;
}

.selection-item-title {
    font-weight: 700;
    color: var(--app-text);
}

.selection-item-selected {
    border-color: rgba(15, 118, 110, 0.24);
    background: rgba(15, 118, 110, 0.08);
}

.selection-empty {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.10);
    color: var(--app-text-muted);
    font-size: 0.94rem;
}

html[data-theme="dark"] .selection-pill,
body.app-body[data-theme="dark"] .selection-pill {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.18);
}

html[data-theme="dark"] .selection-search-hint,
body.app-body[data-theme="dark"] .selection-search-hint {
    background: rgba(10, 17, 24, 0.64);
    border-color: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .selection-pill-remove,
body.app-body[data-theme="dark"] .selection-pill-remove {
    background: rgba(255, 255, 255, 0.08);
    color: #d9e5f1;
}

html[data-theme="dark"] .selection-pill-remove:hover,
html[data-theme="dark"] .selection-pill-remove:focus-visible,
body.app-body[data-theme="dark"] .selection-pill-remove:hover,
body.app-body[data-theme="dark"] .selection-pill-remove:focus-visible {
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

html[data-theme="dark"] .selection-item-selected,
body.app-body[data-theme="dark"] .selection-item-selected {
    background: rgba(45, 212, 191, 0.10);
    border-color: rgba(45, 212, 191, 0.18);
}

html[data-theme="dark"] .selection-empty,
body.app-body[data-theme="dark"] .selection-empty {
    background: rgba(30, 41, 59, 0.52);
}

.selection-item-meta {
    font-size: 0.84rem;
    color: var(--app-muted);
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table .btn-sm {
    padding: 0.58rem 0.88rem;
}

.card .table-light th {
    border-top: 0;
}

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

.card .border.rounded,
.card .border.rounded.p-3,
.card .border.rounded.p-3.h-100 {
    border-color: rgba(15, 23, 42, 0.06) !important;
    border-radius: 18px !important;
    background: rgba(248, 250, 252, 0.78);
}

html[data-theme="dark"] .card .border.rounded,
html[data-theme="dark"] .card .border.rounded.p-3,
html[data-theme="dark"] .card .border.rounded.p-3.h-100,
body.app-body[data-theme="dark"] .card .border.rounded,
body.app-body[data-theme="dark"] .card .border.rounded.p-3,
body.app-body[data-theme="dark"] .card .border.rounded.p-3.h-100 {
    border-color: rgba(148, 163, 184, 0.08) !important;
    background: rgba(17, 25, 37, 0.78);
}

.navbar-toggler {
    border-radius: 14px;
    border-color: rgba(15, 23, 42, 0.10);
    padding: 0.55rem 0.7rem;
}

html[data-theme="dark"] .navbar-toggler,
body.app-body[data-theme="dark"] .navbar-toggler {
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .navbar-toggler-icon,
body.app-body[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1) brightness(1.8);
}

@media (max-width: 991.98px) {
    .app-navbar > .app-navbar-shell {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        row-gap: 0.9rem;
    }

    .app-navbar .navbar-toggler {
        margin-left: auto;
    }

    .app-navbar .navbar-collapse {
        flex: 1 0 100%;
        width: 100%;
        min-width: 0;
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.86);
        border: 1px solid rgba(15, 23, 42, 0.06);
        overflow: visible;
    }

    html[data-theme="dark"] .app-navbar .navbar-collapse,
    body.app-body[data-theme="dark"] .app-navbar .navbar-collapse {
        background: rgba(14, 22, 31, 0.96);
        border-color: rgba(148, 163, 184, 0.10);
        box-shadow: 0 20px 42px rgba(2, 8, 23, 0.36);
    }

    .page-wrap {
        padding-top: 1.4rem;
    }

    .app-nav-list {
        width: 100%;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.45rem;
        border-radius: 24px;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .app-nav-list .nav-link {
        justify-content: flex-start;
        width: 100%;
        min-height: 2.9rem;
        padding-inline: 1rem;
    }

    .app-nav-list .dropdown-menu {
        position: static;
        min-width: 100%;
        margin-top: 0.35rem;
        margin-bottom: 0.35rem;
        box-shadow: none;
    }

    .nav-utilities {
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .nav-utility-card {
        width: 100%;
        justify-content: center;
    }

    .nav-utilities > .dropdown {
        width: 100%;
    }

    .lang-switch {
        justify-content: center;
    }

    .user-panel {
        border-radius: 24px;
        padding: 0.6rem;
    }

    .user-panel .btn {
        width: 100%;
    }

    .report-filter-panel,
    .list-filter-panel {
        grid-template-columns: 1fr;
    }

    .reports-hero-shell {
        grid-template-columns: 1fr;
    }

    .report-filter-panel-advanced {
        grid-template-columns: 1fr;
    }

    .report-filter-action-group {
        justify-content: stretch;
        grid-column: auto;
    }

    .report-filter-action-group .btn {
        flex: 1 1 0;
    }

    .dashboard-link-card .card-body {
        gap: 1rem;
    }

    .dashboard-hero-shell,
    .dashboard-hero-stat-grid,
    .dashboard-hero-finance {
        grid-template-columns: 1fr;
    }

    .dashboard-card-copy {
        font-size: 0.94rem;
    }

    .list-pagination {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 1199.98px) {
    .dashboard-hero-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .app-navbar {
        padding: 0.7rem 0;
    }

    .app-navbar-shell {
        min-height: auto;
    }

    .navbar-brand {
        gap: 0.7rem;
    }

    .brand-mark {
        width: 2.7rem;
        height: 2.7rem;
        font-size: 0.96rem;
    }

    .brand-title {
        font-size: 0.92rem;
    }

    .brand-subtitle {
        font-size: 0.62rem;
        letter-spacing: 0.05em;
    }

    .dashboard-hero-signals {
        gap: 0.65rem;
    }

    .dashboard-hero-signal {
        width: 100%;
        justify-content: space-between;
    }

    .auth-brand-pane,
    .auth-form-pane {
        padding: 1.5rem;
    }

    .metric-card .metric-value {
        font-size: 2rem;
    }

    .dashboard-card-cta {
        width: 100%;
        justify-content: center;
    }

    .permissions-table thead th:first-child,
    .permissions-table tbody td:first-child {
        min-width: 240px;
    }

    .permissions-hero-shell,
    .permissions-hero-stats {
        grid-template-columns: 1fr;
    }

    .permissions-section-title-row {
        flex-direction: column;
    }

    .permissions-actions {
        bottom: 0.5rem;
        padding: 0.85rem;
    }

    .theme-toggle-btn,
    .lang-switch,
    .user-panel {
        width: 100%;
    }

    .lang-switch-track {
        width: 100%;
        justify-content: center;
    }

    .lang-switch-btn {
        flex: 1 1 0;
    }
}
