:root {
    --page: #f4f6f2;
    --surface: #ffffff;
    --surface-soft: #f8faf7;
    --ink: #17202f;
    --muted: #667085;
    --line: #dfe6dc;
    --teal: #0f766e;
    --teal-dark: #115e59;
    --amber: #b7791f;
    --coral: #c0523a;
    --indigo: #344767;
    --shadow: 0 18px 45px rgba(31, 41, 55, .08);
    --shadow-soft: 0 8px 24px rgba(31, 41, 55, .06);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.admin-shell {
    background:
        linear-gradient(180deg, rgba(15, 118, 110, .08), transparent 240px),
        var(--page);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

body.admin-shell h1,
body.admin-shell h2,
body.admin-shell h3,
body.admin-shell h4,
body.admin-shell h5,
body.admin-shell p,
body.admin-shell div,
body.admin-shell span,
body.admin-shell a,
body.admin-shell td,
body.admin-shell th,
.login-page h1,
.login-page h2,
.login-page p,
.login-page div,
.login-page span,
.login-page label,
.login-page button {
    overflow-wrap: anywhere;
}

.text-muted {
    color: #4f5f73 !important;
}

body.theme-indigo {
    --teal: #344767;
    --teal-dark: #26364f;
    --amber: #0f766e;
}

body.theme-amber {
    --teal: #b7791f;
    --teal-dark: #8a5200;
    --amber: #0f766e;
}

body.theme-dark {
    --page: #0b1120;
    --surface: #111827;
    --surface-soft: #172033;
    --ink: #e5eefb;
    --muted: #a9b6c8;
    --line: #334155;
    --teal: #14b8a6;
    --teal-dark: #5eead4;
    --amber: #fbbf24;
    --coral: #fb7185;
    --indigo: #93c5fd;
    --shadow: 0 18px 45px rgba(0, 0, 0, .28);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, .22);
    background:
        radial-gradient(circle at 20% 0%, rgba(20, 184, 166, .18), transparent 340px),
        linear-gradient(180deg, rgba(59, 130, 246, .1), transparent 260px),
        var(--page);
    color: var(--ink);
}

body.theme-dark .sidebar,
body.theme-dark .topbar,
body.theme-dark .card,
body.theme-dark .mini-stat,
body.theme-dark .setting-group,
body.theme-dark .record-list,
body.theme-dark .admin-modal-card,
body.theme-dark .quick-panel,
body.theme-dark .setup-step,
body.theme-dark .rich-editor,
body.theme-dark .multi-select-menu,
body.theme-dark .empty-state {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .topbar,
body.theme-dark .module-hero,
body.theme-dark .setup-main-tabs {
    background: rgba(17, 24, 39, .88);
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .module-hero {
    background:
        linear-gradient(135deg, rgba(20, 184, 166, .16), rgba(30, 41, 59, .96)),
        var(--surface);
}

body.theme-dark .brand-block,
body.theme-dark .admin-modal-header,
body.theme-dark .setting-group-header,
body.theme-dark .rich-toolbar,
body.theme-dark .table thead th {
    background: var(--surface-soft);
    border-color: var(--line);
}

body.theme-dark .brand-title,
body.theme-dark .page-title,
body.theme-dark .card h2,
body.theme-dark .card h3,
body.theme-dark .card .h5,
body.theme-dark .module-hero h2,
body.theme-dark .setting-group-header h3,
body.theme-dark .admin-modal-header h2,
body.theme-dark .table td,
body.theme-dark .table thead th,
body.theme-dark .record-row strong,
body.theme-dark .mini-record span,
body.theme-dark .user-name,
body.theme-dark .form-label {
    color: var(--ink);
}

body.theme-dark .text-muted,
body.theme-dark .brand-subtitle,
body.theme-dark .user-role,
body.theme-dark .module-hero .hero-meta,
body.theme-dark .empty-state,
body.theme-dark .setup-step p,
body.theme-dark .small.text-muted {
    color: var(--muted) !important;
}

body.theme-dark .dashboard-strip > div,
body.theme-dark .dashboard-status-list > div,
body.theme-dark .dashboard-list > div:not(.empty-state) {
    background: rgba(15, 23, 42, .74);
    border-color: var(--line);
}

body.theme-dark .dashboard-strip span,
body.theme-dark .dashboard-status-list span,
body.theme-dark .dashboard-list span,
body.theme-dark .mini-stat span,
body.theme-dark .mini-stat small {
    color: var(--muted) !important;
}

body.theme-dark .dashboard-strip strong,
body.theme-dark .dashboard-status-list strong,
body.theme-dark .dashboard-list strong {
    color: var(--ink);
}

body.theme-dark .nav-section {
    color: #94a3b8;
}

body.theme-dark .sidebar a {
    color: #d7e2f0;
}

body.theme-dark .sidebar a:hover {
    background: #1e293b;
    color: #ccfbf1;
}

body.theme-dark .sidebar a.active {
    background: var(--teal);
    color: #06231f;
}

body.theme-dark .nav-icon {
    background: #1e293b;
    color: #99f6e4;
}

body.theme-dark .sidebar a.active .nav-icon {
    background: rgba(6, 35, 31, .2);
    color: #06231f;
}

body.theme-dark .brand-mark.has-image,
body.theme-dark .user-avatar {
    background: #0f172a;
    border-color: var(--line);
    color: #fcd34d;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .multi-select-button,
body.theme-dark .rich-editor-area {
    background-color: #0f172a;
    border-color: #42526a;
    color: var(--ink);
}

body.theme-dark .form-control::placeholder {
    color: #94a3b8;
}

body.theme-dark .form-select {
    color-scheme: dark;
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus,
body.theme-dark .multi-select.open .multi-select-button {
    border-color: var(--teal);
    box-shadow: 0 0 0 .2rem rgba(20, 184, 166, .22);
}

body.theme-dark .form-check,
body.theme-dark .setting-item .form-check,
body.theme-dark .boolean-toggle,
body.theme-dark .setting-file-preview,
body.theme-dark .mini-record,
body.theme-dark .login-flow-step {
    background: #111c2e;
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .boolean-toggle span {
    color: #cbd5e1;
}

body.theme-dark .boolean-toggle.is-enabled [data-toggle-on],
body.theme-dark .boolean-toggle.is-disabled [data-toggle-off],
body.theme-dark .btn-primary {
    background: var(--teal);
    border-color: var(--teal);
    color: #05201d;
}

body.theme-dark .btn-primary:hover,
body.theme-dark .btn-primary:focus {
    background: #2dd4bf;
    border-color: #2dd4bf;
    color: #031a17;
}

body.theme-dark .btn-outline-primary,
body.theme-dark .btn-outline-secondary {
    background: #0f172a;
    border-color: #475569;
    color: #ccfbf1;
}

body.theme-dark .btn-outline-primary:hover,
body.theme-dark .btn-outline-secondary:hover {
    background: #1e293b;
    color: #fff;
}

body.theme-dark .btn-outline-danger {
    background: #1f1215;
    border-color: #fb7185;
    color: #fecdd3;
}

body.theme-dark .table {
    color: var(--ink);
}

body.theme-dark .table td {
    border-color: #263548;
}

body.theme-dark .table tbody tr:hover {
    background: rgba(20, 184, 166, .08);
}

body.theme-dark .tab-button,
body.theme-dark .rich-toolbar button,
body.theme-dark .multi-select-option {
    background: #0f172a;
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .tab-button:hover,
body.theme-dark .multi-select-option:hover,
body.theme-dark .rich-toolbar button:hover {
    background: #1e293b;
    color: #ccfbf1;
}

body.theme-dark .tab-button.active,
body.theme-dark .multi-select-option.selected {
    background: var(--teal);
    border-color: var(--teal);
    color: #05201d;
}

body.theme-dark .tab-button span {
    background: #1e293b;
    color: #99f6e4;
}

body.theme-dark .tab-button.active span {
    background: rgba(6, 35, 31, .18);
    color: #05201d;
}

body.theme-dark .status-pill,
body.theme-dark .badge.bg-secondary {
    background: rgba(20, 184, 166, .16) !important;
    color: #99f6e4;
}

body.theme-dark .status-pill.warning {
    background: rgba(251, 191, 36, .15);
    color: #fde68a;
}

body.theme-dark .status-pill.danger {
    background: rgba(251, 113, 133, .16);
    color: #fecdd3;
}

body.theme-dark .alert-success {
    background: #063a34;
    color: #ccfbf1;
}

body.theme-dark .alert-danger {
    background: #3f141c;
    color: #fecdd3;
}

body.theme-dark .filter-chip {
    background: #111827;
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .filter-chip strong {
    color: #99f6e4;
}

body.theme-dark .contact-message-preview {
    color: #d7e2f0;
}

body.theme-dark .contact-thread {
    background: #0f172a;
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .page-link {
    background: #0f172a;
    border-color: var(--line);
    color: #ccfbf1;
}

body.theme-dark .active > .page-link,
body.theme-dark .page-link.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #05201d;
}

body.login-page.theme-dark {
    background:
        radial-gradient(circle at 24% 20%, rgba(20, 184, 166, .16), transparent 360px),
        linear-gradient(135deg, #07111f, #0f172a 48%, #111827);
    color: #e5eefb;
}

body.login-page.theme-dark .login-card {
    background: #111827;
    border-color: #334155;
    color: #e5eefb;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
}

body.login-page.theme-dark .login-header {
    background: rgba(17, 24, 39, .9);
    border-color: #334155;
    color: #e5eefb;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
}

body.login-page.theme-dark .login-header-brand,
body.login-page.theme-dark .login-header-brand:hover {
    color: #f8fafc;
}

body.login-page.theme-dark .login-title,
body.login-page.theme-dark .brand-title,
body.login-page.theme-dark .form-label,
body.login-page.theme-dark .form-check-label {
    color: #f8fafc;
}

body.login-page.theme-dark .login-copy,
body.login-page.theme-dark .brand-subtitle,
body.login-page.theme-dark .small.text-muted {
    color: #b6c4d7 !important;
}

body.login-page.theme-dark .login-card .form-check {
    background: transparent;
    border: 0;
    color: #f8fafc;
    padding: 0 0 0 1.6rem;
}

body.login-page.theme-dark .login-card .form-check-input {
    background-color: #0f172a;
    border-color: #64748b;
}

body.login-page.theme-dark .login-card .form-check-input:checked {
    background-color: var(--teal);
    border-color: var(--teal);
}

body.login-page.theme-dark .login-card .brand-mark.has-image {
    background: #0f172a;
    border-color: #475569;
}

body.density-compact .sidebar a {
    padding: 7px 9px;
    margin-bottom: 2px;
}

body.density-compact .nav-icon {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

body.density-compact .nav-section {
    margin-top: 12px;
}

.app-layout {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #fbfcfa;
    border-right: 1px solid var(--line);
    padding: 20px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--teal), var(--amber));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    flex: 0 0 auto;
}

.brand-mark.has-image {
    background: #fff;
    border: 1px solid var(--line);
    padding: 5px;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-title {
    font-weight: 800;
    font-size: 18px;
    line-height: 1.1;
    color: var(--ink);
}

.brand-subtitle {
    color: #536176;
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.35;
}

.nav-section {
    color: #66745f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 18px 10px 7px;
}

.sidebar a {
    color: #324054;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 8px;
    font-weight: 650;
    margin-bottom: 4px;
    transition: background .16s ease, color .16s ease, transform .16s ease;
    line-height: 1.25;
}

.sidebar a:hover {
    background: #edf4f1;
    color: var(--teal-dark);
    transform: translateX(2px);
}

.sidebar a.active {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 118, 110, .22);
}

.nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    background: #eef3ea;
    color: var(--teal-dark);
    flex: 0 0 auto;
}

.sidebar a.active .nav-icon {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.content-shell {
    min-width: 0;
    padding: 24px;
}

.admin-footer {
    color: #526176;
    font-size: 13px;
    line-height: 1.45;
    margin-top: 24px;
    padding: 16px 4px 4px;
    text-align: center;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(223, 230, 220, .95);
    border-radius: 8px;
    padding: 16px 18px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    margin-bottom: 22px;
}

.page-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.18;
    font-weight: 800;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff4df;
    color: #8a5200;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
}

.user-role {
    color: #536176;
    font-size: 12px;
    margin-top: -2px;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    border-width: 1px;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
}

.btn-primary {
    background: var(--teal);
    border-color: var(--teal);
    box-shadow: 0 10px 18px rgba(15, 118, 110, .16);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
}

.btn-outline-primary {
    color: var(--teal-dark);
    border-color: rgba(15, 118, 110, .38);
}

.btn-outline-primary:hover {
    background: var(--teal);
    border-color: var(--teal);
}

.btn-outline-secondary,
.btn-outline-danger {
    background: #fff;
}

.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    min-width: 0;
}

.card:has(> .table) {
    overflow-x: auto;
}

.card > .table {
    min-width: 720px;
}

.card h2,
.card h3,
.card .h5 {
    font-weight: 800;
}

.card.p-3,
.card.p-4 {
    padding: 20px !important;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--teal);
}

.stat-card .text-muted {
    color: #526176 !important;
    font-weight: 700;
}

.stat-card .fs-3 {
    font-size: 34px !important;
    font-weight: 850 !important;
}

.table-responsive,
.card > .table-responsive {
    border-radius: 8px;
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    color: var(--ink);
}

.table thead th {
    background: var(--surface-soft);
    color: #3f4d61;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    white-space: normal;
    line-height: 1.3;
}

.table td {
    padding: 14px 16px;
    vertical-align: middle;
    border-color: #edf1ea;
    color: #243044;
    line-height: 1.45;
    white-space: normal;
}

.table tbody tr:hover {
    background: #fbf6ea;
}

.form-label {
    color: #303c4f;
    font-weight: 750;
    font-size: 13px;
    line-height: 1.35;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #d7dfd4;
    min-height: 42px;
    color: var(--ink);
    line-height: 1.45;
    max-width: 100%;
    min-width: 0;
}

.form-control::placeholder {
    color: #68768a;
    opacity: 1;
}

textarea.form-control {
    min-height: 104px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .12);
}

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

.toggle-enhanced {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: auto;
    max-width: 100%;
}

.toggle-enhanced .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.boolean-toggle {
    flex: 0 0 auto;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef3ea;
    padding: 3px;
    min-width: 150px;
}

.toggle-enhanced .form-check-label {
    flex: 0 0 auto;
    min-width: 68px;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

.boolean-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 6px;
    padding: 0 10px;
    color: #526176;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

.boolean-toggle.is-enabled [data-toggle-on],
.boolean-toggle.is-disabled [data-toggle-off] {
    background: var(--teal);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.badge {
    border-radius: 8px;
    padding: 7px 9px;
    font-weight: 750;
    white-space: normal;
    line-height: 1.2;
}

.badge.bg-secondary {
    background: #e8f1ed !important;
    color: var(--teal-dark);
}

.alert {
    border-radius: 8px;
    border: 0;
    box-shadow: var(--shadow-soft);
}

.pagination {
    gap: 4px;
}

.page-link {
    border-radius: 8px !important;
    color: var(--teal-dark);
    border-color: var(--line);
}

.active > .page-link,
.page-link.active {
    background: var(--teal);
    border-color: var(--teal);
}

.section-grid {
    display: grid;
    gap: 18px;
}

.quick-panel {
    background: linear-gradient(135deg, #ffffff, #f5faf7);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.module-hero {
    border: 1px solid var(--line);
    background: linear-gradient(135deg, #ffffff 0%, #f1f8f4 100%);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
}

.module-hero h2 {
    font-size: 22px;
    font-weight: 850;
    margin: 0;
    line-height: 1.25;
}

.module-hero .hero-meta {
    color: #526176;
    font-weight: 650;
    margin-top: 5px;
    line-height: 1.5;
}

.mini-stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    height: 100%;
}

.mini-stat span {
    display: block;
    color: #526176;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.3;
}

.mini-stat strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
    margin-top: 3px;
}

.mini-stat small {
    display: block;
    margin-top: 6px;
    line-height: 1.35;
}

.dashboard-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-strip > div,
.dashboard-status-list > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    padding: 13px 14px;
    min-width: 0;
}

.dashboard-strip span,
.dashboard-status-list span {
    display: block;
    color: #526176;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.dashboard-strip strong,
.dashboard-status-list strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dashboard-status-list {
    display: grid;
    gap: 10px;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-list > div:not(.empty-state) {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    padding: 12px 14px;
    min-width: 0;
}

.dashboard-list strong {
    display: block;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.3;
}

.dashboard-list span {
    display: block;
    margin-top: 3px;
    color: #526176;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.panel-title h2,
.panel-title h3 {
    margin: 0;
}

.soft-divider {
    border-top: 1px solid var(--line);
    margin: 18px 0;
}

.tab-workspace {
    min-width: 0;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tab-button {
    border: 1px solid var(--line);
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.tab-button:hover {
    background: #edf4f1;
    color: var(--teal-dark);
    border-color: rgba(15, 118, 110, .28);
    transform: translateY(-1px);
}

.tab-button.active {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 118, 110, .18);
}

.tab-button span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 8px;
    background: #eef3ea;
    color: var(--teal-dark);
    font-size: 12px;
}

.tab-button.active span {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-modal:target,
.admin-modal.open {
    display: flex;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(3px);
}

.admin-modal-card {
    position: relative;
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    padding: 20px;
    text-align: left;
}

.admin-modal-card.wide {
    width: min(960px, calc(100vw - 32px));
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.admin-modal-header h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 850;
}

.admin-modal-close {
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.modal-form-grid > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
}

.modal-span-2,
.admin-modal-actions {
    grid-column: 1 / -1;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 6px;
}

.contact-message-preview {
    max-width: 360px;
    color: #334155;
    line-height: 1.5;
}

.contact-thread {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 14px;
}

.contact-thread strong {
    display: block;
    margin-bottom: 6px;
}

.contact-thread p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
}

.setup-main-tabs {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(248, 250, 247, .92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.nested-tabs {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.setting-tab-nav {
    position: sticky;
    top: 78px;
    display: grid;
    gap: 8px;
    margin-bottom: 0;
}

.setting-tab-nav .tab-button {
    justify-content: space-between;
    width: 100%;
    text-align: left;
}

.setting-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.setting-group-header {
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
}

.setting-group-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 850;
    text-transform: capitalize;
    line-height: 1.3;
}

.setting-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
    min-width: 0;
}

.setting-item {
    min-width: 0;
}

.setting-item textarea.form-control {
    min-height: 118px;
}

.setting-item .form-check {
    padding: 12px 12px 12px 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    line-height: 1.35;
}

.setting-item .form-check.toggle-enhanced {
    padding: 12px;
    width: 100%;
    justify-content: space-between;
}

.setting-file-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 12px;
    margin-bottom: 10px;
}

.setting-file-preview img {
    width: 92px;
    height: 58px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.rich-source {
    display: none;
}

.rich-editor {
    border: 1px solid #d7dfd4;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.rich-toolbar button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #334155;
    display: inline-grid;
    place-items: center;
}

.rich-toolbar button:hover {
    background: #edf4f1;
    color: var(--teal-dark);
}

.rich-editor-area {
    min-height: 130px;
    padding: 12px;
    outline: 0;
    line-height: 1.55;
    color: var(--ink);
}

.rich-editor-area img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 8px;
}

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

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

.multi-select-source {
    display: none;
}

.multi-select {
    position: relative;
    min-width: 0;
}

.multi-select-button {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d7dfd4;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 8px 38px 8px 12px;
    text-align: left;
    line-height: 1.35;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.multi-select-button::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #526176;
    border-bottom: 2px solid #526176;
    transform: translateY(-65%) rotate(45deg);
}

.multi-select.open .multi-select-button {
    border-color: var(--teal);
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .12);
}

.multi-select-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 10px;
}

.multi-select.open .multi-select-menu {
    display: block;
}

.multi-select-search {
    margin-bottom: 8px;
}

.multi-select-list {
    display: grid;
    gap: 5px;
    max-height: 240px;
    overflow-y: auto;
}

.multi-select-option {
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    padding: 8px 10px;
    text-align: left;
    line-height: 1.25;
}

.multi-select-option:hover {
    background: #edf4f1;
}

.multi-select-option.selected {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.multi-select-empty {
    color: #526176;
    padding: 10px;
    text-align: center;
}


.record-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.record-row:last-child {
    border-bottom: 0;
}

.mini-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 8px 10px;
}

.empty-state {
    border: 1px dashed #c9d6c4;
    border-radius: 8px;
    padding: 28px;
    text-align: center;
    color: #526176;
    background: rgba(255, 255, 255, .65);
    line-height: 1.5;
}

.setup-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.setup-step {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 15px;
    min-height: 130px;
}

.setup-step span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
    font-weight: 850;
    margin-bottom: 10px;
}

.setup-step strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.3;
}

.setup-step p {
    color: #526176;
    font-size: 13px;
    margin: 0;
    line-height: 1.45;
}

.report-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.report-filter-panel {
    overflow: visible;
}

.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 14px;
}

.report-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #334155;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.25;
}

.filter-chip strong {
    color: var(--teal-dark);
    font-size: 11px;
    text-transform: uppercase;
}

.report-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.report-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #e8f1ed;
    color: var(--teal-dark);
    font-size: 20px;
    flex: 0 0 auto;
}

.report-card-actions,
.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.report-card-actions {
    margin-top: auto;
}

.report-table-card .table {
    min-width: 1040px;
}

.report-table-payroll .table {
    min-width: 1680px;
}

body.admin-shell .report-table th,
body.admin-shell .report-table td {
    overflow-wrap: normal;
    word-break: normal;
}

body.admin-shell .report-table th {
    min-width: 112px;
}

body.admin-shell .report-table th:first-child,
body.admin-shell .report-table td:first-child {
    min-width: 118px;
}

body.admin-shell .report-table th:nth-child(2),
body.admin-shell .report-table td:nth-child(2),
body.admin-shell .report-table th:nth-child(3),
body.admin-shell .report-table td:nth-child(3) {
    min-width: 150px;
}

.report-table td {
    max-width: 360px;
}

.numeric-cell,
.money-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.admin-shell .money-cell,
body.admin-shell .money-value {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

body.admin-shell .report-table .money-cell {
    min-width: 150px;
}

body.admin-shell .report-table-payroll th:last-child,
body.admin-shell .report-table-payroll td:last-child {
    min-width: 420px;
    max-width: 420px;
}

.print-report-letterhead {
    display: none;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm 8mm;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.admin-shell {
        background: #fff !important;
        color: #111827 !important;
        font-size: 10px;
        line-height: 1.3;
        min-width: 0 !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .sidebar,
    .topbar,
    .admin-footer,
    .report-actions {
        display: none !important;
    }

    .print-report-letterhead {
        display: flex;
        justify-content: space-between;
        gap: 24px;
        align-items: flex-start;
        padding-bottom: 10px;
        margin-bottom: 14px;
        border-bottom: 2px solid #111827;
    }

    .print-report-letterhead h1 {
        margin: 0;
        font-size: 18px;
        line-height: 1.15;
        font-weight: 850;
    }

    .print-report-letterhead p {
        margin: 4px 0 0;
        color: #4b5563;
        font-size: 10px;
    }

    .print-report-letterhead div:last-child {
        text-align: right;
        min-width: 160px;
    }

    .print-report-letterhead strong,
    .print-report-letterhead span {
        display: block;
        line-height: 1.3;
    }

    .print-report-letterhead strong {
        font-size: 14px;
    }

    .print-report-letterhead span {
        color: #4b5563;
        font-size: 10px;
    }

    .app-layout {
        display: block;
        min-height: 0;
        width: 100% !important;
        overflow: visible !important;
    }

    .content-shell {
        padding: 0;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
    }

    .module-hero.report-print-header {
        border: 0 !important;
        padding: 0 0 10px !important;
        margin: 0 0 10px !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .module-hero.report-print-header .row {
        display: block;
    }

    .module-hero.report-print-header .col-lg-4 {
        display: none;
    }

    .module-hero.report-print-header h2 {
        font-size: 16px;
        margin: 0 0 4px;
    }

    .module-hero.report-print-header .hero-meta {
        font-size: 11px;
        color: #374151 !important;
        margin: 0;
    }

    .card {
        box-shadow: none !important;
        border-color: #cbd5e1 !important;
    }

    .report-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .report-summary-grid > [class*="col-"] {
        width: auto;
        max-width: none;
        padding: 0;
    }

    .report-summary-grid .card {
        min-height: 0;
        padding: 8px 10px !important;
        border-radius: 4px;
        break-inside: avoid;
    }

    .report-summary-grid .stat-card::before {
        width: 3px;
    }

    .report-summary-grid .text-muted {
        color: #374151 !important;
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .report-summary-grid .fs-4 {
        font-size: 16px !important;
        font-weight: 850;
        line-height: 1.15;
        margin-top: 3px;
        font-variant-numeric: tabular-nums;
        overflow-wrap: normal;
        word-break: normal;
    }

    .report-table-card,
    .table-responsive {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .report-table-card .table {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        font-size: 7.8px;
        border-collapse: collapse;
        table-layout: fixed;
        page-break-inside: auto;
    }

    .report-table-payroll .table {
        font-size: 7px;
    }

    .report-detail-card .table {
        font-size: 7px;
    }

    .report-table-attendance .table,
    .report-detail-card.report-table-payroll .table,
    .report-table-leave .table {
        font-size: 6.2px;
    }

    .report-table-lateness .table {
        font-size: 8px;
    }

    .table td,
    .table thead th {
        padding: 4px 5px;
        border: 1px solid #d1d5db !important;
        color: #111827 !important;
        vertical-align: top;
        white-space: normal !important;
        overflow: visible !important;
        overflow-wrap: anywhere;
        word-break: normal;
        hyphens: auto;
    }

    .table thead th {
        background: #f3f4f6 !important;
        font-size: 7.2px;
        line-height: 1.15;
    }

    .report-table-payroll .table thead th {
        font-size: 6.5px;
    }

    .report-table td {
        max-width: none;
    }

    .report-table th,
    .report-table td,
    .report-table th:first-child,
    .report-table td:first-child,
    .report-table th:nth-child(2),
    .report-table td:nth-child(2),
    .report-table th:nth-child(3),
    .report-table td:nth-child(3) {
        min-width: 0;
    }

    body.admin-shell .report-table-payroll th:last-child,
    body.admin-shell .report-table-payroll td:last-child {
        min-width: 0;
        max-width: none;
    }

    .numeric-cell,
    .money-cell {
        text-align: right !important;
        white-space: normal !important;
        font-variant-numeric: tabular-nums;
        overflow-wrap: normal;
    }

    .payroll-run-table .table th:nth-child(1),
    .payroll-run-table .table td:nth-child(1) {
        width: 10%;
    }

    .payroll-run-table .table th:nth-child(2),
    .payroll-run-table .table td:nth-child(2) {
        width: 14%;
    }

    .payroll-run-table .table th:nth-child(3),
    .payroll-run-table .table td:nth-child(3),
    .payroll-run-table .table th:nth-child(4),
    .payroll-run-table .table td:nth-child(4),
    .payroll-run-table .table th:nth-child(5),
    .payroll-run-table .table td:nth-child(5) {
        width: 12%;
    }

    .payroll-run-table .table th:nth-child(6),
    .payroll-run-table .table td:nth-child(6),
    .payroll-run-table .table th:nth-child(7),
    .payroll-run-table .table td:nth-child(7) {
        width: 9%;
    }

    .payroll-run-table .table th:nth-child(8),
    .payroll-run-table .table td:nth-child(8) {
        width: 22%;
    }

    .report-table thead {
        display: table-header-group;
    }

    .report-table tfoot {
        display: table-footer-group;
    }

    .report-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 8px;
    background: #e8f1ed;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
    line-height: 1.25;
    white-space: nowrap;
    text-align: center;
    overflow-wrap: normal;
    word-break: normal;
}

.status-pill.warning {
    background: #fff4df;
    color: #8a5200;
}

.status-pill.danger {
    background: #fdecea;
    color: #9f2f20;
}

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .12), rgba(183, 121, 31, .12)),
        #f5f4ef;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

.login-header {
    width: min(1840px, calc(100% - 72px));
    margin: 24px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.login-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.login-header-brand:hover {
    color: var(--ink);
}

.login-header-brand .brand-mark {
    width: 38px;
    height: 38px;
}

.login-header-brand .brand-title,
.login-header-brand .brand-subtitle {
    display: block;
}

.login-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.login-wrap {
    width: min(1840px, calc(100% - 72px));
    min-height: calc(100vh - 128px);
    margin: 20px auto 24px;
    display: grid;
    grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.login-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
}

.login-title {
    font-size: 28px;
    font-weight: 850;
    margin: 0;
    line-height: 1.2;
}

.login-copy {
    color: #526176;
    margin: 6px 0 24px;
    line-height: 1.5;
}

.login-visual {
    display: flex;
    align-items: stretch;
    padding: 36px 36px 36px 0;
}

.login-visual-inner {
    width: 100%;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .92), rgba(52, 71, 103, .92)),
        #173b3a;
    color: #fff;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
    min-height: 520px;
}

.login-visual-grid {
    position: relative;
    overflow: hidden;
}

.login-hero-kicker {
    color: rgba(255, 255, 255, .92);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.35;
}

.login-visual-inner h2 {
    font-size: 40px;
    line-height: 1.25;
    color: #fff;
}

.login-hero-copy {
    max-width: 720px;
    color: rgba(255, 255, 255, .92);
    font-size: 17px;
    line-height: 1.55;
    margin-bottom: 0;
}

.login-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.login-metric {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding: 16px;
}

.login-metric strong {
    display: block;
    font-size: 24px;
    line-height: 1.2;
    color: #fff;
}

.login-metric span {
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    line-height: 1.4;
}

.login-foot {
    color: rgba(255, 255, 255, .92);
    max-width: 620px;
    line-height: 1.5;
}

.login-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.login-flow-step {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    padding: 14px;
}

.login-flow-step span {
    display: block;
    color: rgba(255, 255, 255, .82);
    font-weight: 850;
    margin-bottom: 6px;
    line-height: 1.2;
}

.login-flow-step strong {
    display: block;
    color: #fff;
    line-height: 1.3;
}

@media (max-width: 1100px) {
    .app-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .app-layout,
    .login-wrap {
        grid-template-columns: 1fr;
    }

    .login-header,
    .login-wrap {
        width: min(100% - 32px, 1840px);
    }

    .login-header {
        margin-top: 16px;
    }

    .sidebar {
        position: static;
        height: auto;
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-scroll {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

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

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-shell {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .login-visual {
        display: none;
    }

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

    .nested-tabs {
        grid-template-columns: 1fr;
    }

    .setting-tab-nav {
        position: static;
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .setting-tab-nav .tab-button {
        width: auto;
        flex: 0 0 auto;
    }

    .setup-steps {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .login-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-header-actions,
    .login-header-actions .btn {
        width: 100%;
    }

    .setup-main-tabs {
        position: static;
    }

    .tab-button {
        flex: 1 1 100%;
    }

    .admin-modal {
        padding: 12px;
    }

    .admin-modal-card,
    .admin-modal-card.wide {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        padding: 16px;
    }

    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .topbar > .d-flex {
        width: 100%;
        align-items: flex-start !important;
        flex-direction: column;
    }

    .login-panel,
    .content-shell {
        padding: 14px;
    }

    .login-card,
    .module-hero,
    .card.p-3,
    .card.p-4 {
        padding: 16px !important;
    }

    .setting-grid {
        padding: 14px;
    }

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

    .report-filter-actions,
    .report-filter-actions .btn {
        width: 100%;
    }
}
