*, *::before, *::after { box-sizing: border-box; }
:root {
  --black: #111827;
  --white: #ffffff;
  --page: #f5f8fc;
  --cream: #eef3f8;
  --accent: #4a90e2;
  --accent-deep: #2e6dc2;
  --accent-light: #e3f2fd;
  --navy: #16324f;
  --gray: #7b8794;
  --dark-gray: #46515e;
  --border: rgba(74, 144, 226, 0.16);
  --danger: #d64545;
  --success: #20875b;
  --shadow: 0 18px 50px rgba(22, 50, 79, 0.08);
  --radius: 22px;
}
html { scroll-behavior: smooth; width: 100%; max-width: 100%; overflow-x: hidden; }
body { margin: 0; width: 100%; max-width: 100%; overflow-x: hidden; font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--black); background: var(--page); }
button, input, select, textarea { font: inherit; min-width: 0; }
img, svg, video, iframe { max-width: 100%; }
body.menu-open, body.onboarding-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
.hidden, [hidden] { display: none !important; }
.mobile-only { display: none !important; }
.muted { color: var(--gray); line-height: 1.65; }
.section-kicker { margin: 0 0 8px; color: var(--accent-deep); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.13em; }
.section-kicker.light { color: rgba(255,255,255,.72); }
.toast { position: fixed; z-index: 1000; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--navy); color: white; border-radius: 999px; padding: 12px 18px; font-size: .9rem; box-shadow: var(--shadow); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

/* Login */
.auth-page { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand { position: relative; overflow: hidden; padding: clamp(46px, 7vw, 96px); background: linear-gradient(135deg, #f5f8fe 0%, #e3f2fd 58%, #d3e7fb 100%); display: flex; flex-direction: column; justify-content: center; }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(74,144,226,.25); }
.auth-brand::before { width: 420px; height: 420px; right: -170px; top: -120px; }
.auth-brand::after { width: 290px; height: 290px; left: -100px; bottom: -100px; }
.brand-logo { display: block; width: clamp(165px, 19vw, 245px); height: auto; max-height: 104px; object-fit: contain; object-position: left center; margin-bottom: 30px; }
.eyebrow { color: var(--accent-deep); font-weight: 800; font-size: .8rem; letter-spacing: .15em; }
.auth-brand h1 { margin: 12px 0 24px; font-size: clamp(3rem, 5vw, 5.2rem); line-height: 1.04; letter-spacing: -.05em; font-weight: 900; }
.auth-brand h1 em { color: var(--accent); font-style: normal; }
.auth-copy { max-width: 550px; margin: 0; color: var(--dark-gray); font-size: 1.08rem; line-height: 1.75; }
.auth-feature-list { display: grid; gap: 13px; margin-top: 42px; max-width: 560px; }
.auth-feature-list div { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.65); border: 1px solid rgba(74,144,226,.13); border-radius: 16px; padding: 15px 18px; font-weight: 700; color: var(--navy); backdrop-filter: blur(8px); }
.auth-feature-list span { color: var(--accent); font-size: .78rem; letter-spacing: .08em; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: white; }
.auth-card { width: min(440px, 100%); }
.auth-card h2 { margin: 0 0 8px; font-size: 2rem; letter-spacing: -.035em; }
.stack-form { display: grid; gap: 18px; margin-top: 30px; }
label { display: grid; gap: 8px; color: var(--dark-gray); font-weight: 700; font-size: .9rem; }
input, select, textarea { width: 100%; border: 1px solid #dce5ee; background: white; color: var(--black); border-radius: 13px; padding: 13px 14px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(74,144,226,.12); }
textarea { resize: vertical; }
.button { border: 0; border-radius: 13px; padding: 13px 18px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: white; box-shadow: 0 10px 24px rgba(74,144,226,.23); }
.button.primary:hover { background: var(--accent-deep); }
.button.secondary { color: var(--accent-deep); background: var(--accent-light); }
.button.ghost { color: var(--dark-gray); background: #eef2f6; }
.button.full { width: 100%; }
.button.small { padding: 9px 13px; font-size: .85rem; }
.text-button { border: 0; background: none; color: var(--accent-deep); font-weight: 700; padding: 0; margin-top: 20px; }
.auth-help { margin-top: 28px; padding-top: 22px; border-top: 1px solid #edf0f3; color: var(--gray); font-size: .8rem; line-height: 1.6; }

/* First-login profile onboarding */
.onboarding-overlay { position: fixed; z-index: 900; inset: 0; overflow-y: auto; background: #edf4fb; }
.onboarding-shell { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(310px, .78fr) minmax(560px, 1.22fr); }
.onboarding-brand { position: sticky; top: 0; min-height: 100vh; min-height: 100svh; align-self: start; display: flex; flex-direction: column; justify-content: center; padding: clamp(42px, 6vw, 86px); overflow: hidden; color: white; background: linear-gradient(145deg, var(--navy), #245f91); }
.onboarding-brand::before, .onboarding-brand::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); pointer-events: none; }
.onboarding-brand::before { width: 430px; height: 430px; right: -220px; top: -150px; }
.onboarding-brand::after { width: 280px; height: 280px; left: -150px; bottom: -100px; }
.onboarding-logo { position: relative; z-index: 1; width: min(210px, 65%); margin-bottom: 38px; filter: brightness(0) invert(1); }
.onboarding-brand .section-kicker { position: relative; z-index: 1; color: #9bc9ff; }
.onboarding-brand h1 { position: relative; z-index: 1; margin: 8px 0 20px; font-size: clamp(2.2rem, 4vw, 4.25rem); line-height: 1.12; letter-spacing: -.055em; }
.onboarding-brand > p:not(.section-kicker) { position: relative; z-index: 1; max-width: 560px; margin: 0; color: rgba(255,255,255,.68); line-height: 1.75; }
.onboarding-email-box { position: relative; z-index: 1; display: grid; gap: 5px; margin-top: 36px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(255,255,255,.08); }
.onboarding-email-box span { color: rgba(255,255,255,.55); font-size: .72rem; font-weight: 800; }
.onboarding-email-box strong { overflow-wrap: anywhere; font-size: .9rem; }
.onboarding-card { width: min(820px, calc(100% - 56px)); align-self: center; justify-self: center; margin: 38px 28px; padding: clamp(28px, 4vw, 46px); border: 1px solid rgba(22,50,79,.08); border-radius: 26px; background: white; box-shadow: 0 24px 70px rgba(22,50,79,.12); }
.onboarding-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid #e9eef3; }
.onboarding-card-head h2 { margin: 0 0 7px; font-size: clamp(1.7rem, 3vw, 2.25rem); letter-spacing: -.04em; }
.onboarding-card-head p:last-child { margin: 0; color: var(--gray); line-height: 1.6; }
.onboarding-form { gap: 17px; }
.onboarding-actions { display: flex; align-items: center; justify-content: flex-end; gap: 11px; padding-top: 4px; }
.onboarding-actions .button { min-height: 48px; }

/* App shell */
.app-shell { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 100; inset: 0 auto 0 0; width: 250px; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; background: var(--navy); color: white; padding: 26px 18px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 28px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; }
.site-logo { display: block; width: 78px; height: auto; max-height: 38px; object-fit: contain; object-position: left center; flex: 0 0 auto; }
.logo-text { font-size: 1.1rem; letter-spacing: -.02em; }
.side-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 13px; border: 0; color: rgba(255,255,255,.68); background: transparent; border-radius: 13px; padding: 13px 14px; font-weight: 700; font-size: .92rem; text-decoration: none; text-align: left; }
.nav-item span { width: 22px; text-align: center; color: rgba(255,255,255,.5); }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.1); }
.nav-item.active span { color: #9bc9ff; }
.sidebar-foot { margin-top: auto; }
.support-box { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); border-radius: 16px; padding: 16px; }
.support-box strong { font-size: .85rem; }
.support-box p { margin: 7px 0 12px; color: rgba(255,255,255,.55); font-size: .76rem; line-height: 1.55; }
.support-box a { color: #9bc9ff; font-weight: 800; font-size: .78rem; }
.logout-button { width: 100%; margin-top: 13px; border: 0; background: transparent; color: rgba(255,255,255,.5); padding: 10px; font-weight: 700; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 50; height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px; background: rgba(245,248,252,.9); border-bottom: 1px solid rgba(22,50,79,.06); backdrop-filter: blur(14px); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar h1 { margin: 0; font-size: 1.3rem; letter-spacing: -.03em; }
.topbar-eyebrow { margin: 0 0 3px; color: var(--accent); font-weight: 800; font-size: .64rem; letter-spacing: .12em; }
.user-chip { display: flex; align-items: center; gap: 11px; }
.user-avatar { width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--accent-light); color: var(--accent-deep); font-weight: 900; flex: 0 0 auto; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar > span { display: grid; place-items: center; width: 100%; height: 100%; }
.user-chip div:last-child { display: grid; }
.user-chip strong { font-size: .85rem; }
.user-chip span { color: var(--gray); font-size: .72rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.content-wrap { max-width: 1320px; margin: 0 auto; padding: 34px; }
.page { display: none; animation: pageIn .22s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 25px; }
.page-intro h1, .page-intro h2 { margin: 0 0 9px; font-size: clamp(1.8rem, 3vw, 2.35rem); letter-spacing: -.04em; }
.page-intro p:last-child { margin: 0; color: var(--gray); line-height: 1.65; }
.panel { background: white; border: 1px solid rgba(22,50,79,.07); border-radius: var(--radius); box-shadow: 0 12px 35px rgba(22,50,79,.05); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.panel h3 { margin: 0; font-size: 1.15rem; letter-spacing: -.025em; }

/* Dashboard */
.welcome-card { min-height: 290px; display: grid; grid-template-columns: 1fr 380px; align-items: center; overflow: hidden; position: relative; color: white; background: linear-gradient(135deg, var(--navy), #24567f); border-radius: 26px; padding: 44px 50px; box-shadow: var(--shadow); }
.welcome-card h2 { margin: 0 0 15px; font-size: clamp(2rem, 3.5vw, 3.25rem); letter-spacing: -.045em; line-height: 1.15; }
.welcome-card h2 span { color: #9bc9ff; }
.welcome-card p:last-child { margin: 0; color: rgba(255,255,255,.72); line-height: 1.65; }
.welcome-graphic { position: relative; height: 230px; }
.graphic-ring { position: absolute; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; right: 18px; top: -5px; }
.graphic-ring::before { content: ""; position: absolute; inset: 30px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.graphic-card { position: absolute; z-index: 2; width: 145px; background: white; color: var(--navy); border-radius: 18px; padding: 18px; font-size: .75rem; line-height: 1.45; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.graphic-card strong { font-size: 1rem; }
.gc-one { right: 126px; top: 20px; transform: rotate(-5deg); }
.gc-two { right: 3px; bottom: 18px; transform: rotate(7deg); }
.assignment-overview-panel { padding: 24px; margin-bottom: 20px; overflow: hidden; }
.assignment-overview-head { align-items: center; }
.assignment-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 12px; margin-top: 18px; }
.assignment-list.assignment-empty { display: block; }
.assignment-list.assignment-empty .empty-state { min-height: 90px; border: 1px dashed #d9e1e9; border-radius: 15px; background: var(--page); }
.assignment-card { min-width: 0; padding: 18px; border: 1px solid #dce9f6; border-radius: 17px; background: linear-gradient(145deg, #f8fbff, #eef6ff); }
.assignment-student-name { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid rgba(74,144,226,.14); }
.assignment-student-name span { color: var(--gray); font-size: .7rem; font-weight: 800; }
.assignment-student-name strong { color: var(--navy); font-size: 1.15rem; overflow-wrap: anywhere; }
.assignment-date-list { display: grid; gap: 10px; margin: 14px 0 0; }
.assignment-date-list > div { display: grid; gap: 4px; }
.assignment-date-list dt { color: var(--gray); font-size: .7rem; font-weight: 800; }
.assignment-date-list dd { margin: 0; color: var(--dark-gray); font-size: .86rem; font-weight: 800; }
.assignment-date-list .settlement-date-row { padding: 11px 12px; border-radius: 12px; background: white; }
.assignment-date-list .settlement-date-row dd { color: var(--accent-deep); }
.assignment-skeleton { min-height: 132px; border-radius: 17px; }
.dashboard-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; margin-top: 20px; }
.dashboard-grid-single { grid-template-columns: minmax(0, 1fr); }
.announcement-panel, .schedule-summary-panel { padding: 25px; min-height: 245px; }
.announcement-spotlight { position: relative; overflow: hidden; min-height: 0; margin-bottom: 20px; padding: 28px; border-color: rgba(74,144,226,.24); background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%); box-shadow: 0 16px 45px rgba(46,109,194,.09); }
.announcement-spotlight::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(var(--accent), #77b7ff); }
.announcement-panel-head { align-items: center; }
.announcement-panel-copy { margin: 7px 0 0; color: var(--gray); font-size: .82rem; line-height: 1.55; }
.notice-live-badge { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; color: var(--accent-deep); background: white; border: 1px solid rgba(74,144,226,.16); font-size: .72rem; font-weight: 900; }
.notice-live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #4fd197; box-shadow: 0 0 0 4px rgba(79,209,151,.14); }
.announcement-list { display: grid; gap: 14px; margin-top: 21px; }
.announcement-featured { padding: 22px 23px; border: 1px solid rgba(74,144,226,.18); border-radius: 18px; background: white; box-shadow: 0 10px 28px rgba(22,50,79,.055); }
.announcement-featured-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.announcement-label { padding: 5px 8px; border-radius: 999px; color: white; background: var(--accent); font-size: .64rem; font-weight: 900; letter-spacing: .08em; }
.announcement-featured time, .announcement-date { color: var(--accent-deep); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.announcement-featured h4 { margin: 0 0 9px; color: var(--navy); font-size: 1.08rem; letter-spacing: -.02em; }
.announcement-featured p { margin: 0; color: var(--dark-gray); font-size: .88rem; font-weight: 550; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-archive { display: grid; padding: 0 4px; }
.announcement-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 15px 4px; border-bottom: 1px solid #e7edf3; }
.announcement-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.announcement-item strong { display: block; margin-bottom: 5px; font-size: .9rem; }
.announcement-item p { margin: 0; color: var(--gray); font-size: .8rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-empty { min-height: 92px; border: 1px dashed #cfdbe8; border-radius: 15px; background: rgba(255,255,255,.68); }
.small-link { border: 0; background: transparent; color: var(--accent-deep); font-weight: 800; font-size: .78rem; }
.schedule-summary { margin-top: 20px; display: grid; gap: 9px; }
.summary-row { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 10px; background: var(--page); border-radius: 12px; padding: 11px 13px; font-size: .82rem; }
.summary-row strong { color: var(--navy); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.quick-card { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; text-align: left; border: 1px solid rgba(22,50,79,.07); background: white; border-radius: 18px; padding: 19px; color: var(--black); box-shadow: 0 10px 30px rgba(22,50,79,.04); }
.quick-card:hover { border-color: var(--border); transform: translateY(-2px); }
.quick-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--accent-light); color: var(--accent-deep); font-size: 1.2rem; }
.quick-card div { display: grid; gap: 4px; }
.quick-card small { color: var(--gray); }
.quick-card b { color: var(--accent); font-size: 1.1rem; }

/* Schedule */
.save-state { color: var(--gray); background: #edf1f5; border-radius: 999px; padding: 9px 13px; font-size: .78rem; font-weight: 800; }
.save-state.saved { color: var(--success); background: #e6f5ef; }
.schedule-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 20px; }
.schedule-form-panel, .current-slots-panel { padding: 27px; }
.form-section-head h3 { margin: 0 0 4px; }
.form-section-head p { margin: 0; color: var(--gray); font-size: .83rem; }
.slot-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.slot-add { align-self: end; min-height: 46px; }

.availability-picker { margin: 22px 0 24px; }
.availability-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.availability-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--gray); font-size: .76rem; }
.availability-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 15px; height: 15px; border: 1px solid #d8e1ea; border-radius: 4px; background: white; }
.legend-swatch.selected { border-color: var(--accent); background: var(--accent); }
.availability-cell-count { flex: 0 0 auto; color: var(--accent-deep); background: var(--accent-light); border-radius: 999px; padding: 7px 10px; font-size: .74rem; }
.availability-grid-shell { max-height: 610px; overflow: auto; overscroll-behavior: contain; border: 1px solid #dfe7ee; border-radius: 16px; background: white; scrollbar-gutter: stable; }
.availability-grid-shell.dragging { cursor: crosshair; }
.availability-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(68px, 1fr)); min-width: 620px; user-select: none; }
.availability-grid-corner, .availability-day-header { position: sticky; top: 0; z-index: 4; min-height: 48px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #dfe7ee; border-right: 1px solid #edf2f6; background: #f8fafc; }
.availability-grid-corner { left: 0; z-index: 6; color: var(--gray); font-size: .72rem; font-weight: 800; }
.availability-day-header { gap: 2px; flex-direction: column; color: var(--navy); }
.availability-day-header strong { font-size: .86rem; }
.availability-day-header span { color: var(--gray); font-size: .65rem; }
.availability-time-label { position: sticky; left: 0; z-index: 3; min-height: 29px; display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; border-right: 1px solid #dfe7ee; border-bottom: 1px solid #f0f3f6; background: #fbfcfd; color: var(--gray); font-size: .66rem; font-variant-numeric: tabular-nums; }
.availability-time-label.full-hour { border-top: 1px solid #d8e1e8; color: var(--navy); font-weight: 800; }
.availability-cell { min-width: 0; height: 29px; border: 0; border-right: 1px solid #edf2f6; border-bottom: 1px solid #edf2f6; border-radius: 0; background: white; touch-action: manipulation; }
.availability-cell.full-hour { border-top: 1px solid #d8e1e8; }
.availability-cell:hover { background: #eef6ff; }
.availability-cell.selected { background: linear-gradient(135deg, var(--accent), #2f80ed); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.availability-cell:focus-visible { position: relative; z-index: 2; outline: 3px solid rgba(74,144,226,.3); outline-offset: -3px; }
.availability-help { margin: 10px 2px 0; color: var(--gray); font-size: .74rem; line-height: 1.55; }
.availability-mobile-picker { display: none; }
.mobile-schedule-help { display: none; }
.availability-mobile-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.availability-mobile-day { min-width: 0; min-height: 38px; padding: 7px 2px; border: 1px solid #dce5ed; border-radius: 10px; color: var(--gray); background: white; font-size: .72rem; font-weight: 850; cursor: pointer; }
.availability-mobile-day.active { color: white; border-color: var(--accent); background: var(--accent); box-shadow: 0 5px 14px rgba(74,144,226,.18); }
.availability-mobile-hours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.availability-mobile-hour { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 5px; padding: 6px; border: 1px solid #e2e9f0; border-radius: 11px; background: #fbfcfd; }
.availability-mobile-hour > strong { color: var(--navy); text-align: center; font-size: .75rem; font-variant-numeric: tabular-nums; }
.availability-mobile-half-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.availability-mobile-half-buttons button { min-width: 0; min-height: 35px; padding: 0 3px; border: 1px solid #dbe4ec; border-radius: 8px; color: #657586; background: white; font-size: .7rem; font-weight: 850; cursor: pointer; touch-action: manipulation; }
.availability-mobile-half-buttons button.selected { color: white; border-color: var(--accent); background: linear-gradient(135deg, var(--accent), #2f80ed); }
.schedule-preference-field { display: grid; gap: 8px; margin: 4px 0 18px; }
.schedule-preference-field > label { font-size: .9rem; }
.location-assignment-notice { margin-top: 3px; padding: 13px 15px; border: 1px solid #dceaf8; border-radius: 13px; background: #f4f9ff; }
.location-assignment-notice strong { color: var(--accent-deep); font-size: .78rem; }
.location-assignment-notice p { margin: 5px 0 0; color: #5f7387; font-size: .75rem; line-height: 1.55; }
.field-group { display: grid; gap: 8px; margin-top: 6px; }
.field-group label { font-size: .9rem; }
.schedule-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.count-badge { color: var(--accent-deep); background: var(--accent-light); padding: 6px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.slot-list { display: grid; gap: 10px; margin: 20px 0; max-height: 430px; overflow: auto; }
.slot-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; background: var(--page); border: 1px solid transparent; border-radius: 15px; padding: 13px; }
.slot-day { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: white; color: var(--accent-deep); font-weight: 900; }
.slot-main { display: grid; gap: 3px; }
.slot-main strong { font-size: .9rem; }
.slot-main small { color: var(--gray); }
.remove-slot { width: 34px; height: 34px; border: 0; border-radius: 10px; color: var(--gray); background: white; }
.remove-slot:hover { color: var(--danger); }
.schedule-note { border-top: 1px solid #edf1f5; padding-top: 18px; }
.schedule-note strong { font-size: .8rem; color: var(--accent-deep); }
.schedule-note p { margin: 6px 0 0; color: var(--gray); font-size: .78rem; line-height: 1.55; }
.empty-state { display: grid; place-items: center; min-height: 120px; color: var(--gray); text-align: center; font-size: .85rem; }
.empty-state.compact { min-height: 160px; border: 1px dashed #d9e1e9; border-radius: 15px; }

/* Guide */
.guide-progress { padding: 22px 25px; margin-bottom: 16px; }
.guide-progress > div:first-child { display: flex; justify-content: space-between; font-size: .86rem; }
.guide-progress span { color: var(--gray); }
.progress-track { height: 9px; background: #e9eef3; border-radius: 99px; overflow: hidden; margin-top: 13px; }
.progress-bar { width: 0%; height: 100%; background: var(--accent); border-radius: inherit; transition: width .25s; }
.guide-list { display: grid; gap: 12px; }
.guide-card { position: relative; grid-template-columns: 34px 1fr; align-items: start; gap: 18px; cursor: pointer; background: white; border: 1px solid rgba(22,50,79,.07); border-radius: 18px; padding: 22px; box-shadow: 0 8px 25px rgba(22,50,79,.035); }
.guide-card input { position: absolute; opacity: 0; pointer-events: none; }
.guide-check { width: 30px; height: 30px; border: 2px solid #d6e0e8; border-radius: 10px; display: grid; place-items: center; }
.guide-card input:checked + .guide-check { background: var(--accent); border-color: var(--accent); }
.guide-card input:checked + .guide-check::after { content: "✓"; color: white; font-weight: 900; }
.guide-card b { color: var(--accent); font-size: .72rem; letter-spacing: .08em; }
.guide-card h3 { margin: 4px 0 7px; font-size: 1rem; }
.guide-card p { margin: 0; color: var(--gray); font-weight: 400; font-size: .85rem; line-height: 1.55; }
.guide-card:has(> input:checked) { border-color: rgba(74,144,226,.28); background: #fbfdff; }

/* Guide message examples (always visible) */
.guide-message-example { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--page); }
.guide-message-example-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--accent-deep); font-weight: 800; font-size: .78rem; }
.guide-message-example-label span { color: var(--gray); font-weight: 500; font-size: .74rem; }
.guide-message-example p:not(.guide-message-example-label) { margin: 0; padding-top: 12px; border-top: 1px solid rgba(74,144,226,.1); color: var(--dark-gray); font-weight: 500; font-size: .82rem; line-height: 1.7; }

/* Guide sub-checklist (optional self-tracking, not counted in main progress) */
.guide-subchecklist { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.guide-subchecklist li label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; }
.guide-subchecklist input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.guide-subchecklist span { color: var(--dark-gray); font-size: .82rem; }
.guide-subchecklist input:checked + span { color: var(--gray); text-decoration: line-through; }

/* Guide example image */
.guide-example-image { margin-top: 12px; }
.guide-example-image img { display: block; width: 100%; max-width: 360px; border: 1px solid var(--border); border-radius: 13px; }

/* Guide curriculum tab link */
.guide-curriculum-link { margin-top: 12px; border: 0; background: var(--accent-light); color: var(--accent-deep); font-weight: 800; font-size: .8rem; padding: 10px 14px; border-radius: 11px; }
.guide-curriculum-link:hover { background: #d7ebff; }

/* Resources */
.resource-grid, .video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.resource-card, .video-card { overflow: hidden; background: white; border: 1px solid rgba(22,50,79,.07); border-radius: 20px; box-shadow: 0 10px 30px rgba(22,50,79,.045); }
.resource-card { padding: 24px; }
.resource-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: var(--accent-light); color: var(--accent-deep); font-weight: 900; margin-bottom: 20px; }
.resource-type { color: var(--accent-deep); font-size: .7rem; font-weight: 800; letter-spacing: .1em; }
.resource-card h3 { margin: 7px 0 9px; font-size: 1.08rem; }
.resource-card p { min-height: 60px; margin: 0 0 20px; color: var(--gray); font-size: .82rem; line-height: 1.6; }
.resource-card a { display: inline-flex; color: var(--accent-deep); font-weight: 800; font-size: .83rem; text-decoration: none; }
.video-frame { aspect-ratio: 16/9; background: var(--navy); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-info { padding: 20px; }
.video-order { color: var(--accent); font-size: .72rem; font-weight: 900; letter-spacing: .1em; }
.video-info h3 { margin: 7px 0; font-size: 1.02rem; }
.video-info p { margin: 0; color: var(--gray); font-size: .8rem; line-height: 1.55; }
.skeleton { background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 50%, #edf1f5 75%); background-size: 200% 100%; animation: shimmer 1.25s infinite; border-radius: 8px; }
.skeleton.line { height: 15px; }
.skeleton.line.short { width: 70%; }
.skeleton-card { min-height: 220px; background: linear-gradient(90deg, #edf1f5 25%, #f7f9fb 50%, #edf1f5 75%); background-size: 200% 100%; animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Profile */
.profile-panel { padding: 28px; }
.profile-form-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #edf1f5; }
.profile-form-head h3 { margin: 0 0 6px; font-size: 1.08rem; }
.profile-form-head p { margin: 0; color: var(--gray); font-size: .84rem; line-height: 1.55; }
.required-note { flex: 0 0 auto; color: var(--gray); font-size: .76rem; font-weight: 800; }
.required-note b, .required-mark { color: var(--danger); }
.field-label { display: inline-flex; align-items: center; gap: 3px; }
.field-help { display: block; margin-top: 6px; color: var(--gray); font-size: .74rem; line-height: 1.45; }
.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.full-field { grid-column: 1 / -1; }
.profile-payment-warning { padding: 16px 18px; border: 1px solid #f2d5a5; border-radius: 15px; background: #fffaf1; color: #76521f; }
.profile-payment-warning strong { display: block; margin-bottom: 5px; font-size: .88rem; }
.profile-payment-warning p { margin: 0; font-size: .8rem; font-weight: 500; line-height: 1.55; }
.profile-save { grid-column: 2; justify-self: end; min-width: 160px; }
.profile-photo-field { display: flex; align-items: center; gap: 20px; padding: 18px; border: 1px solid #e2eaf2; border-radius: 18px; background: #f8fbfe; }
.profile-photo-preview { width: 96px; height: 96px; flex: 0 0 96px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(74,144,226,.17); border-radius: 50%; background: var(--accent-light); color: var(--accent-deep); font-size: 1.75rem; font-weight: 900; }
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-copy { min-width: 0; display: grid; gap: 9px; }
.profile-photo-title-row { display: flex; align-items: center; gap: 8px; }
.profile-photo-title-row strong { color: var(--navy); font-size: .98rem; }
.optional-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 999px; background: #e8f2fd; color: var(--accent-deep); font-size: .68rem; font-weight: 800; }
.profile-photo-copy p { margin: 0; color: var(--gray); font-size: .8rem; line-height: 1.55; }
.profile-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file-button { cursor: pointer; }
.profile-photo-status { color: var(--gray); font-size: .74rem; font-weight: 700; }
.danger-text { color: var(--danger) !important; }

/* Profile form visual cleanup */
.profile-form > label {
  min-width: 0;
  align-content: start;
}
.profile-form input,
.profile-form select {
  min-height: 48px;
}
.profile-form textarea {
  min-height: 116px;
}
.profile-kakao-field {
  grid-column: 1 / -1;
}
.onboarding-form {
  column-gap: 18px;
  row-gap: 16px;
}
.onboarding-form > label {
  gap: 7px;
}
.onboarding-form .profile-photo-field {
  padding: 16px 18px;
}
.onboarding-form .profile-photo-preview {
  width: 86px;
  height: 86px;
  flex-basis: 86px;
}
.onboarding-form .profile-payment-warning,
.onboarding-form .profile-publication-notice {
  margin-top: 2px;
}
@media (max-width: 820px) {
  .profile-kakao-field { grid-column: auto; }
  .onboarding-form .profile-photo-field { padding: 16px; }
}
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.profile-required-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; color: #a13030; background: #fff0f0; font-size: .68rem; font-weight: 900; }
.profile-publication-notice { padding: 13px 15px; border: 1px solid #dceaf8; border-radius: 13px; background: #f4f9ff; }
.profile-publication-notice strong { color: var(--accent-deep); font-size: .78rem; }
.profile-publication-notice p { margin: 5px 0 0; color: #5f7387; font-size: .75rem; line-height: 1.6; }

/* Admin */
.admin-body { background: var(--page); }
.admin-header { height: 78px; display: flex; justify-content: space-between; align-items: center; padding: 0 4vw; color: white; background: var(--navy); }
.admin-header-actions { display: flex; gap: 10px; }
.admin-header .button.ghost { background: rgba(255,255,255,.1); color: white; }
.admin-main { max-width: 1250px; margin: 0 auto; padding: 42px 4vw 80px; }
.admin-intro { align-items: center; }
.admin-intro h1 { font-size: 2.35rem; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-panel { display: grid; gap: 10px; background: white; border: 1px solid rgba(22,50,79,.07); border-radius: 18px; padding: 22px; }
.stat-panel span { color: var(--gray); font-size: .82rem; font-weight: 700; }
.stat-panel strong { font-size: 1.7rem; letter-spacing: -.04em; }
.admin-filter-panel { display: grid; grid-template-columns: 1fr 220px; gap: 15px; padding: 18px; margin-bottom: 18px; }
.admin-filter-panel label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.admin-filter-panel input, .admin-filter-panel select { padding: 10px 12px; }
.admin-teacher-list { display: grid; gap: 15px; }
.teacher-admin-card { padding: 24px; }
.teacher-admin-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.teacher-admin-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.teacher-photo-download { min-height: 34px; padding: 7px 10px; color: var(--accent-deep); background: #f4f9ff; border-color: #cfe1f2; white-space: nowrap; }
.teacher-admin-profile { display: flex; gap: 13px; align-items: center; }
.teacher-admin-profile .teacher-admin-avatar { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; overflow: hidden; margin-top: 0; border-radius: 16px; background: var(--accent-light); color: var(--accent-deep); font-size: 1rem; font-weight: 900; }
.teacher-admin-avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher-admin-avatar b { color: var(--accent-deep); font-size: 1rem; }
.teacher-admin-profile strong { display: block; }
.teacher-admin-profile span { display: block; color: var(--gray); font-size: .78rem; margin-top: 3px; }
.teacher-admin-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.teacher-admin-details > div { min-width: 0; padding: 13px 14px; border-radius: 13px; background: var(--page); }
.teacher-admin-details span { display: block; margin-bottom: 5px; color: var(--gray); font-size: .7rem; font-weight: 800; }
.teacher-admin-details strong { display: block; overflow-wrap: anywhere; color: var(--navy); font-size: .82rem; line-height: 1.45; }
.teacher-admin-bio { grid-column: 1 / -1; }
.updated-at { color: var(--gray); font-size: .75rem; }
.admin-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 18px; }
.admin-slot { background: var(--page); border-radius: 12px; padding: 11px; font-size: .8rem; }
.admin-slot strong { display: block; margin-bottom: 4px; color: var(--navy); }
.admin-memo { margin-top: 15px; padding-top: 15px; border-top: 1px solid #edf1f5; color: var(--gray); font-size: .8rem; line-height: 1.55; }

/* Student assignment and settlement management */
.admin-assignment-section { margin: 30px 0 42px; }
.admin-assignment-title { margin-bottom: 18px; }
.admin-assignment-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 18px; align-items: start; }
.assignment-manager-form-card, .assignment-manager-list-card { padding: 24px; }
.assignment-manager-form-card > h3 { margin: 0 0 18px; }
.assignment-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.assignment-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.admin-assignment-list { display: grid; gap: 10px; margin-top: 18px; max-height: 520px; overflow: auto; }
.admin-assignment-list > .empty-state { min-height: 180px; border: 1px dashed #d9e1e9; border-radius: 15px; background: var(--page); line-height: 1.65; }
.admin-assignment-item { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(270px, .92fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid #e4ebf2; border-radius: 15px; background: #fbfcfe; }
.admin-assignment-person { min-width: 0; }
.assignment-student-label { display: inline-flex; margin-bottom: 5px; padding: 4px 7px; border-radius: 999px; color: var(--accent-deep); background: var(--accent-light); font-size: .65rem; font-weight: 900; }
.admin-assignment-person strong { display: block; color: var(--navy); font-size: .98rem; overflow-wrap: anywhere; }
.admin-assignment-person small { display: block; margin-top: 4px; color: var(--gray); font-size: .73rem; overflow-wrap: anywhere; }
.admin-assignment-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.admin-assignment-dates > div { min-width: 0; padding: 10px; border-radius: 11px; background: white; }
.admin-assignment-dates dt { color: var(--gray); font-size: .66rem; font-weight: 800; }
.admin-assignment-dates dd { margin: 4px 0 0; color: var(--dark-gray); font-size: .78rem; font-weight: 800; overflow-wrap: anywhere; }
.admin-assignment-actions { display: flex; gap: 7px; }
.assignment-delete-button:hover { color: var(--danger); }
.admin-schedule-title { margin-top: 12px; margin-bottom: 18px; }

@media (max-width: 1050px) {
  .welcome-card { grid-template-columns: 1fr 280px; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-assignment-layout { grid-template-columns: 1fr; }
  .resource-grid, .video-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: 1fr; }
  .admin-slots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .onboarding-shell { grid-template-columns: minmax(0, 1fr); }
  .onboarding-brand { position: relative; min-height: auto; padding: 38px 5vw 34px; }
  .onboarding-brand h1 { max-width: 760px; font-size: clamp(2rem, 6vw, 3.25rem); }
  .onboarding-logo { width: 155px; margin-bottom: 24px; }
  .onboarding-email-box { margin-top: 24px; }
  .onboarding-card { width: min(820px, calc(100% - 32px)); margin: 24px 16px 42px; }
}

@media (max-width: 820px) {
  .mobile-only { display: inline-flex !important; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { min-height: 52vh; padding: 55px 28px; }
  .auth-brand h1 { font-size: 3rem; }
  .auth-feature-list { display: none; }
  .auth-panel { padding: 48px 24px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.22); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 90; inset: 0; background: rgba(5,16,27,.48); }
  .workspace { width: 100%; }
  .topbar { height: 78px; padding: 0 18px; }
  .content-wrap { padding: 22px 16px 50px; }
  .user-chip div:last-child { display: none; }
  .icon-button { width: 38px; height: 38px; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: inherit; font-size: 1.2rem; }
  .topbar .icon-button { color: var(--navy); background: white; }
  .welcome-card { grid-template-columns: 1fr; padding: 30px 25px; min-height: auto; }
  .welcome-graphic { display: none; }
  .dashboard-grid, .schedule-layout { grid-template-columns: 1fr; }
  .slot-form { grid-template-columns: 1fr; }
  .resource-grid, .video-grid { grid-template-columns: 1fr; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-photo-field { align-items: flex-start; }
  .full-field, .profile-save { grid-column: auto; }
  .profile-save { justify-self: stretch; }
  .page-intro { align-items: start; flex-direction: column; }
  .admin-header { padding: 0 16px; }
  .admin-header .logo-text { display: none; }
  .admin-main { padding: 28px 16px 60px; }
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-filter-panel { grid-template-columns: 1fr; }
  .admin-filter-panel label { grid-template-columns: 1fr; }
  .admin-slots { grid-template-columns: 1fr; }
  .assignment-list { grid-template-columns: minmax(0, 1fr); }
  .assignment-manager-form-card, .assignment-manager-list-card { padding: 20px; }
  .admin-assignment-item { grid-template-columns: minmax(0, 1fr); }
  .admin-assignment-actions { justify-content: flex-end; }
}

@media (max-width: 480px) {
  .auth-brand { min-height: 45vh; }
  .auth-brand h1 { font-size: 2.55rem; }
  .welcome-card h2 { font-size: 2rem; }
  .schedule-actions { flex-direction: column-reverse; }
  .schedule-actions .button { width: 100%; }
  .guide-card { grid-template-columns: 30px 1fr; padding: 18px; gap: 13px; }
  .admin-header-actions .button:first-child { display: none; }
}

/* Admin content management */
.admin-content-section { margin-top: 55px; padding-top: 45px; border-top: 1px solid rgba(22,50,79,.1); }
.admin-content-title { margin-bottom: 20px; }
.admin-content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.content-manager-card { padding: 22px; }
.content-manager-card > h3 { margin: 0 0 18px; font-size: 1.08rem; }
.manager-form { display: grid; gap: 13px; }
.manager-form-row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; }
.manager-form input, .manager-form select, .manager-form textarea { padding: 10px 12px; border-radius: 11px; }
.manager-form .button { margin-top: 2px; }
.manager-list { display: grid; gap: 8px; margin-top: 20px; padding-top: 17px; border-top: 1px solid #edf1f5; max-height: 310px; overflow: auto; }
.manager-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px; background: var(--page); border-radius: 12px; }
.manager-item strong { display: block; font-size: .82rem; }
.manager-item small { display: block; margin-top: 3px; color: var(--gray); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manager-item button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: white; color: var(--gray); }
.manager-item button:hover { color: var(--danger); }
@media (max-width: 1050px) { .admin-content-grid { grid-template-columns: 1fr; } }


/* Integrated responsive hardening — based on the current deployed repository */
.auth-brand > *, .auth-card, .workspace, .content-wrap, .page, .panel,
.welcome-card > *, .dashboard-grid > *, .schedule-layout > *,
.resource-grid > *, .video-grid > *, .admin-content-grid > *,
.teacher-admin-card, .manager-item > *, .slot-main { min-width: 0; }

.logo { min-width: 0; }
.sidebar .site-logo { width: 76px; }
.admin-header .site-logo { width: 88px; max-height: 42px; }

.user-chip span, .teacher-admin-profile span, .announcement-item p,
.resource-card p, .video-info p, .manager-item strong, .manager-item small {
  overflow-wrap: anywhere;
}

input[type="time"], input[type="date"], input[type="datetime-local"] {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 820px) {
  .auth-page { min-height: 100svh; }
  .auth-brand { min-height: auto; padding: 42px 24px 34px; }
  .brand-logo { width: clamp(145px, 43vw, 195px); margin-bottom: 22px; }
  .auth-brand h1 { margin: 8px 0 18px; font-size: clamp(2.35rem, 11vw, 3rem); }
  .auth-copy { font-size: .98rem; }
  .auth-panel { place-items: start center; padding: 34px 20px 48px; }
  .auth-card { width: 100%; max-width: 480px; }

  .sidebar {
    width: min(86vw, 300px);
    padding: max(22px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
    transform: translateX(-105%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { touch-action: none; }
  .sidebar-backdrop.hidden { display: none !important; }
  .sidebar-head { padding-bottom: 22px; }
  .sidebar .site-logo { width: 82px; }
  .nav-item, .logout-button { min-height: 44px; }

  .topbar { min-height: 72px; height: auto; padding: 12px 16px; }
  .topbar-left { min-width: 0; }
  .topbar-left > div { min-width: 0; }
  .topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content-wrap { width: 100%; padding: 20px 14px calc(46px + env(safe-area-inset-bottom)); }

  .welcome-card { padding: 28px 22px; border-radius: 21px; }
  .welcome-card h2 { font-size: clamp(1.9rem, 8vw, 2.35rem); }
  .dashboard-grid, .schedule-layout, .resource-grid, .video-grid,
  .profile-form, .admin-stat-grid, .admin-filter-panel, .admin-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .quick-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-card { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 16px; }
  .quick-icon { width: 44px; height: 44px; }

  .schedule-form-panel, .current-slots-panel, .profile-panel,
  .announcement-panel, .schedule-summary-panel, .content-manager-card,
  .teacher-admin-card { padding: 20px; }
  .slot-form { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .slot-add { width: 100%; }
  .schedule-actions { flex-wrap: wrap; }
  .schedule-actions .button { min-height: 44px; }
  .slot-list { max-height: none; overflow: visible; }

  .page-intro { width: 100%; }
  .page-intro > div { min-width: 0; }
  .page-intro .button, .page-intro > button { max-width: 100%; }

  .admin-header { min-height: 72px; height: auto; gap: 12px; padding: 12px 16px; }
  .admin-header .logo { flex: 0 1 auto; }
  .admin-header .site-logo { width: 76px; }
  .admin-header-actions { flex: 0 0 auto; }
  .admin-main { width: 100%; padding: 26px 14px calc(54px + env(safe-area-inset-bottom)); }
  .admin-filter-panel label { grid-template-columns: minmax(0, 1fr); }
  .admin-slots { grid-template-columns: minmax(0, 1fr); }
  .manager-form-row { grid-template-columns: minmax(0, 1fr); }
  .manager-list { max-height: none; overflow: visible; }
}

@media (max-width: 560px) {
  .auth-brand { padding: 34px 20px 28px; }
  .auth-panel { padding-inline: 16px; }
  .auth-card h2 { font-size: 1.75rem; }
  input, select, textarea { font-size: 16px; }

  .panel-head, .teacher-admin-head, .guide-progress > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }
  .teacher-admin-profile { width: 100%; align-items: flex-start; }
  .teacher-admin-head-actions { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .updated-at { padding-left: 59px; }
  .summary-row { grid-template-columns: 68px minmax(0, 1fr); }
  .slot-item { grid-template-columns: 44px minmax(0, 1fr) 34px; gap: 9px; padding: 11px; }
  .slot-day { width: 42px; height: 42px; }
  .schedule-actions { flex-direction: column-reverse; }
  .schedule-actions .button { width: 100%; }
  .resource-card p { min-height: 0; }
  .guide-card { grid-template-columns: 30px minmax(0, 1fr); }

  .admin-header .logo-text { display: none; }
  .admin-header-actions .button { white-space: nowrap; }
  .admin-intro .button, #exportCsvButton { width: 100%; }
  .admin-content-section { margin-top: 36px; padding-top: 30px; }
}

@media (max-width: 380px) {
  .content-wrap, .admin-main { padding-inline: 10px; }
  .welcome-card, .schedule-form-panel, .current-slots-panel,
  .profile-panel, .announcement-panel, .schedule-summary-panel,
  .content-manager-card, .teacher-admin-card { padding: 17px; }
  .quick-card { grid-template-columns: 40px minmax(0, 1fr); }
  .quick-card > b { display: none; }
  .quick-icon { width: 40px; height: 40px; }
  .admin-header-actions .button:first-child { display: none; }
}


/* Profile editing and payout fields — stable update */
@media (max-width: 820px) {
  .profile-form-head { flex-direction: column; gap: 10px; margin-bottom: 20px; }
  .profile-photo-field { flex-direction: column; align-items: center; text-align: center; }
  .profile-photo-copy { width: 100%; }
  .profile-photo-title-row, .profile-photo-actions { justify-content: center; }
  .profile-form { grid-template-columns: minmax(0, 1fr); }
  .profile-form .full-field, .profile-form .profile-save { grid-column: auto; }
  .profile-form .profile-save { width: 100%; justify-self: stretch; min-height: 46px; }
  .teacher-admin-details { grid-template-columns: minmax(0, 1fr); }
  .teacher-admin-bio { grid-column: auto; }
}


/* When2meet-style availability picker */
@media (max-width: 820px) {
  .availability-picker-head { align-items: flex-start; flex-direction: column; }
  .availability-grid-shell { max-height: 500px; }
  .availability-grid { min-width: 560px; grid-template-columns: 54px repeat(7, minmax(62px, 1fr)); }
  .availability-cell, .availability-time-label { min-height: 28px; height: 28px; }
  .availability-grid-corner, .availability-day-header { min-height: 42px; }
}

@media (max-width: 620px) {
  .availability-grid-shell { display: none; }
  .availability-mobile-picker { display: block; margin-top: 2px; }
  .desktop-schedule-help { display: none; }
  .mobile-schedule-help { display: inline; }
  .availability-help { margin-top: 11px; font-size: .72rem; }
  .availability-cell-count { align-self: flex-start; }
}

@media (max-width: 420px) {
  .availability-mobile-days { gap: 4px; }
  .availability-mobile-day { min-height: 36px; font-size: .68rem; }
  .availability-mobile-hours { gap: 6px; }
  .availability-mobile-hour { grid-template-columns: 30px minmax(0, 1fr); gap: 4px; padding: 5px; }
  .availability-mobile-half-buttons button { min-height: 34px; font-size: .67rem; }
  .location-assignment-notice { padding: 12px 13px; }
}


/* Assignment update responsive safeguards */
@media (max-width: 560px) {
  .assignment-overview-panel { padding: 19px; }
  .assignment-date-fields, .admin-assignment-dates { grid-template-columns: minmax(0, 1fr); }
  .assignment-form-actions { flex-direction: column-reverse; }
  .assignment-form-actions .button { width: 100%; }
  .admin-assignment-actions { justify-content: stretch; }
  .admin-assignment-actions .button { flex: 1; }
}


/* Onboarding and emphasized notice mobile safeguards */
@media (max-width: 620px) {
  .onboarding-brand { padding: 30px 20px 28px; }
  .onboarding-brand > p:not(.section-kicker) { font-size: .9rem; }
  .onboarding-card { width: calc(100% - 24px); margin: 18px 12px 30px; padding: 23px 18px; border-radius: 21px; }
  .onboarding-card-head { flex-direction: column; gap: 9px; margin-bottom: 21px; padding-bottom: 18px; }
  .onboarding-form { grid-template-columns: minmax(0, 1fr); }
  .onboarding-form .full-field { grid-column: auto; }
  .onboarding-actions { flex-direction: column-reverse; align-items: stretch; }
  .onboarding-actions .button { width: 100%; }
  .announcement-spotlight { padding: 22px 19px; }
  .announcement-panel-head { align-items: flex-start; flex-direction: column; }
  .announcement-featured { padding: 18px; }
  .announcement-featured-meta { align-items: flex-start; }
  .announcement-item { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}


/* Plan labels and automatic current/history student views */
.assignment-overview-copy { margin: 6px 0 0; color: var(--gray); font-size: .78rem; line-height: 1.5; }
.assignment-head-actions { display: flex; align-items: center; gap: 12px; }
.assignment-card-topline, .admin-assignment-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 12px; }
.plan-badge, .assignment-status-badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: .66rem; font-weight: 900; line-height: 1; }
.plan-badge { color: #425466; background: #eef2f6; }
.plan-economy { color: #276749; background: #e6f7ee; }
.plan-standard { color: #245f9e; background: #e8f3ff; }
.plan-premium { color: #7b4b00; background: #fff2cf; }
.plan-unassigned { color: #667085; background: #f0f2f5; }
.assignment-status-badge.current { color: #17663a; background: #e7f8ee; }
.assignment-status-badge.completed { color: #5f6873; background: #eceff2; }
.assignment-card-history { border-color: #e3e7eb; background: linear-gradient(145deg, #fbfcfd, #f2f4f6); }
.assignment-card-history .settlement-date-row { background: #f9fafb; }
.assignment-history-panel { padding: 24px; }
.assignment-history-list { margin-top: 18px; }
.history-auto-note { margin-top: 16px; padding: 13px 15px; border: 1px solid #dfe7ee; border-radius: 13px; background: #f7f9fb; }
.history-auto-note strong { color: var(--navy); font-size: .78rem; }
.history-auto-note p { margin: 5px 0 0; color: var(--gray); font-size: .75rem; line-height: 1.55; }
.assignment-filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.assignment-filter-tab { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dce4eb; border-radius: 999px; padding: 8px 12px; color: var(--gray); background: white; font-size: .74rem; font-weight: 850; cursor: pointer; }
.assignment-filter-tab span { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; color: inherit; background: #f0f3f6; font-size: .68rem; }
.assignment-filter-tab:hover, .assignment-filter-tab.active { color: var(--accent-deep); border-color: #b8d4f2; background: #f2f8ff; }
.assignment-filter-tab.active span { background: #dceeff; }
.assignment-manager-note { margin: 10px 0 0; color: var(--gray); font-size: .72rem; line-height: 1.5; }
.admin-assignment-item.is-history { background: #f7f8fa; }

@media (max-width: 620px) {
  .assignment-overview-head { align-items: flex-start; flex-direction: column; }
  .assignment-head-actions { width: 100%; justify-content: space-between; }
  .assignment-history-panel { padding: 19px; }
  .assignment-filter-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .assignment-filter-tab { justify-content: center; padding-inline: 8px; }
}


/* NADO bilingual language selector */
.language-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.language-slot-fallback {
  position: relative;
  z-index: 10;
  justify-content: flex-end;
  padding: 12px 16px 0;
  background: var(--page);
}
.nado-language-toggle {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(28, 50, 74, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 16px rgba(20, 41, 66, .08);
}
.nado-language-toggle button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  color: #667085;
  background: transparent;
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.nado-language-toggle button:hover { color: #245f9e; background: #eef6ff; }
.nado-language-toggle button.active { color: #fff; background: #2f80d1; }

/* Login: keep the selector inside the login panel rather than floating over the page. */
.auth-panel { position: relative; }
.auth-language-row {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
}

/* First profile setup */
.onboarding-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

/* Teacher header */
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  flex: 0 0 auto;
}
.topbar-actions .user-chip { flex: 0 0 auto; }

/* Admin header */
.admin-header-actions { align-items: center; }
.language-slot-dark .nado-language-toggle {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.09);
  box-shadow: none;
}
.language-slot-dark .nado-language-toggle button { color: rgba(255,255,255,.72); }
.language-slot-dark .nado-language-toggle button:hover { color: #fff; background: rgba(255,255,255,.1); }
.language-slot-dark .nado-language-toggle button.active { color: var(--navy); background: #fff; }

@media (max-width: 820px) {
  .topbar-actions { gap: 9px; }
  .nado-language-toggle button { padding: 6px 9px; font-size: .68rem; }
  .auth-language-row { top: 16px; right: 16px; }
  .onboarding-head-actions { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 540px) {
  .topbar-actions .user-chip { display: none; }
  .topbar { gap: 10px; }
  .topbar-left { flex: 1 1 auto; }
  .topbar-actions { flex: 0 0 auto; }
  .admin-header-actions { gap: 7px; }
  .admin-header-actions .button { padding-inline: 10px; }
}

@media (max-width: 390px) {
  .nado-language-toggle { padding: 3px; }
  .nado-language-toggle button { padding: 6px 7px; font-size: .63rem; }
  .topbar { padding-inline: 12px; }
}

/* 2026-08-11: Admin assignment calendar + bilingual content management */
.admin-calendar-section { margin-top: 38px; }
.admin-calendar-title { margin-bottom: 14px; }
.admin-calendar-panel { padding: 22px; }
.admin-calendar-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.admin-calendar-nav { display: flex; align-items: center; gap: 8px; }
.admin-calendar-toolbar h3 { margin: 0; color: var(--navy); font-size: 1.15rem; text-align: center; }
.calendar-type-legend { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px 14px; color: var(--gray); font-size: .72rem; font-weight: 800; }
.calendar-type-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; }
.calendar-legend-dot.first { background: #4a90e2; }
.calendar-legend-dot.settlement { background: #e98a2f; }
.calendar-color-note { margin: 0 0 14px; color: var(--gray); font-size: .72rem; line-height: 1.5; }
.admin-calendar-scroll { overflow-x: auto; border: 1px solid #e2e8ef; border-radius: 15px; background: #fff; }
.admin-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  min-width: 924px;
  background: #e7edf3;
  gap: 1px;
}
.calendar-weekday { padding: 10px 8px; background: #f4f7fa; color: var(--gray); text-align: center; font-size: .72rem; font-weight: 900; }
.calendar-day { min-height: 142px; padding: 8px; background: #fff; }
.calendar-day-empty { background: #f9fafc; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px #94bfe9; background: #fbfdff; }
.calendar-day-number { display: flex; justify-content: space-between; align-items: center; min-height: 24px; margin-bottom: 6px; color: #4d5d6d; font-size: .74rem; font-weight: 900; }
.calendar-day-number b { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #4e6378; background: #eef2f6; font-size: .62rem; }
.calendar-events { display: grid; gap: 6px; }
.calendar-event { display: grid; gap: 3px; padding: 7px 8px; border-left: 4px solid; border-radius: 9px; font-size: .66rem; line-height: 1.25; }
.calendar-event-first { border-left-color: #4a90e2; background: #eef6ff; }
.calendar-event-settlement { border-left-color: #e98a2f; background: #fff5ea; }
.calendar-event-type { color: #6e7c8b; font-size: .59rem; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.calendar-student-name, .calendar-teacher-name { width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-student-name {
  padding: 2px 6px;
  border-radius: 999px;
  color: hsl(var(--calendar-name-hue) 62% 34%);
  background: hsl(var(--calendar-name-hue) 82% 94%);
  font-size: .68rem;
  font-weight: 900;
}
.calendar-teacher-name {
  padding: 2px 0;
  color: hsl(var(--calendar-name-hue) 57% 37%);
  font-size: .62rem;
  font-weight: 800;
}
.calendar-teacher-name::before { content: "• "; }

.manager-form-help { margin: -2px 0 2px; padding: 10px 11px; border-radius: 10px; color: var(--gray); background: #f5f8fb; font-size: .7rem; line-height: 1.45; }
.content-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.manager-item-actions { display: flex; align-items: center; gap: 5px; }
.manager-item-actions button { width: auto; min-width: 32px; padding: 0 9px; cursor: pointer; font-size: .7rem; font-weight: 850; }
.manager-item-actions button:first-child:hover { color: var(--accent-deep); background: #eef6ff; }
.manager-item-en { color: #667f98 !important; }

.training-maintenance-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; min-height: 160px; padding: 28px; }
.training-maintenance-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 15px; color: #2f80d1; background: #eaf4ff; font-size: 1.5rem; font-weight: 900; }
.training-maintenance-card strong { color: var(--navy); font-size: 1rem; }
.training-maintenance-card p { margin: 6px 0 0; color: var(--gray); line-height: 1.6; }

@media (max-width: 820px) {
  .admin-calendar-panel { padding: 17px; }
  .admin-calendar-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .admin-calendar-toolbar h3 { order: -1; text-align: left; }
  .calendar-type-legend { justify-content: flex-start; }
  .admin-calendar-nav .button { flex: 0 0 auto; }
  .content-form-actions { flex-direction: column-reverse; }
  .content-form-actions .button { width: 100%; }
}

@media (max-width: 480px) {
  .admin-calendar-section { margin-top: 28px; }
  .admin-calendar-panel { padding: 14px; }
  .calendar-color-note { font-size: .68rem; }
  .training-maintenance-card { align-items: flex-start; padding: 20px; }
}
.calendar-event-first .calendar-event-type { color: #2f80d1; }
.calendar-event-settlement .calendar-event-type { color: #c86e1d; }

/* Mobile availability picker cache-fix hardening */
@media (max-width: 620px) {
  .availability-mobile-picker,
  .availability-mobile-days,
  .availability-mobile-hours { width: 100%; min-width: 0; }

  .availability-mobile-days {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 4px;
  }

  .availability-mobile-day {
    width: 100%;
    min-width: 0;
    padding-inline: 0;
    white-space: nowrap;
  }

  .availability-mobile-hours {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .availability-mobile-hour {
    width: 100%;
    min-width: 0;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 4px;
    padding: 5px;
  }

  .availability-mobile-half-buttons,
  .availability-mobile-half-buttons button { min-width: 0; }

  .availability-mobile-half-buttons button {
    width: 100%;
    min-height: 32px;
    padding-inline: 2px;
  }
}


/* ===== NADO Teacher Service Agreement v1.1 ===== */
body.agreement-open { overflow: hidden; }
.agreement-overlay {
  position: fixed; inset: 0; z-index: 1200; overflow: auto;
  background: #f3f7fb; color: #172033;
}
.agreement-shell { min-height: 100%; padding: 28px; }
.agreement-topbar {
  width: min(1180px, 100%); margin: 0 auto 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
}
.agreement-brand-block { display: flex; align-items: center; gap: 16px; min-width: 0; }
.agreement-logo { width: 110px; height: auto; }
.agreement-brand-block h1 { margin: 2px 0 2px; font-size: clamp(22px, 3vw, 32px); line-height: 1.2; }
.agreement-brand-block p:last-child { margin: 0; color: #69778d; }
.agreement-topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.agreement-card {
  width: min(1180px, 100%); margin: 0 auto; background: #fff; border: 1px solid #e0e7f0;
  border-radius: 24px; box-shadow: 0 18px 50px rgba(31, 58, 92, .08); padding: 24px;
}
.agreement-summary-bar { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.agreement-summary-bar > div { background: #f5f8fc; border-radius: 14px; padding: 12px 14px; }
.agreement-summary-bar span { display: block; color: #728198; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.agreement-summary-bar strong { display: block; overflow-wrap: anywhere; }
.agreement-language-note { border: 1px solid #dbe8f7; background: #f1f7ff; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.agreement-language-note strong { color: #2569b2; }
.agreement-language-note p { margin: 4px 0 0; color: #53657d; line-height: 1.55; }
.agreement-contract-scroll {
  height: min(57vh, 670px); min-height: 390px; overflow: auto; overscroll-behavior: contain;
  border: 1px solid #dbe3ed; border-radius: 18px; background: #fff; padding: 26px;
}
.agreement-contract-content { max-width: 1000px; margin: 0 auto; font-size: 14px; line-height: 1.75; color: #28364a; }
.agreement-contract-content .agreement-purpose { margin: 0 0 24px; padding: 16px 18px; background: #f7f9fc; border-radius: 12px; }
.agreement-article { padding: 6px 0 22px; border-bottom: 1px solid #edf1f5; }
.agreement-article:last-child { border-bottom: 0; }
.agreement-article h3 { margin: 18px 0 10px; font-size: 17px; color: #172033; }
.agreement-article h4 { margin: 18px 0 8px; font-size: 15px; color: #255f9f; }
.agreement-article p { margin: 7px 0; }
.agreement-article ol, .agreement-article ul { margin: 8px 0 0 20px; padding: 0; }
.agreement-article li { margin: 6px 0; }
.agreement-article li ul { margin-top: 7px; }
.agreement-table-scroll { overflow-x: auto; margin: 8px 0 16px; border: 1px solid #e1e7ef; border-radius: 12px; }
.agreement-price-table { width: 100%; min-width: 790px; border-collapse: collapse; font-size: 13px; }
.agreement-price-table th, .agreement-price-table td { padding: 9px 10px; border-bottom: 1px solid #e7ecf2; text-align: right; white-space: nowrap; }
.agreement-price-table th:first-child, .agreement-price-table td:first-child { text-align: left; }
.agreement-price-table th { background: #f5f8fc; color: #53657d; font-weight: 800; }
.agreement-price-table tbody tr:last-child td { border-bottom: 0; }
.agreement-electronic-copy { background: #f8fbff; border: 1px solid #dce9f7; border-radius: 14px; padding: 4px 16px 16px; margin-top: 16px; }
.agreement-consent-form { margin-top: 18px; border-top: 1px solid #e6ebf1; padding-top: 20px; }
.agreement-consent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.agreement-consent-head h2 { margin: 2px 0 4px; }
.agreement-consent-head p:last-child { margin: 0; color: #6f7e92; }
.agreement-required-badge { background: #eaf3ff; color: #246cb9; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.agreement-check-list { display: grid; gap: 9px; }
.agreement-check-list label { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; background: #f7f9fc; border: 1px solid #e6ebf1; border-radius: 12px; cursor: pointer; line-height: 1.55; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.agreement-check-list input { width: 19px; height: 19px; margin-top: 2px; accent-color: #2f80ed; flex: 0 0 auto; touch-action: manipulation; }
.agreement-check-list label.is-checked { border-color: #a9cff8; background: #f1f7ff; }
.agreement-consent-form.is-submitting .agreement-check-list,
.agreement-consent-form.is-submitting .agreement-signature-grid { opacity: .72; }
.agreement-action-row .button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.agreement-signature-grid { display: grid; grid-template-columns: 1.2fr .9fr 1fr; gap: 12px; margin-top: 14px; }
.agreement-signature-grid label, .agreement-auto-field { border: 1px solid #e3e9f0; border-radius: 12px; padding: 11px 12px; }
.agreement-signature-grid label { display: grid; gap: 7px; font-weight: 700; }
.agreement-signature-grid input { width: 100%; }
.agreement-auto-field span { display: block; color: #748399; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.agreement-auto-field strong { display: block; font-size: 14px; }
.agreement-action-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.agreement-action-row .button.primary { min-width: 190px; }
.agreement-action-row .button:disabled { opacity: .48; cursor: not-allowed; }
.agreement-review-footer { margin-top: 18px; padding: 16px; background: #f7f9fc; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.agreement-review-footer p { margin: 0; color: #637289; }
.profile-agreement-panel {
  margin-top: 20px;
  padding: 24px 28px;
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
}
.profile-agreement-panel > div { flex: 1 1 auto; min-width: 0; }
.profile-agreement-panel .section-kicker { margin-bottom: 7px; }
.profile-agreement-panel h3 { margin: 0 0 7px; font-size: 1.12rem; }
.profile-agreement-panel p:last-child { margin: 0; color: #65758b; line-height: 1.5; overflow-wrap: anywhere; }
.profile-agreement-panel .button { flex: 0 0 auto; min-width: 150px; white-space: nowrap; }
.teacher-agreement-detail strong.agreement-ok { color: #1d7a52; }
.teacher-agreement-detail strong.agreement-missing { color: #b55b35; }

@media (max-width: 760px) {
  .agreement-shell { padding: 12px; }
  .agreement-topbar { align-items: flex-start; }
  .agreement-brand-block { align-items: flex-start; }
  .agreement-logo { width: 84px; margin-top: 4px; }
  .agreement-brand-block h1 { font-size: 20px; }
  .agreement-topbar-actions { flex-direction: column; align-items: flex-end; }
  .agreement-card { border-radius: 18px; padding: 14px; }
  .agreement-summary-bar { grid-template-columns: 1fr; gap: 8px; }
  .agreement-contract-scroll { height: 51vh; min-height: 330px; padding: 16px; }
  .agreement-contract-content { font-size: 13px; line-height: 1.65; }
  .agreement-signature-grid { grid-template-columns: 1fr; }
  .agreement-action-row { flex-direction: column-reverse; }
  .agreement-action-row .button { width: 100%; }
  .agreement-review-footer { flex-direction: column; align-items: stretch; }
  .profile-agreement-panel {
    padding: 20px;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }
  .profile-agreement-panel .button { width: 100%; min-width: 0; }
}


/* Assignment pricing, lesson duration, frequency, and partial payout */
.assignment-service-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.assignment-package-note { margin: -2px 0 2px; color: var(--gray); font-size: .72rem; line-height: 1.55; }
.assignment-pricing-preview { overflow: hidden; border: 1px solid #d8e7f6; border-radius: 16px; background: linear-gradient(145deg, #f8fbff, #eef6ff); }
.assignment-pricing-placeholder { padding: 18px; color: var(--gray); font-size: .78rem; font-weight: 700; line-height: 1.55; }
.assignment-pricing-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px 12px; border-bottom: 1px solid rgba(74,144,226,.14); }
.assignment-pricing-head > div { min-width: 0; display: grid; gap: 3px; }
.assignment-pricing-head span { color: var(--gray); font-size: .66rem; font-weight: 850; }
.assignment-pricing-head strong { color: var(--navy); font-size: .84rem; overflow-wrap: anywhere; }
.assignment-pricing-rate { flex: 0 0 auto; padding: 6px 8px; border-radius: 999px; color: #276749 !important; background: #e6f7ee; }
.assignment-pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: rgba(74,144,226,.12); }
.assignment-pricing-grid > div { min-width: 0; padding: 12px 14px; background: white; }
.assignment-pricing-grid dt { color: var(--gray); font-size: .65rem; font-weight: 800; }
.assignment-pricing-grid dd { margin: 4px 0 0; color: var(--dark-gray); font-size: .85rem; font-weight: 900; }
.assignment-pricing-grid .assignment-pricing-total { grid-column: 1 / -1; padding: 15px 16px; background: #eaf4ff; }
.assignment-pricing-grid .assignment-pricing-total dt { color: var(--accent-deep); }
.assignment-pricing-grid .assignment-pricing-total dd { color: var(--accent-deep); font-size: 1.18rem; }
.assignment-pricing-rounding { margin: 0; padding: 10px 14px 12px; color: var(--gray); background: #f8fbff; font-size: .66rem; line-height: 1.5; }
.admin-assignment-service-tags, .assignment-service-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.admin-assignment-service-tags span, .assignment-service-meta span { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 8px; border-radius: 999px; color: #45627e; background: #edf4fb; font-size: .67rem; font-weight: 850; }
.assignment-pricing-missing { margin-top: 10px; padding: 8px 10px; border: 1px dashed #d8dee6; border-radius: 10px; color: var(--gray); background: #f8f9fb; font-size: .68rem; font-weight: 750; line-height: 1.45; }
.assignment-pricing-missing.teacher-view { margin: 12px 0 0; }
.admin-assignment-summary { min-width: 0; display: grid; gap: 8px; }
.admin-assignment-payout { min-width: 0; padding: 11px 12px; border-radius: 12px; background: #eef6ff; }
.admin-assignment-payout span { display: block; color: var(--gray); font-size: .66rem; font-weight: 800; }
.admin-assignment-payout strong { display: block; margin-top: 3px; color: var(--accent-deep); font-size: 1rem; }
.admin-assignment-payout small { display: block; margin-top: 4px; color: var(--gray); font-size: .64rem; line-height: 1.45; }
.assignment-payout-box { margin-top: 12px; padding: 13px 14px; border: 1px solid rgba(74,144,226,.18); border-radius: 13px; background: white; }
.assignment-payout-box span { display: block; color: var(--gray); font-size: .68rem; font-weight: 850; }
.assignment-payout-box strong { display: block; margin-top: 3px; color: var(--accent-deep); font-size: 1.18rem; letter-spacing: -.02em; }
.assignment-payout-box small { display: block; margin-top: 4px; color: var(--gray); font-size: .67rem; line-height: 1.45; }

@media (max-width: 560px) {
  .assignment-service-fields, .assignment-pricing-grid { grid-template-columns: minmax(0, 1fr); }
  .assignment-pricing-grid .assignment-pricing-total { grid-column: auto; }
  .assignment-pricing-head { align-items: flex-start; flex-direction: column; }
}

/* Teacher pay guide */
.payguide-intro { margin-bottom: 18px; }
.payguide-panel { padding: clamp(22px, 3vw, 34px); overflow: hidden; }
.payguide-copy { max-width: 760px; }
.payguide-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px; border-radius: 999px; color: var(--accent-deep); background: var(--accent-light); font-size: .68rem; font-weight: 900; letter-spacing: .03em; }
.payguide-copy h3 { margin: 13px 0 8px; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.25; }
.payguide-copy p { margin: 0; color: var(--gray); line-height: 1.7; }
.payguide-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; padding: 18px; border: 1px solid rgba(74,144,226,.14); border-radius: 18px; background: #f8fbff; }
.payguide-controls label { gap: 7px; }
.payguide-controls label > span { color: #607086; font-size: .72rem; font-weight: 850; }
.payguide-controls select { min-height: 46px; background: white; font-weight: 800; }
.payguide-selection { margin-top: 14px; color: var(--accent-deep); font-size: .78rem; font-weight: 900; text-align: right; }
.payguide-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.payguide-summary-card { position: relative; min-width: 0; min-height: 148px; padding: 22px; border: 1px solid rgba(22,50,79,.07); border-radius: 18px; background: #f8fafc; overflow: hidden; }
.payguide-summary-card::after { content: ""; position: absolute; width: 96px; height: 96px; right: -36px; top: -38px; border-radius: 50%; background: rgba(74,144,226,.08); }
.payguide-summary-card.primary { color: white; border-color: transparent; background: linear-gradient(135deg, var(--accent-deep), var(--accent)); box-shadow: 0 16px 34px rgba(74,144,226,.18); }
.payguide-summary-card.month-two { border-color: rgba(32,135,91,.14); background: #f3fbf7; }
.payguide-summary-card > span { display: block; position: relative; z-index: 1; color: var(--gray); font-size: .72rem; font-weight: 900; }
.payguide-summary-card.primary > span, .payguide-summary-card.primary small { color: rgba(255,255,255,.76); }
.payguide-summary-card.month-two > span { color: #4e7565; }
.payguide-summary-card strong { display: block; position: relative; z-index: 1; margin-top: 12px; color: var(--navy); font-size: clamp(1.35rem, 2.7vw, 2rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.payguide-summary-card.primary strong { color: white; }
.payguide-summary-card.month-two strong { color: var(--success); }
.payguide-summary-card small { display: block; position: relative; z-index: 1; margin-top: 9px; color: var(--gray); font-size: .68rem; line-height: 1.45; }
.payguide-rate-flow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 15px; padding: 15px 18px; border-radius: 16px; color: #5e6e82; background: #f5f8fc; }
.payguide-rate-flow span { font-size: .7rem; font-weight: 850; white-space: nowrap; }
.payguide-rate-flow strong { color: var(--navy); font-size: .95rem; text-align: center; }
.payguide-rate-flow b { color: var(--accent); font-size: 1.15rem; }
.payguide-table-section { margin-top: 30px; }
.payguide-table-section.compact { margin-top: 24px; }
.payguide-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.payguide-section-head h3 { margin: 0 0 5px; font-size: 1rem; }
.payguide-section-head p { margin: 0; color: var(--gray); font-size: .72rem; line-height: 1.55; }
.payguide-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e4eaf0; border-radius: 16px; background: white; -webkit-overflow-scrolling: touch; }
.payguide-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .78rem; }
.payguide-table.session-table { min-width: 420px; }
.payguide-table th, .payguide-table td { padding: 13px 14px; border-bottom: 1px solid #edf1f4; text-align: right; white-space: nowrap; }
.payguide-table th:first-child, .payguide-table td:first-child { text-align: left; }
.payguide-table th { color: #647386; background: #f7f9fc; font-size: .68rem; font-weight: 900; }
.payguide-table td { color: var(--dark-gray); font-weight: 750; }
.payguide-table tbody tr { cursor: pointer; transition: background .15s ease; }
.payguide-table tbody tr:hover { background: #f8fbff; }
.payguide-table tbody tr.selected { background: #eaf4ff; }
.payguide-table tbody tr.selected td { color: var(--accent-deep); }
.payguide-table tbody tr:last-child td { border-bottom: 0; }
.payguide-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; padding: 15px 17px; border: 1px solid #e1e8ef; border-radius: 15px; background: #fafbfd; }
.payguide-note strong { flex: 0 0 auto; color: var(--navy); font-size: .75rem; }
.payguide-note p { margin: 0; color: var(--gray); font-size: .7rem; line-height: 1.6; }

@media (max-width: 900px) {
  .payguide-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payguide-summary-grid { grid-template-columns: minmax(0, 1fr); }
  .payguide-summary-card { min-height: 0; }
}

@media (max-width: 560px) {
  .payguide-panel { padding: 18px; }
  .payguide-controls { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .payguide-selection { text-align: left; line-height: 1.55; }
  .payguide-summary-card { padding: 18px; }
  .payguide-rate-flow { grid-template-columns: 1fr auto 1fr; gap: 7px 10px; text-align: center; }
  .payguide-rate-flow span { grid-row: 1; }
  .payguide-rate-flow span:first-child { grid-column: 1; }
  .payguide-rate-flow span:nth-of-type(2) { grid-column: 3; }
  .payguide-rate-flow strong { grid-row: 2; font-size: .82rem; }
  .payguide-rate-flow strong:first-of-type { grid-column: 1; }
  .payguide-rate-flow b { grid-column: 2; grid-row: 2; }
  .payguide-rate-flow strong:last-of-type { grid-column: 3; }
  .payguide-table { min-width: 590px; }
  .payguide-table.session-table { min-width: 100%; }
  .payguide-table.session-table th, .payguide-table.session-table td { white-space: normal; }
  .payguide-note { flex-direction: column; gap: 5px; }
}
