.app-body {
    --app-bg: #f4f7fb;
    --app-bg-soft: #eef3fb;
    --app-surface: rgba(255, 255, 255, 0.92);
    --app-surface-2: rgba(248, 250, 255, 0.96);
    --app-border: rgba(15, 23, 42, 0.08);
    --app-border-strong: rgba(15, 23, 42, 0.14);
    --app-text: #172033;
    --app-muted: #5f6f86;
    --app-accent: #2563eb;
    --app-accent-strong: #1d4ed8;
    --app-accent-soft: rgba(37, 99, 235, 0.12);
    --app-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --app-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.06);
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(180deg, var(--app-bg-soft) 0%, var(--app-bg) 100%);
    color: var(--app-text);
}

[data-bs-theme="dark"].app-body {
    --app-bg: #0b1220;
    --app-bg-soft: #10192b;
    --app-surface: rgba(20, 29, 46, 0.94);
    --app-surface-2: rgba(28, 39, 63, 0.96);
    --app-border: rgba(148, 163, 184, 0.14);
    --app-border-strong: rgba(148, 163, 184, 0.22);
    --app-text: #ebf1fa;
    --app-muted: #9fb0c8;
    --app-accent: #63a3ff;
    --app-accent-strong: #7bb2ff;
    --app-accent-soft: rgba(99, 163, 255, 0.14);
    --app-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    --app-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.24);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 20%),
        linear-gradient(180deg, var(--app-bg-soft) 0%, var(--app-bg) 100%);
}

.app-shell {
    width: 100%;
    max-width: none;
    padding-left: clamp(16px, 2.4vw, 32px);
    padding-right: clamp(16px, 2.4vw, 32px);
}

.app-brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.app-topnav,
.app-mobilebar {
    background: linear-gradient(135deg, #2469eb 0%, #1f58d6 100%);
    color: #ffffff;
}

.app-topnav .navbar-brand,
.app-mobilebar-brand {
    color: #ffffff;
    text-decoration: none;
}

.app-topnav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-topnav .nav-link:hover,
.app-topnav .nav-link:focus,
.app-topnav .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.app-topnav-links {
    gap: 0.15rem;
}

.app-topnav-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.92);
}

.app-main-content {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

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

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

.app-content {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 280px;
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem 1rem;
    background: linear-gradient(180deg, rgba(24, 76, 189, 0.96), rgba(21, 57, 145, 0.98));
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 14px 0 40px rgba(12, 29, 73, 0.18);
    transition: width 0.22s ease, flex-basis 0.22s ease, padding 0.22s ease;
    z-index: 1030;
}

[data-bs-theme="dark"] .app-sidebar {
    background: linear-gradient(180deg, rgba(15, 27, 51, 0.98), rgba(10, 18, 35, 0.98));
    border-right-color: rgba(148, 163, 184, 0.12);
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.26);
}

.app-sidebar-header,
.app-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-sidebar-header {
    justify-content: space-between;
    min-height: 3rem;
}

.app-sidebar-brand {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.app-sidebar-toggle,
.app-sidebar-user-toggle {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 0.9rem;
}

.app-sidebar-toggle:hover,
.app-sidebar-user-toggle:hover,
.app-sidebar-toggle:focus,
.app-sidebar-user-toggle:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-height: 0;
}

.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    border-radius: 1rem;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.app-sidebar-group-toggle {
    width: 100%;
    border: 0;
    text-align: left;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.84) !important;
    appearance: none;
    -webkit-appearance: none;
}

.app-sidebar-group-toggle:hover,
.app-sidebar-group-toggle:focus,
.app-sidebar-group-toggle.active,
.app-sidebar-group-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.app-sidebar-chevron {
    margin-left: auto;
    opacity: 0.72;
}

.app-sidebar-subnav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.25rem 0 0.45rem 0.7rem;
}

.app-sidebar-sublink {
    min-height: 2.55rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    font-size: 0.94rem;
}

.app-sidebar-link:hover,
.app-sidebar-link:focus,
.app-sidebar-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateX(2px);
}

.app-sidebar-icon {
    width: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    flex: 0 0 1.6rem;
}

.app-sidebar-label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar-footer {
    flex-direction: column;
    align-items: stretch;
    margin-top: auto;
}

.app-sidebar-version {
    padding: 0.3rem 0.55rem;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.84rem;
}

.app-sidebar-user-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 0.7rem 0.85rem;
}

.app-frame.is-sidebar-collapsed .app-sidebar {
    width: 92px;
    flex-basis: 92px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.app-frame.is-sidebar-collapsed .app-sidebar-label,
.app-frame.is-sidebar-collapsed .app-sidebar-version {
    display: none;
}

.app-frame.is-sidebar-collapsed .app-sidebar-brand,
.app-frame.is-sidebar-collapsed .app-sidebar-user-toggle,
.app-frame.is-sidebar-collapsed .app-sidebar-link {
    justify-content: center;
}

.app-frame.is-sidebar-collapsed .app-sidebar-subnav {
    padding-left: 0;
}

.app-frame.is-sidebar-collapsed .app-sidebar-toggle {
    width: 100%;
}

.app-mobilebar {
    position: sticky;
    top: 0;
    z-index: 1025;
    padding: 0.75rem 0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.app-mobilebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
}

.app-mobile-offcanvas .offcanvas-header,
.app-mobile-offcanvas .offcanvas-body {
    background: var(--app-surface);
    color: var(--app-text);
}

.app-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.app-mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    text-decoration: none;
    color: var(--app-text);
    background: var(--app-surface-2);
}

.app-mobile-nav-link.active,
.app-mobile-nav-link:hover,
.app-mobile-nav-link:focus {
    color: var(--app-accent-strong);
    border-color: rgba(37, 99, 235, 0.26);
    background: var(--app-accent-soft);
}

.app-mobile-nav-group {
    display: grid;
    gap: 0.45rem;
}

.app-mobile-nav-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.25rem 0.1rem;
    color: var(--app-text-muted);
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
}

[data-bs-theme="dark"] .hero-card {
    background: linear-gradient(135deg, rgba(99, 163, 255, 0.12) 0%, rgba(20, 29, 46, 0.95) 90%);
}

.stat-card {
    border-left: 4px solid var(--app-accent);
}

.card,
.btn,
.form-control,
.form-select,
.input-group-text {
    border-radius: 1rem;
}

.card {
    border: 1px solid var(--app-border) !important;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-soft);
    overflow: hidden;
}

.card-header,
.card-footer,
.bg-white {
    background: var(--app-surface-2) !important;
    color: var(--app-text) !important;
}

.card-header,
.card-footer {
    border-color: var(--app-border) !important;
}

.table-responsive {
    width: 100%;
    border-radius: 1rem;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(15, 23, 42, 0.03);
    --bs-table-hover-bg: rgba(37, 99, 235, 0.05);
    --bs-table-border-color: var(--app-border);
    color: var(--app-text);
}

[data-bs-theme="dark"] .table {
    --bs-table-striped-bg: rgba(255, 255, 255, 0.018);
    --bs-table-hover-bg: rgba(99, 163, 255, 0.08);
}

.table-light,
.table > :not(caption) > * > .table-light {
    --bs-table-bg: color-mix(in srgb, var(--app-surface-2) 88%, transparent);
    --bs-table-color: var(--app-text);
    color: var(--app-text);
}

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

.table td {
    white-space: normal;
}

.info-list dt,
.text-secondary,
.form-text,
.mobile-meta,
.priority-summary {
    color: var(--app-muted) !important;
}

.info-list dt {
    font-weight: 600;
}

.info-list dd {
    margin-bottom: 0.75rem;
}

.form-control,
.form-select,
.input-group-text {
    border-color: var(--app-border);
    background: rgba(255, 255, 255, 0.72);
    color: var(--app-text);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
    background: rgba(11, 18, 32, 0.44);
}

.form-control::placeholder {
    color: color-mix(in srgb, var(--app-muted) 72%, transparent);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.14);
    background: rgba(255, 255, 255, 0.94);
    color: var(--app-text);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: rgba(11, 18, 32, 0.68);
    border-color: rgba(99, 163, 255, 0.45);
    box-shadow: 0 0 0 0.25rem rgba(99, 163, 255, 0.16);
}

.btn-primary {
    background: linear-gradient(135deg, var(--app-accent) 0%, var(--app-accent-strong) 100%);
    border-color: var(--app-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, color-mix(in srgb, var(--app-accent) 90%, white) 0%, var(--app-accent) 100%);
    border-color: var(--app-accent-strong);
}

.btn-outline-primary {
    color: var(--app-accent-strong);
    border-color: rgba(37, 99, 235, 0.35);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #ffffff;
    background: var(--app-accent);
    border-color: var(--app-accent);
}

.btn-outline-secondary {
    color: var(--app-text);
    border-color: var(--app-border-strong);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: var(--app-text);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.28);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.26);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.dropdown-menu {
    border-radius: 1rem;
    border-color: var(--app-border);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.dropdown-item,
.dropdown-item-text {
    color: var(--app-text);
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background: var(--app-accent-soft);
    color: var(--app-accent-strong);
}

.dropdown-divider {
    border-color: var(--app-border);
}

.alert {
    border-radius: 1rem;
    border-width: 1px;
}

[data-bs-theme="dark"] .alert-success {
    --bs-alert-color: #d1fae5;
    --bs-alert-bg: rgba(5, 46, 22, 0.9);
    --bs-alert-border-color: rgba(20, 83, 45, 0.95);
}

[data-bs-theme="dark"] .alert-warning {
    --bs-alert-color: #fef3c7;
    --bs-alert-bg: rgba(59, 47, 0, 0.9);
    --bs-alert-border-color: rgba(124, 93, 0, 0.95);
}

[data-bs-theme="dark"] .alert-danger {
    --bs-alert-color: #fecaca;
    --bs-alert-bg: rgba(63, 13, 18, 0.92);
    --bs-alert-border-color: rgba(127, 29, 29, 0.96);
}

.quick-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.applicant-id-input {
    width: 6.5rem;
}

.applicant-page-header {
    position: sticky;
    top: 0.75rem;
    z-index: 1020;
    padding: 1rem 1.15rem;
    border: 1px solid var(--app-border);
    border-radius: 1.25rem;
    background: color-mix(in srgb, var(--app-surface) 88%, transparent);
    box-shadow: var(--app-shadow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

[data-bs-theme="dark"] .applicant-page-header {
    background: color-mix(in srgb, var(--app-surface) 94%, transparent);
}

.applicant-page-header.is-desktop-fixed {
    position: fixed !important;
    z-index: 1045;
    margin-bottom: 0 !important;
    box-shadow: var(--app-shadow);
}

.applicant-page-header-spacer {
    display: none;
}

.quick-action-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.applicant-name-link {
    color: inherit;
}

.applicant-name-link:hover,
.applicant-name-link:focus {
    color: var(--app-accent-strong);
    text-decoration: underline !important;
}

.mobile-applicant-card,
.drive-folder-item {
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-soft);
}

.mobile-applicant-card .card-body {
    padding: 1rem;
}

.dashboard-grid .card-body {
    min-height: 124px;
}

.login-wrap {
    min-height: calc(100vh - 160px);
}

.drive-folder-list {
    max-height: 320px;
    overflow: auto;
}

.drive-folder-item {
    padding: 0.75rem 0.875rem;
}

.file-edit-table .form-control,
.file-edit-table .form-select {
    min-width: 140px;
}

.file-dropzone {
    min-height: 156px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1.25rem;
    border: 2px dashed var(--app-accent);
    border-radius: 1rem;
    background: var(--app-accent-soft);
    text-align: center;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.file-dropzone:hover,
.file-dropzone:focus,
.file-dropzone.is-dragover {
    opacity: 1;
    background: var(--app-surface);
    transform: translateY(-1px);
}

.file-dropzone-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--app-accent-soft);
    color: var(--app-accent-strong);
    font-size: 1.25rem;
}

.upload-file-list {
    display: grid;
    gap: 0.85rem;
}

.upload-file-row {
    padding: 1rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-soft);
}

.floating-save-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--app-shadow);
    opacity: 0.65;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-save-btn:hover,
.floating-save-btn:focus {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
    background: var(--app-accent-strong);
}

.upload-file-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.dictionary-badge-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dictionary-table .dictionary-col-id {
    width: 72px;
}

.dictionary-table .dictionary-col-value {
    min-width: 320px;
}

.dictionary-table .dictionary-col-color {
    min-width: 300px;
}

.dictionary-table .dictionary-col-active {
    width: 150px;
}

.dictionary-table .dictionary-col-actions {
    width: 250px;
}

.dictionary-table td {
    vertical-align: middle;
}

.dictionary-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.dictionary-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.dictionary-color-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dictionary-color-option-custom {
    align-items: stretch;
}

.dictionary-color-swatch {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dictionary-color-option:hover .dictionary-color-swatch,
.dictionary-color-option input:checked + .dictionary-color-swatch {
    transform: scale(1.06);
    border-color: var(--app-accent);
    box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.14);
}

.dictionary-color-custom-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.12rem;
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.12);
    background: var(--app-surface);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dictionary-color-picker {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.dictionary-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 999px;
}

.dictionary-color-picker::-webkit-color-swatch,
.dictionary-color-picker::-moz-color-swatch {
    border: 0;
    border-radius: 999px;
}

.dictionary-color-swatch.is-empty {
    position: relative;
    background:
        linear-gradient(135deg, transparent 0%, transparent 45%, rgba(220, 38, 38, 0.92) 46%, rgba(220, 38, 38, 0.92) 54%, transparent 55%, transparent 100%),
        linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
}

[data-bs-theme="dark"] .dictionary-color-swatch {
    border-color: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] .dictionary-color-option:hover .dictionary-color-swatch,
[data-bs-theme="dark"] .dictionary-color-option input:checked + .dictionary-color-swatch {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 0.22rem rgba(99, 163, 255, 0.18);
}

.dictionary-color-option:hover .dictionary-color-custom-wrap,
.dictionary-color-option input:checked + .dictionary-color-custom-wrap {
    transform: scale(1.06);
    border-color: var(--app-accent);
    box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.14);
}

[data-bs-theme="dark"] .dictionary-color-option:hover .dictionary-color-custom-wrap,
[data-bs-theme="dark"] .dictionary-color-option input:checked + .dictionary-color-custom-wrap {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 0.22rem rgba(99, 163, 255, 0.18);
}

[data-bs-theme="dark"] .dictionary-color-swatch.is-empty {
    background:
        linear-gradient(135deg, transparent 0%, transparent 45%, rgba(248, 113, 113, 0.96) 46%, rgba(248, 113, 113, 0.96) 54%, transparent 55%, transparent 100%),
        linear-gradient(180deg, #1b2740 0%, #101827 100%);
}

[data-bs-theme="dark"] .dictionary-color-custom-wrap {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(11, 18, 32, 0.44);
}

.settings-card {
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.settings-card:hover,
.settings-card:focus {
    transform: translateY(-2px);
    box-shadow: var(--app-shadow);
    border-color: rgba(37, 99, 235, 0.22) !important;
}

.settings-card-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 1rem;
    color: var(--app-accent-strong);
    background: var(--app-accent-soft);
    font-size: 1.3rem;
}

.ranking-scenario-card {
    width: 100%;
    padding: 1rem 1.1rem;
    text-align: left;
    color: var(--app-text);
    background: var(--app-surface);
    border: 1px solid var(--app-border) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.ranking-scenario-card:hover,
.ranking-scenario-card:focus {
    transform: translateY(-2px);
    box-shadow: var(--app-shadow);
    border-color: rgba(37, 99, 235, 0.24) !important;
}

.ranking-scenario-card.is-active {
    border-color: rgba(37, 99, 235, 0.38) !important;
    background: color-mix(in srgb, var(--app-accent-soft) 72%, var(--app-surface));
}

.ranking-scenario-title {
    display: block;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.ranking-scenario-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge.bg-light.text-dark {
    border: 1px solid var(--app-border);
}

[data-bs-theme="dark"] .badge.bg-light.text-dark {
    background-color: rgba(148, 163, 184, 0.14) !important;
    color: var(--app-text) !important;
}

.mono-small {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.86rem;
}

.section-anchor {
    scroll-margin-top: 6rem;
}

.app-footer {
    margin-top: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--app-border);
    background: transparent;
}

.app-footer-top {
    padding-left: clamp(16px, 2.4vw, 32px);
    padding-right: clamp(16px, 2.4vw, 32px);
}

a {
    color: var(--app-accent-strong);
}

a:hover {
    color: color-mix(in srgb, var(--app-accent-strong) 88%, white);
}

.navbar-brand {
    letter-spacing: 0.02em;
}

.form-label {
    font-weight: 600;
}

.app-inline-toggle {
    min-height: calc(2.375rem + 2px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-inline-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.applicant-mini-toggle {
    min-width: 104px;
    border-radius: 999px;
    padding-inline: 0.85rem;
}

.service-grid-compact .form-label {
    margin-bottom: 0.35rem;
}

.privilege-row {
    padding-top: 0.15rem;
}

.privilege-inline-toggle {
    min-height: calc(2.375rem + 2px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--app-surface-2) 88%, transparent);
}

.privilege-inline-toggle .form-check-input {
    margin-top: 0;
    float: none;
    margin-left: 0;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.applicant-actions-cell {
    min-width: 150px;
    display: grid;
    gap: 0.45rem;
    justify-items: stretch;
}

.applicant-actions-cell .quick-action-btn {
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0.25rem 0.55rem;
}

.checklist-compact .compact-check {
    margin: 0;
    min-height: 100%;
    padding: 0.65rem 0.8rem 0.65rem 2rem;
    border: 1px solid var(--app-border);
    border-radius: 0.95rem;
    background: color-mix(in srgb, var(--app-surface-2) 84%, transparent);
}

.checklist-compact .compact-check .form-check-input {
    margin-left: -1.25rem;
}

.checklist-compact .compact-check .form-check-label {
    font-size: 0.93rem;
    line-height: 1.3;
}

.exam-group-select {
    min-width: 8.5rem;
}

.floating-save-btn {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 999px;
    opacity: 0.14;
    background: color-mix(in srgb, var(--app-accent) 38%, transparent);
    border-color: rgba(37, 99, 235, 0.16);
    backdrop-filter: blur(4px);
    box-shadow: var(--app-shadow);
    transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.floating-save-btn i {
    font-size: 1rem;
}

.floating-save-btn:hover,
.floating-save-btn:focus {
    opacity: 0.94;
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.52);
    background: color-mix(in srgb, var(--app-accent) 88%, white);
}

.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle,
.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle.collapsed,
.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle:not(.collapsed),
.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle.active {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: none !important;
    outline: none !important;
}

.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle:hover,
.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle:focus,
.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle:focus-visible,
.app-sidebar button.app-sidebar-link.app-sidebar-group-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.34) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 10px 22px rgba(5, 18, 54, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    transform: translateY(-1px);
}

.applicant-edit-screen .applicant-edit-form > fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card {
    margin: 0;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(1),
.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(6),
.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(7) {
    grid-column: 1 / -1;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(2) {
    order: 2;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(5) {
    order: 3;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(3) {
    order: 4;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(4) {
    order: 5;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(6) {
    order: 6;
}

.applicant-edit-screen .applicant-edit-form > fieldset > .card:nth-child(7) {
    order: 7;
}

.applicant-edit-screen .card-header {
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid var(--app-border) !important;
}

.applicant-edit-screen .card-body {
    padding: 1.15rem 1.25rem;
}

.applicant-edit-screen .form-label {
    margin-bottom: 0.35rem;
    color: var(--app-muted);
    font-size: 0.82rem;
}

.applicant-edit-screen .form-control,
.applicant-edit-screen .form-select {
    min-height: 2.35rem;
    border-radius: 0.9rem;
}

.applicant-edit-screen .applicant-edit-form > .page-actions {
    margin-top: 0.25rem;
}

@media (max-width: 1199.98px) {
    .app-topnav .navbar-collapse {
        padding-top: 1rem;
    }

    .applicant-edit-screen .applicant-edit-form > fieldset {
        grid-template-columns: 1fr;
    }

    .applicant-edit-screen .applicant-edit-form > fieldset > .card {
        grid-column: 1 / -1;
    }

    .app-topnav-meta {
        margin-top: 0.75rem;
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .service-inline-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .applicant-mini-toggle {
        width: 100%;
    }

    .floating-save-btn {
        right: 1rem;
        bottom: 1rem;
    }

    .applicant-page-header {
        top: 5.25rem;
        padding: 0.9rem 1rem;
    }

}

@media (max-width: 767.98px) {
    .table-responsive {
        border-radius: 1rem;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-stack {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .applicant-page-header {
        position: static !important;
        top: auto !important;
    }
}
