@font-face {
    font-family: "KanitDuty";
    src: url("../font/Kanit-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "THSarabunDuty";
    src: url("../font/THSarabunPSK.ttf") format("truetype");
}

@font-face {
    font-family: "THSarabunDuty";
    src: url("../font/THSarabunPSK-Bold.ttf") format("truetype");
    font-weight: 700;
}

:root {
    --duty-primary: #16685a;
    --duty-primary-dark: #0d4c42;
    --duty-accent: #f2b705;
    --duty-bg: #f6f8f7;
    --duty-card: #ffffff;
    --duty-line: #dfe7e3;
}

body.app-page {
    font-family: "KanitDuty", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--duty-bg);
    color: #18231f;
    font-size: 18px;
}

.duty-navbar {
    background: var(--duty-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

.duty-navbar .navbar-brand,
.duty-navbar .nav-link,
.duty-user {
    color: #fff;
}

.duty-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .45);
}

.duty-navbar .navbar-toggler-icon {
    filter: invert(1) grayscale(1);
}

.duty-navbar .nav-link {
    border-radius: 8px;
    padding-left: .85rem;
    padding-right: .85rem;
}

.duty-navbar .nav-link:hover {
    background: rgba(255, 255, 255, .13);
    color: #fff;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 10px;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
}

.logout-icon {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px;
    fill: currentColor;
}

.logout-button:hover,
.logout-button:focus {
    color: #fff;
}

.duty-main {
    max-width: 980px;
    padding-top: 0;
    padding-bottom: 48px;
}

.login-shell {
    min-height: calc(100vh - 170px);
}

.term-line,
.term-pill {
    display: block;
    padding: 0;
    margin: 8px 0 14px;
    background: transparent;
    border: 0;
    color: #364941;
    font-size: 18px;
    text-align: center;
}

.duty-card {
    background: var(--duty-card);
    border: 1px solid var(--duty-line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(24, 35, 31, .06);
}

.points-heading {
    max-width: 760px;
    margin: 0 auto 18px;
    text-align: center;
}

.points-heading h1 {
    margin-bottom: 6px;
    color: #24332e;
    font-size: 24px;
    font-weight: 700;
}

.points-heading p {
    margin-bottom: 0;
    color: #65766f;
    font-size: 16px;
}

.points-toolbar {
    max-width: 980px;
    margin: 0 auto 12px;
    display: flex;
    justify-content: flex-end;
}

.point-add-button,
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 18px;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
}

.action-btn {
    min-height: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.points-table {
    table-layout: fixed;
}

.points-table th,
.points-table td,
.periods-table th,
.periods-table td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.periods-table,
.points-table {
    table-layout: fixed;
}

.points-table th:nth-child(1),
.points-table td:nth-child(1) {
    width: 86px;
}

.points-table th:nth-child(3),
.points-table td:nth-child(3) {
    width: 130px;
}

.points-table th:nth-child(4),
.points-table td:nth-child(4) {
    width: 240px;
}

.periods-table th:nth-child(1),
.periods-table td:nth-child(1) {
    width: 86px;
}

.periods-table th:nth-child(3),
.periods-table td:nth-child(3) {
    width: 150px;
}

.periods-table th:nth-child(4),
.periods-table td:nth-child(4) {
    width: 120px;
}

.periods-table th:nth-child(5),
.periods-table td:nth-child(5) {
    width: 240px;
}

.roster-tabs {
    justify-content: center;
    gap: 8px;
}

.roster-tabs .nav-link {
    border-radius: 999px;
    color: var(--duty-primary);
    font-weight: 700;
}

.roster-tabs .nav-link.active {
    background: var(--duty-primary);
}

.roster-toolbar {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.roster-table {
    table-layout: fixed;
}

.roster-table th,
.roster-table td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.roster-table th:nth-child(1),
.roster-table td:nth-child(1) {
    width: 130px;
}

.roster-table th:nth-child(3),
.roster-table td:nth-child(3) {
    width: 300px;
}

.roster-table th:nth-child(4),
.roster-table td:nth-child(4) {
    width: 110px;
}

.roster-table th:nth-child(5),
.roster-table td:nth-child(5) {
    width: 270px;
}

.roster-matrix-table {
    min-width: 1040px;
    table-layout: fixed;
}

.roster-matrix-table th,
.roster-matrix-table td {
    padding: 12px 10px;
    vertical-align: top;
}

.roster-matrix-table th:first-child,
.roster-matrix-table td:first-child {
    width: 240px;
}

.roster-slot-name {
    font-weight: 700;
}

.roster-day-cell {
    min-height: 86px;
    background: #fbfdfc;
}

.roster-day-cell.is-inactive {
    background: #f6f7f7;
}

.roster-cell-link {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 5px;
    min-height: 78px;
    color: inherit;
    text-decoration: none;
}

.roster-cell-link:hover {
    color: var(--duty-primary-dark);
}

.roster-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border: 1px dashed #a9b9b3;
    border-radius: 8px;
    color: #60716a;
    font-size: 15px;
}

.table-muted {
    margin-top: 2px;
    color: #71827a;
    font-size: 14px;
}

.teacher-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px;
}

.teacher-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 12px;
    border: 1px solid var(--duty-line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.teacher-check:has(input:checked) {
    border-color: var(--duty-primary);
    background: #edf8f5;
    color: var(--duty-primary-dark);
    font-weight: 700;
}

.teacher-select {
    min-height: 260px;
}

.teacher-select option {
    padding: 8px 10px;
}

.teacher-slot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.teacher-slot-select {
    min-height: 52px;
    font-size: 17px;
    font-weight: 400;
}

.roster-modal {
    max-width: 720px;
}

.roster-modal .modal-body {
    padding: 22px;
}

.roster-modal .form-label {
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 700;
}

.roster-form-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.teacher-section-title {
    margin: 2px 0 10px;
    color: #344941;
    font-size: 18px;
    font-weight: 700;
}

.section-title {
    margin-bottom: 14px;
    color: #24332e;
    font-size: 22px;
    font-weight: 700;
}

.users-table {
    table-layout: fixed;
}

.users-table th,
.users-table td {
    padding-top: 14px;
    padding-bottom: 14px;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
    width: 180px;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
    width: 120px;
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
    width: 240px;
}

.report-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.report-menu-card {
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--duty-line);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(24, 35, 31, .06);
}

.report-menu-card:hover {
    border-color: var(--duty-primary);
    color: inherit;
}

.report-menu-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    border-radius: 8px;
    background: #edf8f5;
    color: var(--duty-primary);
}

.report-menu-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.report-menu-card h2 {
    margin-bottom: 4px;
    font-size: 20px;
    font-weight: 700;
}

.report-menu-card p {
    margin-bottom: 0;
    color: #60716a;
    font-size: 16px;
}

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

.summary-box {
    padding: 14px;
    border: 1px solid var(--duty-line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.summary-box span {
    display: block;
    color: var(--duty-primary);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.summary-box small {
    color: #60716a;
}

.summary-box.success span {
    color: #198754;
}

.summary-box.warning span {
    color: #b58100;
}

.summary-box.info span {
    color: #0d6efd;
}

.daily-summary-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
}

.daily-summary-table th,
.daily-summary-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.daily-summary-table th:nth-child(1),
.daily-summary-table td:nth-child(1) {
    width: 96px;
}

.daily-summary-table th:nth-child(2),
.daily-summary-table td:nth-child(2) {
    width: 38%;
}

.daily-summary-table th:nth-child(3),
.daily-summary-table td:nth-child(3) {
    width: 24%;
}

.daily-summary-table th:nth-child(4),
.daily-summary-table td:nth-child(4) {
    width: 16%;
}

.daily-summary-table th:nth-child(5),
.daily-summary-table td:nth-child(5) {
    width: 14%;
}

.teacher-roster-table {
    width: 100%;
    min-width: 820px;
    table-layout: fixed;
}

.teacher-roster-table th,
.teacher-roster-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    vertical-align: middle;
}

.teacher-roster-table th:nth-child(1),
.teacher-roster-table td:nth-child(1) {
    width: 90px;
}

.teacher-roster-table th:nth-child(2),
.teacher-roster-table td:nth-child(2) {
    width: 52%;
}

.teacher-roster-table th:nth-child(3),
.teacher-roster-table td:nth-child(3) {
    width: calc(48% - 90px);
}

.teacher-roster-table td:nth-child(3) {
    overflow-wrap: normal;
}

.teacher-roster-table td:nth-child(3) .teacher-line {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

.teacher-roster-missing {
    color: #c00000;
    font-weight: 700;
}

.duty-loading-active {
    overflow: hidden;
}

.duty-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(14, 29, 24, .62);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.duty-loading-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.duty-loading-panel {
    width: min(100%, 420px);
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 14px;
    padding: 28px 22px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .25);
    text-align: center;
}

.duty-loading-spinner {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border: 7px solid rgba(22, 104, 90, .16);
    border-top-color: var(--duty-primary);
    border-radius: 999px;
    animation: duty-spin .8s linear infinite;
}

.duty-loading-title {
    color: #18231f;
    font-size: 24px;
    font-weight: 700;
}

.duty-loading-text {
    margin-top: 6px;
    color: #60716a;
    font-size: 17px;
    line-height: 1.45;
}

.duty-loading-progress {
    height: 10px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eeeb;
}

.duty-loading-progress span {
    display: block;
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--duty-primary), #239f72);
    transition: width .18s ease;
}

.is-submitting {
    opacity: .86;
}

@keyframes duty-spin {
    to {
        transform: rotate(360deg);
    }
}

.teacher-roster-date-card {
    display: flex;
    justify-content: center;
}

.report-date-panel {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.report-back-wrap {
    display: flex;
    justify-content: center;
    max-width: 980px;
    margin: 16px auto 0;
}

.report-back-button,
.report-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 18px;
    border-color: #e4ac00;
    color: #18231f;
    font-weight: 700;
}

.report-date-form {
    width: min(100%, 520px);
    position: relative;
    text-align: center;
}

.report-date-input {
    width: 100%;
    min-height: 58px;
    padding: 10px 16px;
    border: 1px solid var(--duty-line);
    border-radius: 8px;
    background: #fff;
    color: #24332e;
    font: inherit;
    font-size: 22px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(24, 35, 31, .05);
}

.report-date-input:hover,
.report-date-input:focus {
    border-color: var(--duty-primary);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(22, 104, 90, .12);
}

.report-actions {
    gap: 10px;
}

.report-top-actions,
.report-bottom-actions {
    max-width: 980px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-top-actions {
    justify-content: flex-end;
    margin: 0 auto 10px;
}

.report-bottom-actions {
    justify-content: center;
    margin: 16px auto 0;
}

.report-capture-title {
    margin-bottom: 14px;
    text-align: center;
}

.report-capture-title h2 {
    margin-bottom: 4px;
    font-size: 24px;
    font-weight: 700;
}

.report-capture-title p {
    margin-bottom: 0;
    color: #60716a;
}

.report-status {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.report-status-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

.report-status.is-done {
    color: #146c43;
}

.report-status.is-done .report-status-icon {
    background: #198754;
}

.report-status.is-missing {
    color: #b4232d;
}

.report-status.is-missing .report-status-icon {
    background: #dc3545;
}

.report-status.is-substitute {
    color: #0d6efd;
}

.report-status.is-substitute .report-status-icon {
    background: #0d6efd;
}

.teacher-line {
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.record-mode-note {
    margin-top: 2px;
    color: #60716a;
    font-size: 16px;
}

.record-date-panel {
    margin-bottom: 10px;
}

.record-date-card {
    max-width: 980px;
    margin: 0 auto 14px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.record-roster-table {
    width: 100%;
    min-width: 920px;
    table-layout: fixed;
}

.record-roster-table th,
.record-roster-table td {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    vertical-align: top;
}

.record-roster-table th:nth-child(1),
.record-roster-table td:nth-child(1) {
    width: 96px;
}

.record-roster-table th:nth-child(2),
.record-roster-table td:nth-child(2) {
    width: 28%;
}

.record-roster-table th:nth-child(3),
.record-roster-table td:nth-child(3) {
    width: 24%;
}

.record-roster-table th:nth-child(4),
.record-roster-table td:nth-child(4) {
    width: 40%;
}

.record-action-group {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.record-action-half,
.record-edit-btn,
.record-delete-btn {
    width: calc(50% - 4px);
    flex: 0 0 calc(50% - 4px);
}

.record-edit-btn,
.record-delete-btn {
    min-height: 42px;
    font-size: 17px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.record-action-half {
    margin: 0;
}

.record-delete-btn {
    width: 100%;
}

.record-edit-btn {
    border: 1px solid #0d6efd;
    background: #0d6efd;
    color: #fff;
}

.record-edit-btn:hover,
.record-edit-btn:focus {
    border-color: #0b5ed7;
    background: #0b5ed7;
    color: #fff;
}

.record-delete-btn {
    border: 1px solid #dc3545;
    background: #dc3545;
    color: #fff;
}

.record-delete-btn:hover,
.record-delete-btn:focus {
    border-color: #bb2d3b;
    background: #bb2d3b;
    color: #fff;
}

.record-main-btn {
    width: 100%;
    min-height: 42px;
    font-size: 17px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.record-btn-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 18px;
}

.action-edit {
    border: 1px solid #9fc5ff;
    background: #eef5ff;
    color: #0b5ed7;
}

.action-edit:hover,
.action-edit:focus {
    border-color: #0d6efd;
    background: #dceaff;
    color: #084298;
}

.action-disable {
    border: 1px solid #f0c2c5;
    background: #fff1f2;
    color: #b4232d;
}

.action-disable:hover,
.action-disable:focus {
    border-color: #dc3545;
    background: #f8d7da;
    color: #842029;
}

.action-enable {
    border: 1px solid #badbcc;
    background: #eaf7ef;
    color: #146c43;
}

.action-enable:hover,
.action-enable:focus {
    border-color: #198754;
    background: #d1e7dd;
    color: #0f5132;
}

.duty-title {
    font-size: 28px;
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 8px;
}

.duty-subtitle {
    color: #60716a;
    font-size: 18px;
}

.big-action {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-radius: 8px;
    font-size: 22px;
    font-weight: 700;
}

.btn,
.form-control,
.form-select {
    font-size: 18px;
    min-height: 48px;
    border-radius: 8px;
}

input[type="file"].form-control {
    min-height: 48px;
    padding: 0;
    line-height: 1.2;
}

input[type="file"].form-control::file-selector-button {
    height: 46px;
    margin: 0;
    margin-right: 12px;
    padding: 0 18px;
    border: 0;
    border-right: 1px solid #ced4da;
    border-radius: 8px 0 0 8px;
    background: #f8f9fa;
    color: #1f2b28;
    font: inherit;
    font-weight: 700;
    line-height: 46px;
    vertical-align: middle;
}

input[type="file"].form-control::-webkit-file-upload-button {
    height: 46px;
    margin: 0;
    margin-right: 12px;
    padding: 0 18px;
    border: 0;
    border-right: 1px solid #ced4da;
    border-radius: 8px 0 0 8px;
    background: #f8f9fa;
    color: #1f2b28;
    font: inherit;
    font-weight: 700;
    line-height: 46px;
    vertical-align: middle;
}

.btn-primary {
    --bs-btn-bg: var(--duty-primary);
    --bs-btn-border-color: var(--duty-primary);
    --bs-btn-hover-bg: var(--duty-primary-dark);
    --bs-btn-hover-border-color: var(--duty-primary-dark);
}

.password-toggle {
    width: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.password-eye {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.password-eye-closed,
.password-toggle.is-visible .password-eye-open {
    display: none;
}

.password-toggle.is-visible .password-eye-closed {
    display: block;
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-icon {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

@media (max-width: 575.98px) {
    .login-shell {
        min-height: calc(100vh - 135px);
    }
}

.slot-card {
    border-left: 6px solid var(--duty-primary);
}

.slot-card.recorded {
    border-left-color: #198754;
}

.teacher-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    margin: 2px;
    border-radius: 999px;
    background: #edf5f2;
    color: #1c544b;
    font-size: 15px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
}

.status-empty {
    background: #fff3cd;
    color: #765800;
}

.status-done {
    background: #d1e7dd;
    color: #0f5132;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--duty-line);
}

.report-table th,
.report-table td {
    vertical-align: middle;
}

.print-page,
.print-container {
    font-family: "THSarabunDuty", "TH Sarabun New", serif;
    background: #fff;
    color: #000;
    font-size: 20px;
}

.print-container {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 14mm;
}

.print-title {
    text-align: center;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.1;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
}

.print-table th,
.print-table td {
    border: 1px solid #000;
    padding: 4px 6px;
    vertical-align: top;
}

.print-generated-at {
    margin-top: 8px;
    text-align: right;
    font-size: 18px;
}

.print-row-missing,
.print-row-missing td {
    color: #c00000;
}

.print-row-substitute,
.print-row-substitute td {
    color: #0056b3;
}

@media (max-width: 575.98px) {
    body.app-page {
        font-size: 18px;
    }

    .duty-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .duty-card {
        padding: 14px;
    }

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

    .big-action {
        min-height: 104px;
        font-size: 21px;
    }

    .roster-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-check-grid {
        grid-template-columns: 1fr;
        max-height: 330px;
    }

    .record-roster-table {
        min-width: 100%;
    }

    .record-roster-table thead {
        display: none;
    }

    .record-roster-table,
    .record-roster-table tbody,
    .record-roster-table tr,
    .record-roster-table td {
        display: block;
        width: 100%;
    }

    .record-roster-table tr {
        border: 1px solid var(--duty-line);
        border-radius: 10px;
        padding: 8px;
        margin-bottom: 10px;
        background: #fff;
    }

    .record-roster-table td {
        border: 0;
        padding: 6px 4px;
        width: 100% !important;
        max-width: 100%;
    }

    .record-roster-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: #60716a;
        font-size: 13px;
        font-weight: 700;
    }

    .record-roster-table td[data-label="สถานะ"]::before,
    .record-roster-table td[data-label="สถานะ"] {
        text-align: center;
    }

    .record-action-group {
        flex-wrap: wrap;
    }

    .record-action-group .btn,
    .record-action-half,
    .record-roster-table td[data-label="จัดการ"] .btn {
        width: 100%;
        flex-basis: 100%;
    }

    .record-roster-table td[data-label="สถานะ"] .report-status {
        gap: 2px;
        font-size: 12px;
    }

    .record-roster-table td[data-label="สถานะ"] .report-status-icon {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }

    .record-roster-table td[data-label="จุดเวร"],
    .record-roster-table td[data-label="คาบเวร"] {
        font-size: 17px;
        font-weight: 700;
        overflow-wrap: break-word;
    }

    .record-mode-note {
        font-size: 15px;
    }

    .record-date-panel .report-date-form {
        width: 100%;
    }

    .record-date-panel .report-date-input {
        min-height: 52px;
        font-size: 20px;
    }

    .record-main-btn {
        font-size: 20px;
        min-height: 50px;
    }
}

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

    .print-container {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }

    .duty-navbar,
    .term-line,
    .points-heading,
    .record-date-card,
    .report-top-actions,
    .report-back-wrap {
        display: none !important;
    }

    .duty-main {
        max-width: none;
        padding: 0;
    }

    .duty-card {
        box-shadow: none;
        border: 0;
        padding: 0;
    }

    .teacher-roster-table {
        min-width: 0;
        font-size: 16px;
    }
}
