:root {
  --brand: #2563eb;
  --brand-deep: #1458d3;
  --brand-soft: #eaf3ff;
  --ink: #14213d;
  --muted: #667085;
  --line: #e6edf5;
  --canvas: #f4f8fc;
  --surface: #fff;
  --success: #0ea978;
  --warning: #ee8b13;
  --danger: #e5484d;
  --shadow: 0 14px 40px rgba(31, 76, 128, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.login-view {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: linear-gradient(145deg, #f7fbff 0%, #edf5ff 45%, #f8fbff 100%);
}

.login-glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(10px); opacity: .7; }
.glow-one { left: -180px; top: -200px; background: radial-gradient(circle, rgba(37,99,235,.2), transparent 68%); }
.glow-two { right: -170px; bottom: -220px; background: radial-gradient(circle, rgba(40,159,245,.17), transparent 68%); }

.login-card {
  position: relative;
  width: min(440px, 100%);
  padding: 38px;
  border: 1px solid rgba(190, 209, 232, .75);
  border-radius: 28px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 28px 80px rgba(33, 89, 156, .15);
  backdrop-filter: blur(18px);
}

.login-brand, .sidebar-brand { display: flex; align-items: center; gap: 13px; }
.login-brand img { width: 52px; height: 52px; object-fit: contain; }
.login-brand div, .sidebar-brand div { display: flex; flex-direction: column; gap: 4px; }
.login-brand strong { font-size: 17px; }
.login-brand span, .sidebar-brand span { color: var(--muted); font-size: 12px; }
.login-card h1 { margin: 36px 0 8px; font-size: 30px; }
.login-card > p { margin: 0 0 27px; color: var(--muted); }
.login-card small { display: block; margin-top: 18px; color: #8793a4; font-size: 12px; line-height: 1.6; }
.form-error { min-height: 20px; margin-top: 9px; color: var(--danger); font-size: 13px; }

.admin-app { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 246px;
  padding: 26px 18px 20px;
  border-right: 1px solid #e2eaf3;
  background: rgba(255,255,255,.97);
  box-shadow: 8px 0 30px rgba(37,75,119,.035);
}

.sidebar-brand { padding: 0 10px 25px; border-bottom: 1px solid var(--line); }
.sidebar-brand img { width: 44px; height: 44px; }
.sidebar-brand strong { font-size: 16px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 22px; }
.nav-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #657286;
  text-align: left;
}
.nav-button:hover { background: #f4f8fd; color: var(--ink); }
.nav-button.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav-shape { display: grid; place-items: center; width: 22px; height: 22px; font-style: normal; }
.dashboard-icon { border: 2px solid currentColor; border-radius: 6px; box-shadow: inset 7px 0 0 transparent; }
.dashboard-icon::before, .dashboard-icon::after { content: ''; position: absolute; background: currentColor; border-radius: 2px; }
.dashboard-icon::before { width: 2px; height: 15px; }.dashboard-icon::after { width: 15px; height: 2px; }
.teachers-icon::before { content: ''; width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 0 9px 0 -1px var(--brand-soft), 0 9px 0 2px currentColor; }
.orders-icon { border: 2px solid currentColor; border-radius: 4px; }
.orders-icon::before, .orders-icon::after { content: ''; position: absolute; width: 10px; height: 2px; background: currentColor; box-shadow: 0 5px 0 currentColor; }
.settings-icon { border: 2px solid currentColor; border-radius: 50%; box-shadow: inset 0 0 0 4px white; background: currentColor; }
.content-icon { border-radius: 6px; background: #edf4ff; color: currentColor; font-size: 10px; font-weight: 800; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 999px; background: #eaf3ff; color: var(--brand); font-size: 11px; text-align: center; }
.nav-button.is-active .nav-badge { background: var(--brand); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid var(--line); }
.connection { display: flex; align-items: center; gap: 8px; color: #718095; font-size: 12px; }
.connection span { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(14,169,120,.11); }
.logout-button { margin-top: 14px; padding: 0; border: 0; background: none; color: #9a4f54; font-size: 12px; }

.main-content { min-height: 100vh; margin-left: 246px; padding: 0 34px 42px; }
.main-header { display: flex; align-items: center; justify-content: space-between; min-height: 112px; }
.main-header h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.main-header p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.header-actions { display: flex; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg, #2563eb, #1678e8); color: #fff; box-shadow: 0 9px 20px rgba(37,99,235,.18); }
.button.secondary { border-color: #dce6f1; background: #fff; color: #526176; }
.button.danger { border-color: #f0cfd1; background: #fff7f7; color: var(--danger); }
.button.wide { width: 100%; min-height: 48px; }

.page-panel { display: none; }
.page-panel.is-active { display: block; animation: panel-in .18s ease; }
@keyframes panel-in { from { opacity: .5; transform: translateY(3px); } }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.stat-card { display: flex; align-items: center; gap: 17px; min-height: 126px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.stat-icon { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 15px; font-size: 18px; font-weight: 800; }
.stat-icon.blue { background: #e8f1ff; color: #2563eb; }.stat-icon.cyan { background: #e7f8ff; color: #0986b7; }.stat-icon.orange { background: #fff3e7; color: #da7710; }.stat-icon.green { background: #eaf9f3; color: #0c9b70; }
.stat-card > div:last-child { display: flex; flex-direction: column; }
.stat-card span { color: #748196; font-size: 12px; }.stat-card strong { margin-top: 5px; font-size: 28px; }.stat-card small { margin-top: 3px; color: #9ba5b3; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-top: 18px; }
.panel-card { border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 78px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 16px; }.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.text-button { border: 0; background: none; color: var(--brand); font-size: 12px; font-weight: 700; }
.recent-orders, .availability-list { min-height: 280px; padding: 8px 22px 16px; }
.recent-order, .availability-item { display: flex; align-items: center; min-height: 72px; border-bottom: 1px solid #edf1f5; }
.recent-order:last-child, .availability-item:last-child { border-bottom: 0; }
.recent-main { display: flex; flex: 1; flex-direction: column; gap: 5px; }.recent-main strong { font-size: 13px; }.recent-main span { color: var(--muted); font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: #fff4e8; color: #d47712; font-size: 11px; font-weight: 700; }
.teacher-mini-avatar { flex-shrink: 0; width: 43px; height: 43px; margin-right: 12px; border-radius: 13px; background-repeat: no-repeat; background-color: #eef3f8; }
.uploaded-avatar { display: block; object-fit: cover; }
.availability-copy { display: flex; flex: 1; flex-direction: column; gap: 4px; }.availability-copy strong { font-size: 13px; }.availability-copy span { color: var(--muted); font-size: 11px; }
.availability-dot { width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--success); }
.guide-card { display: flex; align-items: center; gap: 17px; margin-top: 18px; padding: 20px 22px; border: 1px solid #d8e8fb; border-radius: 18px; background: linear-gradient(135deg,#edf6ff,#f8fbff); }
.guide-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 13px; background: var(--brand); color: #fff; font-weight: 800; }
.guide-card > div:nth-child(2) { flex: 1; }.guide-card h3 { margin: 0; font-size: 14px; }.guide-card p { margin: 6px 0 0; color: #65758b; font-size: 12px; }

.table-panel { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; gap: 12px; min-height: 74px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; width: min(360px, 40vw); }
.search-box input { width: 100%; height: 40px; padding: 0 14px 0 40px; border: 1px solid #dfe7f0; border-radius: 11px; outline: 0; }
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.search-box span { position: absolute; left: 15px; top: 12px; width: 13px; height: 13px; border: 2px solid #8895a7; border-radius: 50%; }
.search-box span::after { content: ''; position: absolute; right: -6px; bottom: -4px; width: 7px; height: 2px; background: #8895a7; transform: rotate(45deg); }
.table-toolbar select, .field select { height: 40px; padding: 0 34px 0 12px; border: 1px solid #dfe7f0; border-radius: 10px; background: #fff; color: #526176; outline: 0; }
.table-toolbar .button { margin-left: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { height: 50px; padding: 0 17px; background: #f8fafc; color: #79869a; font-size: 11px; font-weight: 700; text-align: left; }
td { min-height: 72px; padding: 15px 17px; border-top: 1px solid #edf1f5; color: #536176; font-size: 12px; vertical-align: middle; }
.teacher-cell { display: flex; align-items: center; }.teacher-cell strong { display: block; color: var(--ink); font-size: 13px; }.teacher-cell span { display: block; margin-top: 4px; color: #8894a5; font-size: 10px; }
.price-cell { color: #e5484d; font-weight: 800; }
.active-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--success); }.active-dot.inactive { background: #a5afbd; }
.table-actions { display: flex; gap: 7px; }.mini-button { padding: 6px 9px; border: 1px solid #dce5ef; border-radius: 8px; background: #fff; color: #506076; font-size: 11px; }.mini-button.primary { border-color: #c9dcfb; background: #f4f8ff; color: var(--brand); }
.empty-row td { height: 180px; color: #8c98a8; text-align: center; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 18px; }
.settings-form { overflow: hidden; }.settings-form .form-grid { padding: 24px; }.form-actions { display: flex; justify-content: flex-end; padding: 18px 24px; border-top: 1px solid var(--line); }
.api-card { padding: 24px; }.api-status { display: flex; align-items: center; gap: 8px; color: var(--success); font-size: 12px; font-weight: 700; }.api-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.api-card h2 { margin: 24px 0 10px; font-size: 17px; }.api-card > code { display: block; padding: 13px; overflow: auto; border-radius: 10px; background: #14213d; color: #dce8fb; font-size: 12px; }.api-card > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.api-route { display: flex; align-items: center; gap: 10px; min-height: 42px; border-top: 1px solid var(--line); font-size: 11px; }.api-route span { width: 42px; color: var(--brand); font-weight: 800; }.api-route code { color: #536176; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { color: #536176; font-size: 12px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #dce5ef; border-radius: 10px; background: #fff; color: var(--ink); outline: 0; }
.field input { height: 42px; padding: 0 12px; }.field textarea { padding: 11px 12px; resize: vertical; line-height: 1.6; }.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.field small { color: #8d98a8; font-size: 10px; }.form-grid { display: grid; gap: 18px; }.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }.field-full { grid-column: 1 / -1; }
.check-field { display: flex; align-items: center; gap: 9px; color: #405069; font-size: 12px; }.check-field input { width: 16px; height: 16px; accent-color: var(--brand); }
.config-example { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; padding: 16px; border-radius: 12px; background: #f6f9fd; color: #647186; font-size: 11px; }.config-example strong { color: #25344c; font-size: 12px; }.config-example b { display: inline-block; width: 58px; color: var(--brand); }
.cloud-hint { margin-top: 22px; padding: 15px; border: 1px solid #dce8f6; border-radius: 12px; background: #f7fbff; }.cloud-hint strong { color: #26415f; font-size: 12px; }.cloud-hint p { margin: 7px 0 0; color: #77869a; font-size: 10px; line-height: 1.65; }
.check-group { display: flex; align-items: center; gap: 18px; min-height: 42px; padding-top: 19px; color: #536176; font-size: 12px; }
.check-group label { display: flex; align-items: center; gap: 7px; }.check-group input { accent-color: var(--brand); }
.region-quick-add { display: grid; grid-template-columns: minmax(150px,1fr) repeat(3,minmax(130px,1fr)) auto; align-items: end; gap: 10px; padding: 14px; border: 1px solid #dce8f6; border-radius: 12px; background: #f7fbff; }
.region-quick-add > div { display: flex; flex-direction: column; gap: 5px; align-self: center; }.region-quick-add strong { font-size: 12px; }.region-quick-add small { color: #8793a4; font-size: 10px; }
.region-quick-add select { width: 100%; height: 40px; padding: 0 9px; border: 1px solid #dce5ef; border-radius: 9px; background: #fff; color: #536176; }
.base-region-picker { grid-template-columns: minmax(170px,1fr) repeat(2,minmax(150px,1fr)) auto; }
.travel-check { align-self: end; min-height: 42px; padding: 0 12px; border: 1px solid #dce8f6; border-radius: 10px; background: #f7fbff; }
.travel-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; background: #f1f4f8; color: #66758a; font-size: 10px; font-weight: 700; }
.travel-pill.included { background: #eaf8f2; color: #0b9168; }
.featured-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; background: #eaf2ff; color: #2468d8; font-size: 10px; font-weight: 800; }
.featured-pill.is-off { background: #f1f4f8; color: #8a96a6; font-weight: 600; }
.review-stars { color: #f5a623; font-weight: 800; letter-spacing: 1px; }
.review-table { min-width: 1120px; }
.review-content-cell { min-width: 310px; max-width: 430px; white-space: normal; }
.review-content-cell p { margin: 0 0 10px; color: #33425a; line-height: 1.65; }
.review-media-list { display: flex; flex-wrap: wrap; gap: 7px; }
.review-media-thumb { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border: 1px solid #dce6f2; border-radius: 9px; background: #eef4fb; color: var(--brand); text-decoration: none; }
.review-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb { font-size: 16px; }
.review-no-media, .review-cloud-file { color: #8a96a7; font-size: 10px; }
.review-cloud-file { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 8px; background: #f1f5fa; }
.review-status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.review-status.pending { background: #fff4e5; color: #ce7412; }
.review-status.approved { background: #eaf8f2; color: #0a9167; }
.review-status.rejected { background: #fff0f1; color: #c7444b; }
.review-actions { display: flex; min-width: 255px; flex-direction: column; gap: 8px; }
.review-actions > div { display: flex; gap: 7px; }
.review-note-input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #dce5ef; border-radius: 8px; outline: 0; font-size: 11px; }
.review-note-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.mini-button.danger { border-color: #f0cfd1; background: #fff7f7; color: var(--danger); }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,33,57,.45); backdrop-filter: blur(4px); }
.modal-panel { position: relative; display: flex; flex-direction: column; width: min(940px, 100%); max-height: calc(100vh - 48px); overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 35px 100px rgba(15,37,65,.25); }
.modal-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; min-height: 82px; padding: 0 25px; border-bottom: 1px solid var(--line); }.modal-header h2 { margin: 0; font-size: 19px; }.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f2f5f8; color: #657286; font-size: 25px; }
.modal-body { overflow-y: auto; padding: 2px 25px 28px; }.form-section-title { margin: 25px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 800; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; padding: 16px 25px; border-top: 1px solid var(--line); background: #fbfcfe; }
.upload-box { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; min-height: 90px; border: 1px dashed #bcd0e7; border-radius: 12px; background: #f7fbff; color: var(--brand); cursor: pointer; font-size: 12px; font-weight: 700; }.upload-box input { display: none; }.upload-box small { color: #8793a4; font-weight: 400; }

.teacher-modal-panel { width: min(1120px, 100%); border: 1px solid rgba(207,221,238,.9); border-radius: 24px; background: #f3f7fb; }
.teacher-modal-header { min-height: 96px; padding: 0 30px; border-bottom-color: #dfe9f4; background: linear-gradient(135deg,#fff 20%,#f3f8ff 100%); }
.teacher-modal-header h2 { margin-top: 4px; font-size: 21px; letter-spacing: -.2px; }
.teacher-modal-header p { margin-top: 7px; font-size: 12px; }
.modal-kicker { color: #6b8db6; font-size: 9px; font-weight: 800; letter-spacing: 1.7px; }
.teacher-editor-body { padding: 20px 24px 30px; background: #f3f7fb; }
.teacher-editor-section { margin-bottom: 18px; padding: 24px; border: 1px solid #dfe8f2; border-radius: 19px; background: #fff; box-shadow: 0 10px 30px rgba(43,76,116,.045); }
.teacher-editor-section:last-child { margin-bottom: 0; }
.editor-section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.editor-section-heading > span { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px; background: #eaf3ff; color: var(--brand); font-size: 11px; font-weight: 900; }
.editor-section-heading h3 { margin: 0; color: #1c2c43; font-size: 16px; }
.editor-section-heading p { margin: 5px 0 0; color: #8995a6; font-size: 11px; }
.teacher-profile-editor { display: grid; grid-template-columns: 210px minmax(0,1fr); align-items: start; gap: 24px; }
.avatar-editor-card { display: flex; align-items: center; flex-direction: column; padding: 18px; border: 1px solid #dce8f5; border-radius: 17px; background: linear-gradient(180deg,#f6faff,#fff); text-align: center; }
.avatar-preview { position: relative; display: grid; place-items: center; width: 148px; height: 148px; overflow: hidden; border: 5px solid #fff; border-radius: 24px; background: #e7f0fb; box-shadow: 0 10px 28px rgba(49,91,138,.16); }
.avatar-preview img, .avatar-sprite-preview { width: 100%; height: 100%; object-fit: cover; background-repeat: no-repeat; }
.avatar-preview > span { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 999px; background: rgba(20,39,66,.72); color: #fff; font-size: 9px; }
.avatar-editor-copy { display: flex; align-items: center; flex-direction: column; gap: 5px; margin: 14px 0 13px; }
.avatar-editor-copy strong { color: #233650; font-size: 13px; }.avatar-editor-copy span { min-height: 28px; color: #8996a8; font-size: 10px; line-height: 1.45; }
.avatar-editor-card > small { margin-top: 9px; color: #9aa5b3; font-size: 9px; }
.profile-fields { gap: 16px; }
.media-upload-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 16px; border: 1px solid #bcd4f2; border-radius: 10px; background: #f4f8ff; color: var(--brand); cursor: pointer; font-size: 11px; font-weight: 800; transition: .18s ease; }
.media-upload-button:hover { border-color: #8bb6ea; background: #eaf3ff; transform: translateY(-1px); }
.media-upload-button input { display: none; }
.media-upload-button.is-uploading { cursor: wait; opacity: .55; pointer-events: none; }
.avatar-upload-button { width: 100%; }
.media-heading { align-items: flex-start; }
.media-heading .media-upload-button { margin-left: auto; }
.media-editor-summary { display: flex; align-items: center; justify-content: space-between; min-height: 50px; margin-bottom: 14px; padding: 0 15px; border: 1px solid #e0e9f3; border-radius: 12px; background: #f8fbff; }
.media-editor-summary > div { display: flex; align-items: baseline; gap: 5px; color: #6b7a8e; font-size: 10px; }.media-editor-summary strong { color: var(--brand); font-size: 20px; }.media-editor-summary p { margin: 0; color: #7c8a9d; font-size: 10px; }
.teacher-media-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.teacher-media-card { display: grid; grid-template-columns: minmax(180px,.9fr) minmax(190px,1.1fr); min-height: 226px; overflow: hidden; border: 1px solid #dce6f1; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(40,72,112,.055); }
.teacher-media-preview { position: relative; min-height: 226px; overflow: hidden; background: #eaf1f8; }
.teacher-media-preview > a, .teacher-media-preview img, .teacher-media-preview video { display: block; width: 100%; height: 100%; min-height: 226px; object-fit: cover; }
.teacher-media-preview video { background: #101722; }
.media-card-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; width: 100%; min-height: 226px; background: linear-gradient(145deg,#edf4fb,#dfeaf6); color: #7f94ab; }
.media-card-placeholder > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: rgba(255,255,255,.8); color: var(--brand); font-size: 20px; }.media-card-placeholder small { font-size: 10px; }
.media-type-badge { position: absolute; left: 10px; top: 10px; padding: 5px 8px; border-radius: 999px; background: rgba(21,40,66,.76); color: #fff; font-size: 9px; font-weight: 800; backdrop-filter: blur(8px); }
.media-type-badge.video { background: rgba(34,96,179,.84); }
.media-remove-button { position: absolute; right: 9px; top: 9px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(16,31,52,.72); color: #fff; cursor: pointer; font-size: 18px; line-height: 1; backdrop-filter: blur(8px); }
.media-remove-button:hover { background: #c7444b; }
.teacher-media-fields { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.teacher-media-fields label { display: flex; flex-direction: column; gap: 5px; }.teacher-media-fields label > span { color: #718095; font-size: 9px; font-weight: 700; }
.teacher-media-fields input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid #dce5ef; border-radius: 8px; color: #263850; font-size: 11px; outline: 0; }.teacher-media-fields input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.07); }
.teacher-media-fields details { border-top: 1px solid #edf1f5; }.teacher-media-fields summary { padding: 9px 0 4px; color: #718095; cursor: pointer; font-size: 9px; }.teacher-media-fields details label { margin-top: 7px; }
.media-storage-meta { display: flex; gap: 6px; margin-top: auto; }.media-storage-meta span { padding: 4px 7px; border-radius: 999px; background: #edf4fb; color: #657b94; font-size: 9px; }
.teacher-media-empty { display: flex; align-items: center; flex-direction: column; padding: 42px 20px; border: 1px dashed #c7d7e9; border-radius: 15px; background: #f9fbfe; text-align: center; }.teacher-media-empty > span { color: #8aa5c3; font-size: 29px; }.teacher-media-empty strong { margin-top: 9px; color: #52647b; font-size: 12px; }.teacher-media-empty p { margin: 7px 0 0; color: #929dac; font-size: 10px; }
.teacher-modal-footer { align-items: center; padding: 16px 30px; border-top-color: #dce6f1; background: rgba(255,255,255,.96); }
.teacher-modal-footer > div { display: flex; align-items: center; gap: 7px; margin-right: auto; color: #8491a2; font-size: 10px; }.save-indicator { width: 7px; height: 7px; border-radius: 50%; background: #80a8d8; }
.button:disabled { cursor: wait; opacity: .55; transform: none; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: 35px; padding: 11px 18px; border-radius: 10px; background: rgba(18,33,55,.94); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .22s ease; }.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1120px) {
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
  .three-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .region-quick-add { grid-template-columns: repeat(2,minmax(0,1fr)); }.region-quick-add > div { grid-column: 1 / -1; }
  .teacher-profile-editor { grid-template-columns: 190px minmax(0,1fr); }
  .teacher-media-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sidebar { width: 74px; padding: 22px 10px; }.sidebar-brand div, .nav-button span, .sidebar-foot { display: none; }.sidebar-brand { justify-content: center; padding: 0 0 22px; }.sidebar-brand img { width: 42px; }.nav-button { justify-content: center; padding: 0; }.nav-badge { position: absolute; right: 4px; top: 4px; }
  .main-content { margin-left: 74px; padding: 0 16px 30px; }.main-header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 12px; min-height: 140px; }.header-actions { width: 100%; }.header-actions .button { flex: 1; }
  .stat-grid { grid-template-columns: 1fr; }.dashboard-grid { grid-template-columns: 1fr; }.table-toolbar { flex-wrap: wrap; padding: 14px; }.search-box { width: 100%; }.table-toolbar .button { margin-left: 0; }
  .modal { padding: 8px; }.modal-panel { max-height: calc(100vh - 16px); }.three-columns, .two-columns { grid-template-columns: 1fr; }.field-full { grid-column: auto; }
  .teacher-editor-body { padding: 12px; }.teacher-editor-section { padding: 17px; }.teacher-profile-editor { grid-template-columns: 1fr; }.avatar-editor-card { width: min(280px,100%); margin: 0 auto; }.teacher-media-card { grid-template-columns: 1fr; }.teacher-media-preview, .teacher-media-preview > a, .teacher-media-preview img, .teacher-media-preview video, .media-card-placeholder { min-height: 240px; height: 240px; }.media-heading { flex-wrap: wrap; }.media-heading .media-upload-button { width: 100%; margin: 10px 0 0; }.media-editor-summary { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 13px; }.teacher-modal-footer > div { display: none; }
}
