:root {
  --lb-bg: #f6f7fb;
  --lb-surface: #ffffff;
  --lb-surface-muted: #f8f9fc;
  --lb-sidebar: #25223d;
  --lb-sidebar-hover: #37324f;
  --lb-sidebar-active: #494164;
  --lb-primary: #7463df;
  --lb-primary-hover: #6252ca;
  --lb-text: #222633;
  --lb-text-secondary: #7a8190;
  --lb-border: #e5e7ee;
  --lb-success: #2f8f61;
  --lb-warning: #c47a24;
  --lb-danger: #c94f59;
  --lb-radius-sm: 8px;
  --lb-radius-md: 12px;
  --lb-radius-lg: 16px;
  --lb-shadow-card: 0 2px 10px rgba(31, 36, 54, 0.035);
  --lb-shadow-modal: 0 24px 64px rgba(27, 30, 43, 0.2);
  --lb-sidebar-width: 232px;
}

body.lb-app {
  --bg: var(--lb-bg);
  --panel: var(--lb-surface);
  --card: var(--lb-surface);
  --line: var(--lb-border);
  --text: var(--lb-text);
  --muted: var(--lb-text-secondary);
  --accent: var(--lb-primary);
  --purple: var(--lb-primary);
  --purple-dark: var(--lb-primary-hover);
  --lav: #f0edff;
  --good: var(--lb-success);
  --warn: var(--lb-warning);
  --bad: var(--lb-danger);
  margin: 0;
  background: var(--lb-bg);
  color: var(--lb-text);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.lb-app button,
body.lb-app input,
body.lb-app select,
body.lb-app textarea {
  font: inherit;
}

body.lb-app .btn {
  border-color: var(--lb-border);
  border-radius: var(--lb-radius-sm);
  background: var(--lb-surface);
  color: #4e5565;
  font-weight: 750;
  box-shadow: none;
}

body.lb-app .btn:hover {
  border-color: #cfd3df;
  background: var(--lb-surface-muted);
}

body.lb-app .btn.primary {
  border-color: var(--lb-primary);
  background: var(--lb-primary);
  color: #fff;
}

body.lb-app .btn.primary:hover {
  border-color: var(--lb-primary-hover);
  background: var(--lb-primary-hover);
}

body.lb-app .input,
body.lb-app input:not([type="checkbox"]):not([type="radio"]),
body.lb-app select,
body.lb-app textarea {
  border-color: var(--lb-border);
  border-radius: var(--lb-radius-sm);
  background: var(--lb-surface);
  color: var(--lb-text);
  outline: none;
}

body.lb-app .input:focus,
body.lb-app input:not([type="checkbox"]):not([type="radio"]):focus,
body.lb-app select:focus,
body.lb-app textarea:focus {
  border-color: #a89fe9;
  box-shadow: 0 0 0 3px rgba(116, 99, 223, 0.1);
}

body.lb-app .card:not(.pt-guide-card) {
  border-color: var(--lb-border);
  border-radius: var(--lb-radius-md);
  background: var(--lb-surface);
  box-shadow: var(--lb-shadow-card);
}

body.lb-app .badge,
body.lb-app .status,
body.lb-app .tag {
  border-radius: 999px;
}

body.lb-admin table:not(.week-table) th,
body.lb-teacher table:not(.week-table) th {
  background: #f6f7fa;
  color: #676f7e;
  font-size: 12px;
  font-weight: 750;
}

body.lb-admin table:not(.week-table) td,
body.lb-teacher table:not(.week-table) td {
  border-bottom-color: var(--lb-border);
  font-size: 13px;
}

body.lb-admin table:not(.week-table) tbody tr:hover,
body.lb-teacher table:not(.week-table) tbody tr:hover {
  background: #fbfbfd;
}

body.lb-app .modal,
body.lb-app .login-card,
body.lb-app .login-card-v43,
body.lb-app .pt-modal-dialog {
  border-radius: var(--lb-radius-lg);
  box-shadow: var(--lb-shadow-modal);
}

body.lb-app .modal-head,
body.lb-app .modal-footer,
body.lb-app .pt-modal-head {
  border-color: var(--lb-border);
}

/* Admin and teacher share one navigation language. */
body.lb-admin .app {
  grid-template-columns: var(--lb-sidebar-width) minmax(0, 1fr);
}

body.lb-admin .sidebar,
body.lb-teacher .sidebar,
body.lb-student .student-sidebar-v3 {
  width: var(--lb-sidebar-width);
  min-width: var(--lb-sidebar-width);
  background: var(--lb-sidebar);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

body.lb-admin .brand,
body.lb-teacher .sidebar .brand,
body.lb-student .student-brand-v3 {
  color: #fff;
  letter-spacing: -0.02em;
}

body.lb-admin .brand small,
body.lb-teacher .sidebar .brand span,
body.lb-student .student-sidebar-v3 small {
  color: #b9b5ce;
}

body.lb-admin .nav button,
body.lb-teacher .nav-button,
body.lb-teacher .nav-parent,
body.lb-teacher .nav-child,
body.lb-student .student-nav-item-v3 {
  min-height: 42px;
  border-radius: var(--lb-radius-sm);
  background: transparent;
  color: #d7d4e3;
}

body.lb-admin .nav button:hover,
body.lb-teacher .nav-button:hover,
body.lb-teacher .nav-parent:hover,
body.lb-teacher .nav-child:hover,
body.lb-student .student-nav-item-v3:hover {
  background: var(--lb-sidebar-hover);
  color: #fff;
}

body.lb-admin .nav button.active,
body.lb-teacher .nav-button.active,
body.lb-teacher .nav-parent.active,
body.lb-teacher .nav-child.active,
body.lb-student .student-nav-item-v3.active {
  background: var(--lb-sidebar-active);
  color: #fff;
}

body.lb-teacher {
  --sidebar: var(--lb-sidebar-width);
}

body.lb-teacher .sidebar-foot,
body.lb-student .student-sidebar-bottom-v3 {
  border-color: rgba(255, 255, 255, 0.11);
}

body.lb-teacher .sidebar-foot .btn,
body.lb-student .student-side-logout-v3 {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #e8e6ef;
}

body.lb-teacher .topbar {
  background: rgba(246, 247, 251, 0.95);
  border-bottom-color: var(--lb-border);
  backdrop-filter: blur(10px);
}

body.lb-admin .main,
body.lb-teacher .content {
  padding: 24px 28px 40px;
}

body.lb-admin .title h1,
body.lb-teacher .topbar h1,
body.lb-student .student-main-head-v3 h1 {
  color: var(--lb-text);
  font-size: 25px;
  letter-spacing: -0.035em;
}

/* Shared admin-style weekly timetable. */
body.lb-app .week-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

body.lb-app .week-title {
  color: var(--lb-text);
  font-size: 17px;
  font-weight: 850;
}

body.lb-app .legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

body.lb-app .legend span {
  color: var(--lb-text-secondary);
  font-size: 12px;
}

body.lb-app .legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border: 1px solid rgba(75, 80, 94, 0.18);
  border-radius: 2px;
  vertical-align: -1px;
}

body.lb-app .timetable-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #aeb5c2;
  border-radius: var(--lb-radius-md);
  background: var(--lb-surface);
}

body.lb-admin .week-table,
body.lb-teacher .week-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
  border-collapse: collapse;
}

body.lb-admin .week-table th,
body.lb-admin .week-table td,
body.lb-teacher .week-table th,
body.lb-teacher .week-table td {
  height: 34px;
  padding: 4px 5px;
  border: 1px solid #aeb5c2;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

body.lb-admin .week-table thead th,
body.lb-admin .week-table .day-cell,
body.lb-teacher .week-table thead th,
body.lb-teacher .week-table .day-cell {
  background: #8fd4ef;
  color: #17232e;
  font-weight: 800;
}

body.lb-admin .week-table .day-cell,
body.lb-teacher .week-table .day-cell {
  width: 54px;
  font-size: 16px;
}

body.lb-admin .week-table .day-cell small,
body.lb-teacher .week-table .day-cell small {
  display: block;
  margin-top: 3px;
  color: #35515f;
  font-size: 10px;
  font-weight: 650;
}

body.lb-app .week-table .slot-cell {
  background: #fff;
}

body.lb-app .week-table .class-cell {
  overflow: hidden;
  padding-left: 7px;
  color: #1d222b;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.lb-app .week-table .course-reading { background: #fff; }
body.lb-app .week-table .course-training,
body.lb-app .week-table .class-orange { background: #f2a47c; }
body.lb-app .week-table .course-pt,
body.lb-app .week-table .class-green { background: #d6efca; }
body.lb-app .week-table .course-middle,
body.lb-app .week-table .class-blue { background: #cceeff; }
body.lb-app .week-table .course-makeup,
body.lb-app .week-table .makeup-cell,
body.lb-app .week-table .class-lav { background: #eee9ff; }

.teacher-legend-reading-v11 { background: #fff; }
.teacher-legend-training-v11 { background: #f2a47c; }
.teacher-legend-pt-v11 { background: #d6efca; }
.teacher-legend-middle-v11 { background: #cceeff; }
.teacher-legend-makeup-v11 { background: #eee9ff; }

.teacher-timetable-name-v11 {
  text-align: left;
  font-weight: 850;
}

.timetable-print-heading-v94 {
  display: none;
}

/* Logged-out role routes hand authentication back to the root login. */
body.lb-unified-entry-only .login-gate-v43,
body.lb-unified-entry-only .login-gate,
body.lb-student.lb-unified-entry-only:not(.student-logged-in-v3) > .top,
body.lb-student.lb-unified-entry-only:not(.student-logged-in-v3) > .main {
  visibility: hidden;
}

.role-route-message-v94 {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--lb-bg);
  color: var(--lb-text-secondary);
  font-size: 13px;
  text-align: center;
}

.role-route-message-v94[hidden] {
  display: none;
}

/* Root unified login. */
body.lb-unified-login {
  min-height: 100vh;
}

body.lb-unified-login *,
body.lb-unified-login *::before,
body.lb-unified-login *::after {
  box-sizing: border-box;
}

.unified-login-shell-v94 {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.unified-login-card-v94 {
  width: min(390px, 100%);
  padding: 32px;
  border: 1px solid var(--lb-border);
  border-radius: 15px;
  background: var(--lb-surface);
  box-shadow: 0 14px 42px rgba(31, 36, 54, 0.08);
}

.unified-login-brand-v94 {
  color: var(--lb-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.unified-login-card-v94 h1 {
  margin: 9px 0 4px;
  color: var(--lb-text);
  font-size: 26px;
  letter-spacing: -0.04em;
}

.unified-login-card-v94 > p {
  margin: 0 0 24px;
  color: var(--lb-text-secondary);
  font-size: 13px;
}

.unified-login-card-v94 label {
  display: block;
  margin: 13px 0 6px;
  color: #505766;
  font-size: 12px;
  font-weight: 800;
}

.unified-login-card-v94 input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--lb-border);
}

.unified-login-card-v94 button {
  width: 100%;
  min-height: 45px;
  margin-top: 18px;
  border: 1px solid var(--lb-primary);
  border-radius: var(--lb-radius-sm);
  background: var(--lb-primary);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.unified-login-card-v94 button:hover {
  border-color: var(--lb-primary-hover);
  background: var(--lb-primary-hover);
}

.unified-login-card-v94 button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.unified-login-message-v94 {
  min-height: 20px;
  margin-top: 12px;
  color: var(--lb-danger);
  font-size: 12px;
  line-height: 1.5;
}

.unified-parent-link-v94 {
  display: block;
  width: max-content;
  margin: 8px auto 0;
  color: var(--lb-text-secondary);
  font-size: 11px;
  text-decoration: none;
}

.unified-parent-link-v94:hover {
  color: var(--lb-primary-hover);
  text-decoration: underline;
}

/* A4 landscape timetable output shared by admin and teacher. */
@media print {
  @page {
    size: A4 landscape;
    margin: 5mm;
  }

  html,
  body.lb-admin.print-timetable,
  body.lb-teacher {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  body.lb-admin.print-timetable > :not(.app),
  body.lb-teacher > :not(.teacher-app) {
    display: none !important;
  }

  body.lb-admin.print-timetable .app,
  body.lb-admin.print-timetable .main,
  body.lb-teacher .teacher-app,
  body.lb-teacher .main-shell,
  body.lb-teacher .content {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body.lb-admin.print-timetable .sidebar,
  body.lb-admin.print-timetable .topbar,
  body.lb-admin.print-timetable .view:not(#timetable),
  body.lb-teacher .sidebar,
  body.lb-teacher .drawer-overlay,
  body.lb-teacher .topbar,
  body.lb-teacher .view:not(#view-timetable),
  body.lb-admin.print-timetable #timetable .week-toolbar .small,
  body.lb-admin.print-timetable #timetable .week-toolbar .inline-actions,
  body.lb-teacher #view-timetable .week-toolbar .small,
  body.lb-teacher #view-timetable .week-toolbar .toolbar {
    display: none !important;
  }

  body.lb-admin.print-timetable #timetable,
  body.lb-teacher #view-timetable {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.lb-admin.print-timetable #timetable > .card,
  body.lb-teacher #view-timetable > .card {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.lb-admin.print-timetable .timetable-print-heading-v94,
  body.lb-teacher .timetable-print-heading-v94 {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 1.2mm;
    color: #202631;
  }

  .timetable-print-heading-v94 strong {
    font-size: 12pt;
    letter-spacing: -0.03em;
  }

  .timetable-print-heading-v94 span {
    font-size: 8pt;
    font-weight: 800;
  }

  body.lb-admin.print-timetable #timetable .week-toolbar,
  body.lb-teacher #view-timetable .week-toolbar {
    display: block !important;
    margin: 0 0 1.1mm !important;
  }

  body.lb-admin.print-timetable #timetable .week-title,
  body.lb-teacher #view-timetable .week-title {
    margin: 0 !important;
    font-size: 9pt !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
  }

  body.lb-admin.print-timetable #timetable .legend,
  body.lb-teacher #view-timetable .legend {
    display: flex !important;
    gap: 2.6mm !important;
    margin: 0 0 1.4mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.lb-admin.print-timetable #timetable .legend span,
  body.lb-teacher #view-timetable .legend span {
    font-size: 7.2pt !important;
    white-space: nowrap;
  }

  body.lb-admin.print-timetable #timetable .legend i,
  body.lb-teacher #view-timetable .legend i {
    width: 2.2mm !important;
    height: 2.2mm !important;
    margin-right: 1mm !important;
  }

  body.lb-admin.print-timetable .timetable-wrap,
  body.lb-teacher #teacherTimetable {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable,
  body.lb-teacher #teacherTimetable .week-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable tr,
  body.lb-teacher #teacherTimetable .week-table tr {
    height: 4.2mm !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable th,
  body.lb-admin.print-timetable #weeklyTimetable td,
  body.lb-teacher #teacherTimetable .week-table th,
  body.lb-teacher #teacherTimetable .week-table td {
    box-sizing: border-box !important;
    height: 4.2mm !important;
    min-height: 4.2mm !important;
    max-height: 4.2mm !important;
    padding: 0.3mm 0.65mm !important;
    border: 0.22mm solid #9099a7 !important;
    overflow: hidden !important;
    font-size: 7.2pt !important;
    line-height: 1.05 !important;
    vertical-align: middle !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable thead tr,
  body.lb-teacher #teacherTimetable .week-table thead tr,
  body.lb-admin.print-timetable #weeklyTimetable thead th,
  body.lb-teacher #teacherTimetable .week-table thead th {
    height: 6mm !important;
    min-height: 6mm !important;
    max-height: 6mm !important;
    padding: 0.35mm !important;
    font-size: 7pt !important;
    white-space: nowrap !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable .day-cell,
  body.lb-teacher #teacherTimetable .week-table .day-cell {
    width: 13mm !important;
    padding: 0.4mm !important;
    font-size: 10pt !important;
    line-height: 1.05 !important;
    text-align: center !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable .day-cell small,
  body.lb-teacher #teacherTimetable .week-table .day-cell small {
    margin-top: 0.7mm !important;
    font-size: 6.5pt !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable .class-cell,
  body.lb-teacher #teacherTimetable .week-table .class-cell {
    padding-left: 0.9mm !important;
    font-size: 7.2pt !important;
    font-weight: 750 !important;
    line-height: 1.05 !important;
    text-align: left !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable .slot-cell,
  body.lb-teacher #teacherTimetable .week-table .slot-cell {
    padding: 0 !important;
    background: #fff !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable .homework-h-v25,
  body.lb-admin.print-timetable #weeklyTimetable .makeup-homework-h-v36,
  body.lb-teacher #teacherTimetable .homework-h-v11,
  body.lb-teacher #teacherTimetable .temp-mark-v11,
  body.lb-teacher #teacherTimetable .teacher-makeup-mark-v11 {
    margin-left: 0.7mm !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 6.4pt !important;
    line-height: 1 !important;
  }

  body.lb-admin.print-timetable #weeklyTimetable,
  body.lb-admin.print-timetable #weeklyTimetable *,
  body.lb-teacher #teacherTimetable,
  body.lb-teacher #teacherTimetable * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

.homework-h-v11,
.temp-mark-v11,
.teacher-makeup-mark-v11 {
  display: inline-flex;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 850;
}

.homework-h-v11 { color: #315f88; }
.temp-mark-v11 { color: #78551c; }
.teacher-makeup-mark-v11 { color: #6657c8; }

/* Date-neutral full schedule controls. */
.full-schedule-date-toolbar-v93 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius-md);
  background: var(--lb-surface-muted);
}

.full-schedule-date-control-v93 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  margin: 0;
  padding: 0 4px 0 10px;
}

.full-schedule-date-control-v93 .small {
  flex: 1;
  color: #4f5666;
  font-weight: 800;
  white-space: nowrap;
}

.full-schedule-date-control-v93 .input {
  width: 146px;
  min-height: 36px;
}

/* Student and parent keep their lighter role-specific layout while sharing the brand. */
body.lb-student .student-main-v3 {
  margin-left: var(--lb-sidebar-width);
  width: calc(100% - var(--lb-sidebar-width));
}

body.lb-student .pt-home-hero-v4 {
  border: 1px solid #302c4b;
  border-radius: var(--lb-radius-lg);
  background: var(--lb-sidebar);
  box-shadow: none;
}

body.lb-student .pt-metric-card-v4,
body.lb-student .pt-book-card-v4,
body.lb-student .student-panel-v3,
body.lb-parent .service,
body.lb-parent .makeup-option,
body.lb-parent .summary {
  border-color: var(--lb-border);
  border-radius: var(--lb-radius-md);
  box-shadow: none;
}

body.lb-teacher .pt-dashboard-stat::after {
  display: none;
}

body.lb-parent .top,
body.lb-student > .top {
  border-bottom-color: var(--lb-border);
  background: var(--lb-surface);
}

body.lb-parent .brand,
body.lb-student .student-logo-v2 {
  color: var(--lb-text);
  letter-spacing: -0.02em;
}

@media (max-width: 900px) {
  body.lb-admin .main,
  body.lb-teacher .content {
    padding: 20px 16px 34px;
  }

  .full-schedule-date-toolbar-v93 {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .full-schedule-date-control-v93 {
    order: -1;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  body.lb-admin .app {
    grid-template-columns: 1fr;
  }

  body.lb-admin .sidebar {
    position: relative;
    width: auto;
    min-width: 0;
    height: auto;
  }

  body.lb-student .student-sidebar-v3 {
    width: 185px;
    min-width: 185px;
  }

  body.lb-student .student-main-v3 {
    width: calc(100% - 185px);
    margin-left: 185px;
  }

  body.lb-app .week-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  body.lb-student .student-sidebar-v3 {
    width: 100%;
    min-width: 0;
  }

  body.lb-student .student-main-v3 {
    width: 100%;
    margin-left: 0;
  }

  .full-schedule-date-control-v93 {
    align-items: stretch;
    flex-direction: column;
  }

  .full-schedule-date-control-v93 .input {
    width: 100%;
  }
}
