:root {
    --sh-brand: #00acac;
    --sh-brand-dark: #018a8b;
    --sh-navy: #101d2c;
    --sh-ink: #172b4d;
    --sh-text: #4b617a;
    --sh-muted: #728399;
    --sh-line: #e3e9ef;
    --sh-surface: #ffffff;
    --sh-background: #f5f8fb;
    --sh-danger: #d64545;
    --sh-radius-sm: 7px;
    --sh-radius: 12px;
    --sh-shadow: 0 10px 30px rgba(23, 43, 77, .07);
    --sh-header-height: 64px;
    --sh-sidebar-width: 250px;
}

html,
body {
    font-family: "Manrope", Arial, sans-serif !important;
}

body {
    color: var(--sh-text);
    background: var(--sh-background);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.btn, .navbar, .sidebar, .panel, .card, .table {
    font-family: "Manrope", Arial, sans-serif !important;
}

a {
    color: var(--sh-brand-dark);
}

a:hover,
a:focus {
    color: var(--sh-brand);
    text-decoration: none;
}

/* Application shell */
#page-container.page-container,
#page-container {
    min-height: 100vh;
}

.header {
    min-height: var(--sh-header-height);
    background: var(--sh-surface) !important;
    border-bottom: 1px solid var(--sh-line);
    box-shadow: 0 2px 10px rgba(23, 43, 77, .04);
}

.pace .pace-progress {
    top: calc(var(--sh-header-height) - 2px) !important;
    z-index: 1040 !important;
    height: 2px !important;
}

.pace .pace-activity {
    display: none !important;
}

.header .navbar-header {
    width: var(--sh-sidebar-width);
    min-height: var(--sh-header-height);
    display: flex;
    align-items: center;
    background: var(--sh-navy);
}

.header .navbar-brand {
    min-height: var(--sh-header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: #fff !important;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.header .navbar-brand span {
    color: #fff;
}

.header .navbar-brand em {
    margin-left: 8px;
    color: var(--sh-brand);
    font-style: normal;
}

.header .navbar-brand img {
    width: 32px;
    height: 32px;
    margin-right: 9px;
    padding: 0 !important;
    object-fit: contain;
}

.header .navbar-nav {
    min-height: var(--sh-header-height);
    align-items: center;
}

.header .navbar-user > a {
    min-height: var(--sh-header-height);
    display: flex !important;
    align-items: center;
    gap: 8px;
    color: var(--sh-ink) !important;
    font-weight: 700;
}

.header .navbar-user img {
    width: 34px !important;
    height: 34px !important;
    border: 2px solid #edf2f6;
    object-fit: cover;
}

.employee-profile-photo {
    aspect-ratio: 1 / 1;
    object-fit: cover !important;
    object-position: center;
    border-radius: 50% !important;
}

.header .dropdown-menu {
    padding: 8px;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius-sm);
    box-shadow: var(--sh-shadow);
}

.header .dropdown-item {
    padding: 9px 12px;
    border-radius: 5px;
    font-weight: 600;
}

.sidebar,
.sidebar-bg {
    width: var(--sh-sidebar-width);
    background: var(--sh-navy) !important;
}

.sidebar {
    position: fixed !important;
    top: var(--sh-header-height) !important;
    bottom: 0 !important;
    height: calc(100vh - var(--sh-header-height)) !important;
    overflow: hidden !important;
}

.sidebar > [data-scrollbar="true"],
.sidebar > .slimScrollDiv,
.sidebar > .slimScrollDiv > [data-scrollbar="true"] {
    height: 100% !important;
    max-height: 100% !important;
}

.sidebar > [data-scrollbar="true"],
.sidebar > .slimScrollDiv > [data-scrollbar="true"] {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #496176 transparent;
}

.sidebar > [data-scrollbar="true"]::-webkit-scrollbar,
.sidebar > .slimScrollDiv > [data-scrollbar="true"]::-webkit-scrollbar {
    width: 6px;
}

.sidebar > [data-scrollbar="true"]::-webkit-scrollbar-thumb,
.sidebar > .slimScrollDiv > [data-scrollbar="true"]::-webkit-scrollbar-thumb {
    background: #496176;
    border-radius: 999px;
}

.sidebar .nav-header {
    padding: 18px 20px 8px !important;
    color: #71859a !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.sidebar .nav > li > a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 11px 18px;
    color: #afbdcb !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    border-left: 3px solid transparent;
}

.sidebar .nav > li > a i {
    width: 24px;
    margin-right: 9px;
    color: #8295a8;
    text-align: center;
}

.sidebar .nav > li > a:hover,
.sidebar .nav > li.active > a,
.sidebar .nav > li.expand > a {
    color: #fff !important;
    background: rgba(255, 255, 255, .06) !important;
    border-left-color: var(--sh-brand);
}

.sidebar .nav > li > a:hover i,
.sidebar .nav > li.active > a i,
.sidebar .nav > li.expand > a i {
    color: var(--sh-brand);
}

.sidebar .sub-menu {
    padding: 5px 0 8px 44px !important;
    background: rgba(0, 0, 0, .12);
}

.sidebar .sub-menu > li > a {
    min-height: 35px;
    display: flex;
    align-items: center;
    padding: 7px 14px 7px 0;
    color: #92a5b8 !important;
    font-size: 13px;
    line-height: 1.4;
}

.sidebar .sub-menu > li > a i {
    width: 20px;
    margin-right: 10px;
    color: #6f8498;
    text-align: center;
}

.sidebar .sub-menu > li > a:hover,
.sidebar .sub-menu > li.active > a {
    color: #fff !important;
}

.sidebar .app-user-card {
    position: relative;
    width: 100%;
    padding: 14px !important;
    overflow: hidden;
    background: rgba(255, 255, 255, .035) !important;
}

.sidebar .nav > .app-user-card > .app-user-link {
    position: relative !important;
    width: 100% !important;
    min-height: 48px !important;
    display: block !important;
    padding: 4px 42px 0 53px !important;
    overflow: hidden !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
}

.sidebar .app-user-avatar {
    position: absolute;
    top: 3px;
    left: 0;
    width: 42px;
    height: 42px;
    display: block;
}

.sidebar .app-user-avatar img {
    width: 42px !important;
    height: 42px !important;
    display: block;
    border: 2px solid rgba(255, 255, 255, .16);
    border-radius: 10px !important;
    object-fit: cover;
}

.sidebar .app-user-meta {
    width: 100%;
    min-width: 0;
    display: block;
    overflow: hidden;
}

.sidebar .app-user-meta strong,
.sidebar .app-user-meta small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar .app-user-meta strong {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.sidebar .app-user-meta small {
    margin-top: 3px;
    color: #8095a9;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.sidebar .nav > .app-user-card > .app-sidebar-collapse {
    position: absolute !important;
    top: 22px !important;
    right: 12px !important;
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    color: #8ca8bf !important;
    background: rgba(255, 255, 255, .08) !important;
    border: 0 !important;
    border-radius: 8px;
}

.sidebar .nav > .app-user-card > .app-sidebar-collapse:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .13) !important;
}

.sidebar .app-sidebar-collapse i {
    width: auto !important;
    margin: 0 !important;
    color: inherit !important;
}

.content {
    padding: 28px 30px 44px;
    color: var(--sh-text);
}

.page-header,
.content > h1,
.content > h2,
.content > .container > h1,
.content > .container > h2,
.content > .modal-header .modal-title {
    margin: 0 0 24px !important;
    color: var(--sh-ink) !important;
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -.03em;
}

/* Reusable content surfaces */
.panel,
.card {
    overflow: hidden;
    background: var(--sh-surface);
    border: 1px solid var(--sh-line) !important;
    border-radius: var(--sh-radius) !important;
    box-shadow: var(--sh-shadow);
}

.panel-heading,
.card-header {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 14px 18px !important;
    color: var(--sh-ink) !important;
    background: var(--sh-surface) !important;
    border-bottom: 1px solid var(--sh-line) !important;
}

.panel-title,
.card-title {
    color: var(--sh-ink) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}

.panel-body,
.card-body {
    padding: 20px;
}

.form-group label,
.control-label {
    color: var(--sh-ink);
    font-size: 12px;
    font-weight: 700;
}

.form-control,
.custom-select,
select.form-control {
    min-height: 42px;
    color: var(--sh-text);
    background: #fbfcfd;
    border: 1px solid #d8e1e9;
    border-radius: var(--sh-radius-sm);
    box-shadow: none !important;
    font-family: inherit;
}

.form-control:focus,
.custom-select:focus,
select.form-control:focus {
    border-color: var(--sh-brand);
    box-shadow: 0 0 0 3px rgba(0, 172, 172, .1) !important;
}

.btn {
    min-height: 38px;
    padding: 9px 16px;
    border-radius: var(--sh-radius-sm);
    font-weight: 700;
}

.btn-success,
.btn-primary,
.btn-theme {
    color: #fff !important;
    background: var(--sh-brand) !important;
    border-color: var(--sh-brand) !important;
}

.btn-success:hover,
.btn-primary:hover,
.btn-theme:hover {
    background: var(--sh-brand-dark) !important;
    border-color: var(--sh-brand-dark) !important;
}

.btn-default,
.btn-secondary,
.btn-dark {
    color: var(--sh-ink) !important;
    background: #fff !important;
    border-color: var(--sh-line) !important;
}

.table {
    width: 100% !important;
    margin-bottom: 0;
    color: var(--sh-text);
    background: #fff;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    padding: 12px 14px;
    color: var(--sh-ink);
    background: #f5f8fa;
    border-bottom: 1px solid var(--sh-line) !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-left: 0 !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
    vertical-align: middle;
}

.table td {
    padding: 12px 14px;
    color: #3d4f64;
    border-color: #edf1f4 !important;
    border-right: 0 !important;
    border-left: 0 !important;
    vertical-align: middle;
}

.table-bordered {
    border: 0 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: #fbfcfd;
}

.table-hover tbody tr:hover,
.table tbody tr:hover {
    background: #f3f8fa;
}

.table-responsive {
    width: 100%;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius-sm);
    scrollbar-width: thin;
    scrollbar-color: #c2ccd6 transparent;
}

.table-responsive > .table {
    border: 0 !important;
}

.table td.with-btn,
.table td:last-child {
    white-space: nowrap;
}

.table td.with-btn > a:not(.btn) {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    color: var(--sh-brand-dark);
    background: #eef8f8;
    border-radius: 6px;
}

.table td.with-btn > a:not(.btn):hover {
    color: #fff;
    background: var(--sh-brand);
}

/* Shared DataTables controls */
.dataTables_wrapper {
    width: 100%;
    color: var(--sh-text);
}

.dataTables_wrapper > .row {
    margin-right: 0;
    margin-left: 0;
}

.dataTables_wrapper > .row:first-child {
    align-items: center;
    margin-bottom: 0;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--sh-line);
    border-bottom: 0;
    border-radius: var(--sh-radius-sm) var(--sh-radius-sm) 0 0;
}

.dataTables_wrapper > .row:last-child {
    align-items: center;
    margin-top: 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-top: 0;
    border-radius: 0 0 var(--sh-radius-sm) var(--sh-radius-sm);
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--sh-muted);
    font-size: 12px;
    font-weight: 700;
}

.dataTables_wrapper .dataTables_length select {
    width: auto !important;
    min-width: 72px;
    min-height: 38px;
    margin: 0 3px;
    padding: 7px 28px 7px 10px;
    color: var(--sh-text);
    background-color: #fff;
    border: 1px solid #d8e1e9;
    border-radius: var(--sh-radius-sm);
    box-shadow: none;
}

.dataTables_wrapper .dataTables_filter {
    display: flex;
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_filter input[type="search"] {
    width: min(260px, 100%) !important;
    min-height: 40px;
    margin-left: 0 !important;
    padding: 9px 36px 9px 12px;
    color: var(--sh-text);
    background: #fff;
    border: 1px solid #d8e1e9;
    border-radius: var(--sh-radius-sm);
    box-shadow: none;
    font-family: inherit;
}

.dataTables_wrapper .dataTables_filter input[type="search"]:focus {
    border-color: var(--sh-brand);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 172, 172, .1);
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0 !important;
    color: var(--sh-muted);
    font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 0 !important;
}

.dataTables_wrapper .page-link {
    min-width: 34px;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 6px 10px;
    color: var(--sh-text);
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: 6px !important;
}

.dataTables_wrapper .page-item.active .page-link {
    color: #fff;
    background: var(--sh-brand);
    border-color: var(--sh-brand);
}

.dataTables_wrapper .page-item.disabled .page-link {
    color: #a8b5c2;
    background: #f7f9fb;
}

.dataTables_wrapper table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: 1px solid var(--sh-line) !important;
}

.dataTables_wrapper table.dataTable.no-footer {
    border-bottom: 1px solid var(--sh-line) !important;
}

.dataTables_wrapper .dataTables_empty {
    padding: 42px 20px !important;
    color: var(--sh-muted);
    text-align: center;
}

.panel-body > .navbar.navbar-light.bg-light {
    margin-bottom: 16px;
    padding: 10px 12px;
    background: #f8fafc !important;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius-sm);
}

/* Report filters and export actions */
.report-filter-form {
    padding: 20px;
}

.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.report-filter-grid .form-group {
    min-width: 0;
    margin: 0;
}

.report-filter-grid .form-group label {
    display: block;
    margin-bottom: 7px;
}

.report-filter-grid .form-control,
.report-filter-grid .form-select,
.report-filter-grid .multiselect-native-select,
.report-filter-grid .multiselect-native-select .btn-group,
.report-filter-grid .multiselect-native-select .multiselect {
    width: 100% !important;
}

.report-filter-grid .multiselect-native-select .multiselect {
    min-height: 42px;
    overflow: hidden;
    color: var(--sh-text);
    background: #fbfcfd;
    border: 1px solid #d8e1e9;
    border-radius: var(--sh-radius-sm);
    text-align: left;
}

.report-filter-grid .multiselect-container {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--sh-line);
    box-shadow: var(--sh-shadow);
}

.report-filter-grid .multiselect-container .input-group {
    margin: 0 !important;
    padding: 9px;
}

.report-filter-grid .multiselect-container .form-control {
    min-height: 36px;
}

.report-date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--sh-line);
}

.report-search {
    width: min(430px, 100%);
}

.report-pagination-info {
    white-space: nowrap;
    color: #6c757d;
    font-size: 0.9rem;
}

.report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.report-actions-wide {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding-top: 18px;
    border-top: 1px solid var(--sh-line);
}

.report-actions .btn {
    min-height: 40px;
    padding: 9px 16px;
}

.modal-content {
    border: 0;
    border-radius: var(--sh-radius);
    box-shadow: 0 22px 60px rgba(16, 29, 44, .22);
}

.alert {
    border: 0;
    border-radius: var(--sh-radius-sm);
}

.text-danger,
.field-validation-error,
.validation-summary-errors {
    color: var(--sh-danger) !important;
    font-size: 12px;
    font-weight: 600;
}

/* Dashboard */
.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-heading .page-header {
    margin-bottom: 4px !important;
}

.dashboard-heading p {
    margin: 0;
    color: var(--sh-muted);
    font-size: 13px;
}

.dashboard-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 28px !important;
}

.dashboard-stats > [class*="col"] {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    padding: 0 !important;
}

.widget.widget-stats {
    --stat-accent: var(--sh-brand);
    position: relative;
    min-height: 126px;
    overflow: hidden;
    color: var(--sh-text) !important;
    background: #fff !important;
    border: 1px solid var(--sh-line) !important;
    border-left: 4px solid var(--stat-accent) !important;
    border-radius: var(--sh-radius) !important;
    box-shadow: 0 6px 20px rgba(23, 43, 77, .055);
}

.dashboard-stats .bg-teal { --stat-accent: #0aa7a5; }
.dashboard-stats .bg-blue { --stat-accent: #3886d9; }
.dashboard-stats .bg-indigo { --stat-accent: #7a5bd5; }
.dashboard-stats .bg-dark { --stat-accent: #586574; }
.dashboard-stats .bg-green { --stat-accent: #32a852; }
.dashboard-stats .bg-red { --stat-accent: #e65757; }

.widget.widget-stats .stats-content {
    position: relative;
    z-index: 2;
    padding: 20px 72px 18px 20px !important;
    color: var(--sh-text) !important;
}

.widget.widget-stats .stats-title {
    margin-bottom: 7px;
    color: var(--sh-muted) !important;
    font-size: 11px !important;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: none !important;
}

.widget.widget-stats .stats-number {
    margin-bottom: 7px;
    color: var(--sh-ink) !important;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
}

.widget.widget-stats .stats-desc {
    color: var(--sh-muted) !important;
    opacity: 1;
    font-size: 12px;
}

.widget.widget-stats .stats-icon,
.widget.widget-stats .stats-icon.stats-icon-lg {
    top: 20px !important;
    right: 18px !important;
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    color: var(--stat-accent) !important;
    background: #eef7f7;
    border-radius: 10px;
    opacity: 1 !important;
}

.dashboard-stats .bg-blue .stats-icon { background: #edf5fc; }
.dashboard-stats .bg-indigo .stats-icon { background: #f2effc; }
.dashboard-stats .bg-dark .stats-icon { background: #eff2f4; }
.dashboard-stats .bg-green .stats-icon { background: #eef8f0; }
.dashboard-stats .bg-red .stats-icon { background: #fdf0f0; }

.widget.widget-stats .stats-icon i,
.widget.widget-stats .stats-icon.stats-icon-lg i {
    position: static !important;
    font-size: 19px !important;
    line-height: 1 !important;
}

.dashboard-stats .stats-progress {
    display: none !important;
}

.attendance-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.attendance-stats > [class*="col"] {
    display: flex;
}

.attendance-stats .bg-teal { --stat-bg: #00acac; }
.attendance-stats .bg-blue { --stat-bg: #348fe2; }
.attendance-stats .bg-indigo { --stat-bg: #8753de; }
.attendance-stats .bg-dark { --stat-bg: #2d353c; }
.attendance-stats .bg-green { --stat-bg: #32a932; }
.attendance-stats .bg-red { --stat-bg: #ff5b57; }

.attendance-stats .widget.widget-stats {
    width: 100%;
    height: 152px;
    min-height: 152px;
    color: #fff !important;
    background: var(--stat-bg) !important;
    border: 0 !important;
    box-shadow: 0 6px 18px rgba(23, 43, 77, .1);
}

.attendance-stats .widget.widget-stats .stats-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 17px 12px 14px !important;
    color: #fff !important;
}

.attendance-stats .widget.widget-stats .stats-title {
    min-height: 29px;
    padding-right: 34px;
    color: rgba(255, 255, 255, .82) !important;
    font-size: 13px !important;
    line-height: 1.4;
}

.attendance-stats .widget.widget-stats .stats-number {
    color: #fff !important;
    font-size: 24px;
}

.attendance-stats .widget.widget-stats .stats-desc {
    margin-top: auto;
    color: rgba(255, 255, 255, .72) !important;
    font-size: 12px;
    line-height: 1.45;
}

.attendance-stats .widget.widget-stats .stats-icon,
.attendance-stats .widget.widget-stats .stats-icon.stats-icon-lg {
    top: 13px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, .16) !important;
    border-radius: 8px;
}

.attendance-stats .widget.widget-stats .stats-icon i,
.attendance-stats .widget.widget-stats .stats-icon.stats-icon-lg i {
    color: #fff !important;
    font-size: 15px !important;
}

.dashboard-main-grid {
    margin-right: -8px;
    margin-left: -8px;
}

.dashboard-main-grid > [class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

.dashboard-main-grid .panel {
    margin-bottom: 18px;
}

.dashboard-main-grid .panel-heading {
    justify-content: space-between;
    gap: 16px;
}

.dashboard-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-panel-actions .btn {
    min-height: 34px;
    padding: 7px 13px;
    font-size: 11px;
}

.dashboard-main-grid iframe {
    display: block;
    max-width: calc(100% - 32px) !important;
    margin: 20px auto !important;
}

.dashboard-main-grid .table-responsive,
.dashboard-main-grid [style*="overflow-y"] {
    scrollbar-width: thin;
    scrollbar-color: #c2ccd6 transparent;
}

#donut-chart {
    width: 100%;
    max-width: 360px;
    height: 270px;
    margin: 0 auto;
}

#donut-chart svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

#donut-chart .nv-legend text,
#donut-chart .nv-pieLabels text {
    font-family: "Manrope", Arial, sans-serif !important;
    font-size: 11px !important;
}

#donut-chart .nv-series {
    cursor: default;
}

/* Authentication */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 1fr) minmax(420px, 520px);
    background: var(--sh-background);
}

.auth-visual {
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 64px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(16, 29, 44, .93), rgba(0, 118, 120, .74)),
        url("/Content/assets/img/login-bg/login-bg.jpg") center / cover no-repeat;
}

.auth-art {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    height: 560px;
    color: #c9f7f2;
    pointer-events: none;
    z-index: 0;
}

.auth-art::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle at 66% 32%, rgba(94, 220, 210, .20), transparent 62%);
}

.auth-art-cal {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 300px;
    height: 300px;
    opacity: .1;
}

.auth-art-clock {
    position: absolute;
    top: 260px;
    right: 260px;
    width: 170px;
    height: 170px;
    opacity: .12;
}

.auth-art-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c9f7f2;
    opacity: .28;
}

.auth-art-dot-1 {
    top: 96px;
    right: 258px;
}

.auth-art-dot-2 {
    top: 136px;
    right: 226px;
    width: 4px;
    height: 4px;
}

.auth-art-dot-3 {
    top: 262px;
    right: 452px;
}

.auth-art-dot-4 {
    top: 52px;
    right: 470px;
    width: 4px;
    height: 4px;
}

.auth-visual-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.auth-visual-copy .auth-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: #7ee2dc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.auth-visual-copy h1 {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.04em;
}

.auth-visual-copy p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 16px;
}

.auth-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.auth-feature {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
}

.auth-feature i {
    color: #7ee2dc;
    font-size: 15px;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
    background: #fff;
}

.auth-card {
    width: 100%;
    max-width: 390px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
    color: var(--sh-ink) !important;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.025em;
}

.auth-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.auth-brand em {
    margin-left: 8px;
    color: var(--sh-brand);
    font-style: normal;
}

.auth-content h1,
.auth-content h2,
.auth-content h3,
.auth-content h4 {
    margin: 0 0 8px;
    color: var(--sh-ink);
    font-size: 27px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.03em;
}

.auth-content .auth-intro {
    margin: 0 0 26px;
    color: var(--sh-muted);
}

.auth-content .form-group {
    margin-bottom: 17px;
}

.auth-content .form-control {
    min-height: 48px;
    padding: 11px 13px;
}

.auth-content .input-group-text {
    min-height: 48px;
    color: var(--sh-muted);
    background: #fbfcfd;
    border-color: #d8e1e9;
    border-radius: 0 var(--sh-radius-sm) var(--sh-radius-sm) 0;
    cursor: pointer;
}

.auth-content .btn {
    min-height: 46px;
}

.auth-footer {
    margin-top: 28px;
    color: var(--sh-muted);
    font-size: 12px;
}

@media (min-width: 768px) {
    .page-sidebar-fixed .content,
    .page-header-fixed.page-sidebar-fixed .content {
        margin-left: var(--sh-sidebar-width);
    }
}

.page-sidebar-minified .sidebar,
.page-sidebar-minified .sidebar-bg {
    width: 60px !important;
}

.page-sidebar-minified .sidebar .app-user-meta,
.page-sidebar-minified .sidebar .nav-header {
    display: none !important;
}

.page-sidebar-minified .sidebar .app-user-card {
    padding: 9px !important;
}

.page-sidebar-minified .sidebar .nav > .app-user-card > .app-user-link {
    padding: 0 !important;
}

.page-sidebar-minified .sidebar .app-user-avatar {
    position: static;
}

.page-sidebar-minified .sidebar .app-sidebar-collapse {
    display: none !important;
}

@media (min-width: 768px) {
    .page-sidebar-minified .content {
        margin-left: 60px !important;
    }
}

@media (max-width: 991px) {
    .report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .attendance-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 280px;
        padding: 42px;
    }

    .auth-panel {
        padding: 42px 24px;
    }
}

@media (max-width: 767px) {
    .report-filter-grid {
        grid-template-columns: 1fr;
    }

    .report-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .report-search,
    .report-actions,
    .report-pagination-info,
    .report-actions .btn {
        width: 100%;
    }

    .report-actions .btn {
        justify-content: center;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .attendance-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header .navbar-header {
        width: 100%;
    }

    .content {
        padding: 22px 16px 36px;
    }

    .page-header,
    .content > h1,
    .content > h2,
    .content > .container > h1,
    .content > .container > h2,
    .content > .modal-header .modal-title {
        font-size: 24px !important;
    }

    .dataTables_wrapper > .row:first-child > [class*="col-"],
    .dataTables_wrapper > .row:last-child > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .dataTables_wrapper .dataTables_filter {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_filter input[type="search"] {
        width: 100% !important;
    }

    .dataTables_wrapper .dataTables_info {
        margin-bottom: 10px;
        text-align: center;
    }

    .dataTables_wrapper .dataTables_paginate .pagination {
        flex-wrap: wrap;
        justify-content: center !important;
    }

    .table thead th,
    .table td {
        padding: 10px 12px;
    }

    .auth-visual {
        min-height: 230px;
        padding: 30px 24px;
    }

    .auth-visual-copy h1 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .attendance-stats {
        grid-template-columns: 1fr;
    }
}

/* Employee form cross-tab required-field validation */
.sh-field-error {
    display: block;
    margin-top: 5px;
    color: #e74c3c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.sh-invalid,
.sh-invalid:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 1px rgba(231, 76, 60, .25) !important;
}

/* ============ Subscription management ============ */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-toolbar .page-header {
    margin: 0 !important;
}

.page-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-toolbar-actions .btn {
    min-height: 40px;
}

.sub-page-intro {
    margin: -12px 0 24px;
    color: var(--sh-muted);
    font-size: 13px;
    line-height: 1.55;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    white-space: nowrap;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .035em;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-active {
    color: #12833f;
    background: #e6f6ec;
}

.badge-expired {
    color: #c0392b;
    background: #fbeceb;
}

.badge-pending {
    color: #8a6d00;
    background: #fff6dc;
}

.badge-followup {
    color: #b96a05;
    background: #fdf0dd;
}

.badge-inactive {
    color: #5b6773;
    background: #eef1f4;
}

.badge-info {
    color: #1a5a99;
    background: #e6f0fb;
}

.sub-meta-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sub-meta-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    border-bottom: 1px solid var(--sh-line);
}

.sub-meta-list li:last-child {
    border-bottom: 0;
}

.sub-meta-list .sub-meta-label {
    color: var(--sh-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.sub-meta-list .sub-meta-value {
    color: var(--sh-ink);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.form-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--sh-line);
}

.form-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.form-section-title {
    margin: 0 0 14px;
    color: var(--sh-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--sh-line);
}

.form-actions .btn {
    min-height: 42px;
}

/* Shared toggle switch */
.sh-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    margin: 0;
    vertical-align: middle;
}

.sh-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sh-switch .sh-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #ccd6df;
    border-radius: 999px;
    transition: background .2s ease;
}

.sh-switch .sh-slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    bottom: 3px;
    left: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(23, 43, 77, .28);
    transition: transform .2s ease;
}

.sh-switch input:checked + .sh-slider {
    background: var(--sh-brand);
}

.sh-switch input:checked + .sh-slider::before {
    transform: translateX(24px);
}

.sh-switch input:focus-visible + .sh-slider {
    box-shadow: 0 0 0 3px rgba(0, 172, 172, .28);
}

/* Quick links */
.sub-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.sub-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: var(--sh-ink);
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius);
    box-shadow: 0 6px 20px rgba(23, 43, 77, .05);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sub-quick-link:hover {
    color: var(--sh-ink);
    border-color: var(--sh-brand);
    box-shadow: var(--sh-shadow);
    transform: translateY(-2px);
}

.sub-quick-link i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: var(--sh-brand-dark);
    background: #eef8f8;
    border-radius: 10px;
    font-size: 16px;
}

.sub-quick-link strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.sub-quick-link small {
    display: block;
    margin-top: 2px;
    color: var(--sh-muted);
    font-size: 11px;
    line-height: 1.4;
}

.stat-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.stat-link:hover {
    color: inherit;
    text-decoration: none;
}

.detail-table {
    margin: 0;
}

.detail-table .table-responsive {
    margin-bottom: 0;
}

.empty-state {
    padding: 48px 24px;
    color: var(--sh-muted);
    text-align: center;
}

.empty-state i {
    display: block;
    margin-bottom: 14px;
    color: #b9c5d0;
    font-size: 34px;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--sh-ink);
    font-size: 15px;
    font-weight: 800;
}

.empty-state p {
    margin: 0 auto 18px;
    max-width: 420px;
    font-size: 13px;
}

@media (max-width: 767px) {
    .page-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .page-toolbar-actions {
        width: 100%;
    }

    .page-toolbar-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        justify-content: center;
    }
}

/* Subscription dashboard — matches main attendance dashboard look */
.subscription-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-stats .stat-link {
    display: flex;
    width: 100%;
}

@media (max-width: 991px) {
    .subscription-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .subscription-stats {
        grid-template-columns: 1fr;
    }
}

/* Multiselect footer — Select All / Clear shared component */
.multiselect-container .ms-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-top: 1px solid var(--sh-line, #e3e9ef);
    margin-top: 2px;
}

.multiselect-container .ms-footer-btn {
    flex: 1 1 50%;
    border: none;
    background: transparent;
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

.multiselect-container .ms-footer-btn:hover,
.multiselect-container .ms-footer-btn:focus {
    background: #f2f4f7;
}

.multiselect-container .ms-footer-select-all {
    color: var(--sh-brand, #00acac);
}

.multiselect-container .ms-footer-clear {
    color: #d9534f;
    border-left: 1px solid var(--sh-line, #e3e9ef);
}



/* ============ Horizontal scroll for tables ============ */
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll > table {
    width: 100%;
    margin-bottom: 0;
}

.table-scroll table th,
.table-scroll table td,
.table-responsive table th,
.table-responsive table td {
    white-space: nowrap;
}
