/* Operational UI refresh. Loaded after the legacy styles. */
:root {
    --purple-deep: #4f46e5;
    --purple-light: #7371fc;
    --purple-softest: #f5efff;
    --purple-glow: rgba(115, 113, 252, 0.14);

    --warm-white: #faf9fc;
    --ice-gray: #f5efff;
    --cloud-gray: #e5d9f2;
    --slate-text: #172033;
    --muted-ink: #667085;

    --primary: #4f46e5;
    --primary-light: #7371fc;
    --primary-dark: #4338ca;
    --primary-bg: #f5efff;
    --accent: #7371fc;
    --accent-dark: #4f46e5;
    --accent-bg: rgba(115, 113, 252, 0.12);
    --accent-solid: #4f46e5;

    --emerald: #059669;
    --emerald-bg: #ecfdf5;
    --amber: #d97706;
    --amber-bg: #fffbeb;
    --coral: #dc2626;
    --coral-bg: #fef2f2;
    --sky: #4f46e5;
    --sky-bg: #f5efff;
    --rose: #be185d;
    --rose-bg: #fdf2f8;
    --teal: #0f766e;
    --teal-bg: #f0fdfa;
    --indigo: #4f46e5;
    --indigo-bg: #eef2ff;

    --soft-green: var(--emerald);
    --soft-green-bg: var(--emerald-bg);
    --soft-red: var(--coral);
    --soft-red-bg: var(--coral-bg);
    --soft-blue: var(--sky);
    --soft-blue-bg: var(--sky-bg);
    --soft-orange: var(--amber);
    --soft-orange-bg: var(--amber-bg);
    --soft-pink: var(--rose);
    --soft-pink-bg: var(--rose-bg);
    --soft-teal: var(--teal);
    --soft-teal-bg: var(--teal-bg);
    --soft-violet: var(--indigo);
    --soft-violet-bg: var(--indigo-bg);

    --bg: #faf9fc;
    --bg-secondary: #f5efff;
    --cotton: #fbfaff;
    --crystal-falls: #fbfaff;
    --card: #ffffff;
    --light: #ffffff;
    --light-gray: #f5efff;
    --border: #ddd8e7;
    --border-light: #ebe6f0;
    --text: #172033;
    --text-secondary: #3f4b5f;
    --muted: #667085;
    --shadow-soft: none;
    --shadow-card: none;
    --shadow-elevated: 0 12px 32px rgba(23, 32, 51, 0.14);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --radius-xl: 10px;
}


/* Attendance recap: one daily result with exact JP detail. */
.rekap-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
}

.rekap-filter-row > div {
    min-width: 190px;
}

.rekap-filter-row .rekap-filter-class {
    min-width: 220px;
    flex: 1 1 260px;
}

.rekap-filter-row .input-field {
    width: 100%;
}

.rekap-filter-note,
.rekap-period-meta {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.rekap-filter-note i {
    margin-right: 5px;
    color: var(--accent);
}

.rekap-status-overview {
    margin: 0 0 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.rekap-status-overview > header,
.rekap-status-section-head {
    display: flex;
    min-height: 34px;
    align-items: center;
    margin-bottom: 10px;
}

.rekap-status-overview h3,
.rekap-status-section-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 750;
}

.rekap-status-overview h3 i,
.rekap-status-section-head h3 i {
    width: 20px;
    margin-right: 6px;
    color: var(--accent);
    text-align: center;
}

.rekap-status-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.rekap-status-metrics > div {
    min-width: 0;
    min-height: 64px;
    padding: 10px 12px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-left: 3px solid #667085;
    border-radius: 6px;
    background: #f8fafc;
}

.rekap-status-metrics span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
}

.rekap-status-metrics strong {
    margin-top: 4px;
    color: var(--text);
    font-size: 20px;
    line-height: 1.1;
}

.rekap-status-metrics strong small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.rekap-status-metrics .is-h { border-left-color: #059669; background: #ecfdf5; }
.rekap-status-metrics .is-s { border-left-color: #d97706; background: #fffbeb; }
.rekap-status-metrics .is-i { border-left-color: #2563eb; background: #eff6ff; }
.rekap-status-metrics .is-a { border-left-color: #dc2626; background: #fef2f2; }
.rekap-status-metrics .is-b { border-left-color: #344054; background: #f2f4f7; }

.rekap-status-section {
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.rekap-status-section-head {
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    background: #f8fafc;
}

.rekap-status-section .table-responsive {
    margin: 0;
}

.rekap-status-summary-table {
    min-width: 820px;
}

.rekap-status-summary-table th:not(:nth-child(2)),
.rekap-status-summary-table td:not(:nth-child(2)) {
    width: 72px;
    text-align: center;
}

.rekap-status-summary-table th:nth-child(2),
.rekap-status-summary-table td:nth-child(2) {
    min-width: 190px;
}

.rekap-status-summary-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.rekap-status-summary-table .is-h,
.rekap-status-calendar .is-h,
.daily-status-column.is-h { color: #047857; background: #ecfdf5; }
.rekap-status-summary-table .is-s,
.rekap-status-calendar .is-s,
.daily-status-column.is-s { color: #b45309; background: #fffbeb; }
.rekap-status-summary-table .is-i,
.rekap-status-calendar .is-i,
.daily-status-column.is-i { color: #1d4ed8; background: #eff6ff; }
.rekap-status-summary-table .is-a,
.rekap-status-calendar .is-a,
.daily-status-column.is-a { color: #b91c1c; background: #fef2f2; }
.rekap-status-summary-table .is-b,
.rekap-status-calendar .is-b,
.daily-status-column.is-b { color: #1d2939; background: #f2f4f7; }

.rekap-status-summary-table td.is-number,
.rekap-status-calendar td,
.daily-status-column {
    font-weight: 750;
    text-align: center;
}

.rekap-status-calendar {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.rekap-status-calendar th,
.rekap-status-calendar td {
    min-width: 44px;
    height: 42px;
    padding: 6px;
    text-align: center;
}

.rekap-status-calendar th:first-child,
.rekap-status-calendar td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 44px;
    width: 44px;
    background: #ffffff;
}

.rekap-status-calendar th:nth-child(2),
.rekap-status-calendar td:nth-child(2) {
    position: sticky;
    left: 44px;
    z-index: 2;
    min-width: 190px;
    max-width: 190px;
    text-align: left;
    background: #ffffff;
}

.rekap-status-calendar thead th:first-child,
.rekap-status-calendar thead th:nth-child(2) {
    z-index: 4;
    background: #f2f4f7;
}

.rekap-status-calendar th strong,
.rekap-status-calendar th small {
    display: block;
}

.rekap-status-calendar th small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.rekap-status-calendar .is-off {
    color: #98a2b3;
    background: #f8fafc;
}

.daily-status-column {
    min-width: 88px;
}

@media (max-width: 720px) {
    .rekap-filter-row,
    .rekap-filter-row > div,
    .rekap-filter-row .rekap-filter-class,
    .rekap-filter-row > button {
        width: 100%;
    }

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

    .rekap-status-metrics > div:last-child {
        grid-column: 1 / -1;
    }

    .rekap-status-calendar th:nth-child(2),
    .rekap-status-calendar td:nth-child(2) {
        min-width: 140px;
        max-width: 140px;
    }
}

@media print {
    .rekap-status-overview,
    .rekap-status-section {
        break-inside: avoid;
        border-color: #000 !important;
        box-shadow: none !important;
    }

    .rekap-status-metrics {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .rekap-status-calendar {
        width: 100%;
        font-size: 6.5px;
    }

    .rekap-status-calendar th,
    .rekap-status-calendar td {
        position: static !important;
        min-width: 0 !important;
        height: auto;
        padding: 2px !important;
        border: 1px solid #000 !important;
    }
}


/* Shared data-management screens */
.content-narrow {
    max-width: 700px;
}

.content-medium {
    max-width: 1000px;
}

.data-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.data-toolbar.is-filter-bar {
    align-items: end;
    margin-bottom: 20px;
}

.data-toolbar-field {
    min-width: 180px;
    flex: 1 1 180px;
}

.data-toolbar-field.is-compact {
    min-width: 160px;
    flex: 0 1 180px;
}

.data-toolbar-field.is-wide {
    min-width: 200px;
    flex-basis: 240px;
}

.data-toolbar .input-field,
.data-filter-grid .input-field,
.data-form-grid .input-field {
    width: 100%;
}

.data-toolbar .input-field {
    min-height: 40px;
    padding: 9px 12px;
}

.table-card {
    max-width: 100%;
    overflow-x: auto;
}

.table-empty {
    padding: 32px !important;
    color: #98a2b3;
    text-align: center;
}

.empty-card {
    padding: 40px;
    color: var(--muted);
    text-align: center;
}

.cell-strong {
    font-weight: 600;
}

.cell-muted {
    color: var(--muted);
}

.cell-actions {
    white-space: nowrap;
}

.cell-center {
    text-align: center;
}

.cell-nowrap {
    white-space: nowrap;
}

.cell-meta {
    color: var(--muted);
    font-size: 11px;
}

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.user-table {
    min-width: 840px;
}

.user-table th:last-child,
.user-table td:last-child {
    width: 150px;
    min-width: 150px;
    text-align: center;
}

.user-action-group {
    gap: 10px;
}

.btn-icon-compact {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
}

.btn-compact {
    min-height: 32px;
    padding: 6px 10px !important;
    font-size: 12px !important;
}

.data-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f1f3f5;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.data-badge.is-count,
.data-badge.is-schedule {
    background: #eff6ff;
    color: #1d4ed8;
}

.data-badge.is-points {
    padding-inline: 12px;
    background: #fef2f2;
    color: #b42318;
}

.data-badge.is-warning {
    background: #fffaeb;
    color: #b54708;
}

.data-badge.is-role {
    padding: 3px 10px;
    font-size: 11px;
    text-transform: uppercase;
}

.data-badge.is-wakasek {
    background: #eef2ff;
    color: #4338ca;
}

.data-badge.is-active {
    background: #ecfdf3;
    color: #067647;
}

.data-badge.is-graduated {
    background: #eff6ff;
    color: #1d4ed8;
}

.data-badge.is-transferred {
    background: #eef2ff;
    color: #4338ca;
}

.data-badge.is-inactive {
    background: #fef2f2;
    color: #b42318;
}

.data-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.data-pagination.has-bottom-spacing {
    margin-bottom: 16px;
}

.data-list-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.data-list-controls .data-result-meta {
    margin-bottom: 0;
}

.data-page-size {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.data-page-size .input-field {
    width: 72px;
    min-height: 32px;
    padding: 5px 24px 5px 9px;
    font-size: 11px;
}

.data-pagination .btn-primary,
.data-pagination .btn-secondary {
    min-width: 34px;
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.pagination-status {
    padding: 0 4px;
    color: var(--muted);
    font-size: 11px;
}

.pagination-ellipsis {
    padding: 0 3px;
    color: var(--muted);
}

.is-hidden {
    display: none !important;
}

.table-pro.is-wide {
    min-width: 760px;
}

.dialog-copy {
    margin: 0 0 8px;
}

.dialog-help {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
}

.dialog-note {
    color: var(--muted);
    font-size: 13px;
}

.dialog-summary {
    margin: 0 2px 14px;
    color: var(--text);
    text-align: left;
}

.dialog-summary-label,
.dialog-summary-meta {
    color: var(--muted);
    font-size: 12px;
}

.dialog-summary-name {
    margin: 2px 0;
    font-weight: 700;
}

.dialog-field-label {
    display: block;
    margin: 12px 2px 5px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.dialog-select {
    width: 100% !important;
    margin: 0 !important;
}

.swal2-input.is-readonly {
    background: #f1f3f5 !important;
    color: var(--muted) !important;
}

.dialog-code {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f1f3f5;
    color: var(--text);
    font-size: 16px;
}

.dialog-list {
    max-height: 220px;
    margin-top: 12px;
    overflow: auto;
    text-align: left;
}

.dialog-list-title {
    margin-bottom: 8px;
    font-weight: 700;
}

.dialog-list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.file-upload-copy {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}

.file-upload-dropzone {
    margin-top: 12px;
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
}

.file-upload-icon {
    display: block;
    margin-bottom: 8px;
    color: #059669;
    font-size: 28px;
}

.file-upload-input {
    max-width: 100%;
    font-size: 13px;
}

.file-upload-format {
    margin-top: 6px;
    color: #98a2b3;
    font-size: 11px;
}

/* Schedule management */
.data-panel {
    margin-bottom: 16px;
    padding: 20px;
}

.data-section-heading {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.data-section-heading i {
    margin-right: 8px;
    color: var(--accent);
}

.data-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    align-items: end;
    gap: 10px;
}

.data-form-grid label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.data-form-grid .input-field {
    min-height: 40px;
    padding: 8px 12px;
}

.data-form-grid > .btn-primary {
    min-height: 40px;
}

.data-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.data-section-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.data-section-bar .data-section-heading {
    margin-bottom: 0;
}

.data-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.data-filter-grid .input-field {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
}

.data-result-meta {
    min-height: 18px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.schedule-conflict-area {
    margin-bottom: 14px;
}

.schedule-conflict-status {
    min-height: 44px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
    color: #475467;
}

.schedule-conflict-status > i {
    width: 18px;
    margin-top: 2px;
    text-align: center;
}

.schedule-conflict-status > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.schedule-conflict-status strong {
    color: inherit;
    font-size: 13px;
}

.schedule-conflict-status span {
    font-size: 12px;
    line-height: 1.4;
}

.schedule-conflict-status.is-clear {
    border-color: #a6f4c5;
    background: #ecfdf3;
    color: #067647;
}

.schedule-conflict-status.is-warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #93370d;
}

.schedule-conflict-status.is-error {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.schedule-conflict-table-wrap {
    max-width: 100%;
    margin-top: 10px;
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: 6px;
}

.schedule-conflict-table {
    min-width: 860px;
}

.schedule-conflict-table tbody td {
    vertical-align: top;
}

.schedule-conflict-table th:first-child {
    width: 120px;
}

.schedule-conflict-table th:nth-child(2) {
    width: 125px;
}

.schedule-conflict-entry {
    min-width: 250px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px;
    align-items: center;
    gap: 10px;
}

.schedule-conflict-entry-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.schedule-conflict-entry-copy strong {
    color: var(--text);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.schedule-conflict-entry-copy span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.schedule-conflict-entry-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.schedule-conflict-entry .btn-icon-compact {
    width: 32px;
    height: 32px;
}

.schedule-edit-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-top: 4px;
    text-align: left;
}

.schedule-edit-field {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.schedule-edit-field > span {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.schedule-edit-field .input-field {
    width: 100%;
    min-height: 42px;
    margin: 0;
}

.schedule-day-group {
    margin-bottom: 16px;
}

.schedule-day-heading {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-left: 3px solid var(--accent);
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    font-weight: 700;
}

.schedule-day-heading i {
    margin-right: 6px;
}

.schedule-table td {
    font-size: 12px;
}

.schedule-table .schedule-subject {
    font-weight: 600;
}

.schedule-table .schedule-time {
    text-align: center;
}

.schedule-action-column {
    width: 92px;
}

/* Settings */
.settings-page {
    max-width: 640px;
}

.settings-page.is-compact {
    max-width: 500px;
}

.settings-card {
    margin-bottom: 16px;
    padding: 24px;
}

.settings-card:last-child {
    margin-bottom: 0;
}

.settings-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.settings-heading i {
    color: var(--accent);
}

.settings-heading.is-compact {
    margin-bottom: 10px;
}

.settings-fields {
    display: grid;
    gap: 14px;
}

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

.settings-inline {
    display: flex;
    align-items: end;
    gap: 12px;
}

.settings-inline > .settings-field {
    min-width: 0;
    flex: 1;
}

.settings-inline > .btn-primary {
    min-height: 44px;
}

.settings-field + .settings-field-spaced,
.settings-field-spaced {
    margin-top: 14px;
}

.settings-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.settings-label-note {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
}

.settings-copy {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
}

.settings-logo-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-logo-preview {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--light);
    color: var(--muted);
}

.settings-logo-preview img {
    max-width: 100%;
    max-height: 100%;
}

.settings-file-input {
    max-width: 170px;
    font-size: 12px;
}

.settings-hidden-fields {
    display: none;
}

.settings-save-button {
    width: 100%;
    margin-top: 20px;
    justify-content: center;
}

/* Attendance session metadata and detailed period recap */
.rekap-range-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.rekap-range-table {
    width: max-content;
    min-width: 100%;
    font-size: 12px;
}

.rekap-range-cell {
    min-width: 64px;
    padding: 7px 5px !important;
    text-align: center;
}

.rekap-range-heading {
    min-width: 64px;
    padding: 7px 5px !important;
    text-align: center;
    font-size: 10px;
}

.rekap-range-heading.is-h { color: #087f5b; }
.rekap-range-heading.is-s { color: #b66a00; }
.rekap-range-heading.is-i { color: #3558a8; }
.rekap-range-heading.is-a { color: #b42318; }
.rekap-range-heading.is-b { color: #22243a; }
.rekap-range-heading.is-mixed { color: #6d28d9; }
.rekap-range-heading.is-missing { color: #b45309; }

.rekap-range-cell.is-total {
    background: #f8fafc;
}

.rekap-range-value {
    min-height: 38px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    line-height: 1.1;
}

.rekap-range-value strong {
    font-size: 13px;
    font-weight: 800;
}

.rekap-range-value strong small {
    margin-left: 2px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.rekap-range-value span {
    color: #667085;
    font-size: 9px;
    font-weight: 700;
}

.rekap-range-value.is-h strong { color: #087f5b; }
.rekap-range-value.is-s strong { color: #b66a00; }
.rekap-range-value.is-i strong { color: #3558a8; }
.rekap-range-value.is-a strong { color: #b42318; }
.rekap-range-value.is-b strong { color: #22243a; }
.rekap-range-value.is-mixed strong { color: #6d28d9; }
.rekap-range-value.is-missing strong,
.rekap-range-value.is-missing span { color: #b45309; }

.rekap-range-empty {
    color: #cbd5e1;
}

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

.absensi-session-field {
    min-width: 0;
}

.absensi-session-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.absensi-session-field label i {
    color: var(--accent);
}

.absensi-session-field .input-field {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 13px;
}

.rekap-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.rekap-mode-tabs button {
    min-height: 38px;
    flex: 0 0 auto;
}

.rekap-detail-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(135px, 1fr));
    gap: 10px;
    align-items: end;
}

.rekap-detail-filter-grid > div {
    min-width: 0;
}

.rekap-detail-filter-grid .input-field {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px !important;
    font-size: 12px;
}

.rekap-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.rekap-detail-actions > button {
    min-width: 0;
}

.rekap-loading {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 24px;
}

.rekap-empty-state {
    min-height: 160px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: var(--muted);
    text-align: center;
}

.rekap-empty-state > i {
    color: #98a2b3;
    font-size: 24px;
}

.rekap-empty-state.is-error,
.rekap-empty-state.is-error > i {
    color: #b42318;
}

.rekap-empty-state .btn-primary {
    margin-top: 4px;
}

.rekap-detail-print-meta {
    margin: 0 0 12px;
    text-align: center;
    font-size: 12px;
}

.rekap-detail-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.rekap-detail-metric {
    min-width: 0;
    min-height: 78px;
    padding: 13px 14px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--border);
    border-left: 3px solid #2563eb;
    border-radius: 7px;
    background: #ffffff;
}

.rekap-detail-metric:nth-child(2) {
    border-left-color: #059669;
}

.rekap-detail-metric:nth-child(3) {
    border-left-color: #4f46e5;
}

.rekap-detail-metric:nth-child(4) {
    border-left-color: #98a2b3;
}

.rekap-detail-metric.has-warning {
    border-left-color: #d97706;
    background: #fffbeb;
}

.rekap-detail-metric span {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.rekap-detail-metric strong {
    margin-top: 5px;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.rekap-detail-metric strong small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}

.rekap-detail-subjects {
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.rekap-detail-section-head {
    min-height: 44px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    background: #f8fafc;
}

.rekap-detail-section-head h3 {
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
}

.rekap-detail-section-head h3 i {
    margin-right: 7px;
    color: #2563eb;
}

.rekap-detail-subjects .table-responsive {
    margin: 0;
}

.rekap-detail-subject-table {
    min-width: 520px;
}

.rekap-detail-subject-table th:not(:first-child),
.rekap-detail-subject-table td:not(:first-child) {
    width: 110px;
    text-align: center;
}

.rekap-detail-viewbar {
    min-height: 44px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rekap-detail-viewbar > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.rekap-detail-view-tabs {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #eef1f5;
}

.rekap-detail-view-tabs button {
    min-height: 32px;
    padding: 6px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #526071;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.rekap-detail-view-tabs button.is-active {
    background: #ffffff;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(23, 32, 51, 0.1);
}

.rekap-detail-table-card {
    overflow: hidden;
}

.rekap-detail-table-card .table-responsive {
    margin: 0;
}

.rekap-detail-table {
    min-width: 1120px;
}

.rekap-detail-records {
    min-width: 1320px;
}

.rekap-detail-table td {
    vertical-align: middle;
    font-size: 11px;
}

.rekap-detail-table td small {
    margin-top: 2px;
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.rekap-detail-table .is-number {
    text-align: center;
}

.rekap-detail-status {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.rekap-detail-status.is-bolos {
    border-color: #cbd5e1;
    background: #eef2f6;
    color: #172033;
}

.rekap-detail-status.is-alpha {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b42318;
}

.rekap-detail-status.is-izin {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.rekap-detail-status.is-sakit {
    border-color: #fde68a;
    background: #fffbeb;
    color: #a15c07;
}

.rekap-detail-status.is-missing {
    width: 36px;
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a4f08;
}

.rekap-detail-unmapped {
    width: fit-content;
    margin-top: 3px;
    padding: 2px 5px;
    display: block;
    border: 1px solid #fde68a;
    border-radius: 4px;
    background: #fffbeb;
    color: #92400e;
    font-size: 8px;
    font-weight: 750;
    white-space: nowrap;
}

.rekap-detail-subject-cell {
    position: relative;
    min-width: 150px;
    padding-right: 30px;
}

.rekap-detail-map-button {
    width: 26px;
    height: 26px;
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #ffffff;
    color: #526071;
    cursor: pointer;
    transform: translateY(-50%);
}

.rekap-detail-map-button:hover {
    border-color: #93b4ed;
    color: #1d4ed8;
}

.rekap-detail-icon-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rekap-detail-pagination {
    min-height: 42px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.rekap-detail-pagination button {
    min-width: 34px;
    height: 34px;
    padding: 5px 8px;
    font-size: 11px;
}

.rekap-detail-pagination > span {
    padding: 0 3px;
    color: var(--muted);
}

@media (max-width: 1180px) {
    .rekap-detail-filter-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 720px) {
    .absensi-session-fields,
    .rekap-detail-filter-grid,
    .rekap-detail-metrics {
        grid-template-columns: 1fr;
    }

    .rekap-mode-tabs {
        margin-right: -4px;
        padding-bottom: 4px;
    }

    .rekap-mode-tabs button {
        padding: 8px 10px;
        font-size: 11px;
    }

    .rekap-detail-actions {
        display: grid;
        grid-template-columns: 1fr 44px 1fr;
    }

    .rekap-detail-actions .btn-secondary {
        width: 44px;
        padding: 0;
        font-size: 0;
    }

    .rekap-detail-actions .btn-secondary i {
        font-size: 13px;
    }

    .rekap-detail-actions .btn-export {
        width: 44px;
        justify-self: end;
        padding: 0;
    }

    .rekap-detail-actions .btn-export span {
        display: none;
    }

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

    .rekap-detail-metric {
        min-height: 68px;
    }

    .rekap-detail-metric strong {
        font-size: 20px;
    }

    .rekap-detail-viewbar {
        align-items: stretch;
        flex-direction: column;
    }

    .rekap-detail-view-tabs {
        width: 100%;
    }

    .rekap-detail-view-tabs button {
        flex: 1 1 50%;
    }
}

@media print {
    .rekap-detail-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rekap-detail-metric,
    .rekap-detail-subjects,
    .rekap-detail-table-card {
        break-inside: avoid;
        box-shadow: none !important;
    }

    .rekap-detail-table,
    .rekap-detail-records {
        min-width: 100%;
    }
}

html {
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg);
}

body {
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

.fade-in {
    animation: none;
}

button,
a,
input,
select,
textarea {
    letter-spacing: 0;
}

* {
    letter-spacing: 0 !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

/* Application shell */
.app-wrapper,
.main-area,
.content,
.content > *,
#mainContent,
#mainContent > * {
    min-width: 0;
}

.sidebar {
    width: 252px;
    top: 0;
    left: 0;
    height: 100vh;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: var(--card);
}

.sidebar-logo {
    min-height: 72px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.sidebar-brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1d4ed8;
    color: #ffffff;
    font-size: 16px;
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-logo h2 {
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logo p {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-close {
    display: none;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
}

.sidebar-nav {
    padding: 8px 10px 14px;
}

.nav-section {
    padding: 16px 10px 6px;
    color: #7a8493;
    font-size: 9px;
    letter-spacing: 0;
}

.nav-item {
    min-height: 38px;
    gap: 10px;
    margin: 1px 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    color: #465164;
    font-size: 12.5px;
    font-weight: 650;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
    background: #f1f4f8;
    border-color: transparent;
    color: #172033;
    transform: none;
}

.nav-item.active {
    background: #eaf2ff;
    color: #1d4ed8;
    border-color: transparent;
    box-shadow: inset 3px 0 0 #2563eb;
}

.nav-item i,
.nav-item.active i {
    width: 20px;
    color: currentColor !important;
    font-size: 14px;
}

.sidebar-footer {
    padding: 10px;
}

.conn-status {
    min-height: 44px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-color: var(--border-light);
    border-radius: 6px;
    background: #f7f8fa;
}

.conn-dot {
    width: 7px;
    height: 7px;
    animation: none;
    background: #059669 !important;
}

.sidebar-role {
    gap: 8px;
}

.sidebar-role-text small {
    font-size: 9px;
    font-weight: 650;
}

.sidebar-role-text span {
    font-size: 11px;
    font-weight: 750;
}

.conn-status > i {
    color: #059669 !important;
    font-size: 12px !important;
}

.btn-logout {
    min-height: 38px;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #b42318;
    font-size: 12px;
}

.btn-logout:hover {
    background: #fef3f2;
    border-color: #fecdca;
    transform: none;
}

.main-area {
    width: calc(100% - 252px);
    margin-left: 252px;
    overflow: visible;
    background: var(--bg);
}

.main-area::before,
.main-area::after {
    content: none;
    display: none;
}

.topbar {
    width: 100%;
    max-width: 100%;
    min-height: 72px;
    top: 0;
    margin: 0;
    padding: 12px 24px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.topbar-group {
    min-width: 0;
    flex: 1 1 auto;
    gap: 12px;
    overflow: hidden;
}

.topbar-heading {
    min-width: 0;
    gap: 2px;
    overflow: hidden;
}

.topbar-kicker {
    max-width: min(52vw, 620px);
    overflow: hidden;
    color: #667085;
    font-size: 9px;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-title {
    max-width: 100%;
    overflow: hidden;
    font-size: 20px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-subtitle {
    font-size: 12px;
}

.topbar-user {
    min-width: 0;
    flex: 0 0 auto;
    gap: 10px;
    padding: 4px 4px 4px 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #ffffff;
}

.topbar-user-name {
    max-width: 180px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-role {
    font-size: 10px;
    font-weight: 600;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #1f2937;
    box-shadow: none;
    font-size: 13px;
}

.content {
    width: 100%;
    padding: 20px 24px 32px;
}

.content .card[style*="padding:32px"],
.content .card[style*="padding: 32px"] {
    padding: 22px !important;
}

.content .card[style*="padding:24px"],
.content .card[style*="padding: 24px"] {
    padding: 18px !important;
}

#mainContent > .fade-in[style*="max-width:600px"],
#mainContent > .fade-in[style*="max-width: 600px"] {
    max-width: 720px !important;
}

#mainContent > .fade-in[style*="max-width:500px"],
#mainContent > .fade-in[style*="max-width: 500px"] {
    max-width: 560px !important;
}

/* Surfaces and controls */
.card {
    border-color: var(--border);
    border-radius: 8px;
    box-shadow: none;
    transition: border-color 0.15s ease;
}

.card:hover {
    border-color: var(--border);
    transform: none;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-export {
    min-height: 38px;
    justify-content: center;
    border-radius: 6px;
    padding: 8px 14px;
    box-shadow: none;
    font-size: 12.5px;
    line-height: 1.2;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
    background: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: #ffffff;
    color: #344054;
    border-color: #cfd5dd;
}

.btn-secondary:hover {
    background: #f7f8fa;
    border-color: #98a2b3;
    color: #172033;
}

.btn-danger {
    border-color: #fecdca;
    border-radius: 6px;
    background: #fff7f6;
    color: #b42318;
}

.btn-danger:hover {
    background: #b42318;
    border-color: #b42318;
}

.btn-export {
    background: #087f5b;
    color: #ffffff;
}

.btn-export:hover {
    background: #066b4c;
    box-shadow: none;
    transform: none;
}

.input-field,
.setup-input {
    min-height: 40px;
    border-color: #cfd5dd;
    border-radius: 6px;
    padding: 9px 12px;
    background: #ffffff;
    color: #172033;
    font-size: 13px;
    font-weight: 550;
}

.input-field:focus,
.setup-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-field::placeholder,
.setup-input::placeholder {
    color: #98a2b3;
}

.password-toggle-button {
    border-radius: 5px;
}

.compact-label,
.form-label {
    color: #667085;
    font-size: 10px;
    letter-spacing: 0;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #2563eb;
}

.table-responsive {
    margin-bottom: 0;
}

.table-pro thead th {
    padding: 11px 13px;
    background: #f5f7f9;
    border-bottom: 1px solid var(--border);
    color: #536174;
    font-size: 10px;
    letter-spacing: 0;
}

.table-pro tbody td {
    padding: 11px 13px;
    color: #273548;
    font-size: 12.5px;
    font-weight: 500;
}

.table-pro tbody tr:hover {
    background: #f8fafc;
}

.badge-blue,
.badge-green,
.badge-red,
.badge-gray,
.selection-counter,
.selection-badge {
    border-radius: 5px;
}

.badge-blue {
    color: #1d4ed8;
}

.badge-green {
    color: #047857;
}

.stat-card {
    gap: 12px;
    padding: 16px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 7px;
    font-size: 16px;
}

.stat-label {
    font-size: 10px;
    letter-spacing: 0;
}

.stat-value {
    font-size: 25px;
}

.status-btn {
    border-width: 1px;
    border-radius: 6px;
}

.jam-btn {
    min-width: 40px;
    min-height: 40px;
    border-width: 1px;
    border-radius: 6px;
    font-size: 14px;
}

.jam-btn.active,
.jam-btn.filled.active,
.absensi-calendar-day.is-selected {
    background: #2563eb;
    border-color: #2563eb;
    transform: none;
}

.absensi-date-display {
    min-height: 40px;
    padding: 8px 12px;
    border-color: #cfd5dd;
    border-radius: 6px;
    font-size: 13px;
}

.absensi-date-popover {
    border-radius: 8px;
    box-shadow: var(--shadow-elevated);
}

.absensi-calendar-nav,
.absensi-calendar-day,
.absensi-mobile-number,
.absensi-mobile-status-item {
    border-radius: 6px;
}

.absensi-mobile-card {
    padding: 14px;
}

.absensi-mobile-statuses {
    gap: 6px;
}

.absensi-mobile-status-item {
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.empty-note {
    padding: 14px;
    border-radius: 6px;
}

.selection-toolbar,
.selection-summary {
    margin-bottom: 10px;
}

.student-check-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.student-check-item {
    border-radius: 6px;
}

.student-check-item:hover {
    transform: none;
}

.tatib-searchable-field {
    display: grid;
    gap: 7px;
}

.tatib-search-input-wrap {
    position: relative;
    min-width: 0;
}

.tatib-search-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    color: #667085;
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
}

.tatib-search-input {
    padding-left: 38px !important;
}

.tatib-suggestion-list {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    z-index: 80;
    max-height: 280px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #cfd6e4;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(28, 35, 61, 0.14);
}

.tatib-suggestion-list[hidden] {
    display: none;
}

.tatib-suggestion-option {
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 9px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #17213d;
    font: inherit;
    text-align: left;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tatib-suggestion-option:hover,
.tatib-suggestion-option:focus-visible,
.tatib-suggestion-option.is-keyboard-active {
    outline: none;
    background: #f0edff;
}

.tatib-suggestion-main {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.tatib-suggestion-title,
.tatib-suggestion-subtitle {
    overflow-wrap: anywhere;
}

.tatib-suggestion-title {
    color: #17213d;
    font-size: 13px;
    font-weight: 800;
}

.tatib-suggestion-subtitle {
    color: #667085;
    font-size: 10px;
    font-weight: 600;
}

.tatib-suggestion-points {
    flex: 0 0 auto;
    padding: 4px 6px;
    border-radius: 5px;
    background: #f0edff;
    color: #5145cd;
    font-size: 10px;
    font-weight: 800;
}

.tatib-suggestion-empty {
    padding: 13px 10px;
    color: #667085;
    font-size: 12px;
    text-align: center;
}

.tatib-search-meta {
    min-height: 16px;
    color: #667085;
    font-size: 11px;
    font-weight: 600;
}

.tatib-massal-card {
    padding: 24px;
}

.tatib-massal-class-field {
    max-width: 520px;
    margin-bottom: 14px;
}

.tatib-batch-search {
    max-width: 760px;
    margin-bottom: 12px;
}

.tatib-massal-student-list {
    max-width: 760px;
    margin-bottom: 0;
}

.tatib-massal-rule-field {
    max-width: 760px;
    margin-top: 18px;
    margin-bottom: 16px;
    padding-top: 18px;
    border-top: 1px solid #e1e5ee;
}

.tatib-massal-meta-grid {
    display: grid;
    max-width: 980px;
    margin-bottom: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tatib-massal-wide-field {
    grid-column: 1 / -1;
}

.tatib-massal-photo-control {
    display: flex;
    min-width: 0;
    gap: 8px;
}

.tatib-massal-photo-control > .input-field {
    flex: 1;
    min-width: 0;
    padding: 8px;
}

.tatib-massal-submit {
    max-width: 980px;
}

.tatib-massal-submit > .btn-primary {
    width: 100%;
    justify-content: center;
}

.tatib-selection-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tatib-search-result-count {
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.tatib-search-result-count strong {
    color: #273548;
}

.student-check-copy {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.student-check-name,
.student-check-identity {
    overflow-wrap: anywhere;
}

.student-check-identity {
    color: #667085;
    font-size: 10px;
    font-weight: 600;
}

.tatib-recorded-badge {
    flex: 0 0 auto;
    padding: 3px 6px;
    border-radius: 5px;
    background: #d1fae5;
    color: #047857;
    font-size: 10px;
    font-weight: 800;
}

@media (max-width: 640px) {
    .tatib-massal-card {
        padding: 18px;
    }

    .tatib-massal-meta-grid {
        grid-template-columns: 1fr;
    }

    .tatib-massal-wide-field {
        grid-column: auto;
    }

    .tatib-selection-status,
    .tatib-filter-actions {
        width: 100%;
    }

    .tatib-filter-actions > button {
        flex: 1;
        justify-content: center;
    }

    .student-check-grid {
        grid-template-columns: 1fr;
    }
}

.panel-link,
.action-card,
.action-arrow,
.overview-badge,
.info-row,
.mini-row,
.mini-row-icon {
    border-radius: 6px;
}

.action-card:hover {
    box-shadow: none;
    transform: none;
}

/* Dashboard */
.dashboard-shell {
    gap: 16px;
}

.dashboard-shell-atmosphere {
    padding: 0;
}

.dashboard-shell-atmosphere::before,
.dashboard-shell-atmosphere::after {
    content: none;
    display: none;
}

.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
}

.metric-card {
    min-width: 0;
    min-height: 142px;
    gap: 10px;
    padding: 16px;
    border-top-width: 3px;
}

.metric-card.is-link:hover {
    border-color: #b8c1cc;
    border-top-color: currentColor;
    background: #fcfdff;
}

.metric-card.is-blue { border-top-color: #2563eb; }
.metric-card.is-green { border-top-color: #059669; }
.metric-card.is-violet { border-top-color: #4f46e5; }
.metric-card.is-orange { border-top-color: #d97706; }
.metric-card.is-pink { border-top-color: #be185d; }
.metric-card.is-red { border-top-color: #dc2626; }

.metric-card-head {
    align-items: flex-start;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    font-size: 15px;
}

.metric-trend {
    max-width: calc(100% - 50px);
    padding: 2px 0;
    border-radius: 0;
    background: transparent;
    color: #667085;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.35;
    text-align: right;
}

.metric-title {
    font-size: 10px;
    letter-spacing: 0;
}

.metric-value {
    margin-top: 6px;
    font-size: 30px;
}

.metric-card.is-blue .metric-icon {
    background: #eff6ff;
    color: #2563eb;
}

.metric-card.is-green .metric-icon {
    background: #ecfdf5;
    color: #047857;
}

.metric-card.is-violet .metric-icon {
    background: #eef2ff;
    color: #4f46e5;
}

.metric-card.is-orange .metric-icon {
    background: #fffbeb;
    color: #b45309;
}

.metric-card.is-pink .metric-icon {
    background: #fdf2f8;
    color: #be185d;
}

.metric-card.is-red .metric-icon {
    background: #fef2f2;
    color: #dc2626;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.7fr);
    gap: 12px;
    align-items: stretch;
}

.dashboard-panel {
    min-width: 0;
    padding: 18px;
}

.dashboard-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-panel-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.dashboard-panel-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-chart-layout {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.65fr);
    gap: 18px;
    align-items: center;
}

.dashboard-chart-wrap {
    height: 238px;
    min-width: 0;
}

.dashboard-chart-empty {
    height: 238px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.attendance-breakdown {
    display: grid;
    gap: 2px;
}

.attendance-breakdown-row,
.dashboard-summary-row {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.attendance-breakdown-row:last-child,
.dashboard-summary-row:last-child {
    border-bottom: 0;
}

.attendance-breakdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 650;
}

.attendance-swatch {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.attendance-breakdown-value,
.dashboard-summary-value {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-summary-list {
    display: grid;
}

.dashboard-summary-label {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-summary-action {
    width: 100%;
    margin-top: 16px;
}

.teacher-day-panel {
    padding: 16px;
}

.teacher-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.teacher-day-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.teacher-day-title i {
    color: #2563eb;
}

.teacher-day-count,
.teacher-day-empty {
    color: var(--muted);
    font-size: 11px;
}

.teacher-schedule-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.teacher-schedule-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
}

.teacher-schedule-item:hover {
    border-color: #98a2b3;
    background: #f8fafc;
}

.teacher-schedule-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
}

.teacher-schedule-copy {
    min-width: 0;
    flex: 1;
}

.teacher-schedule-subject {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-schedule-meta {
    overflow: hidden;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Login and initial setup */
.login-page {
    min-height: 100svh;
    padding: 24px;
    background: #f5efff;
}

.login-orb {
    display: none;
}

.login-shell {
    max-width: 520px;
    gap: 0;
}

.login-content {
    max-width: 420px;
    flex-basis: 420px;
}

.login-page.setup-active .login-content {
    max-width: 720px;
    flex-basis: 720px;
}

.login-top {
    margin-bottom: 18px;
}

.login-top-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #4f46e5;
    box-shadow: none;
    font-size: 19px;
}

.login-top h1 {
    margin-bottom: 4px;
    color: #172033;
    font-size: 23px;
    line-height: 1.3;
}

.login-top p {
    color: #667085;
    font-size: 12.5px;
}

.login-card {
    padding: 26px;
    border-color: #cdc1ff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    margin-bottom: 6px;
    color: #344054;
    font-size: 12px;
}

.input-wrap i {
    left: 13px;
    color: #667085;
    opacity: 1;
}

.input-wrap input {
    min-height: 42px;
    padding: 10px 42px 10px 38px;
    border: 1px solid #cfd5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #172033;
    font-size: 13px;
}

.input-wrap input:focus {
    border-color: #7371fc;
    box-shadow: 0 0 0 3px rgba(115, 113, 252, 0.14);
}

.pw-toggle {
    width: 34px;
    height: 34px;
    color: #667085;
}

.pw-toggle:hover {
    color: #4f46e5;
}

.login-btn {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 6px;
    background: #4f46e5;
    box-shadow: none;
    font-size: 13.5px;
}

.login-btn:hover {
    background: #4338ca;
    box-shadow: none;
    transform: none;
}

.login-footer {
    margin-top: 20px;
    color: #7a8493;
}

.setup-form {
    gap: 16px;
}

.setup-heading h2 {
    font-size: 18px;
}

/* Shared loading and maintenance states */
.loading-state {
    display: grid;
    min-height: 150px;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-secondary);
    text-align: center;
}

.loading-state-page {
    min-height: 220px;
}

.loading-state i {
    color: #2563eb;
    font-size: 24px;
}

.loading-state-page i {
    font-size: 28px;
}

.loading-state p {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
}

.maintenance-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    background: #f8fafc;
}

.maintenance-card {
    width: min(680px, 100%);
    padding: 28px;
}

.maintenance-card:hover {
    transform: none;
}

.maintenance-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.maintenance-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
}

.maintenance-heading h1 {
    margin: 0;
    font-size: 20px;
}

.maintenance-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
}

.maintenance-status {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.maintenance-status[data-tone="success"] {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.maintenance-status[data-tone="warning"] {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.maintenance-status[data-tone="error"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.maintenance-confirmation {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}

.maintenance-confirmation input {
    margin-top: 3px;
}

.maintenance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.maintenance-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* Dialogs */
.swal2-container {
    padding: 12px !important;
}

.swal2-popup {
    width: min(420px, calc(100vw - 24px)) !important;
    padding: 24px !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 10px !important;
    box-shadow: var(--shadow-elevated) !important;
}

.swal2-icon {
    width: 64px !important;
    height: 64px !important;
    margin: 4px auto 18px !important;
    font-size: 12px !important;
}

.swal2-title {
    padding: 0 !important;
    font-size: 21px !important;
    line-height: 1.3 !important;
}

.swal2-html-container {
    margin: 10px 0 0 !important;
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

.swal2-actions {
    gap: 8px;
    margin-top: 20px !important;
}

.swal2-confirm,
.swal2-cancel,
.swal2-deny {
    min-height: 38px;
    margin: 0 !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
}

.swal2-confirm {
    background: #2563eb !important;
}

.swal2-input,
.swal2-select,
.swal2-textarea {
    border-radius: 6px !important;
    font-size: 13px !important;
}

@media (max-width: 1040px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-layout {
        grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: min(86vw, 300px);
        top: 0;
        left: 0;
        height: 100dvh;
        border-radius: 0;
        box-shadow: 10px 0 30px rgba(23, 32, 51, 0.14);
        transform: translateX(-101%);
    }

    .sidebar-close {
        display: inline-flex;
    }

    .mobile-overlay {
        background: rgba(15, 23, 42, 0.42);
    }

    .main-area {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        min-height: 64px;
        top: 0;
        margin: 0;
        padding: 10px 12px;
        border-radius: 0;
    }

    .mobile-header {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--border) !important;
        border-radius: 6px;
        background: #ffffff !important;
        color: #344054 !important;
        font-size: 15px !important;
        padding: 0 !important;
    }

    .topbar-title {
        font-size: 17px;
    }

    .topbar-user {
        padding: 3px;
    }

    .topbar-avatar {
        width: 34px;
        height: 34px;
    }

    .content {
        padding: 12px 12px 24px;
    }

    .card {
        overflow: visible !important;
    }

    .card.table-card,
    .table-card {
        max-width: 100%;
        overflow-x: auto !important;
    }

    .card[style*="overflow-x:auto"],
    .card[style*="overflow-x: auto"],
    .table-responsive,
    [style*="overflow-x:auto"]:has(> .table-pro),
    [style*="overflow-x: auto"]:has(> .table-pro) {
        max-width: 100%;
        overflow-x: auto !important;
    }

    .schedule-edit-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

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

    .metric-card {
        min-height: 132px;
        padding: 13px;
    }

    .metric-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .metric-value {
        font-size: 27px;
    }

    .dashboard-panel {
        padding: 14px;
    }

    .dashboard-chart-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dashboard-chart-wrap,
    .dashboard-chart-empty {
        height: 210px;
    }

    .teacher-schedule-list {
        grid-template-columns: 1fr;
    }

    #rekap-filters > div[style*="display:flex"] > button {
        flex: 1 1 120px;
    }
}

@media (max-width: 520px) {
    .topbar-user-meta {
        display: none;
    }

    .topbar-kicker {
        max-width: 54vw;
    }

    .login-page {
        padding: 18px 0;
    }

    .login-content {
        padding: 0 14px 14px;
    }

    .login-top-icon {
        display: inline-flex;
    }

    .login-top h1 {
        font-size: 21px;
    }

    .login-card {
        padding: 22px 18px;
    }

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

    .settings-card {
        padding: 18px;
    }

    .settings-grid,
    .settings-inline {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .data-form-grid,
    .data-filter-grid {
        grid-template-columns: 1fr;
    }

    .data-list-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .data-secondary-actions > button {
        flex: 1 1 140px;
    }

    .settings-inline > .btn-primary {
        width: 100%;
        justify-content: center;
    }

    #mainContent .fade-in[style*="max-width:600px"] [style*="grid-template-columns:1fr 1fr"],
    #mainContent .fade-in[style*="max-width: 600px"] [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .absensi-actions {
        gap: 8px;
    }

    #rekap-filters > div[style*="display:flex"] {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
        width: 100%;
        min-width: 0;
    }

    #rekap-filters > div[style*="display:flex"] > div {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0 !important;
    }

    #rekap-filters > div[style*="display:flex"] > button {
        width: 100%;
        min-width: 0;
        padding-right: 7px;
        padding-left: 7px;
        font-size: 11px;
        white-space: nowrap;
    }
}

@media (max-width: 350px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 120px;
    }
}

@media print {
    .content {
        padding: 0 !important;
    }
}

/* Lavender identity palette */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline-color: rgba(115, 113, 252, 0.26);
}

.sidebar-brand-mark,
.topbar-avatar,
.btn-primary {
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.nav-item.active {
    background: #f5efff;
    color: var(--primary);
    box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item:hover {
    background: #faf8ff;
}

.input-field:focus,
.setup-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(115, 113, 252, 0.14);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
}

.jam-btn.active,
.jam-btn.filled.active,
.absensi-calendar-day.is-selected {
    background: var(--primary);
    border-color: var(--primary);
}

.data-badge.is-principal {
    background: #f5efff;
    color: #4f46e5;
    border: 1px solid #cdc1ff;
}

/* Attendance journal */
.absensi-journal-card {
    padding: 18px;
}

.absensi-journal-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.absensi-journal-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.absensi-journal-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
}

.absensi-journal-range {
    flex: 0 0 auto;
    min-width: 62px;
    padding: 7px 10px;
    border: 1px solid #cdc1ff;
    border-radius: 6px;
    background: #f5efff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.absensi-session-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.absensi-summary-item {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #fbfaff;
}

.absensi-summary-item > span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
}

.absensi-summary-item > strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 12px;
}

.absensi-journal-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.absensi-journal-fields textarea.input-field {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    line-height: 1.5;
}

.absensi-journal-fields textarea.is-readonly {
    background: #f5f5f7;
    color: #667085;
    cursor: not-allowed;
}

.field-required {
    color: #dc2626;
}

.field-optional {
    color: #98a2b3;
    font-size: 9px;
    font-weight: 650;
    text-transform: none;
}

.journal-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 26px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
}

.journal-status-badge.is-scheduled {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.journal-status-badge.is-substitute {
    border-color: #cdc1ff;
    background: #f5efff;
    color: #4f46e5;
}

.journal-status-badge.is-outside,
.journal-status-badge.is-duty {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.journal-status-badge.is-missing {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.absensi-journal-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.45;
}

.absensi-journal-notice.is-info {
    border-color: #cdc1ff;
    background: #f5efff;
    color: #4338ca;
}

.absensi-journal-notice.is-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

/* Journal and compliance filters */
.journal-scope-tabs,
.pantau-mode-tabs,
.pantau-view-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
}

.journal-scope-tabs button,
.pantau-mode-tabs button,
.pantau-view-tabs button {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-secondary);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.journal-scope-tabs button.is-active,
.pantau-mode-tabs button.is-active,
.pantau-view-tabs button.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.pantau-view-tabs {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.pantau-view-tabs button {
    min-height: 42px;
    padding-inline: 16px;
}

.journal-filter-card,
.pantau-filter-card {
    padding: 16px;
    margin-bottom: 14px;
}

.journal-filter-grid,
.pantau-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 10px;
    align-items: end;
}

.pantau-filter-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.filter-field {
    min-width: 0;
}

.filter-field > label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-field .input-field {
    width: 100%;
    min-height: 40px;
}

.journal-search-field {
    grid-column: span 2;
}

.input-with-icon {
    position: relative;
}

.input-with-icon > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #98a2b3;
    pointer-events: none;
}

.input-with-icon .input-field {
    padding-left: 34px;
}

.journal-filter-actions,
.pantau-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.journal-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.journal-metric,
.pantau-summary-item {
    position: relative;
    min-width: 0;
    min-height: 86px;
    padding: 14px 44px 14px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.journal-metric > span,
.pantau-summary-item > span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.journal-metric > strong,
.pantau-summary-item > strong {
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.journal-metric > i,
.pantau-summary-item > i {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--accent);
    font-size: 16px;
}

.journal-metric.has-warning {
    border-color: #fde68a;
}

.journal-metric.has-warning > i {
    color: #d97706;
}

.journal-result-meta,
.pantau-result-meta {
    margin: 0 2px 8px;
    color: var(--muted);
    font-size: 11px;
}

.journal-table-card,
.pantau-table-card {
    overflow: hidden;
}

.journal-table,
.pantau-table {
    min-width: 1040px;
}

.journal-table td strong,
.pantau-table td strong {
    display: block;
}

.journal-table td small,
.pantau-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.journal-material-cell {
    min-width: 220px;
    max-width: 320px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.journal-empty-value {
    color: #b45309;
    font-style: italic;
}

.journal-pagination,
.pantau-pagination {
    justify-content: center;
    margin-top: 14px;
}

.journal-pagination .btn-primary,
.journal-pagination .btn-secondary,
.pantau-pagination .btn-primary,
.pantau-pagination .btn-secondary,
.pantau-detail-pagination .btn-secondary {
    width: 38px;
    min-width: 38px;
    padding: 8px;
}

.empty-state-panel {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 34px 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state-panel > i {
    color: var(--accent);
    font-size: 24px;
}

.empty-state-panel > strong {
    color: var(--text);
    font-size: 14px;
}

.empty-state-panel > span {
    font-size: 11px;
}

.journal-detail-modal {
    color: var(--text);
    text-align: left;
}

.journal-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.journal-detail-grid > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #fbfaff;
}

.journal-detail-grid span,
.journal-detail-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.journal-detail-grid strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.journal-detail-label {
    margin-top: 11px;
}

.journal-detail-textarea.swal2-textarea {
    width: 100%;
    min-height: 100px;
    margin: 0;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.journal-detail-copy {
    min-height: 46px;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #fbfaff;
    font-size: 12px;
    line-height: 1.55;
}

/* Compliance */
.pantau-daily-filter-card {
    padding: 16px;
    margin-bottom: 14px;
}

.pantau-daily-filter-row {
    display: flex;
    align-items: end;
    gap: 10px;
}

.pantau-daily-filter-row .filter-field {
    width: min(220px, 100%);
}

.pantau-daily-filter-row .btn-primary {
    min-height: 40px;
}

.pantau-daily-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 10px;
}

.pantau-daily-meta > div {
    min-width: 0;
}

.pantau-daily-meta strong,
.pantau-daily-meta span {
    display: block;
}

.pantau-daily-meta strong {
    color: var(--text);
    font-size: 13px;
}

.pantau-daily-meta > div > span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.pantau-daily-total {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
}

.pantau-daily-list {
    display: grid;
    gap: 12px;
}

.pantau-daily-class {
    min-width: 0;
    padding: 14px;
    overflow: hidden;
}

.pantau-daily-class-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pantau-daily-class-header > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.pantau-daily-class-header i {
    flex: 0 0 auto;
    color: var(--primary);
}

.pantau-daily-class-header h3 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 13px;
}

.pantau-daily-class-header > span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.pantau-daily-period-scroll {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
}

.pantau-daily-period-grid {
    display: grid;
    grid-template-columns: repeat(var(--pantau-period-count), minmax(102px, 1fr));
    min-width: calc(var(--pantau-period-count) * 110px);
    gap: 8px;
}

.pantau-daily-period {
    display: grid;
    min-width: 0;
    min-height: 62px;
    align-content: center;
    justify-items: center;
    gap: 5px;
    padding: 8px 6px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #fafafa;
    text-align: center;
}

.pantau-daily-period > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.pantau-daily-period > strong {
    width: 100%;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.25;
}

.pantau-daily-period.is-filled {
    border-color: #a7e8ca;
    background: #ecfdf5;
}

.pantau-daily-period.is-filled > strong {
    color: #047857;
}

.pantau-daily-period.is-empty {
    border-color: #f1d8dc;
    background: #fffafa;
}

.pantau-daily-period.is-empty > strong {
    color: #dc2626;
}

.pantau-range-field {
    grid-column: span 2;
}

.pantau-date-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.pantau-date-range > span {
    color: var(--muted);
    font-size: 10px;
}

.pantau-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.pantau-summary-item {
    min-height: 92px;
    padding-right: 36px;
}

.pantau-summary-item > strong {
    font-size: 21px;
}

.pantau-summary-item strong small {
    font-size: 10px;
}

.pantau-summary-item.is-success > i {
    color: #059669;
}

.pantau-summary-item.is-substitute > i {
    color: #7371fc;
}

.pantau-summary-item.is-duty > i {
    color: #d97706;
}

.pantau-summary-item.is-danger {
    border-color: #fecaca;
}

.pantau-summary-item.is-danger > i {
    color: #dc2626;
}

.pantau-class-list {
    max-width: 220px;
}

.pantau-class-list > span {
    display: inline-block;
    margin: 2px 3px 2px 0;
    padding: 3px 6px;
    border-radius: 4px;
    background: #f5efff;
    color: #4f46e5;
    font-size: 9px;
    font-weight: 700;
}

.is-success-text {
    color: #047857 !important;
}

.is-substitute-text {
    color: #4f46e5 !important;
}

.is-danger-text {
    color: #b91c1c !important;
}

.pantau-rate {
    position: relative;
    width: 112px;
    height: 28px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background: #f5f5f7;
}

.pantau-rate > span {
    position: absolute;
    inset: 0 auto 0 0;
    background: #a7f3d0;
}

.pantau-rate.is-medium > span {
    background: #fde68a;
}

.pantau-rate.is-low > span {
    background: #fecaca;
}

.pantau-rate > strong {
    position: relative;
    z-index: 1;
    display: grid;
    height: 100%;
    place-items: center;
    color: #172033;
    font-size: 10px;
}

.pantau-detail-modal {
    color: var(--text);
    text-align: left;
}

.pantau-detail-toolbar,
.pantau-detail-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pantau-detail-toolbar .input-field {
    width: min(260px, 100%);
}

.pantau-detail-toolbar > span,
.pantau-detail-pagination > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.pantau-detail-table {
    min-width: 760px;
}

.pantau-detail-pagination {
    justify-content: center;
    margin: 12px 0 0;
}

.pantau-detail-empty {
    padding: 24px !important;
    color: var(--muted) !important;
    text-align: center;
}

/* Settings additions */
.settings-journal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 12px;
    align-items: end;
    margin-top: 16px;
}

.settings-field-note {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fbfaff;
    cursor: pointer;
}

.settings-toggle-row input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.settings-toggle-row strong,
.settings-toggle-row small {
    display: block;
}

.settings-toggle-row strong {
    color: var(--text);
    font-size: 12px;
}

.settings-toggle-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

/* Report layouts */
.journal-print-meta,
.pantau-print-meta {
    margin-bottom: 10px;
    text-align: center;
    font-size: 11px;
}

@media (max-width: 1180px) {
    .journal-filter-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .pantau-filter-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

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

@media (max-width: 760px) {
    .absensi-session-summary,
    .absensi-session-fields,
    .absensi-journal-fields,
    .journal-filter-grid,
    .pantau-filter-grid,
    .journal-detail-grid,
    .settings-journal-grid {
        grid-template-columns: 1fr;
    }

    .journal-search-field,
    .pantau-range-field {
        grid-column: auto;
    }

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

    .absensi-journal-heading {
        align-items: flex-start;
    }

    .journal-filter-actions > button,
    .pantau-filter-actions > button {
        flex: 1 1 150px;
    }

    .pantau-date-range {
        grid-template-columns: 1fr;
    }

    .pantau-date-range > span {
        display: none;
    }
}

@media (max-width: 520px) {
    .journal-metric-grid,
    .pantau-summary-grid {
        grid-template-columns: 1fr;
    }

    .journal-filter-actions,
    .pantau-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .journal-filter-actions > button,
    .pantau-filter-actions > button {
        width: 100%;
        min-width: 0;
    }

    .journal-scope-tabs button,
    .pantau-mode-tabs button,
    .pantau-view-tabs button {
        padding-inline: 10px;
        font-size: 11px;
    }

    .pantau-daily-filter-row,
    .pantau-daily-class-header,
    .pantau-daily-meta {
        align-items: stretch;
    }

    .pantau-daily-filter-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .pantau-daily-filter-row .filter-field,
    .pantau-daily-filter-row .btn-primary {
        width: 100%;
    }

    .pantau-daily-class-header,
    .pantau-daily-meta {
        flex-direction: column;
    }

    .pantau-daily-class-header > span,
    .pantau-daily-total {
        align-self: flex-start;
    }
}

@media print {
    .journal-print-report,
    .pantau-print-report {
        display: block !important;
        width: 100% !important;
    }

    .journal-print-table,
    .pantau-print-table {
        width: 100% !important;
        table-layout: fixed;
        margin-top: 6px !important;
    }

    .journal-print-table th,
    .journal-print-table td,
    .pantau-print-table th,
    .pantau-print-table td {
        border: 1px solid #000 !important;
        padding: 3px 4px !important;
        color: #000 !important;
        font-size: 7.5px !important;
        line-height: 1.25 !important;
        overflow-wrap: anywhere;
        vertical-align: top;
    }

    .journal-print-table tr,
    .pantau-print-table tr {
        break-inside: avoid;
    }

    .signature-section {
        margin-top: 20px !important;
    }

    .sig-space {
        height: 90px !important;
    }
}

/* Professional attendance reports */
@page smanika-attendance-report {
    size: A4 landscape;
    margin: 10mm 8mm 12mm;

    @bottom-left {
        content: "Sistem Absensi Sekolah";
        color: #555b66;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 7pt;
    }

    @bottom-right {
        content: "Halaman " counter(page) " dari " counter(pages);
        color: #555b66;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 7pt;
    }
}

@media print {
    #rekap-result {
        page: smanika-attendance-report;
        width: 100% !important;
        color: #16181d !important;
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 8pt !important;
        line-height: 1.25 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .print-report-header {
        margin: 0 0 3.5mm !important;
        break-after: avoid;
        page-break-after: avoid;
    }

    .print-report-header .kop-surat {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    .print-letterhead {
        position: relative;
        display: grid !important;
        grid-template-columns: 20mm minmax(0, 1fr) 20mm;
        align-items: center;
        gap: 3mm;
        min-height: 18mm;
        padding: 0 0 2.4mm;
        border-bottom: 1.4pt solid #16181d;
    }

    .print-letterhead::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: -1.4mm;
        left: 0;
        border-bottom: 0.45pt solid #16181d;
    }

    .print-logo-slot {
        width: 20mm;
        height: 17mm;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .print-logo-slot img {
        max-width: 17mm !important;
        max-height: 17mm !important;
        object-fit: contain;
    }

    .print-letterhead-copy {
        min-width: 0;
        text-align: center;
    }

    .print-letterhead-copy h1,
    .print-letterhead-copy h2,
    .print-letterhead-copy p {
        margin: 0 !important;
        color: #111318 !important;
        line-height: 1.18 !important;
        letter-spacing: 0 !important;
    }

    .print-letterhead-copy h1 {
        font-size: 10.5pt !important;
        font-weight: 700 !important;
        text-transform: uppercase;
    }

    .print-letterhead-copy h2 {
        margin-top: 0.4mm !important;
        font-size: 13pt !important;
        font-weight: 800 !important;
        text-transform: uppercase;
    }

    .print-kop-line {
        font-size: 7.7pt !important;
    }

    .print-kop-authority {
        margin-bottom: 0.5mm !important;
        font-size: 8.5pt !important;
        font-weight: 700 !important;
        text-transform: uppercase;
    }

    .print-kop-contact {
        margin-top: 0.4mm !important;
        font-size: 7.2pt !important;
    }

    .print-report-title {
        margin: 4mm 0 1.5mm;
        text-align: center;
    }

    .print-report-title h3 {
        margin: 0 !important;
        color: #111318 !important;
        font-size: 11pt !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-decoration: none !important;
        text-transform: uppercase;
    }

    #rekap-result .rekap-period-meta,
    #rekap-result .rekap-detail-print-meta {
        margin: 0 0 3mm !important;
        color: #2f333a !important;
        font-size: 8pt !important;
        font-weight: 600 !important;
        text-align: center !important;
    }

    #rekap-result .rekap-status-overview,
    #rekap-result .rekap-status-section,
    #rekap-result .rekap-detail-subjects,
    #rekap-result .rekap-detail-table-card,
    #rekap-result .attendance-incident-section {
        margin: 0 0 4mm !important;
        padding: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    #rekap-result .rekap-status-overview {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    #rekap-result .rekap-status-section,
    #rekap-result .rekap-detail-subjects,
    #rekap-result .rekap-detail-table-card,
    #rekap-result .attendance-incident-section {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    #rekap-result .rekap-status-overview > header,
    #rekap-result .rekap-status-section-head,
    #rekap-result .rekap-detail-section-head,
    #rekap-result .attendance-incident-heading {
        min-height: 0 !important;
        margin: 0 0 1.5mm !important;
        padding: 0 0 1mm !important;
        align-items: flex-end !important;
        border: 0 !important;
        border-bottom: 0.7pt solid #42464d !important;
        background: transparent !important;
        break-after: avoid;
        page-break-after: avoid;
    }

    #rekap-result .rekap-status-overview h3,
    #rekap-result .rekap-status-section-head h3,
    #rekap-result .rekap-detail-section-head h3,
    #rekap-result .attendance-incident-heading h3 {
        margin: 0 !important;
        color: #16181d !important;
        font-size: 8.5pt !important;
        font-weight: 800 !important;
    }

    #rekap-result .rekap-status-overview h3 i,
    #rekap-result .rekap-status-section-head h3 i,
    #rekap-result .rekap-detail-section-head h3 i,
    #rekap-result .attendance-incident-heading h3 i {
        display: none !important;
    }

    #rekap-result .attendance-incident-eyebrow {
        color: #555b66 !important;
        font-size: 6.5pt !important;
        font-weight: 700 !important;
        text-transform: uppercase;
    }

    #rekap-result .attendance-incident-count {
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #3e4249 !important;
        font-size: 7pt !important;
        font-weight: 700 !important;
    }

    #rekap-result .rekap-status-metrics,
    #rekap-result .rekap-detail-metrics {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 0 !important;
        overflow: hidden;
        border: 0.5pt solid #565b63;
        border-radius: 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    #rekap-result .rekap-detail-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        margin-bottom: 4mm !important;
    }

    #rekap-result .rekap-status-metrics > div,
    #rekap-result .rekap-detail-metric {
        min-height: 0 !important;
        padding: 1.6mm 2mm !important;
        border: 0 !important;
        border-right: 0.5pt solid #8a8e95 !important;
        border-radius: 0 !important;
        background: #f5f6f7 !important;
    }

    #rekap-result .rekap-status-metrics > div:last-child,
    #rekap-result .rekap-detail-metric:last-child {
        border-right: 0 !important;
    }

    #rekap-result .rekap-status-metrics span,
    #rekap-result .rekap-detail-metric span {
        color: #3e4249 !important;
        font-size: 6.5pt !important;
        font-weight: 700 !important;
        text-transform: uppercase;
    }

    #rekap-result .rekap-status-metrics strong,
    #rekap-result .rekap-detail-metric strong {
        margin-top: 0.6mm !important;
        color: #111318 !important;
        font-size: 11pt !important;
        font-weight: 800 !important;
    }

    #rekap-result .rekap-status-metrics strong small,
    #rekap-result .rekap-detail-metric strong small {
        color: #555b66 !important;
        font-size: 6.5pt !important;
    }

    #rekap-result .table-responsive,
    #rekap-result .attendance-incident-scroll {
        width: 100% !important;
        max-height: none !important;
        margin: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    #rekap-result table {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        border-collapse: collapse !important;
        border-spacing: 0 !important;
        color: #16181d !important;
    }

    #rekap-result table thead {
        display: table-header-group;
    }

    #rekap-result table tfoot {
        display: table-footer-group;
    }

    #rekap-result table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    #rekap-result table th,
    #rekap-result table td {
        padding: 1.25mm 1.4mm !important;
        border: 0.5pt solid #565b63 !important;
        background: #ffffff !important;
        color: #16181d !important;
        font-size: 7pt !important;
        line-height: 1.2 !important;
        overflow-wrap: anywhere !important;
        vertical-align: middle !important;
    }

    #rekap-result table thead th {
        background: #e9ebee !important;
        color: #111318 !important;
        font-weight: 800 !important;
        text-align: center !important;
        text-transform: uppercase;
    }

    #rekap-result table tbody tr:nth-child(even) td {
        background: #f8f8f8 !important;
    }

    #rekap-result table td span,
    #rekap-result table td small,
    #rekap-result table td strong {
        color: inherit !important;
    }

    #rekap-result .rekap-status-summary-table {
        table-layout: fixed !important;
    }

    #rekap-result .rekap-status-summary-table th:nth-child(2),
    #rekap-result .rekap-status-summary-table td:nth-child(2) {
        width: 29% !important;
        min-width: 0 !important;
        text-align: left !important;
    }

    #rekap-result .rekap-status-calendar {
        width: 100% !important;
        table-layout: fixed !important;
        font-size: 6pt !important;
    }

    #rekap-result .rekap-status-calendar th,
    #rekap-result .rekap-status-calendar td {
        position: static !important;
        min-width: 0 !important;
        height: auto !important;
        padding: 0.8mm 0.35mm !important;
        font-size: 5.8pt !important;
        text-align: center !important;
    }

    #rekap-result .rekap-status-calendar th:first-child,
    #rekap-result .rekap-status-calendar td:first-child {
        width: 6mm !important;
    }

    #rekap-result .rekap-status-calendar th:nth-child(2),
    #rekap-result .rekap-status-calendar td:nth-child(2) {
        width: 35mm !important;
        max-width: none !important;
        text-align: left !important;
    }

    #rekap-result .rekap-status-calendar th small {
        margin-top: 0.4mm !important;
        color: #555b66 !important;
        font-size: 5pt !important;
    }

    #rekap-result .rekap-status-calendar .is-off {
        background: #eeeeee !important;
        color: #777c84 !important;
    }

    #rekap-result .daily-rekap-table {
        table-layout: fixed !important;
    }

    #rekap-result .daily-rekap-table th,
    #rekap-result .daily-rekap-table td {
        padding: 1mm 1.1mm !important;
        font-size: 6.6pt !important;
    }

    #rekap-result .daily-rekap-table th:first-child,
    #rekap-result .daily-rekap-table td:first-child {
        width: 7mm !important;
    }

    #rekap-result .daily-rekap-table th:nth-child(2),
    #rekap-result .daily-rekap-table td:nth-child(2) {
        width: 42mm !important;
        white-space: normal !important;
    }

    #rekap-result .daily-rekap-table .daily-status-column {
        width: 18mm !important;
        min-width: 0 !important;
    }

    #rekap-result .daily-rekap-table .daily-izin-column {
        width: 40mm !important;
    }

    #rekap-result .attendance-incident-table {
        table-layout: fixed !important;
    }

    #rekap-result .attendance-incident-table th,
    #rekap-result .attendance-incident-table td {
        padding: 1mm 1.2mm !important;
        font-size: 6.4pt !important;
        vertical-align: top !important;
    }

    #rekap-result .attendance-incident-table th:nth-child(1) { width: 5%; }
    #rekap-result .attendance-incident-table th:nth-child(2) { width: 10%; }
    #rekap-result .attendance-incident-table th:nth-child(3) { width: 15%; }
    #rekap-result .attendance-incident-table th:nth-child(4) { width: 8%; }
    #rekap-result .attendance-incident-table th:nth-child(5) { width: 7%; }
    #rekap-result .attendance-incident-table th:nth-child(6) { width: 12%; }
    #rekap-result .attendance-incident-table th:nth-child(7) { width: 12%; }
    #rekap-result .attendance-incident-table th:nth-child(8) { width: 15%; }
    #rekap-result .attendance-incident-table th:nth-child(9) { width: 16%; }

    #rekap-result .attendance-incident-status,
    #rekap-result .rekap-detail-status {
        display: inline !important;
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #16181d !important;
        font-size: inherit !important;
        font-weight: 700 !important;
        line-height: inherit !important;
    }

    #rekap-result .print-status-full {
        display: inline !important;
    }

    #rekap-result .rekap-detail-unmapped {
        width: auto !important;
        margin: 0.5mm 0 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #3e4249 !important;
        font-size: 6pt !important;
        font-style: italic;
        white-space: normal !important;
    }

    #rekap-result .rekap-detail-table,
    #rekap-result .rekap-detail-records {
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    #rekap-result .rekap-detail-records th,
    #rekap-result .rekap-detail-records td {
        padding: 0.85mm 1mm !important;
        font-size: 5.8pt !important;
        vertical-align: top !important;
    }

    #rekap-result .attendance-incident-empty,
    #rekap-result .rekap-empty-state {
        margin: 0 !important;
        padding: 3mm !important;
        border: 0.5pt solid #8a8e95 !important;
        border-radius: 0 !important;
        background: #ffffff !important;
        color: #3e4249 !important;
        font-size: 7.5pt !important;
        text-align: center;
    }

    .print-report-footer {
        clear: both;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-report-footer .signature-section {
        width: calc(100% - 24mm) !important;
        margin: 9mm 12mm 0 !important;
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(55mm, 72mm) minmax(55mm, 72mm) !important;
        justify-content: space-between !important;
        gap: 35mm !important;
        color: #16181d !important;
        font-size: 8pt !important;
        text-align: left !important;
    }

    .print-report-footer .sig-box {
        min-width: 0;
        display: flex !important;
        align-items: stretch !important;
        flex-direction: column !important;
        overflow: visible !important;
        text-align: left !important;
    }

    .print-report-footer .signature-section p {
        margin: 0 0 0.6mm !important;
        color: #16181d !important;
        font-size: 8pt !important;
        line-height: 1.25 !important;
    }

    .print-report-footer .sig-space {
        height: 20mm !important;
    }

    .print-report-footer .sig-name {
        display: block !important;
        font-weight: 700 !important;
        text-decoration: underline !important;
        text-decoration-thickness: 0.45pt !important;
        text-underline-offset: 1mm !important;
        white-space: normal !important;
    }

    .print-report-footer .print-generated-at {
        margin: 8mm 0 0 !important;
        padding-top: 1.5mm !important;
        border-top: 0.4pt solid #b3b6bb;
        color: #666b73 !important;
        font-size: 6.5pt !important;
        text-align: right !important;
    }
}
