﻿      :root {
        --bg: #eef2f7;
        --surface: #ffffff;
        --line: #d6dde8;
        --ink: #0f172a;
        --muted: #52617a;
        --brand: #2457b8;
        --preview-scale: 0.62;
        --layout-columns: 1fr 1fr;
        --layout-gap: 8px;
      }

      * { box-sizing: border-box; }

      body {
        margin: 0;
        font-family: "Pretendard", "Noto Sans KR", sans-serif;
        color: var(--ink);
        background: var(--bg);
      }

      .topbar {
        height: 62px;
        border-bottom: 1px solid var(--line);
        background: #f8fafc;
      }

      .topbar-inner {
        width: min(1320px, calc(100vw - 8px));
        height: 100%;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 12px;
      }

      .brand {
        justify-self: start;
        display: flex;
        align-items: center;
        gap: 9px;
        font-weight: 800;
        font-size: 25px;
        letter-spacing: -0.01em;
      }

      .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 0;
        overflow: hidden;
      }

      .brand-logo {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        background: transparent;
        mix-blend-mode: multiply;
      }

      .menu {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0;
        color: #1a1f2d;
      }

      .menu strong,
      .menu span,
      .menu a {
        font-size: 18px;
        font-weight: 700;
        padding: 0 14px;
        color: #1a1f2d;
        text-decoration: none;
      }

      .view-section {
        display: none !important;
      }

      .view-section.is-active {
        display: grid !important;
      }

      .header-actions {
        justify-self: end;
        display: inline-flex;
        align-items: center;
        gap: 8px;
      }

      .icon-btn {
        border: 1px solid var(--line);
        background: #fff;
        border-radius: 8px;
        padding: 7px 10px;
        font-weight: 700;
        font-size: 12px;
        color: #24314a;
        cursor: pointer;
      }

      #adminPageBtn {
        border: 1px solid #2f8e6d;
        background: linear-gradient(180deg, #87d8b5 0%, #4eb38a 100%);
        color: #083a27;
        border-radius: 10px;
        padding: 8px 14px;
        font-size: 13px;
        min-width: 0;
        white-space: nowrap;
        cursor: pointer;
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.35),
          0 2px 0 rgba(8, 18, 42, 0.35),
          0 6px 10px rgba(7, 20, 48, 0.22);
        transition: transform 0.12s ease, background-color 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
      }

      #adminPageBtn:hover {
        background: linear-gradient(180deg, #9ae0c0 0%, #5ebc97 100%);
        filter: brightness(1.02);
        transform: translateY(-1px);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.38),
          0 3px 0 rgba(8, 18, 42, 0.32),
          0 8px 14px rgba(7, 20, 48, 0.24);
      }

      #adminPageBtn:active {
        transform: translateY(1px);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.25),
          0 1px 0 rgba(8, 18, 42, 0.3),
          0 3px 6px rgba(7, 20, 48, 0.2);
      }

      #changePasswordBtn {
        border: 1px solid #3d7eb7;
        background: linear-gradient(180deg, #8fc2eb 0%, #5d9ed9 100%);
        color: #0f3154;
        min-width: 0;
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 10px;
        cursor: pointer;
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.35),
          0 2px 0 rgba(8, 18, 42, 0.35),
          0 6px 10px rgba(7, 20, 48, 0.22);
        transition: transform 0.12s ease, filter 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
      }

      #changePasswordBtn:hover {
        background: linear-gradient(180deg, #a5cff0 0%, #6ca8de 100%);
        filter: brightness(1.03);
        transform: translateY(-1px);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.38),
          0 3px 0 rgba(8, 18, 42, 0.32),
          0 8px 14px rgba(7, 20, 48, 0.24);
      }

      #changePasswordBtn:active {
        transform: translateY(1px);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.25),
          0 1px 0 rgba(8, 18, 42, 0.3),
          0 3px 6px rgba(7, 20, 48, 0.2);
      }

      #logoutBtn {
        border: 1px solid #6b62bf;
        background: linear-gradient(180deg, #b0a7ee 0%, #877dd8 100%);
        color: #271f6a;
        border-radius: 10px;
        padding: 8px 14px;
        font-size: 13px;
        min-width: 0;
        white-space: nowrap;
        cursor: pointer;
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.35),
          0 2px 0 rgba(8, 18, 42, 0.35),
          0 6px 10px rgba(7, 20, 48, 0.22);
        transition: transform 0.12s ease, background-color 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
      }

      #logoutBtn:hover {
        background: linear-gradient(180deg, #c0b8f2 0%, #978ee0 100%);
        filter: brightness(1.02);
        transform: translateY(-1px);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.38),
          0 3px 0 rgba(8, 18, 42, 0.32),
          0 8px 14px rgba(7, 20, 48, 0.24);
      }

      #logoutBtn:active {
        transform: translateY(1px);
        box-shadow:
          inset 0 1px 0 rgba(255, 255, 255, 0.25),
          0 1px 0 rgba(8, 18, 42, 0.3),
          0 3px 6px rgba(7, 20, 48, 0.2);
      }

      .container {
        width: min(1320px, calc(100vw - 8px));
        margin: 10px auto 18px;
        display: grid;
        grid-template-columns: var(--layout-columns);
        gap: var(--layout-gap);
      }

      .panel {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 10px;
        width: 100%;
      }


      .title-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
      }

      .title {
        font-weight: 800;
        font-size: 16px;
      }

      .preview-title {
        width: 100%;
        text-align: center;
        color: #1e40af;
        font-size: 24px;
      }

      .small {
        font-size: 11px;
        color: var(--muted);
      }

      .preview-wrap {
        background: #ddd;
        border: 1px solid #c8ced8;
        border-radius: 8px;
        padding: 8px;
        overflow: auto;
        display: flex;
        justify-content: center;
        width: 86%;
        margin: 0 auto;
      }

      .han-paper {
        min-width: 760px;
        max-width: 760px;
        margin: 0 auto;
        background: #fff;
        border: 1px solid #b9b9b9;
        padding: 34px 40px 30px;
        position: relative;
        zoom: var(--preview-scale);
      }

      @supports not (zoom: 1) {
        .han-paper {
          transform: scale(var(--preview-scale));
          transform-origin: top center;
          width: calc(760px / var(--preview-scale));
        }
      }

      .doc-box {
        border: 1px solid #8a8a8a;
        padding: 18px 20px;
      }

      .doc-box + .doc-box {
        margin-top: 14px;
      }

      .doc-box-title {
        text-align: center;
        font-size: 44px;
        font-weight: 700;
        letter-spacing: 0;
        white-space: nowrap;
        margin: 8px 0 28px;
        font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
      }

      .han-paper::before,
      .han-paper::after {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        border-top: 1px solid #b9b9b9;
      }

      .han-paper::before {
        left: 18px;
        top: 18px;
        border-left: 1px solid #b9b9b9;
      }

      .han-paper::after {
        right: 18px;
        top: 18px;
        border-right: 1px solid #b9b9b9;
      }

      .doc-title {
        text-align: center;
        font-size: 44px;
        font-weight: 700;
        letter-spacing: 28px;
        margin: 8px 0 28px;
        font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
      }

      .top-grid {
        display: grid;
        grid-template-columns: 250px 1fr;
        gap: 12px;
        align-items: start;
      }

      .type-table {
        border: 1px solid #333;
        width: 258px;
      }

      .type-row {
        display: grid;
        grid-template-columns: 1.7fr 0.7fr;
        min-height: 36px;
        border-bottom: 1px solid #333;
      }

      .type-row:last-child { border-bottom: 0; }

      .type-row div {
        border-right: 1px solid #333;
        padding: 6px 8px;
        font-size: 19px;
        display: flex;
        align-items: center;
        white-space: nowrap;
      }

      .type-row div:last-child {
        border-right: 0;
        justify-content: center;
        font-size: 20px;
      }

      .student-meta {
        justify-self: end;
        margin-top: 4px;
        font-size: 24px;
        line-height: 1.55;
      }

      .body-text {
        margin: 38px 16px 12px;
        font-size: 21px;
        line-height: 1.44;
        letter-spacing: -0.5px;
        word-break: keep-all;
        overflow-wrap: anywhere;
      }

      .body-date-line {
        margin-bottom: 4px;
      }

      .body-line-2 {
        white-space: nowrap;
      }

      .line-inline {
        display: inline;
      }

      .reason-placeholder {
        color: #b42318;
        font-weight: 700;
      }

      .sign-block {
        margin-top: 26px;
        display: grid;
        justify-content: end;
        gap: 6px;
        font-size: 22px;
        line-height: 1.3;
      }

      .sign-row {
        display: grid;
        grid-template-columns: 66px 120px 36px;
        align-items: end;
        column-gap: 6px;
      }

      .sign-label {
        text-align: left;
      }

      .sign-name {
        display: inline-block;
        width: 120px;
        text-align: center;
      }

      .sign-name.guardian-line {
        border-bottom: 1px solid #111;
      }

      .sign-stamp {
        text-align: left;
      }

      .sub-title {
        text-align: center;
        font-size: 44px;
        font-weight: 700;
        letter-spacing: 2px;
        margin: 8px 0 26px;
      }

      .confirm-text {
        font-size: 21px;
        line-height: 1.55;
      }

      .method-line {
        display: flex;
        justify-content: flex-end;
        white-space: nowrap;
      }

      .method-first {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
      }

      .method-item {
        width: 340px;
        display: inline-flex;
        justify-content: space-between;
        align-items: baseline;
      }

      .method-paren {
        display: inline-block;
        width: 156px;
        text-align: center;
      }

      .method-mark {
        display: inline-block;
        width: 72px;
        text-align: center;
      }

      .confirm-text .ind {
        padding-left: 36px;
      }

      .bottom-sign {
        margin-top: 34px;
        display: grid;
        justify-content: end;
        gap: 8px;
        font-size: 23px;
      }

      .principal {
        margin-top: 48px;
        text-align: center;
        font-size: 40px;
        font-weight: 700;
      }

      .input-top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 8px;
      }

      .card-box {
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 8px;
        background: #f8faff;
      }

      .sub-card-title {
        margin: 0 0 6px;
        font-size: 14px;
        font-weight: 800;
        color: #23314d;
      }

      .student-lookup h4 {
        margin: 2px 0 8px;
        text-align: center;
        font-size: 18px;
      }

      .lookup-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 6px;
        align-items: center;
        margin-bottom: 8px;
      }

      .score-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
      }

      .avatar-score-row {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 8px;
        align-items: stretch;
      }

      .score-grid.side-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 0;
      }

      .score-box {
        border: 1px solid #c7d5ea;
        border-radius: 8px;
        padding: 6px 4px;
        text-align: center;
        background: #fff;
      }

      .score-box .k {
        font-size: 11px;
        color: #495a79;
        white-space: nowrap;
        font-weight: 800;
      }

      .score-box .v {
        margin-top: 8px;
        font-size: 20px;
        font-weight: 800;
      }

      .score-box.abs { background: #eaf8ee; border-color: #9fddb4; }
      .score-box.leave { background: #fff3ee; border-color: #f2c3ad; }
      .score-box.late { background: #eef4ff; border-color: #b9cbef; }
      .score-box.total { background: #f4f2ff; border-color: #c8bff2; }

      .avatar {
        height: 150px;
        border-radius: 8px;
        background: linear-gradient(145deg, #f2bf9f, #d7b06f);
        display: grid;
        place-items: center;
        color: #fff;
        font-size: 58px;
      }

      .avatar-score-wrap {
        margin-top: 8px;
      }

      .row { margin-top: 8px; }

      .date-boxes {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
      }

      .date-boxes > .card-box:first-child {
        display: flex;
        flex-direction: column;
      }

      .date-boxes > .card-box:first-child .mini-calendar {
        flex: 1;
      }

      .date-boxes > .card-box:first-child,
      .date-boxes > .card-box:nth-child(2),
      .extra-reason-boxes > .card-box.method-select-box,
      .extra-reason-boxes > .card-box:last-child {
        position: relative;
        border-radius: 14px;
        border: 1px solid #c8d5ec;
        box-shadow: 0 10px 24px rgba(36, 87, 184, 0.10);
        overflow: hidden;
        transition: transform 0.14s ease, box-shadow 0.14s ease;
      }

      .date-boxes > .card-box:first-child {
        background:
          radial-gradient(120% 100% at 100% 0%, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0) 55%),
          linear-gradient(180deg, #fbfdff 0%, #eef7ff 100%);
      }

      .date-boxes > .card-box:nth-child(2) {
        background:
          radial-gradient(120% 100% at 100% 0%, rgba(34, 197, 94, 0.18) 0%, rgba(34, 197, 94, 0) 55%),
          linear-gradient(180deg, #fcfffd 0%, #effcf5 100%);
      }

      .extra-reason-boxes > .card-box.method-select-box {
        background:
          radial-gradient(120% 100% at 100% 0%, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0) 55%),
          linear-gradient(180deg, #fffdf8 0%, #fff5e6 100%);
      }

      .extra-reason-boxes > .card-box:last-child {
        background:
          radial-gradient(120% 100% at 100% 0%, rgba(139, 92, 246, 0.16) 0%, rgba(139, 92, 246, 0) 55%),
          linear-gradient(180deg, #fcfbff 0%, #f3efff 100%);
      }

      .date-boxes > .card-box:first-child::before,
      .date-boxes > .card-box:nth-child(2)::before,
      .extra-reason-boxes > .card-box.method-select-box::before,
      .extra-reason-boxes > .card-box:last-child::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 4px;
      }

      .date-boxes > .card-box:first-child::before {
        background: linear-gradient(90deg, #0ea5e9, #2563eb);
      }

      .date-boxes > .card-box:nth-child(2)::before {
        background: linear-gradient(90deg, #22c55e, #16a34a);
      }

      .extra-reason-boxes > .card-box.method-select-box::before {
        background: linear-gradient(90deg, #f59e0b, #ea580c);
      }

      .extra-reason-boxes > .card-box:last-child::before {
        background: linear-gradient(90deg, #a855f7, #6366f1);
      }

      .date-boxes > .card-box:first-child:hover,
      .date-boxes > .card-box:nth-child(2):hover,
      .extra-reason-boxes > .card-box.method-select-box:hover,
      .extra-reason-boxes > .card-box:last-child:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(36, 87, 184, 0.15);
      }

      .date-boxes > .card-box:first-child .sub-card-title,
      .date-boxes > .card-box:nth-child(2) .sub-card-title,
      .extra-reason-boxes > .card-box.method-select-box .sub-card-title,
      .extra-reason-boxes > .card-box:last-child .sub-card-title {
        font-size: 15px;
        letter-spacing: 0.2px;
        color: #14284d;
        margin-bottom: 8px;
      }

      .extra-reason-boxes {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 8px;
      }

      .date-summary {
        border: 1px solid #d4dcea;
        border-radius: 8px;
        background: #f8fbff;
        padding: 8px;
        font-size: 12px;
        line-height: 1.7;
        color: #334155;
      }

      .quick-reason-panel {
        margin-top: 6px;
      }

      .date-boxes .quick-reason-panel > .row {
        margin-top: 24px;
      }

      .mini-calendar {
        margin-top: 8px;
        border: 1px solid #cfd8e8;
        border-radius: 12px;
        background: linear-gradient(180deg, #ffffff, #f7faff);
        padding: 8px;
        box-shadow: 0 8px 18px rgba(36, 87, 184, 0.08);
      }

      .mini-calendar .cal-head {
        display: grid;
        grid-template-columns: 24px 1fr 24px;
        align-items: center;
        text-align: center;
        font-size: 14px;
        font-weight: 800;
        color: #1f3560;
        margin-bottom: 6px;
        letter-spacing: 0.2px;
      }

      .mini-calendar .cal-head .cal-nav {
        border: 1px solid #c8d6ee;
        background: #fff;
        color: #1e3a8a;
        border-radius: 6px;
        width: 22px;
        height: 22px;
        padding: 0;
        font-size: 11px;
        line-height: 1;
      }

      .mini-calendar .cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-auto-rows: minmax(28px, 1fr);
        gap: 3px;
      }

      .mini-calendar .dow {
        text-align: center;
        font-size: 10px;
        color: #6b7e9a;
        padding: 3px 0;
        font-weight: 700;
      }

      .mini-calendar .cal-grid .dow:nth-child(1) {
        color: #dc2626;
      }

      .mini-calendar .cal-grid .dow:nth-child(7) {
        color: #2563eb;
      }

      .mini-calendar .day {
        border: 1px solid #dde4f1;
        border-radius: 8px;
        background: #fff;
        font-size: 11px;
        padding: 7px 0;
        cursor: pointer;
        line-height: 1;
        transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
      }

      .mini-calendar .day:hover {
        background: #eef4ff;
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(36, 87, 184, 0.16);
      }

      .mini-calendar .day.selected {
        background: #2457b8;
        border-color: #2457b8;
        color: #fff;
        font-weight: 700;
      }

      .mini-calendar .day.in-range {
        background: #edf4ff;
        border-color: #c9dbfb;
        color: #1e3a8a;
      }

      .mini-calendar .day.weekend {
        color: #b45309;
      }

      .mini-calendar .day.holiday {
        background: #fff1f2;
        border-color: #fecdd3;
        color: #9f1239;
        font-weight: 700;
      }

      .mini-calendar .day.today {
        border-color: #2563eb;
        box-shadow: inset 0 0 0 1px #2563eb;
      }

      .mini-calendar .day.start {
        background: #16a34a;
        border-color: #15803d;
        color: #fff;
        font-weight: 700;
      }

      .mini-calendar .day.end {
        background: #dc2626;
        border-color: #b91c1c;
        color: #fff;
        font-weight: 700;
      }

      .mini-calendar .empty {
        visibility: hidden;
      }

      .admin-calendar {
        margin-top: 8px;
      }

      .admin-calendar .cal-head {
        display: grid;
        grid-template-columns: 28px 1fr 28px;
        align-items: center;
        text-align: center;
        font-size: 16px;
        font-weight: 800;
        color: #1f3560;
        margin-bottom: 8px;
      }

      .admin-calendar .cal-nav {
        border: 1px solid #c8d6ee;
        background: #fff;
        color: #1e3a8a;
        border-radius: 8px;
        width: 26px;
        height: 26px;
        padding: 0;
        font-size: 12px;
        line-height: 1;
      }

      .admin-calendar .cal-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
      }

      .admin-calendar .dow {
        text-align: center;
        font-size: 11px;
        color: #6b7e9a;
        padding: 4px 0;
        font-weight: 700;
      }

      .admin-calendar .day {
        border: 1px solid #dde4f1;
        border-radius: 8px;
        background: #fff;
        font-size: 12px;
        padding: 9px 0;
        cursor: pointer;
        line-height: 1;
      }

      .admin-calendar .day.weekend {
        color: #94a3b8;
        background: #f8fafc;
        cursor: not-allowed;
      }

      .admin-calendar .day.holiday {
        background: #fee2e2;
        border-color: #fca5a5;
        color: #991b1b;
        font-weight: 800;
      }

      .admin-calendar .day.today {
        border-color: #2563eb;
        box-shadow: inset 0 0 0 1px #2563eb;
      }

      .admin-calendar .empty {
        visibility: hidden;
      }

      .admin-holiday-list {
        margin-top: 10px;
        line-height: 1.7;
      }

      label {
        display: block;
        margin-bottom: 4px;
        font-size: 12px;
        font-weight: 700;
      }

      input, select, textarea {
        width: 100%;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 8px 9px;
        font-size: 13px;
        background: #fff;
      }

      textarea { min-height: 80px; resize: none; }

      #reason {
        min-height: 58px;
      }

      #reason::placeholder {
        color: #5b6f96;
        font-weight: 600;
        font-size: 12px;
        line-height: 1.45;
        letter-spacing: -0.1px;
      }

      .btn-row {
        margin-top: 10px;
        display: flex;
        gap: 8px;
      }

      button {
        border: 0;
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 12px;
        cursor: pointer;
      }

      .btn-main { background: var(--brand); color: #fff; font-weight: 700; }
      .btn-sub { background: #e9eef7; color: #17223b; }

      .chips {
        margin-top: 8px;
        border-radius: 9px;
        border: 1px solid #7ea2df;
        background: linear-gradient(145deg, #4e7fd0, #3561af);
        padding: 8px;
      }

      .chips h4 {
        margin: 0 0 6px;
        color: #eef5ff;
        font-size: 12px;
      }

      .chip-wrap {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
      }

      .method-select-box .chip-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .method-select-box .method-main {
        margin-bottom: 10px;
      }

      .method-select-box .method-sub-title {
        margin: 30px 0 6px;
        font-size: 14px;
        font-weight: 800;
        color: #23314d;
      }

      .convenience-sub-title {
        font-size: 15px !important;
        font-weight: 900 !important;
        margin-bottom: 4px !important;
      }

      .attach-main-chips {
        margin-bottom: 30px;
      }

      .type-quick-row {
        margin-top: 8px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
      }

      .chip {
        text-align: center;
        border-radius: 7px;
        padding: 6px 4px;
        font-size: 11px;
        border: 1px solid rgba(27, 66, 130, 0.28);
        background: linear-gradient(180deg, #ffffff 0%, #e9f2ff 48%, #d7e8ff 100%);
        color: #12305e;
        font-weight: 700;
        box-shadow:
          0 2px 0 rgba(21, 54, 109, 0.22),
          0 6px 12px rgba(30, 78, 157, 0.20),
          inset 0 1px 0 rgba(255, 255, 255, 0.95);
        transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
      }

      .chip:hover {
        filter: brightness(1.03);
        transform: translateY(-1px);
        box-shadow:
          0 3px 0 rgba(21, 54, 109, 0.24),
          0 10px 16px rgba(30, 78, 157, 0.24),
          inset 0 1px 0 rgba(255, 255, 255, 0.95);
      }

      .chip:active {
        transform: translateY(1px);
        box-shadow:
          0 1px 0 rgba(21, 54, 109, 0.24),
          0 4px 8px rgba(30, 78, 157, 0.18),
          inset 0 1px 0 rgba(255, 255, 255, 0.9);
      }

      .quick-reason-panel .chip:nth-child(4n + 1) {
        border-color: rgba(191, 64, 64, 0.35);
        background: linear-gradient(180deg, #fff5f5 0%, #ffe4e6 50%, #fecdd3 100%);
        color: #7a1e2a;
      }

      .quick-reason-panel .chip:nth-child(4n + 2) {
        border-color: rgba(132, 94, 32, 0.35);
        background: linear-gradient(180deg, #fff8eb 0%, #ffedd5 50%, #fed7aa 100%);
        color: #7a4b12;
      }

      .quick-reason-panel .chip:nth-child(4n + 3) {
        border-color: rgba(33, 111, 69, 0.35);
        background: linear-gradient(180deg, #effcf6 0%, #dcfce7 50%, #bbf7d0 100%);
        color: #14532d;
      }

      .quick-reason-panel .chip:nth-child(4n) {
        border-color: rgba(71, 48, 140, 0.35);
        background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 50%, #ddd6fe 100%);
        color: #40207a;
      }

      #msg {
        margin-top: 8px;
        font-size: 12px;
        color: #1f3e75;
        min-height: 16px;
        display: none;
      }

      .footer {
        width: min(1320px, calc(100vw - 8px));
        margin: 8px auto 12px;
        border-top: 1px solid var(--line);
        padding-top: 10px;
        display: grid;
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 8px;
        font-size: 11px;
        color: var(--muted);
      }

      .footer > div {
        min-width: 0;
      }

      .login-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        backdrop-filter: blur(2px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
      }

      .login-modal {
        width: min(360px, calc(100vw - 32px));
        background: #fff;
        border: 1px solid #c9d4e8;
        border-radius: 12px;
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.25);
        padding: 16px;
      }

      .login-title {
        margin: 0 0 10px;
        font-size: 18px;
        font-weight: 800;
        color: #1e3a8a;
        text-align: center;
      }

      .login-help {
        margin: 0 0 10px;
        font-size: 12px;
        color: #52617a;
        text-align: center;
      }

      .login-field {
        margin-top: 8px;
      }

      .login-error {
        min-height: 18px;
        margin-top: 8px;
        font-size: 12px;
        color: #b42318;
        text-align: center;
      }

      @media (max-width: 980px) {
        .container { grid-template-columns: 1fr; }
        .chip-wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .menu { display: none; }
        .header-actions { display: none; }
        .brand {
          position: static;
          margin: 0 auto;
          font-size: 22px;
        }
        .footer {
          grid-template-columns: 1fr 1fr;
        }
      }

      @media (max-width: 640px) {
        .chip-wrap,
        .input-top,
        .footer {
          grid-template-columns: 1fr;
        }
        .date-boxes,
        .extra-reason-boxes { grid-template-columns: 1fr; }
        .footer {
          gap: 10px;
          font-size: 12px;
          text-align: center;
          padding-top: 12px;
        }
      }

      @media print {
        @page {
          size: A4;
          margin: 8mm;
        }

        body {
          background: #fff;
        }

        .topbar,
        .footer,
        .container > .panel:nth-child(2) {
          display: none !important;
        }

        .container {
          width: 100%;
          margin: 0;
          display: block;
        }

        .container > .panel:first-child {
          border: 0;
          padding: 0;
          background: #fff;
        }

        .container > .panel:first-child .title-row {
          display: none !important;
        }

        .preview-wrap {
          border: 0;
          background: #fff;
          width: 100%;
          padding: 0;
          overflow: visible;
        }

        .han-paper {
          zoom: 0.74 !important;
          transform: none !important;
          width: auto !important;
          margin: 0 auto;
          break-inside: avoid;
          page-break-inside: avoid;
        }

        .doc-box {
          break-inside: avoid;
          page-break-inside: avoid;
        }
      }
    
