:root {
    color-scheme: light;
    --sidebar-width: 18.5rem;
    --topbar-height: 4.75rem;
    --radius-sm: 0.8rem;
    --radius-md: 1.15rem;
    --radius-lg: 1.5rem;
    --bg: #edf3f7;
    --bg-alt: #e4ecf3;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --surface-dark: #0f172a;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text-strong: #0f172a;
    --text-muted: #5d6b82;
    --text-soft: #738198;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --brand-soft: rgba(15, 118, 110, 0.12);
    --accent: #d97706;
    --accent-soft: rgba(217, 119, 6, 0.12);
    --info-soft: rgba(14, 116, 144, 0.12);
    --success-soft: rgba(22, 163, 74, 0.12);
    --shadow-sm: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 24px 60px rgba(15, 23, 42, 0.14);
    --bs-body-color: var(--text-strong);
    --bs-emphasis-color: var(--text-strong);
    --bs-secondary-color: var(--text-muted);
    --bs-tertiary-color: var(--text-soft);
    --bs-border-color: var(--border-color);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #08111f;
    --bg-alt: #0d1728;
    --surface: rgba(12, 22, 38, 0.84);
    --surface-strong: #101b2e;
    --surface-dark: #06101d;
    --border-color: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.24);
    --text-strong: #e5eef8;
    --text-muted: #b1bfd1;
    --text-soft: #97a9c0;
    --brand: #3fb6a8;
    --brand-strong: #78d6ca;
    --brand-soft: rgba(63, 182, 168, 0.16);
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --info-soft: rgba(56, 189, 248, 0.16);
    --success-soft: rgba(34, 197, 94, 0.16);
    --shadow-sm: 0 18px 44px rgba(2, 6, 23, 0.35);
    --shadow-md: 0 28px 80px rgba(2, 6, 23, 0.5);
    --bs-body-color: var(--text-strong);
    --bs-emphasis-color: var(--text-strong);
    --bs-secondary-color: var(--text-muted);
    --bs-tertiary-color: var(--text-soft);
    --bs-border-color: var(--border-color);
}

html {
    font-size: 15px;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-strong);
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(14, 116, 144, 0.14), transparent 26%),
        linear-gradient(180deg, #f8fbfd 0%, var(--bg) 42%, var(--bg-alt) 100%);
    transition: background-color 0.2s ease, color 0.2s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
    background-size: 2.5rem 2.5rem;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 72%);
}

a {
    color: var(--brand-strong);
    text-decoration-color: rgba(17, 94, 89, 0.28);
}

a:hover {
    color: var(--brand);
}

.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    backdrop-filter: blur(18px);
    background: rgba(248, 251, 253, 0.84);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 1100;
}

.topbar-start,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--text-strong);
    text-decoration: none;
}

.topbar-brand:hover {
    color: var(--text-strong);
}

.topbar-brand-mark {
    width: 2.85rem;
    height: 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-size: 1.25rem;
    color: white;
    background: linear-gradient(135deg, var(--brand) 0%, #0f4c81 100%);
    box-shadow: 0 14px 30px rgba(15, 118, 110, 0.28);
}

.brand-mark-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-mark-custom {
    background: transparent !important;
    box-shadow: none !important;
}

.brand-mark-custom .brand-mark-image {
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.18));
}

html[data-theme="dark"] .brand-mark-custom .brand-mark-image {
    filter: drop-shadow(0 10px 22px rgba(2, 6, 23, 0.45));
}

.topbar-brand-label {
    display: block;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.topbar-brand-subtitle {
    display: block;
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-toggle {
    min-width: 8.5rem;
    justify-content: center;
}

.sidebar-toggle {
    width: 2.85rem;
    height: 2.85rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.95rem;
    color: var(--text-strong);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle:hover {
    background: white;
}

.topbar-action,
.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.85rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    color: var(--text-strong);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.topbar-action:hover,
.profile-pill:hover {
    color: var(--text-strong);
    transform: translateY(-1px);
}

.profile-pill-avatar {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, #0f766e 0%, #0f4c81 100%);
}

.profile-pill-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.account-menu {
    position: relative;
}

.profile-menu-toggle {
    cursor: pointer;
}

.profile-menu-toggle.dropdown-toggle::after {
    margin-left: 0.35rem;
    border-top-width: 0.35em;
    border-right-width: 0.35em;
    border-left-width: 0.35em;
}

.profile-pill-name {
    font-size: 0.88rem;
    font-weight: 700;
}

.profile-pill-role {
    color: var(--text-soft);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.env-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    color: #fff7ed;
    background: linear-gradient(135deg, #dc2626 0%, #b45309 100%);
    border: 1px solid rgba(127, 29, 29, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.25);
    text-transform: uppercase;
}

.account-dropdown-menu {
    min-width: 18rem;
    margin-top: 0.7rem;
    padding: 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-md);
}

.account-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem 0.7rem;
}

.account-menu-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-strong);
}

.account-menu-link {
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.account-dropdown-menu .dropdown-divider {
    margin: 0.45rem 0;
    border-top-color: var(--border-color);
}

.account-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.75rem 0.8rem;
    border: 0;
    border-radius: 0.9rem;
    background: transparent;
    color: var(--text-strong);
    text-decoration: none;
}

.account-menu-item:hover,
.account-menu-item:focus {
    background: rgba(15, 118, 110, 0.08);
    color: var(--text-strong);
}

.account-menu-item-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.16rem;
    min-width: 0;
}

.account-menu-item-label {
    font-size: 0.88rem;
    font-weight: 700;
}

.account-menu-item-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.account-menu-item > .bi {
    font-size: 1rem;
    color: var(--text-soft);
}

.account-menu-status {
    cursor: default;
}

.account-menu-status:hover,
.account-menu-status:focus {
    background: transparent;
}

.account-dropdown-menu .theme-toggle {
    min-width: 0;
}

.app-sidebar {
    position: fixed;
    top: calc(var(--topbar-height) + 1rem);
    left: 1rem;
    bottom: 1rem;
    width: var(--sidebar-width);
    z-index: 1050;
}

.app-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 1.75rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.9) 100%);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
}

.sidebar-card {
    padding: 1rem;
    border-radius: 1.25rem;
    background: linear-gradient(160deg, rgba(15, 118, 110, 0.26) 0%, rgba(14, 116, 144, 0.12) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
}

.sidebar-card-label,
.nav-section-title {
    margin-bottom: 0.45rem;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-card-title {
    font-size: 1rem;
    font-weight: 700;
}

.sidebar-card-copy {
    margin-top: 0.35rem;
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.84rem;
    line-height: 1.5;
}

.nav-section + .nav-section {
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.app-nav {
    gap: 0.3rem;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.82rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 1rem;
    color: rgba(226, 232, 240, 0.78);
    font-weight: 600;
    transition: all 0.18s ease;
}

.app-sidebar .nav-link i {
    width: 1.15rem;
    font-size: 1rem;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    color: white;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.28) 0%, rgba(59, 130, 246, 0.18) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1040;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.main-content {
    margin-left: calc(var(--sidebar-width) + 2rem);
    padding: calc(var(--topbar-height) + 1.25rem) 1.5rem 1.5rem;
}

.content-shell {
    max-width: 1400px;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.12), transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 250, 252, 0.82) 100%);
    box-shadow: var(--shadow-sm);
}

.page-header nav {
    width: 100%;
    margin-bottom: 0.1rem;
}

.page-header h1 {
    margin: 0;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.page-header p {
    margin: 0;
    color: var(--text-muted);
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--text-soft);
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: var(--radius-md);
    background: var(--surface);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(242, 247, 250, 0.75) 100%);
    color: var(--text-strong);
    font-weight: 700;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border-color);
    background: rgba(248, 251, 253, 0.74);
}

.alert {
    border: 0;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    color: #14532d;
    background: rgba(22, 163, 74, 0.13);
}

.alert-danger {
    color: #7f1d1d;
    background: rgba(220, 38, 38, 0.12);
}

.btn {
    border-radius: 0.95rem;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.btn-primary {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand) 0%, #0f4c81 100%);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--brand-strong);
    background: linear-gradient(135deg, var(--brand-strong) 0%, #0c416d 100%);
}

.btn-outline-primary {
    color: var(--brand-strong);
    border-color: rgba(15, 118, 110, 0.28);
    background: rgba(255, 255, 255, 0.76);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: white;
    border-color: var(--brand);
    background: var(--brand);
}

.btn-outline-secondary {
    color: var(--text-muted);
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: var(--text-strong);
    border-color: rgba(15, 23, 42, 0.16);
    background: white;
}

.form-label {
    margin-bottom: 0.45rem;
    color: var(--text-strong);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 3rem;
    border-color: rgba(15, 23, 42, 0.12);
    border-radius: 0.95rem;
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--text-strong);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 118, 110, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(15, 118, 110, 0.12);
}

textarea.form-control {
    min-height: 7rem;
}

.form-control[type="file"] {
    padding: 0.35rem;
    overflow: hidden;
}

.form-control[type="file"]::file-selector-button {
    margin: -0.35rem 0.85rem -0.35rem -0.35rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.7rem 0 0 0.7rem;
    color: var(--text-strong);
    background: rgba(241, 245, 249, 0.9);
    font-weight: 700;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.form-control[type="file"]::file-selector-button:hover {
    background: rgba(226, 232, 240, 0.96);
}

.form-text,
.text-muted,
.small.text-muted {
    color: var(--text-muted) !important;
}

.form-check {
    display: flex;
    gap: 0.75rem;
    margin: 0;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.form-check:last-child {
    border-bottom: 0;
}

.form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.2rem;
    border-radius: 0.4rem;
}

.form-switch {
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 0;
}

.form-switch .form-check-input {
    width: 2.5rem;
    height: 1.4rem;
    margin-top: 0;
    margin-left: 0;
    flex: 0 0 auto;
    border-radius: 999px;
}

.form-switch .form-check-label {
    margin-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.52rem 0.72rem;
    border-radius: 999px;
    line-height: 1;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.approval-path-cell {
    min-width: 18rem;
}

.queue-step-list {
    display: grid;
    gap: 0.55rem;
}

.queue-step-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
    padding: 0.2rem 0;
}

.queue-step-badge {
    min-width: 4.8rem;
    text-align: center;
}

.queue-step-copy {
    min-width: 0;
}

.queue-step-name {
    color: var(--text-strong);
    font-weight: 700;
    line-height: 1.2;
}

.queue-step-approver {
    margin-top: 0.18rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.queue-edit-button {
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.users-filter-switch {
    min-height: 3rem;
    padding: 0.75rem 0 0;
}

.bg-secondary {
    background-color: rgba(100, 116, 139, 0.16) !important;
    color: #334155 !important;
}

.bg-light {
    background-color: rgba(248, 250, 252, 0.78) !important;
}

.bg-warning {
    color: #4a3300 !important;
}

.table {
    margin-bottom: 0;
    color: var(--text-strong);
}

.table > :not(caption) > * > * {
    padding: 1rem 1.05rem;
    vertical-align: middle;
    border-bottom-color: rgba(15, 23, 42, 0.07);
}

.table > thead {
    vertical-align: middle;
}

.table > thead th {
    border-bottom-width: 1px;
    color: var(--text-soft);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(248, 251, 253, 0.85);
}

.table > tbody > tr {
    transition: background-color 0.16s ease, transform 0.16s ease;
}

.table-hover > tbody > tr:hover {
    background: rgba(15, 118, 110, 0.05);
}

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

.page-link {
    color: var(--brand-strong);
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.82);
}

.page-item.active .page-link {
    border-color: var(--brand);
    background: var(--brand);
}

.list-group-item {
    border-color: rgba(15, 23, 42, 0.06);
    background: transparent;
}

.list-group-item-action:hover {
    background: rgba(15, 118, 110, 0.05);
}

.nav-tabs {
    gap: 0.5rem;
    border-bottom: 0;
}

.nav-tabs .nav-link {
    padding: 0.8rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-muted);
    font-weight: 700;
}

.nav-tabs .nav-link:hover {
    border-color: rgba(15, 118, 110, 0.28);
    color: var(--brand-strong);
}

.nav-tabs .nav-link.active {
    border-color: transparent;
    color: white;
    background: linear-gradient(135deg, var(--brand) 0%, #0f4c81 100%);
    box-shadow: 0 14px 30px rgba(15, 118, 110, 0.2);
}

.activity-item {
    position: relative;
    margin-left: 0.65rem;
    padding: 0 0 1.4rem 1.4rem;
    border-left: 2px solid rgba(15, 23, 42, 0.1);
}

.activity-item::before {
    content: "";
    position: absolute;
    left: -0.45rem;
    top: 0.25rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand) 0%, #0f4c81 100%);
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.08);
}

.activity-item.system-generated::before {
    background: #64748b;
    box-shadow: 0 0 0 6px rgba(100, 116, 139, 0.12);
}

.report-card {
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.report-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.22);
    box-shadow: 0 26px 50px rgba(15, 23, 42, 0.12);
}

.stat-card {
    overflow: hidden;
    position: relative;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -1.5rem -1.5rem auto;
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.border-primary {
    border-left: 4px solid #0f4c81;
}

.stat-card.border-success {
    border-left: 4px solid #15803d;
}

.stat-card.border-warning {
    border-left: 4px solid #b45309;
}

.stat-card.border-danger {
    border-left: 4px solid #b91c1c;
}

.stat-card.border-info {
    border-left: 4px solid #0e7490;
}

.bg-orange {
    background-color: #ea580c !important;
    color: white !important;
}

.bg-teal {
    background-color: #0f766e !important;
    color: white !important;
}

.bg-pink {
    background-color: #be185d !important;
    color: white !important;
}

.btn-orange {
    color: white;
    border-color: #ea580c;
    background-color: #ea580c;
}

.btn-orange:hover {
    color: white;
    border-color: #c2410c;
    background-color: #c2410c;
}

.btn-teal {
    color: white;
    border-color: #0f766e;
    background-color: #0f766e;
}

.btn-teal:hover {
    color: white;
    border-color: #115e59;
    background-color: #115e59;
}

.btn-pink {
    color: white;
    border-color: #be185d;
    background-color: #be185d;
}

.btn-pink:hover {
    color: white;
    border-color: #9d174d;
    background-color: #9d174d;
}

.dashboard-hero,
.section-hero {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 1fr);
}

.dashboard-hero nav,
.section-hero nav {
    grid-column: 1 / -1;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-copy p {
    max-width: 48rem;
    font-size: 1rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-panel {
    display: grid;
    gap: 0.8rem;
    padding: 1.15rem;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.9);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-panel-label {
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-panel-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.hero-panel-copy {
    color: rgba(226, 232, 240, 0.76);
    font-size: 0.9rem;
    line-height: 1.55;
}

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

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 249, 252, 0.8) 100%);
    box-shadow: var(--shadow-sm);
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -1.3rem -1.6rem auto;
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-label {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-size: 1.2rem;
    background: rgba(15, 118, 110, 0.1);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.metric-subtext {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.metric-card.primary .metric-icon {
    color: #0f4c81;
    background: rgba(15, 76, 129, 0.12);
}

.metric-card.success .metric-icon {
    color: #15803d;
    background: var(--success-soft);
}

.metric-card.info .metric-icon {
    color: #0e7490;
    background: var(--info-soft);
}

.metric-card.warning .metric-icon {
    color: #b45309;
    background: var(--accent-soft);
}

.data-toolbar,
.filter-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toolbar-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.toolbar-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.toolbar-copy {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.inline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.inline-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-strong);
    font-size: 0.8rem;
    font-weight: 700;
}

.content-block {
    padding: 1.15rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 1rem;
    background: rgba(248, 251, 253, 0.72);
    color: var(--text-strong);
}

.content-block p:last-child,
.content-block dl:last-child {
    margin-bottom: 0;
}

.definition-list dt {
    margin-bottom: 0.2rem;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.definition-list dd {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.definition-list dd:last-child {
    margin-bottom: 0;
}

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 0.85rem;
    border-radius: 1.25rem;
    font-size: 1.4rem;
    color: var(--brand-strong);
    background: rgba(15, 118, 110, 0.08);
}

.surface-frame {
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
}

.branding-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.branding-preview-mark,
.branding-favicon-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--brand) 0%, #0f4c81 100%);
    box-shadow: var(--shadow-sm);
}

.branding-preview-mark {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    font-size: 1.4rem;
}

.branding-favicon-frame {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
    font-size: 1rem;
}

.sticky-panel {
    position: sticky;
    top: calc(var(--topbar-height) + 1rem);
}

.tab-content {
    margin-top: 1rem;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-shell {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
}

.login-panel {
    padding: 3rem;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    color: white;
}

.login-brand-mark {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.25rem;
}

.login-hero {
    color: white;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.3), transparent 28%),
        linear-gradient(145deg, #0f766e 0%, #0f4c81 52%, #0f172a 100%);
}

.login-hero h1 {
    margin: 0 0 1rem;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.login-hero p {
    max-width: 30rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.8;
}

.login-feature-list {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.login-feature {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
}

.login-feature-title {
    font-weight: 800;
}

.login-card {
    padding: 3rem 2.6rem;
    background: rgba(255, 255, 255, 0.9);
}

.login-card h2 {
    margin: 0;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 2rem;
}

.login-card .text-muted {
    line-height: 1.7;
}

.login-entra-button {
    min-height: 3rem;
    font-weight: 700;
}

.login-divider {
    position: relative;
    margin: 0 0 1.5rem;
    text-align: center;
}

.login-divider::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.login-divider span {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 0 0.85rem;
    color: var(--text-soft);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.96);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(63, 182, 168, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 26%),
        linear-gradient(180deg, #07101c 0%, var(--bg) 42%, var(--bg-alt) 100%);
}

html[data-theme="dark"] body::before {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
}

html[data-theme="dark"] a {
    color: var(--brand-strong);
    text-decoration-color: rgba(120, 214, 202, 0.34);
}

html[data-theme="dark"] .topbar {
    background: rgba(7, 16, 28, 0.84);
    border-bottom-color: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .topbar-brand,
html[data-theme="dark"] .topbar-brand:hover {
    color: var(--text-strong);
}

html[data-theme="dark"] .topbar-brand-subtitle,
html[data-theme="dark"] .profile-pill-role,
html[data-theme="dark"] .nav-section-title,
html[data-theme="dark"] .sidebar-card-label,
html[data-theme="dark"] .sidebar-card-copy,
html[data-theme="dark"] .hero-panel-label,
html[data-theme="dark"] .hero-panel-copy,
html[data-theme="dark"] .metric-label,
html[data-theme="dark"] .definition-list dt,
html[data-theme="dark"] .table > thead th {
    color: var(--text-muted);
}

html[data-theme="dark"] .sidebar-toggle,
html[data-theme="dark"] .topbar-action,
html[data-theme="dark"] .profile-pill {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-strong);
}

html[data-theme="dark"] .sidebar-toggle:hover,
html[data-theme="dark"] .topbar-action:hover,
html[data-theme="dark"] .profile-pill:hover {
    color: var(--text-strong);
    background: rgba(19, 32, 52, 0.92);
}

html[data-theme="dark"] .account-dropdown-menu {
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(10, 18, 32, 0.96);
}

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

html[data-theme="dark"] .account-menu-item:hover,
html[data-theme="dark"] .account-menu-item:focus {
    background: rgba(63, 182, 168, 0.12);
}

html[data-theme="dark"] .env-badge {
    border-color: rgba(251, 191, 36, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(127, 29, 29, 0.24);
}

html[data-theme="dark"] .queue-step-approver {
    color: var(--text-muted);
}

html[data-theme="dark"] .page-header {
    border-color: rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 28%),
        linear-gradient(145deg, rgba(11, 20, 34, 0.92) 0%, rgba(15, 23, 42, 0.84) 100%);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .surface-frame,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .login-shell,
html[data-theme="dark"] .login-card {
    border-color: rgba(148, 163, 184, 0.12);
    background: var(--surface);
}

html[data-theme="dark"] .login-divider span {
    background: var(--surface);
}

html[data-theme="dark"] .card-header {
    background: linear-gradient(180deg, rgba(17, 27, 46, 0.94) 0%, rgba(11, 20, 34, 0.92) 100%);
}

html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .content-block,
html[data-theme="dark"] .table > thead th,
html[data-theme="dark"] .nav-tabs .nav-link,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .page-link {
    background: rgba(16, 27, 46, 0.82);
}

html[data-theme="dark"] .content-block {
    border-color: rgba(148, 163, 184, 0.1);
    color: var(--text-strong);
}

html[data-theme="dark"] .content-block p,
html[data-theme="dark"] .content-block dd,
html[data-theme="dark"] .content-block span,
html[data-theme="dark"] .content-block li,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .toolbar-title,
html[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--text-strong);
}

html[data-theme="dark"] .card-body,
html[data-theme="dark"] .card-body p,
html[data-theme="dark"] .card-body span,
html[data-theme="dark"] .card-body div,
html[data-theme="dark"] .card-body li,
html[data-theme="dark"] .card-body h1,
html[data-theme="dark"] .card-body h2,
html[data-theme="dark"] .card-body h3,
html[data-theme="dark"] .card-body h4,
html[data-theme="dark"] .card-body h5,
html[data-theme="dark"] .card-body h6,
html[data-theme="dark"] .form-check-label,
html[data-theme="dark"] legend {
    color: var(--text-strong);
}

html[data-theme="dark"] .form-text,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .small.text-muted,
html[data-theme="dark"] .toolbar-copy,
html[data-theme="dark"] .metric-subtext,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .breadcrumb-item,
html[data-theme="dark"] .breadcrumb-item a {
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .opacity-75,
html[data-theme="dark"] .small.opacity-75 {
    opacity: 1 !important;
    color: rgba(229, 238, 248, 0.82) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] .text-body-emphasis,
html[data-theme="dark"] .text-black,
html[data-theme="dark"] a.text-dark,
html[data-theme="dark"] .table a.text-dark {
    color: var(--text-strong) !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text {
    border-color: rgba(148, 163, 184, 0.16);
    background-color: rgba(11, 20, 34, 0.94);
    color: var(--text-strong);
}

html[data-theme="dark"] .form-control::placeholder {
    color: rgba(152, 168, 189, 0.72);
}

html[data-theme="dark"] .form-control[type="file"]::file-selector-button {
    border-right-color: rgba(148, 163, 184, 0.14);
    color: var(--text-strong);
    background: rgba(30, 41, 59, 0.96);
}

html[data-theme="dark"] .form-control[type="file"]::file-selector-button:hover {
    background: rgba(51, 65, 85, 0.98);
}

html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .btn-outline-secondary {
    background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .btn-outline-secondary {
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus {
    color: var(--text-strong);
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(22, 34, 54, 0.95);
}

html[data-theme="dark"] .table {
    color: var(--text-strong);
    --bs-table-color: var(--text-strong);
    --bs-table-bg: rgba(12, 22, 38, 0.01);
    --bs-table-border-color: rgba(148, 163, 184, 0.1);
    --bs-table-striped-bg: rgba(16, 27, 46, 0.88);
    --bs-table-striped-color: var(--text-strong);
    --bs-table-hover-bg: rgba(63, 182, 168, 0.08);
    --bs-table-hover-color: var(--text-strong);
}

html[data-theme="dark"] .table > :not(caption) > * > * {
    border-bottom-color: rgba(148, 163, 184, 0.1);
    background-color: transparent;
    box-shadow: none;
}

html[data-theme="dark"] .table-responsive {
    background: rgba(12, 22, 38, 0.3);
}

html[data-theme="dark"] .list-group,
html[data-theme="dark"] .list-group-item {
    --bs-list-group-bg: rgba(16, 27, 46, 0.82);
    --bs-list-group-color: var(--text-strong);
    --bs-list-group-border-color: rgba(148, 163, 184, 0.1);
    --bs-list-group-action-hover-bg: rgba(63, 182, 168, 0.08);
    --bs-list-group-action-hover-color: var(--text-strong);
    --bs-list-group-action-active-bg: rgba(20, 184, 166, 0.14);
    --bs-list-group-action-active-color: var(--text-strong);
}

html[data-theme="dark"] .list-group-item {
    color: var(--text-strong);
}

html[data-theme="dark"] .list-group-item a,
html[data-theme="dark"] .list-group-item-action {
    color: inherit;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover,
html[data-theme="dark"] .list-group-item-action:hover {
    background: rgba(63, 182, 168, 0.08);
}

html[data-theme="dark"] .activity-item {
    border-left-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .bg-secondary {
    background-color: rgba(100, 116, 139, 0.26) !important;
    color: #d8e2ef !important;
}

html[data-theme="dark"] .bg-light {
    background-color: rgba(30, 41, 59, 0.88) !important;
    color: var(--text-strong) !important;
}

html[data-theme="dark"] .badge.bg-warning,
html[data-theme="dark"] .badge.bg-info,
html[data-theme="dark"] .badge.bg-light,
html[data-theme="dark"] .badge.text-dark {
    color: #0f172a !important;
}

html[data-theme="dark"] .badge.bg-light.text-dark,
html[data-theme="dark"] .badge.bg-light.border {
    color: #dbe7f5 !important;
    background-color: rgba(51, 65, 85, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
}

.calendar-shell #calendar {
    min-height: 42rem;
}

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

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

@media (max-width: 991.98px) {
    .topbar {
        padding: 0 1rem;
    }

    .app-sidebar {
        top: 0.75rem;
        left: 0.75rem;
        bottom: 0.75rem;
        transform: translateX(calc(-100% - 1rem));
        transition: transform 0.22s ease;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }

    .topbar-brand-subtitle,
    .profile-pill-role {
        display: none;
    }

    .account-dropdown-menu {
        min-width: min(18rem, calc(100vw - 1.5rem));
    }

    .topbar-brand-label {
        font-size: 1.15rem;
    }

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

    .page-header,
    .card-body,
    .card-header,
    .card-footer,
    .login-panel,
    .login-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .main-content {
        padding-bottom: 1rem;
    }
}

@media print {
    .topbar,
    .app-sidebar,
    .sidebar-backdrop,
    .btn,
    .alert {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    body {
        background: white;
    }
}

.rich-text-field {
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6fb 100%);
    border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.rich-text-editor {
    min-height: 11rem;
    border: 0;
    border-radius: 0;
    padding: 1rem;
    line-height: 1.65;
}

.rich-text-editor:focus {
    box-shadow: none;
}

.rich-text-editor:empty::before {
    content: attr(data-placeholder);
    color: #7a8799;
}

.content-block p:last-child,
.content-block ul:last-child,
.content-block ol:last-child {
    margin-bottom: 0;
}

.content-block ul,
.content-block ol {
    padding-left: 1.5rem;
}
