@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #173443;
  --ink-soft: #55707b;
  --muted: #8ea0a4;
  --paper: #f7f6f1;
  --white: #fffefa;
  --line: #e5e8e2;
  --teal: #0f807a;
  --teal-soft: #dcefeb;
  --navy: #173442;
  --orange: #ef9d45;
  --orange-soft: #fff0d9;
  --rose: #d67572;
  --shadow: 0 18px 50px rgba(23, 52, 66, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Be Vietnam Pro', system-ui, sans-serif; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(23,52,66,.08); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--orange); color: var(--white); border-radius: 11px 11px 11px 3px; font-size: 20px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: .04em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 1px; }
.topbar-tools { display: flex; align-items: center; gap: 14px; }
.topbar-date { color: var(--ink-soft); font-size: 12px; }
.settings-open { border: 1px solid #cadbd7; background: transparent; color: var(--teal); border-radius: 8px; padding: 9px 12px; font-size: 11px; font-weight: 700; transition: background .2s, transform .2s, border .2s; }
.settings-open:hover { background: var(--teal-soft); border-color: var(--teal); transform: translateY(-1px); }
.hero-section { display: grid; grid-template-columns: 1fr 1.04fr; gap: 56px; align-items: center; padding: 68px 18px 56px; }
.eyebrow, .section-kicker { color: var(--teal); font-weight: 700; letter-spacing: .16em; font-size: 10px; margin: 0 0 18px; }
.hero-copy h1 { font-size: clamp(43px, 5.5vw, 72px); line-height: .99; letter-spacing: -.065em; margin: 0; font-weight: 700; }
.hero-copy h1 em { color: var(--teal); font-style: normal; }
.hero-description { max-width: 430px; color: var(--ink-soft); font-size: 14px; line-height: 1.9; margin: 24px 0 0; }
.today-panel { position: relative; overflow: hidden; background: var(--navy); color: white; border-radius: 22px; padding: 29px 31px 30px; min-height: 198px; box-shadow: var(--shadow); }
.today-panel::after { content: ''; position: absolute; right: -38px; top: -66px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,255,255,.04), 0 0 0 44px rgba(255,255,255,.03); }
.today-heading { position: relative; z-index: 1; display: flex; gap: 9px; align-items: center; color: #a8d7d0; letter-spacing: .15em; font-size: 10px; font-weight: 700; }
.live-dot { width: 7px; height: 7px; border-radius: 99px; background: #f4bc65; box-shadow: 0 0 0 5px rgba(244,188,101,.14); }
.today-status { position: relative; z-index: 1; font-size: 22px; font-weight: 600; margin: 24px 0 27px; letter-spacing: -.03em; }
.today-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.button { border: 0; border-radius: 9px; padding: 12px 17px; font-size: 12px; font-weight: 700; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover, .quick-button:hover { transform: translateY(-1px); }
.button-primary { background: #f4c36e; color: var(--navy); box-shadow: 0 7px 18px rgba(0,0,0,.12); }
.button-quiet { background: rgba(255,255,255,.12); color: white; }
.button-dark { background: var(--navy); color: white; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 18px 19px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.stat-highlight { background: var(--teal-soft); border-color: #cde7e1; }
.stat-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; color: var(--teal); background: #c9e5df; font-size: 16px; font-weight: 700; }
.stat-icon.orange { color: #c27824; background: var(--orange-soft); }.stat-icon.rose { color: var(--rose); background: #f9e4df; }.stat-icon.sun { color: #ae7b1b; background: #fff0c3; }
.stat-label { display: block; color: var(--ink-soft); font-size: 11px; margin-bottom: 5px; }.stat-card strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.calendar-card { padding: 28px 30px 21px; }.card-heading { display: flex; justify-content: space-between; align-items: center; }.card-heading h2, .settings-intro h2, .history-header h2 { font-size: 24px; letter-spacing: -.045em; margin: 0; }.section-kicker { margin-bottom: 8px; font-size: 9px; }
.month-controls, .settings-month { display: flex; align-items: center; gap: 6px; }.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 22px; line-height: 1; }.icon-button:hover { color: var(--teal); border-color: var(--teal); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }.calendar-weekdays { margin-top: 27px; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; }.calendar-grid { gap: 5px; }
.calendar-day { position: relative; min-height: 66px; border: 1px solid transparent; background: transparent; border-radius: 9px; color: var(--ink); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; transition: background .2s, border .2s; }.calendar-day.empty { pointer-events: none; }.calendar-day:not(.empty):hover { border-color: #b3dcd4; background: #f2faf8; }.calendar-day .day-number { font-size: 13px; font-weight: 600; }.calendar-day .day-mark { min-height: 13px; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; }.calendar-day.planned { background: #eef8f5; color: #116f6b; }.calendar-day.attended { background: var(--teal); color: white; }.calendar-day.teacher_off { background: #f8e6d5; color: #a66629; }.calendar-day.absent { background: #fcf0ee; color: #be6562; }.calendar-day.holiday { box-shadow: inset 0 -2px 0 var(--orange); }.calendar-day.today { border: 2px solid var(--orange); }.calendar-day.today .day-number::after { content: ' ·'; color: var(--orange); }.calendar-day .holiday-label { display: none; position: absolute; z-index: 2; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 160px; padding: 7px 8px; border-radius: 7px; color: white; background: var(--navy); font-size: 10px; white-space: normal; line-height: 1.4; box-shadow: var(--shadow); }.calendar-day:hover .holiday-label { display: block; }
.calendar-day.rest-day { background: #f1f3f0; color: #879798; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; padding-top: 22px; margin-top: 21px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; }.calendar-legend span { display: flex; align-items: center; gap: 6px; }.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: #c5e6df; }.legend-dot.attended { background: var(--teal); }.legend-dot.holiday { background: var(--orange); }.legend-dot.absent { background: #efb8b4; }
.settings-card, .history-card { padding: 32px 34px; margin-bottom: 24px; }.settings-intro { display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; }.settings-intro h2 { font-size: 22px; }.settings-intro p:not(.section-kicker) { color: var(--ink-soft); font-size: 12px; margin: 10px 0 0; }.settings-tip { display: flex; gap: 8px; align-items: center; color: #987243; background: #fff5df; padding: 9px 12px; border-radius: 8px; font-size: 10px; max-width: 260px; line-height: 1.4; }.settings-tip > span:first-child { color: var(--orange); font-size: 18px; }.settings-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 31px 0 17px; padding-top: 20px; border-top: 1px solid var(--line); }.settings-month { gap: 13px; }.settings-month strong { min-width: 92px; text-align: center; font-size: 13px; }.quick-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; color: var(--ink-soft); font-size: 10px; }.quick-button { background: transparent; border: 1px solid #c5d4d1; color: var(--teal); border-radius: 7px; padding: 8px 10px; font-size: 10px; font-weight: 700; transition: transform .2s, background .2s; }.quick-button:hover { background: var(--teal-soft); }.settings-weekdays { margin-top: 0; }.settings-calendar .calendar-day { min-height: 61px; cursor: pointer; }.settings-footnote { color: var(--muted); font-size: 10px; margin: 18px 0 0; }
.settings-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 22px; background: rgba(12, 31, 39, .62); backdrop-filter: blur(5px); overflow-y: auto; }
.settings-overlay[hidden] { display: none; }
.settings-modal { width: min(900px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; background: var(--white); border-radius: 20px; padding: 26px 28px 28px; box-shadow: 0 26px 90px rgba(8, 29, 37, .24); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 0 4px 23px; }.modal-header h2 { margin: 0; font-size: 24px; letter-spacing: -.045em; }.modal-header .section-kicker { margin-bottom: 8px; }.modal-close { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); border-radius: 9px; font-size: 26px; line-height: 1; }.modal-close:hover { color: var(--rose); border-color: #e5b6b1; }.settings-modal .settings-card { padding: 0; margin: 0; border: 0; box-shadow: none; }.settings-description { color: var(--ink-soft); font-size: 12px; margin: 0; }
.history-card { background: var(--navy); color: white; border: 0; }.history-header { display: flex; justify-content: space-between; align-items: flex-start; }.history-header .section-kicker { color: #93d2cb; }.history-header h2 { color: white; }.history-header p:not(.section-kicker) { color: #a6bec0; font-size: 12px; margin: 11px 0 0; }.history-mark { color: rgba(255,255,255,.18); font-family: 'DM Sans', sans-serif; font-size: 24px; }.history-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 28px; }.history-form label { display: flex; flex-direction: column; gap: 7px; color: #a6bec0; font-size: 10px; }.history-form input { background: rgba(255,255,255,.1); color: white; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; padding: 11px 12px; font-size: 12px; color-scheme: dark; }.history-form .button { height: 40px; margin-left: 4px; }.history-result { margin-top: 27px; padding-top: 23px; border-top: 1px solid rgba(255,255,255,.13); }.history-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.history-stat { background: rgba(255,255,255,.08); border-radius: 9px; padding: 14px; }.history-stat span { display: block; color: #a6bec0; font-size: 10px; margin-bottom: 6px; }.history-stat strong { font-size: 18px; }.history-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 11px; }.history-table th { color: #8caeaf; text-align: left; font-weight: 500; padding: 0 10px 9px; }.history-table td { padding: 11px 10px; border-top: 1px solid rgba(255,255,255,.09); }.pill { display: inline-block; padding: 4px 8px; border-radius: 99px; font-size: 10px; }.pill.attended { background: rgba(111,210,188,.18); color: #a0e8d8; }.pill.absent { background: rgba(239,146,141,.16); color: #f1b0ac; }.pill.teacher { background: rgba(244,190,104,.16); color: #f4c77e; }.pill.upcoming { background: rgba(255,255,255,.09); color: #b1c4c4; }.history-empty { color: #a6bec0; font-size: 12px; }
.footer { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 12px 0 40px; color: var(--muted); font-size: 10px; }.footer-dot { color: var(--orange); font-size: 16px; }.toast { position: fixed; left: 50%; bottom: 22px; z-index: 10; transform: translate(-50%, 90px); opacity: 0; background: var(--navy); color: white; padding: 12px 16px; border-radius: 9px; box-shadow: var(--shadow); font-size: 12px; transition: transform .25s, opacity .25s; }.toast.show { transform: translate(-50%, 0); opacity: 1; }

.calendar-day.off { background: #f8e6d5; color: #a66629; }
.history-reason { display: block; margin-top: 5px; color: #a6bec0; font-size: 10px; }
.absence-modal { width: min(520px, 100%); }.absence-date { color: var(--ink-soft); font-size: 12px; margin: -8px 0 19px; }.absence-options { display: grid; gap: 9px; }.absence-option { display: grid; grid-template-columns: 35px 1fr auto; gap: 11px; align-items: center; width: 100%; padding: 13px; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: transparent; color: var(--ink); transition: background .2s, border .2s, transform .2s; }.absence-option:hover { background: #f2faf8; border-color: #b3dcd4; transform: translateY(-1px); }.absence-option-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--orange-soft); color: #bd7627; font-weight: 700; }.absence-option:nth-child(2) .absence-option-icon { background: #fff2c8; color: #aa7a1a; }.absence-option:nth-child(3) .absence-option-icon { background: #f9e4df; color: var(--rose); }.absence-option strong, .absence-option small { display: block; }.absence-option strong { font-size: 12px; }.absence-option small { color: var(--ink-soft); font-size: 10px; margin-top: 3px; }.absence-arrow { color: var(--teal); font-size: 17px; }.absence-reason-panel label { display: block; color: var(--ink); font-size: 11px; font-weight: 700; margin-bottom: 8px; }.absence-reason-panel textarea { display: block; width: 100%; resize: vertical; min-height: 88px; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; outline: none; color: var(--ink); font-size: 12px; line-height: 1.5; }.absence-reason-panel textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,128,122,.1); }.absence-reason-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }.button-quiet-light { background: #edf3f1; color: var(--teal); }

@media (max-width: 850px) {
  .hero-section { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }.hero-copy h1 { font-size: clamp(44px, 11vw, 64px); }.stats-grid { grid-template-columns: repeat(2, 1fr); }.settings-intro { flex-direction: column; }.settings-tip { max-width: none; }
}
@media (max-width: 560px) {
  .app-shell { width: min(100% - 24px, 1180px); }.topbar { height: 70px; }.topbar-tools { gap: 8px; }.topbar-date { display: none; }.settings-open { padding: 8px 10px; font-size: 10px; }.hero-section { padding: 40px 4px 34px; gap: 26px; }.hero-description { font-size: 13px; }.today-panel { padding: 24px 21px; }.today-status { font-size: 19px; margin: 20px 0 22px; }.button { padding: 11px 13px; font-size: 11px; }.stats-grid { gap: 8px; }.stat-card { min-height: 76px; padding: 12px; gap: 9px; }.stat-icon { width: 29px; height: 29px; font-size: 13px; }.stat-label { font-size: 10px; }.stat-card strong { font-size: 13px; }.calendar-card { padding: 22px 13px 17px; }.card-heading h2, .settings-intro h2, .history-header h2, .modal-header h2 { font-size: 20px; }.calendar-day { min-height: 53px; }.calendar-day .day-number { font-size: 12px; }.calendar-day .day-mark { font-size: 8px; }.calendar-grid { gap: 3px; }.calendar-legend { gap: 8px 12px; font-size: 9px; }.settings-card, .history-card { padding: 24px 16px; }.settings-toolbar { align-items: flex-start; flex-direction: column; gap: 17px; }.quick-actions { justify-content: flex-start; }.quick-actions > span { width: 100%; }.settings-calendar .calendar-day { min-height: 51px; }.settings-overlay { padding: 10px; align-items: start; }.settings-modal { max-height: calc(100vh - 20px); padding: 21px 16px 22px; border-radius: 16px; }.modal-header { padding: 0 3px 19px; }.history-header { gap: 10px; }.history-mark { font-size: 16px; }.history-form { flex-wrap: wrap; }.history-form label { flex: 1 1 140px; }.history-form .button { width: 100%; margin: 3px 0 0; }.history-summary { grid-template-columns: repeat(2, 1fr); }.history-table { font-size: 10px; }.history-table th, .history-table td { padding: 9px 5px; }.footer { flex-wrap: wrap; text-align: center; padding-bottom: 25px; }
}
