:root {
    --ohc-bg: #0b111c;
    --ohc-surface: #121a28;
    --ohc-surface-2: #1a2436;
    --ohc-text: #eef2f6;
    --ohc-muted: #8b9aab;
    --ohc-accent: #d4af37;
    --ohc-accent-hover: #e4c55a;
    --ohc-accent-muted: rgba(212, 175, 55, 0.14);
    --ohc-border: rgba(255, 255, 255, 0.07);
    --ohc-radius: 0.4rem;
    --ohc-font-size: 0.9375rem;
    --ohc-scrollbar: #2a3548;
    --ohc-scrollbar-thumb: #3d4d66;
    --ohc-sidebar-width: 15.35rem;
}

* {
    box-sizing: border-box;
}

html {
    font-size: var(--ohc-font-size);
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--ohc-bg);
    color: var(--ohc-text);
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--ohc-scrollbar-thumb) var(--ohc-scrollbar);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--ohc-scrollbar);
}

*::-webkit-scrollbar-thumb {
    background: var(--ohc-scrollbar-thumb);
    border-radius: 4px;
}

a {
    color: var(--ohc-accent);
}

a:hover {
    color: var(--ohc-accent-hover);
}

h1,
.h1 {
    font-size: 1.35rem;
}

h2,
.h2 {
    font-size: 1.15rem;
}

h3,
.h3 {
    font-size: 1.05rem;
}

.text-muted {
    color: var(--ohc-muted) !important;
}

.card,
.settings-panel,
.dash-panel,
.dash-kpi-card {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    color: var(--ohc-text);
}

.form-control,
.form-select {
    background-color: var(--ohc-surface-2);
    border-color: var(--ohc-border);
    color: var(--ohc-text);
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
}

.form-label,
.form-check-label {
    color: var(--ohc-text);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--ohc-surface-2);
    border-color: var(--ohc-accent);
    box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.2);
    color: var(--ohc-text);
}

.form-control::placeholder {
    color: var(--ohc-muted);
}

.form-text {
    color: var(--ohc-muted);
    font-size: 0.75rem;
}

.btn {
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

.btn-primary {
    background: var(--ohc-accent);
    border-color: var(--ohc-accent);
    color: #1a1508;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--ohc-accent-hover);
    border-color: var(--ohc-accent-hover);
    color: #1a1508;
}

.btn-outline-light {
    border-color: var(--ohc-border);
    color: var(--ohc-text);
}

.btn-outline-light:hover {
    background: var(--ohc-surface-2);
    border-color: var(--ohc-accent);
    color: var(--ohc-text);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
    color: #ffb4bc;
    font-size: 0.8125rem;
}

.alert-success {
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
    color: #9dffc8;
    font-size: 0.8125rem;
}

.border-secondary-subtle {
    border-color: var(--ohc-border) !important;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.bg-secondary,
.badge.bg-primary {
    background-color: var(--ohc-surface-2) !important;
    color: var(--ohc-text) !important;
}

.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-content-minimal {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--ohc-border);
    box-shadow: none !important;
}

.login-brand {
    text-align: center;
}

.login-logo {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto 1rem;
}

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

.app-sidebar {
    width: var(--ohc-sidebar-width);
    flex-shrink: 0;
    align-items: stretch;
    background: var(--ohc-surface);
    border-right: 1px solid var(--ohc-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (min-width: 992px) {
    .has-sidebar .app-main {
        margin-left: var(--ohc-sidebar-width);
    }
}

.sidebar-brand {
    width: 100%;
    padding: 0.85rem 0.25rem 0.45rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: var(--ohc-text);
    line-height: 0;
}

.brand-link:hover {
    color: var(--ohc-text);
    opacity: 0.92;
}

.sidebar-logo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.sidebar-nav {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0;
}

.sidebar-nav .nav-link,
.offcanvas .nav-link {
    color: var(--ohc-text);
    border-radius: 0;
    padding: 0.48rem 0.55rem;
    margin-bottom: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    width: 100%;
    display: flex;
}

.nav-link-icon {
    align-items: center;
    gap: 0.75rem;
}

.nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ohc-text);
}

.nav-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.sidebar-nav .nav-link:hover,
.offcanvas .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ohc-text);
}

.sidebar-nav .nav-link.active,
.offcanvas .nav-link.active {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--ohc-accent);
}

.sidebar-nav .nav-link.active .nav-icon,
.offcanvas .nav-link.active .nav-icon {
    color: var(--ohc-accent);
}

.sidebar-footer {
    align-self: stretch;
    width: 100%;
    padding: 0.55rem;
}

.sidebar-user-name {
    color: var(--ohc-text);
    font-weight: 500;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar,
.mobile-topbar {
    background: var(--ohc-surface);
}

.app-topbar {
    font-size: 0.8125rem;
    min-height: 3.25rem;
}

.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    font-size: 0.875rem;
}

.mobile-topbar .sidebar-logo {
    max-width: 120px;
}

.topbar-heading {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ohc-text);
    line-height: 1.2;
}

.topbar-subheading {
    font-size: 0.8125rem;
    line-height: 1.3;
    margin-top: 0.1rem;
}

.topbar-user {
    text-align: right;
    line-height: 1.2;
    padding-left: 0.5rem;
    border-left: 1px solid var(--ohc-border);
}

.topbar-icon-btn {
    min-width: 2rem;
    padding: 0.2rem 0.45rem;
    opacity: 0.85;
}

.app-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 1rem !important;
}

.app-footer {
    border-top: 1px solid var(--ohc-border);
    background: var(--ohc-surface);
    font-size: 0.75rem;
    margin-top: auto;
    flex-shrink: 0;
}

.page-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ohc-border);
}

.page-header .text-muted {
    font-size: 0.8125rem;
}

.content-panel-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--ohc-text);
}

.dash-preview-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--ohc-accent);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dash-kpi-card {
    border-radius: 0.55rem;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.dash-kpi-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-kpi-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.dash-kpi-icon-alert {
    background: rgba(196, 92, 92, 0.15);
    color: #e8a0a0;
}

.dash-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ohc-muted);
    margin-bottom: 0.15rem;
}

.dash-kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ohc-text);
    line-height: 1.1;
}

.dash-kpi-value-alert {
    color: #ff8a96;
}

.dash-kpi-sub,
.dash-kpi-trend {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.dash-trend-up {
    color: #6fcf97;
}

.dash-trend-danger {
    color: #ff8a96;
}

.dash-trend-gold {
    color: var(--ohc-accent);
}

.dash-grid-2,
.dash-grid-3 {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

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

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

.dash-panel {
    border-radius: 0.55rem;
    padding: 1rem;
    min-height: 180px;
}

.dash-panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--ohc-text);
}

.dash-chart-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-donut {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(#4a90c4 0 42%, #5cb87a 42% 77%, #d4a04a 77% 100%);
    position: relative;
    flex-shrink: 0;
}

.dash-donut-hole {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: var(--ohc-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-donut-total {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ohc-text);
}

.dash-legend li,
.dash-status-list li,
.dash-list li,
.dash-todo li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--ohc-text);
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--ohc-border);
}

.dash-legend strong,
.dash-status-list .ms-auto {
    color: var(--ohc-muted);
    margin-left: auto;
}

.dash-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    display: inline-block;
}

.dash-dot-morning {
    background: #4a90c4;
}

.dash-dot-afternoon {
    background: #5cb87a;
}

.dash-dot-evening {
    background: #d4a04a;
}

.dash-progress-bar {
    height: 0.45rem;
    border-radius: 999px;
    background: var(--ohc-surface-2);
    overflow: hidden;
}

.dash-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ohc-accent);
}

.settings-tabs .nav-link {
    color: var(--ohc-muted);
    font-size: 0.8125rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--ohc-radius);
}

.settings-tabs .nav-link:hover {
    color: var(--ohc-text);
    background: rgba(255, 255, 255, 0.04);
}

.settings-tabs .nav-link.active {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
    font-weight: 600;
}

.settings-panel {
    padding: 1rem 1.1rem;
}

.settings-logo-preview {
    max-height: 48px;
    max-width: 180px;
    border-radius: var(--ohc-radius);
    border: 1px solid var(--ohc-border);
    background: var(--ohc-surface-2);
    padding: 0.25rem;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ohc-text);
    --bs-table-border-color: var(--ohc-border);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: var(--ohc-accent-muted);
    font-size: 0.875rem;
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ohc-muted);
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover td {
    background: var(--ohc-accent-muted);
}

.staff-left-row td {
    background: rgba(220, 53, 69, 0.08);
}

.staff-left-date {
    color: #ff9aa5;
    font-weight: 600;
}

.staff-type-badge {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
}

.staff-type-bank {
    background: rgba(255, 192, 0, 0.16);
    border-color: rgba(255, 192, 0, 0.42);
    color: #ffd56a;
}

.record-count {
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    display: inline-flex;
    font-size: 0.78rem;
    padding: 0.28rem 0.7rem;
}

.trust-summary-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.trust-summary-card {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    padding: 0.85rem;
}

.trust-summary-total {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.35);
}

.trust-summary-hours {
    color: var(--ohc-accent);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.profile-hero {
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.16), transparent 30%),
        linear-gradient(135deg, var(--ohc-surface), #0f1725);
    border: 1px solid var(--ohc-border);
    border-radius: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 1.25rem;
}

.profile-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--ohc-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.profile-hero-title {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.profile-pill {
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    display: inline-flex;
    font-size: 0.78rem;
    gap: 0.35rem;
    padding: 0.22rem 0.62rem;
}

.profile-pill strong {
    color: var(--ohc-text);
    font-weight: 600;
}

.profile-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.profile-summary-card {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    padding: 0.9rem;
}

.profile-summary-danger,
.profile-section-danger {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.45);
}

.profile-pill-danger {
    border-color: rgba(220, 53, 69, 0.45);
    color: #ffb4bc;
}

.profile-summary-card .profile-value {
    font-size: 1rem;
    font-weight: 600;
}

.profile-summary-status .form-text {
    color: var(--ohc-muted);
    font-size: 0.72rem;
    margin-top: 0.45rem;
}

.profile-status-dropdown {
    display: block;
}

.profile-status-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    gap: 0.45rem;
    padding: 0;
    text-align: left;
    width: 100%;
}

.profile-status-trigger::after {
    display: none !important;
}

.profile-status-trigger .profile-value {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.profile-status-chevron {
    border-right: 2px solid var(--ohc-muted);
    border-bottom: 2px solid var(--ohc-muted);
    flex: 0 0 auto;
    height: 0.4rem;
    margin-top: 0.12rem;
    transform: rotate(45deg);
    width: 0.4rem;
}

.profile-summary-danger .profile-status-trigger .profile-value {
    color: #ffb4bc;
}

.profile-summary-danger .profile-status-chevron {
    border-color: #ffb4bc;
}

.profile-status-menu {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    box-shadow: 0 0.65rem 1.5rem rgba(0, 0, 0, 0.28);
    min-width: 100%;
    padding: 0.3rem;
}

.profile-status-menu .dropdown-item {
    border: 0;
    border-radius: 0.4rem;
    color: var(--ohc-text);
    font-size: 0.88rem;
    padding: 0.5rem 0.65rem;
    text-align: left;
    width: 100%;
}

.profile-status-menu .dropdown-item:hover,
.profile-status-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ohc-text);
}

.profile-status-menu .dropdown-item.is-selected {
    background: var(--ohc-accent-muted);
    color: var(--ohc-accent);
}

.profile-status-date {
    margin-top: 0.35rem;
}

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

.profile-section {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.65rem;
    padding: 1rem;
}

.profile-section-wide {
    grid-column: 1 / -1;
}

.profile-section-title {
    color: var(--ohc-text);
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.profile-activity-notes .profile-section {
    min-height: 12rem;
}

.profile-activity-table {
    font-size: 0.84rem;
}

.profile-activity-table th,
.profile-activity-table td {
    white-space: normal;
}

.admin-notes-form .admin-notes-input {
    font-size: 0.9rem;
    resize: vertical;
}

.admin-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    max-height: 24rem;
    overflow-y: auto;
    padding: 0;
}

.admin-notes-item {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    padding: 0.75rem;
}

.admin-notes-meta {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.admin-notes-body {
    color: var(--ohc-text);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.profile-field {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    padding: 0.75rem;
}

.profile-label {
    color: var(--ohc-muted);
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.profile-value {
    color: var(--ohc-text);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.modal-content {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    color: var(--ohc-text);
}

.offcanvas.text-bg-dark {
    background: var(--ohc-surface) !important;
}

@media (max-width: 1199.98px) {
    .dash-kpi-row,
    .dash-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .app-content {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .dash-kpi-row,
    .dash-grid-2,
    .dash-grid-3 {
        grid-template-columns: 1fr;
    }

    .profile-section-grid {
        grid-template-columns: 1fr;
    }

    .docs-browser-layout {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .docs-browser-explorer {
        height: 20rem;
    }

    .docs-browser-preview-panel {
        height: 14rem;
    }

    .docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-layout {
        height: calc(100dvh - 8.5rem);
        max-height: calc(100dvh - 8.5rem);
    }

    .docs-browser-profile .docs-browser-layout {
        height: auto;
        max-height: none;
    }

    .docs-browser-profile .docs-browser-explorer {
        height: 22rem;
    }

    .docs-browser-profile.is-file-selected .docs-browser-explorer {
        display: none;
    }

    .docs-browser-profile.is-file-selected .docs-browser-preview-panel {
        height: min(34rem, 72vh);
    }
}

.docs-browser {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    overflow: hidden;
}

.docs-browser-toggle {
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
    border: 0;
    color: var(--ohc-text);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.9rem 1rem;
    text-align: left;
    width: 100%;
}

.docs-browser-toggle:hover,
.docs-browser-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ohc-text);
    outline: none;
}

.docs-browser-toggle-main {
    align-items: center;
    display: inline-flex;
    font-weight: 600;
    gap: 0.55rem;
}

.docs-browser-toggle-icon {
    align-items: center;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 0.45rem;
    color: var(--ohc-accent);
    display: inline-flex;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.docs-browser-toggle-icon svg {
    height: 1rem;
    width: 1rem;
}

.docs-browser-toggle-hint {
    font-size: 0.82rem;
}

.docs-browser-chevron {
    border-right: 2px solid var(--ohc-muted);
    border-bottom: 2px solid var(--ohc-muted);
    display: inline-block;
    height: 0.45rem;
    margin-left: 0.15rem;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    width: 0.45rem;
}

.docs-browser-toggle[aria-expanded="true"] .docs-browser-chevron {
    transform: rotate(45deg);
}

.docs-browser-body {
    border-top: 1px solid var(--ohc-border);
    padding: 0.85rem;
}

.docs-browser-layout {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
    height: 26rem;
    max-height: 26rem;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected {
    margin-bottom: 0;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-layout {
    height: calc(100dvh - 11rem);
    max-height: calc(100dvh - 11rem);
    min-height: 20rem;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-panel-title {
    display: none;
}

.docs-browser-expanded:not(.docs-browser-profile).is-file-selected .docs-browser-preview {
    padding: 0.45rem 0.55rem 0.55rem;
}

.docs-browser-profile .docs-browser-layout {
    height: 36rem;
    max-height: 36rem;
}

.docs-browser-profile.is-file-selected .docs-browser-layout {
    height: 42rem;
    max-height: min(42rem, 78vh);
}

.docs-browser.is-file-selected .docs-browser-layout {
    grid-template-columns: minmax(0, 1fr);
}

.docs-browser.is-file-selected .docs-browser-explorer {
    display: none;
}

.docs-browser.is-file-selected .docs-browser-preview-panel {
    grid-column: 1 / -1;
}

.docs-browser-explorer,
.docs-browser-preview-panel {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.docs-browser-toolbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--ohc-border);
    display: flex;
    flex: 0 0 auto;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.65rem;
}

.docs-browser-up {
    align-items: center;
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    border-radius: 0.4rem;
    color: var(--ohc-muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2rem;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    width: 2rem;
}

.docs-browser-up svg {
    height: 1rem;
    width: 1rem;
}

.docs-browser-up:not(:disabled):hover,
.docs-browser-up:not(:disabled):focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--ohc-accent);
    outline: none;
}

.docs-browser-up:disabled {
    cursor: default;
    opacity: 0.35;
}

.docs-browser-breadcrumb {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.15rem;
    min-width: 0;
}

.docs-browser-upload {
    flex: 0 0 auto;
    margin: 0;
}

.docs-browser-upload-btn {
    align-items: center;
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 0.4rem;
    color: var(--ohc-accent);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.docs-browser-upload:hover .docs-browser-upload-btn,
.docs-browser-upload:focus-within .docs-browser-upload-btn {
    background: rgba(212, 175, 55, 0.22);
    border-color: rgba(212, 175, 55, 0.55);
    color: var(--ohc-accent-hover);
}

.docs-browser-status {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem 0;
}

.docs-browser-status.is-error {
    color: #ff9aa5;
}

.docs-browser-status.is-success {
    color: #8fd9a8;
}

.docs-breadcrumb-link {
    background: transparent;
    border: 0;
    border-radius: 0.3rem;
    color: var(--ohc-accent);
    font-size: 0.82rem;
    max-width: 12rem;
    overflow: hidden;
    padding: 0.15rem 0.35rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-breadcrumb-link:hover,
.docs-breadcrumb-link:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ohc-accent-hover);
    outline: none;
}

.docs-breadcrumb-current {
    color: var(--ohc-text);
    font-size: 0.82rem;
    font-weight: 600;
    max-width: 14rem;
    overflow: hidden;
    padding: 0.15rem 0.35rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-breadcrumb-sep {
    color: var(--ohc-muted);
    font-size: 0.75rem;
    user-select: none;
}

.docs-browser-grid-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.85rem;
    position: relative;
}

.docs-browser-drop-overlay {
    align-items: center;
    background: rgba(11, 17, 28, 0.82);
    border: 2px dashed rgba(212, 175, 55, 0.55);
    border-radius: var(--ohc-radius);
    color: var(--ohc-accent);
    display: none;
    inset: 0.65rem;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.docs-browser-drop-overlay span {
    background: var(--ohc-accent-muted);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 0.9rem;
}

.docs-browser-grid-wrap.is-dragover .docs-browser-drop-overlay {
    display: flex;
}

.docs-browser-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
}

.docs-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid transparent;
    border-radius: 0.65rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 7.5rem;
    padding: 0.75rem 0.55rem 0.65rem;
    position: relative;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.docs-item:hover,
.docs-item:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.docs-item.is-selected {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.35);
}

.docs-item-icon {
    align-items: center;
    border-radius: 0.55rem;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.docs-item-icon svg {
    height: 1.75rem;
    width: 1.75rem;
}

.docs-item-icon img {
    border-radius: 0.45rem;
    height: 3rem;
    object-fit: cover;
    width: 3rem;
}

.docs-item-icon-folder {
    background: rgba(212, 175, 55, 0.14);
    color: #e4c55a;
}

.docs-item-icon-image {
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.docs-item-icon-pdf {
    background: rgba(220, 76, 76, 0.14);
    color: #ff8f8f;
}

.docs-item-icon-word {
    background: rgba(66, 133, 244, 0.14);
    color: #8ab4ff;
}

.docs-item-icon-excel {
    background: rgba(52, 168, 83, 0.14);
    color: #8fd9a8;
}

.docs-item-icon-text {
    background: rgba(139, 154, 171, 0.14);
    color: #b8c4d3;
}

.docs-item-icon-file {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ohc-muted);
}

.docs-item-name {
    align-items: flex-start;
    display: flex;
    font-size: 0.78rem;
    font-weight: 500;
    gap: 0.3rem;
    line-height: 1.25;
    max-width: 100%;
    min-width: 0;
}

.docs-item-name-text {
    display: -webkit-box;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-word;
}

.docs-item-lock {
    align-items: center;
    color: var(--ohc-muted);
    display: inline-flex;
    flex: 0 0 auto;
    height: 0.95rem;
    margin-top: 0.05rem;
    width: 0.95rem;
}

.docs-item-lock svg {
    height: 0.8rem;
    width: 0.8rem;
}

.docs-item.is-selected .docs-item-lock {
    color: var(--ohc-accent);
}

.docs-item-meta {
    color: var(--ohc-muted);
    font-size: 0.68rem;
    margin-top: auto;
}

.docs-item-rename {
    align-items: center;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.35rem;
    color: rgba(255, 255, 255, 0.75);
    display: inline-flex;
    height: 1.5rem;
    justify-content: center;
    opacity: 0;
    padding: 0;
    position: absolute;
    right: 0.35rem;
    top: 0.35rem;
    transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    width: 1.5rem;
}

.docs-item-rename svg {
    height: 0.85rem;
    width: 0.85rem;
}

.docs-item:hover .docs-item-rename,
.docs-item:focus-within .docs-item-rename,
.docs-item-rename:focus-visible {
    opacity: 1;
}

.docs-item-rename:hover,
.docs-item-rename:focus-visible {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--ohc-accent);
    outline: none;
}

.docs-browser-panel-title {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--ohc-border);
    color: var(--ohc-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.75rem;
    text-transform: uppercase;
}

.docs-browser-preview {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.85rem;
}

.docs-browser.is-file-selected .docs-browser-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
    padding: 0.55rem 0.65rem 0.65rem;
}

.docs-preview-topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
}

.docs-preview-back-btn {
    flex: 0 0 auto;
    font-weight: 600;
}

.docs-preview-topbar-title {
    color: var(--ohc-text);
    flex: 1 1 auto;
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-preview-topbar-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.docs-preview-actions-secondary {
    margin-top: 0;
}

.docs-preview-viewer {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}

.docs-preview-loading {
    inset: 0;
    padding: 1rem;
    position: absolute;
    z-index: 1;
}

.docs-preview-generated-note {
    margin: 0.35rem 0 0.65rem;
}

.docs-preview-password-form {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    margin-top: 0.5rem;
    padding: 1rem;
}

.docs-preview-password-error {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    border-radius: var(--ohc-radius);
    color: #ffb4bc;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
}

.docs-browser-loading,
.docs-browser-error,
.docs-browser-empty,
.docs-browser-preview-empty {
    align-items: center;
    color: var(--ohc-muted);
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    gap: 0.65rem;
    justify-content: center;
    min-height: 12rem;
    padding: 1rem;
    text-align: center;
}

.docs-browser-empty svg,
.docs-browser-preview-empty svg {
    color: rgba(255, 255, 255, 0.18);
    height: 2.5rem;
    width: 2.5rem;
}

.docs-preview-meta {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.docs-preview-meta-icon {
    flex: 0 0 auto;
}

.docs-preview-meta-icon img {
    height: 2.5rem;
    width: 2.5rem;
}

.docs-preview-image-btn {
    background: transparent;
    border: 0;
    display: block;
    padding: 0;
    width: 100%;
}

.docs-preview-image,
.docs-modal-image {
    background: #0a1018;
    border: 1px solid var(--ohc-border);
    border-radius: var(--ohc-radius);
    display: block;
    max-height: 420px;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.docs-browser.is-file-selected .docs-preview-image {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    object-fit: contain;
}

.docs-browser.is-file-selected .docs-preview-image-btn {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.docs-preview-frame,
.docs-modal-frame {
    background: #fff;
    border: 0;
    border-radius: var(--ohc-radius);
    min-height: 420px;
    width: 100%;
}

.docs-browser.is-file-selected .docs-preview-frame {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.docs-preview-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.docs-preview-actions .btn-outline-danger {
    border-color: rgba(255, 154, 165, 0.45);
    color: #ff9aa5;
}

.docs-preview-actions .btn-outline-danger:hover,
.docs-preview-actions .btn-outline-danger:focus-visible {
    background: rgba(255, 154, 165, 0.12);
    border-color: rgba(255, 154, 165, 0.65);
    color: #ffb8c0;
}

.docs-file-modal .modal-content {
    background: var(--ohc-surface);
    border: 1px solid var(--ohc-border);
    color: var(--ohc-text);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
}

.docs-file-modal-dialog {
    height: 90vh;
    margin: 5vh auto;
    max-height: 90vh;
    max-width: min(96vw, 96rem);
    width: min(96vw, 96rem);
}

.docs-file-modal .modal-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.docs-modal-viewer {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.docs-modal-frame {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.docs-modal-image {
    flex: 1 1 auto;
    height: 100%;
    max-height: none;
    min-height: 0;
    object-fit: contain;
}

.docs-file-modal .modal-header,
.docs-file-modal .modal-footer {
    border-color: var(--ohc-border);
}

.docs-root-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.docs-root-tab {
    background: var(--ohc-surface-2);
    border: 1px solid var(--ohc-border);
    border-radius: 999px;
    color: var(--ohc-muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    text-decoration: none;
}

.docs-root-tab:hover,
.docs-root-tab:focus-visible {
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--ohc-text);
}

.docs-root-tab.is-active {
    background: var(--ohc-accent-muted);
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--ohc-accent);
}

.docs-browser-expanded .docs-browser-body {
    border-top: 0;
    padding-top: 0;
}

.docs-browser-expanded-body .docs-browser-body {
    padding: 0;
}

.docs-restore-modal .modal-content,
.docs-restore-modal .modal-header,
.docs-restore-modal .modal-footer {
    background: var(--ohc-surface);
    border-color: var(--ohc-border);
    color: var(--ohc-text);
}

.docs-restore-item {
    align-items: center;
    border-top: 1px solid var(--ohc-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.docs-restore-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.client-files-tick {
    color: #8fd9a8;
    font-size: 1rem;
    font-weight: 700;
}

.client-files-missing {
    display: inline-block;
    font-size: 0.72rem;
    line-height: 1.2;
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-files-missing-wrap {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 7.5rem;
}

.client-files-missing-wrap .docs-folder-match-rename {
    font-size: 0.68rem;
    line-height: 1.1;
    padding: 0.1rem 0.4rem;
}

.client-files-hint .docs-folder-match-rename {
    margin-left: 0.35rem;
}

.client-files-hint {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: var(--ohc-radius);
    color: var(--ohc-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.85rem 1rem;
}

.client-files-hint strong {
    color: var(--ohc-text);
}

.folder-setup-panel {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: var(--ohc-radius);
    color: var(--ohc-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.85rem 1rem;
}

.folder-setup-intro {
    margin-bottom: 0.75rem;
}

.folder-setup-intro:last-child {
    margin-bottom: 0;
}

.folder-setup-panel strong {
    color: var(--ohc-text);
}
