/* ===== 尚课吧 - Global Styles v=13 ===== */
* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: #f2f2f7;
  color: #1c1c1e;
  height: 100%;
  overflow: hidden;
}

/* ===== Auth Pages ===== */
.auth-page {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f7;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.auth-box {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.auth-logo {
  text-align: center;
  font-size: 48px;
  margin-bottom: 8px;
}
.auth-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: #8e8e93;
  margin-bottom: 24px;
}
.auth-tabs {
  display: flex;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e5ea;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: #f2f2f7;
  color: #8e8e93;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active {
  background: #007aff;
  color: white;
}
.student-home-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1.5px solid #e5e5ea;
  border-radius: 12px;
  background: #f9f9fb;
  outline: none;
  transition: border-color 0.2s;
}
.auth-input:focus { border-color: #007aff; background: white; }
.auth-btn {
  margin-top: 8px;
  padding: 14px;
  font-size: 16px;
}
.icp-footer {
  margin-top: 20px;
  padding: 8px 0 2px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: #8e8e93;
}
.icp-footer a {
  color: inherit;
  text-decoration: none;
}
.icp-footer a:active {
  color: #007aff;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}
.plan-option {
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 12px;
  background: #f9f9fb;
}
.plan-option strong {
  display: block;
  font-size: 15px;
  color: #1c1c1e;
}
.plan-option p {
  margin: 4px 0;
  font-size: 13px;
  color: #007aff;
  font-weight: 600;
}
.plan-option small {
  display: block;
  color: #8e8e93;
  line-height: 1.5;
}

/* ===== App Layout ===== */
:root {
  --app-height: 100vh;
  --bottom-nav-height: 50px;
  --bottom-offset: 0px;
}
#app-main {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  height: -webkit-fill-available;
  height: var(--app-height, 100dvh);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: #f2f2f7;
  position: relative;
}

header {
  background: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid #e5e5ea;
  flex-shrink: 0;
}
.header-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #007aff;
  font-weight: 500;
  min-width: 60px;
  padding: 4px 0;
  cursor: pointer;
}
h1 { font-size: 17px; font-weight: 600; text-align: center; flex:1; }

#page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
#student-page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

/* ===== Bottom Navigation ===== */
#bottom-nav {
  display: flex;
  background: white;
  border-top: 0.5px solid #e5e5ea;
  padding: 6px 0 max(env(safe-area-inset-bottom), 6px);
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  color: #8e8e93;
  font-size: 10px;
}
.nav-item.active { color: #007aff; }
.nav-icon { font-size: 20px; margin-bottom: 2px; }
.nav-label { font-size: 10px; }

/* ===== Home ===== */
.today-card {
  background: linear-gradient(135deg, #007aff, #5856d6);
  color: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.today-date { font-size: 16px; opacity: 0.9; margin-bottom: 4px; }
.today-summary { font-size: 24px; font-weight: 700; }
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.home-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.home-card:active { transform: scale(0.97); }
.home-icon { font-size: 28px; margin-bottom: 8px; }
.home-label { font-size: 14px; color: #3c3c43; font-weight: 500; }
.home-count { font-size: 22px; font-weight: 700; color: #1c1c1e; margin-top: 4px; }
.home-count-sub { font-size: 12px; color: #8e8e93; }

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #3c3c43;
  margin-bottom: 10px;
  margin-top: 8px;
}

/* ===== Student List ===== */
.search-bar {
  margin-bottom: 12px;
}
.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: white;
  font-size: 15px;
  outline: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.student-item {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.student-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #f2f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #007aff;
  margin-right: 12px;
  flex-shrink: 0;
}
.student-info { flex: 1; min-width:0; }
.student-name { font-size: 16px; font-weight: 500; }
.student-tags { margin-top: 4px; }
.student-tag {
  display: inline-block;
  background: #f2f2f7;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  color: #555;
  margin-right: 4px;
  margin-bottom: 2px;
}
.student-classes { text-align: center; margin-left: 8px; }
.student-remaining { font-size: 24px; font-weight: 700; }
.student-remaining-label { font-size: 11px; color: #8e8e93; }

/* ===== Type Badge ===== */
.type-badge {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 8px;
  font-weight: 500;
  margin-left: 4px;
}
.type-badge.trial {
  background: #fff3e0;
  color: #e65100;
}
.type-badge.formal {
  background: #e3f2fd;
  color: #1565c0;
}

/* ===== Type Radio ===== */
.type-radio-group {
  display: flex;
  gap: 12px;
}
.type-radio {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #f9f9fb;
  border: 1.5px solid #e5e5ea;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.type-radio input { display: none; }
.type-radio:has(input:checked) {
  border-color: #007aff;
  background: #e8f2ff;
}
.type-radio-label { font-size: 14px; font-weight: 500; }

/* ===== Permission Checkbox ===== */
.perm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.perm-check:hover {
  background: #f5f5f7;
}
.perm-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #007aff;
}

/* ===== Course Card ===== */
.course-card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
}
.course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.course-date { font-size: 15px; font-weight: 600; }
.course-time { font-size: 14px; color: #8e8e93; }
.course-loc { font-size: 13px; color: #8e8e93; margin-top: 2px; }
.course-status { font-size: 13px; }
.course-status.completed { color: #34c759; }
.course-status.planned { color: #007aff; }
.course-location { font-size: 13px; color: #555; margin-bottom: 4px; }
.course-plan { font-size: 13px; color: #8e8e93; margin-top: 4px; }
.course-content-brief { font-size: 13px; color: #555; margin-top: 4px; padding: 6px 10px; background: #f0f7ff; border-radius: 6px; }
.course-meta-row { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #8e8e93; margin-top: 4px; }
.course-students { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.course-student-badge {
  background: #f2f2f7;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 13px;
  color: #333;
}

/* ===== Tab Bar ===== */
.tab-bar {
  display: flex;
  gap: 4px;
  background: #e5e5ea;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 12px;
}
.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn.active {
  background: white;
  color: #1c1c1e;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ===== Stats ===== */
.stats-section {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.stats-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #3c3c43;
  margin-bottom: 10px;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  text-align: center;
  padding: 12px;
  background: #f9f9fb;
  border-radius: 12px;
}
.stat-card.primary { background: #e8f2ff; }
.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: #1c1c1e;
}
.stat-num.warning { color: #ff9500; }
.stat-num.danger { color: #ff3b30; }
.stat-label { font-size: 12px; color: #8e8e93; margin-top: 2px; }
.stats-sub-section {
  margin-top: 4px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 0.5px solid #f2f2f7;
}
.stat-row:last-child { border-bottom: none; }
.stat-val { font-weight: 600; }
.stat-val.warning { color: #ff9500; }
.stat-val.primary { color: #007aff; }

/* Stats Detail */
.stats-student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid #f2f2f7;
}
.stats-student-row:last-child { border-bottom: none; }
.stats-student-row .info {}
.stats-student-row .name { font-weight: 500; font-size: 14px; }
.stats-student-row .meta { font-size: 12px; color: #8e8e93; }
.stats-student-row .nums { text-align: right; }
.stats-student-row .used { font-size: 12px; color: #8e8e93; }
.stats-student-row .remain { font-size: 16px; font-weight: 600; }
.stats-student-row .remain.danger { color: #ff3b30; }
.stats-student-row .remain.warning { color: #ff9500; }

/* ===== Monthly Report ===== */
.month-report-item {
  border-bottom: 0.5px solid #f2f2f7;
  padding: 6px 0;
}
.month-report-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
}
.month-report-label { font-weight: 500; }
.month-report-count { color: #007aff; font-weight: 500; }
.month-report-days { padding-left: 12px; }
.month-report-day {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #3c3c43;
}
.month-report-day-date { color: #8e8e93; }
.month-report-day-count { font-weight: 500; }

/* ===== Score Trend ===== */
.score-trend-empty {
  text-align: center;
  padding: 24px;
  color: #8e8e93;
  font-size: 14px;
}
.score-trend-item {
  margin-bottom: 12px;
}
.score-trend-item-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.score-trend-item-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.score-trend-point {
  text-align: center;
  min-width: 56px;
}
.score-trend-point .date {
  font-size: 12px;
  color: #8e8e93;
  margin-bottom: 2px;
}
.score-trend-point .val {
  font-size: 16px;
  font-weight: 600;
}

/* ===== Detail ===== */
.detail-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.detail-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.detail-meta { font-size: 14px; color: #555; }
.detail-classes {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.detail-class-box {
  flex: 1;
  text-align: center;
  background: #f9f9fb;
  padding: 10px;
  border-radius: 10px;
}
.detail-class-box .num { font-size: 22px; font-weight: 700; }
.detail-class-box .num.danger { color: #ff3b30; }
.detail-class-box .num.warning { color: #ff9500; }
.detail-class-box .label { font-size: 11px; color: #8e8e93; }
.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 12px 0 8px;
}
.detail-course-item { padding: 8px 0; border-bottom: 0.5px solid #f2f2f7; }
.detail-course-item:last-child { border-bottom: none; }
.detail-course-date { font-size: 14px; font-weight: 500; }
.detail-course-content { font-size: 13px; color: #555; margin-top: 4px; }
.detail-result { display: inline-block; background: #f2f2f7; padding: 2px 8px; border-radius: 6px; margin: 2px 4px 2px 0; font-size: 13px; }

/* ===== Student Results in Course Detail ===== */
.student-result-row {
  padding: 12px 0;
  border-bottom: 0.5px solid #f2f2f7;
}
.student-result-row:last-child { border-bottom: none; }
.student-result-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.result-items { margin-bottom: 4px; }
.result-item {
  display: inline-block;
  background: #f2f2f7;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  margin: 2px 4px 2px 0;
}
.add-result-input { margin-top: 8px; }
.add-result-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}
.add-result-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #f9f9fb;
}
.add-result-row input:focus { border-color: #007aff; background: white; }
.add-result-btn-wrap { display: flex; }
.add-result-btn-wrap button {
  width: 100%;
  padding: 10px;
  background: #f2f2f7;
  border: 1px dashed #c7c7cc;
  border-radius: 8px;
  font-size: 14px;
  color: #007aff;
  cursor: pointer;
}

/* ===== Location ===== */
.location-item {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.location-info { flex: 1; }
.location-info .name { font-size: 15px; font-weight: 500; }
.location-info .addr { font-size: 13px; color: #8e8e93; margin-top: 2px; }
.location-del { background: none; border: none; font-size: 16px; color: #ff3b30; cursor: pointer; padding: 4px; }

.project-item {
  display: flex; align-items: center; background: white;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.project-name { flex: 1; font-size: 15px; font-weight: 500; }
.project-actions { display: flex; gap: 8px; }
.btn-mini { background: none; border: 1px solid #007aff; color: #007aff; font-size: 14px; cursor: pointer; padding: 4px 10px; border-radius: 6px; }
.btn-mini-del { background: none; border: none; font-size: 16px; color: #ff3b30; cursor: pointer; padding: 4px; }

/* ===== Settings ===== */
.settings-section { margin-top: 12px; }
.settings-item {
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 0.5px solid #f2f2f7;
  cursor: pointer;
  font-size: 14px;
}
.settings-item:first-child { border-radius: 12px 12px 0 0; }
.settings-item:last-child { border-bottom: none; border-radius: 0 0 12px 12px; }
.settings-item .arrow { color: #c7c7cc; font-size: 18px; }

/* ===== Buttons ===== */
.btn-primary {
  display: block;
  width: 100%;
  padding: 12px;
  background: #007aff;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.1s;
}
.btn-primary:active { opacity: 0.8; }
.btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  background: #f2f2f7;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  font-size: 14px;
  color: #3c3c43;
  cursor: pointer;
}
.btn-small {
  padding: 10px 16px;
  background: #007aff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

/* ===== Forms ===== */
.form-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #3c3c43;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  background: #f9f9fb;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #007aff;
  background: white;
}
.form-group textarea { min-height: 60px; resize: vertical; }
.form-group select { appearance: auto; }
.form-row { display: flex; gap: 8px; }
.form-row .half { flex: 1; }
.form-row .fill { flex: 1; }
.form-hint { font-size: 12px; color: #8e8e93; margin-top: 4px; }

/* Tags */
.tag-input-wrap { margin-bottom: 8px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-item {
  display: inline-flex;
  align-items: center;
  background: #e8f2ff;
  color: #007aff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.tag-remove { cursor: pointer; margin-left: 4px; font-weight: 700; }

/* ===== Project Tag Chips ===== */
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tag-chip {
  display: inline-block;
  border: 1px solid #c7c7cc;
  border-radius: 16px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #1c1c1e;
  background: #fff;
  transition: all 0.15s;
  user-select: none;
}
.tag-chip:active { transform: scale(0.96); }
.tag-chip.selected {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
}
.location-check-wrap { padding: 4px 0; }
.location-check-wrap label { font-size: 14px; cursor: pointer; }
.student-check-wrap { padding: 6px 0; border-bottom: 0.5px solid #f2f2f7; }
.student-check-wrap:last-child { border-bottom: none; }
.student-check-wrap label { font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.student-check-wrap input[type="checkbox"] { width: auto; padding: 0; }
.location-check-wrap input[type="checkbox"] { width: auto; padding: 0; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 9999;
}
.toast.show { opacity: 1; }

/* ===== Dialog ===== */
.dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.dialog-box {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
}
.dialog-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; text-align: center; }
.dialog-text { font-size: 14px; color: #555; margin-bottom: 20px; text-align: center; }
.dialog-buttons { display: flex; gap: 10px; }
.dialog-cancel, .dialog-confirm {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.dialog-cancel { background: #f2f2f7; color: #555; }
.dialog-confirm { background: #ff3b30; color: white; }
.dialog-confirm-blue { background: #007aff; color: white; }

/* ===== Big Stat Cards (4 Module) ===== */
.big-stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.big-stat-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1c1c1e;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid #f2f2f7;
}
.big-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.big-stat-item {
  text-align: center;
  padding: 12px 6px;
  background: #f9f9fb;
  border-radius: 12px;
  transition: background 0.15s;
}
.big-stat-item.clickable {
  cursor: pointer;
}
.big-stat-item.clickable:active {
  background: #e8e8ed;
  transform: scale(0.97);
}
.big-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: #1c1c1e;
  line-height: 1.3;
}
.big-stat-label {
  font-size: 12px;
  color: #8e8e93;
  margin-top: 4px;
  line-height: 1.3;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: #8e8e93;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Student Home Card ===== */
#student-home-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  color: white;
  margin: 0 0 16px 0;
  box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}
#student-home-avatar {
  font-size: 40px;
  margin-bottom: 4px;
}
#student-greeting {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}
#student-type-label {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 2px;
}
#student-project-label {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 12px;
}
#student-home-classes {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 16px;
  display: inline-block;
  min-width: 100px;
}

/* ===== Share Card ===== */
#share-card-container {
  padding: 12px;
  display: flex;
  justify-content: center;
}
#student-page-share {
  background:
    radial-gradient(circle at 86% 8%, rgba(38,183,169,0.2), transparent 30%),
    radial-gradient(circle at 8% 28%, rgba(241,90,36,0.16), transparent 28%),
    linear-gradient(180deg, #fff7f1 0%, #f7fbff 52%, #ffffff 100%);
  min-height: 100vh;
}
#share-card {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(26,37,56,0.16);
  overflow: hidden;
  border: 1px solid rgba(16,32,51,0.08);
  padding: 18px;
  position: relative;
}
#share-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 142px;
  pointer-events: none;
  background: linear-gradient(135deg, #f15a24, #ff9f4a);
}
#share-card-title-section {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 30px 8px 28px;
  text-align: left;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}
#share-card-title-text {
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0;
  text-shadow: none;
}
#share-card-subtitle { font-size: 13px; color: rgba(255,255,255,0.86); margin-top: 8px; letter-spacing: 0; }
#share-card-info-cards {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.share-info-card {
  flex: 1;
  background: #142238;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.share-info-card.sic-green { background: #1a2e24; }
.share-info-card.sic-purple { background: #221a2e; }
.sic-icon { font-size: 18px; margin-bottom: 2px; }
.sic-label { font-size: 11px; color: rgba(255,255,255,0.45); margin-bottom: 2px; }
.sic-value { font-size: 16px; font-weight: 700; color: #ffffff; }
#share-card-scores {
  padding: 12px 0 2px;
  position: relative;
  z-index: 1;
}
.share-score-item {
  background: rgba(2,10,16,0.92);
  border-radius: 4px;
  border: 1px solid rgba(255,122,0,0.72);
  box-shadow: 0 0 16px rgba(255,122,0,0.18);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.share-score-item:nth-child(even) {
  border-color: rgba(24,185,255,0.72);
  box-shadow: 0 0 16px rgba(24,185,255,0.18);
}
.share-score-name { font-size: 18px; font-weight: 900; color: #ffffff; margin-bottom: 6px; text-shadow: 0 0 10px rgba(24,185,255,0.65); }
.share-score-entry {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 2px 0;
  padding-left: 8px;
  color: rgba(255,255,255,0.5);
}
.share-score-date { color: rgba(255,255,255,0.35); }
.share-score-val { font-weight: 900; color: #ff7a00; font-size: 16px; }
.share-score-arrow { margin-left: 4px; font-size: 12px; }
#share-card-footer {
  padding: 12px 0 2px;
  text-align: left;
  margin-top: 8px;
  border-top: 1px solid rgba(16,32,51,0.08);
}
.share-footer-text { font-size: 11px; color: #8e97a3; }
.share-footer-date { font-size: 11px; color: #b0b7c1; margin-top: 2px; }
#share-card-actions {
  display: flex;
  gap: 10px;
  padding: 0 12px 20px;
}
#share-card-image-area { padding: 0 12px 20px; }

/* ===== Responsive ===== */
@media (min-width: 500px) {
  #app-main { border-left: 0.5px solid #e5e5ea; border-right: 0.5px solid #e5e5ea; }
}

/* ===== Purchase History Rows ===== */
.purchase-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f7;
}
.purchase-row:last-child { border-bottom: none; }
.purchase-info { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.purchase-date { font-size: 14px; color: #3c3c43; font-weight: 500; }
.purchase-classes { font-size: 14px; color: #1c1c1e; }
.purchase-amount { font-size: 14px; color: #ff9500; font-weight: 600; }
.purchase-unit { font-size: 12px; color: #8e8e93; }
.purchase-remaining { font-size: 14px; color: #007aff; font-weight: 500; white-space: nowrap; }

/* ===== Student Detail Header ===== */
.detail-header-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.detail-meta-row .student-tag { font-size: 13px; padding: 3px 10px; }
.detail-meta-item { font-size: 14px; color: #555; }
.detail-meta-item strong { color: #1c1c1e; }
.detail-stats-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.detail-stat-box {
  flex: 1;
  text-align: center;
  background: #f9f9fb;
  padding: 12px 8px;
  border-radius: 10px;
}
.detail-stat-box .stat-num { font-size: 24px; font-weight: 700; }
.detail-stat-box .stat-num.danger { color: #ff3b30; }
.detail-stat-box .stat-num.warning { color: #ff9500; }
.detail-stat-box .stat-label { font-size: 12px; color: #8e8e93; margin-top: 2px; }
.detail-stat-box .stat-sub { font-size: 11px; color: #8e8e93; }

/* ===== Scrollable Course List ===== */
.course-scroll-list { max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.course-scroll-list .detail-course-item:last-child { border-bottom: none; }

/* ===== Score Item Cards ===== */
.score-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #f9f9fb;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.score-item-card:active { background: #e5e5ea; }
.score-item-card .score-item-name { font-size: 15px; font-weight: 600; }
.score-item-card .score-item-latest { font-size: 14px; color: #007aff; font-weight: 500; }
.score-item-card .score-item-arrow { font-size: 18px; color: #c7c7cc; }

/* ===== Purchase Request Form ===== */
.purchase-request-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid #f2f2f7; }
.pr-form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.pr-form-row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.pr-reason { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; margin-bottom: 8px; box-sizing: border-box; }

/* ===== Approval List ===== */
.approval-item {
  background: white;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.approval-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.approval-student { font-size: 16px; font-weight: 600; }
.approval-status { font-size: 12px; padding: 3px 8px; border-radius: 10px; }
.approval-status.pending { background: #fff3cd; color: #856404; }
.approval-status.approved { background: #d4edda; color: #155724; }
.approval-status.rejected { background: #f8d7da; color: #721c24; }
.approval-detail { font-size: 14px; color: #555; margin-bottom: 4px; }
.approval-meta { font-size: 12px; color: #8e8e93; margin-top: 4px; }
.approval-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-approve { background: #34c759; color: white; border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.btn-reject { background: #ff3b30; color: white; border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; }

/* ===== Delete at bottom ===== */
.detail-delete-area { margin-top: 24px; padding-top: 16px; border-top: 1px solid #f2f2f7; text-align: center; }

/* ===== Purchase history expand ===== */
.purchase-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f2f2f7; }
.purchase-row:last-child { border-bottom: none; }
.purchase-info { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.purchase-date { font-size: 14px; color: #3c3c43; font-weight: 500; }
.purchase-classes { font-size: 14px; color: #1c1c1e; }
.purchase-amount { font-size: 14px; color: #ff9500; font-weight: 600; }
.purchase-unit { font-size: 12px; color: #8e8e93; }
.purchase-remaining { font-size: 14px; color: #007aff; font-weight: 500; white-space: nowrap; }

/* ===== Input number arrows ===== */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ===== UI Refresh v14 - Minimal Sport System ===== */
:root {
  --surface: #ffffff;
  --surface-soft: #f6f7f9;
  --surface-tint: #eef1f5;
  --ink: #111827;
  --ink-soft: #4b5563;
  --muted: #8a93a3;
  --line: #dde3ea;
  --brand: #f15a24;
  --brand-strong: #c43d14;
  --field: #f8fafc;
  --blue: #2563eb;
  --orange: #ff7a1a;
  --danger: #ef4444;
  --navy: #102033;
  --shadow: 0 10px 28px rgba(16, 32, 51, 0.08);
}

html, body {
  background:
    linear-gradient(135deg, rgba(241,90,36,0.045) 0 1px, transparent 1px 76px),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--ink);
}

#app-main,
#student-app {
  background:
    radial-gradient(circle at 18% -8%, rgba(241,90,36,0.13), transparent 28%),
    radial-gradient(circle at 100% 16%, rgba(16,32,51,0.10), transparent 26%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

#page-content,
#student-page-content {
  padding: 14px;
}

header {
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(221,229,221,0.9);
  box-shadow: 0 8px 24px rgba(17,23,19,0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

h1 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.header-btn {
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
}

.header-btn:active,
.nav-item:active,
.home-card:active,
.course-card:active,
.student-item:active,
.settings-item:active {
  transform: translateY(1px);
}

#bottom-nav {
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(221,229,221,0.95);
  box-shadow: 0 -12px 32px rgba(17,23,19,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-item {
  position: relative;
  color: var(--muted);
  gap: 2px;
  transition: color 0.15s, transform 0.15s;
}

.nav-item.active {
  color: var(--brand-strong);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: -6px;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--brand);
}

.nav-icon {
  font-size: 19px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
}

.auth-page {
  background:
    radial-gradient(circle at 80% 12%, rgba(241,90,36,0.14), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.auth-box {
  border-radius: 8px;
  border: 1px solid rgba(221,229,221,0.95);
  box-shadow: var(--shadow);
}

.auth-logo {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0e8;
  color: var(--brand-strong);
  font-size: 30px;
}

.auth-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
}

.auth-subtitle {
  color: var(--muted);
}

.auth-tabs,
.tab-bar {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  overflow: hidden;
}

.auth-tab,
.tab-btn {
  border-radius: 6px;
  color: var(--ink-soft);
  background: transparent;
}

.auth-tab.active,
.tab-btn.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(17,23,19,0.08);
}

.auth-input,
.form-group input,
.form-group textarea,
.form-group select,
.search-bar input,
.pr-form-row input,
.pr-reason {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  box-shadow: none;
}

.auth-input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.search-bar input:focus,
.pr-form-row input:focus,
.pr-reason:focus {
  border-color: rgba(241,90,36,0.82);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(241,90,36,0.11);
}

.today-card,
#student-home-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #102033 0%, #24324a 48%, #f15a24 100%);
  box-shadow: 0 18px 34px rgba(16,32,51,0.18);
}

.today-card::before,
#student-home-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -38px auto;
  width: 180px;
  height: 180px;
  border: 22px solid rgba(255,255,255,0.13);
  border-radius: 50%;
}

.today-card::after,
#student-home-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,0.08) 18px 20px);
  opacity: 0.45;
}

.today-card > *,
#student-home-card > * {
  position: relative;
  z-index: 1;
}

.today-date,
.today-summary {
  color: white;
}

.home-grid {
  gap: 10px;
}

.home-card,
.student-item,
.course-card,
.stats-section,
.detail-card,
.form-card,
.location-item,
.project-item,
.settings-item,
.student-home-card,
.approval-item,
.score-item-card,
.big-stat-card,
.month-report-item {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(221,229,221,0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.home-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
}

.home-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -46px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 16px solid rgba(241,90,36,0.08);
}

.home-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0e8;
  font-size: 21px;
  margin-bottom: 10px;
}

.home-label,
.section-title,
.stats-section-title,
.detail-section-title {
  color: var(--ink);
  font-weight: 800;
}

.home-count,
.stat-num,
.detail-class-box .num,
.student-remaining {
  color: var(--ink);
  font-weight: 900;
}

.home-count-sub,
.stat-label,
.student-remaining-label,
.detail-class-box .label,
.course-meta-row,
.course-time,
.course-loc,
.detail-meta {
  color: var(--muted);
}

.student-avatar {
  background: linear-gradient(135deg, #fff0e8, #e8f0ff);
  color: var(--brand-strong);
  font-weight: 900;
}

.student-name,
.course-date,
.detail-name,
.project-name,
.location-info .name {
  color: var(--ink);
  font-weight: 800;
}

.student-tag,
.course-student-badge,
.detail-result,
.result-item,
.tag-item {
  background: #eef3ee;
  color: var(--ink-soft);
  border-radius: 6px;
  font-weight: 600;
}

.type-badge.trial {
  background: #fff4e8;
  color: #b45309;
}

.type-badge.formal {
  background: #fff0e8;
  color: var(--brand-strong);
}

.type-radio,
.perm-check,
.detail-class-box,
.stat-card,
.big-stat-item,
.share-info-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.type-radio:has(input:checked),
.tag-chip.selected {
  border-color: var(--brand);
  background: #fff0e8;
  color: var(--brand-strong);
}

.course-card {
  position: relative;
  overflow: hidden;
  padding-left: 16px;
}

.course-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand), var(--blue));
}

.course-status {
  border-radius: 999px;
  padding: 3px 8px;
  font-weight: 800;
  background: #eef1f5;
}

.course-status.completed {
  background: #fff0e8;
  color: var(--brand-strong);
}

.course-status.planned {
  background: #e8f0ff;
  color: var(--blue);
}

.student-available-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(221,229,221,0.95);
  border-radius: 8px;
  background: white;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.93)),
    linear-gradient(135deg, rgba(241,90,36,0.08), #eef7f4);
  box-shadow: 0 10px 26px rgba(16,32,51,0.08);
  cursor: pointer;
}

.student-available-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--project-color), #2f80ed);
}

.student-course-top,
.student-course-title,
.student-course-meta {
  position: relative;
  display: flex;
}

.student-course-top {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.student-course-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 78px);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.2;
}

.student-course-time span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  background: #fff0e8;
  color: var(--brand-strong);
  font-weight: 800;
  white-space: nowrap;
}

.student-course-time strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.student-course-title {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-right: 2px;
}

.student-course-title strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  word-break: break-word;
}

.student-course-project {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--project-color);
  background: rgba(255,255,255,0.86);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.student-course-meta {
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.student-course-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(238,243,238,0.86);
}

.student-course-note {
  position: relative;
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 3px solid var(--project-color);
  border-radius: 7px;
  background: rgba(255,255,255,0.72);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.student-course-footer {
  position: relative;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.student-card-action,
.student-card-cancel {
  border: 0;
  border-radius: 7px;
  font-weight: 900;
  cursor: pointer;
}

.student-card-action {
  min-width: 60px;
  height: 32px;
  padding: 0 14px;
  background: var(--brand);
  color: white;
  box-shadow: 0 8px 18px rgba(241,90,36,0.18);
}

.student-course-state.signed {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: #15803d;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.student-card-cancel {
  padding: 0;
  background: transparent;
  color: #f97316;
  font-size: 12px;
}

.student-card-full {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.course-content-brief,
.course-plan {
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.stats-grid {
  gap: 8px;
}

.stat-card.primary {
  background: #fff0e8;
}

.stat-num.warning,
.stat-val.warning,
.purchase-amount {
  color: var(--orange);
}

.stat-num.danger,
.detail-class-box .num.danger,
.location-del,
.btn-mini-del {
  color: var(--danger);
}

.stat-val.primary,
.month-report-count,
.score-item-card .score-item-latest {
  color: var(--brand-strong);
}

.stat-row,
.stats-student-row,
.detail-course-item,
.student-result-row,
.month-report-item,
.purchase-row {
  border-color: var(--line);
}

.btn-primary,
.btn-small,
.dialog-confirm,
.dialog-confirm-blue {
  background: var(--brand);
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(241,90,36,0.2);
}

.btn-primary:active,
.btn-small:active,
.dialog-confirm:active {
  opacity: 1;
  transform: translateY(1px);
}

.btn-secondary,
.btn-mini,
.dialog-cancel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 700;
}

.form-card {
  padding: 14px;
}

.form-group label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.settings-item {
  box-shadow: none;
  margin-bottom: 8px;
}

.settings-item:first-child,
.settings-item:last-child {
  border-radius: 8px;
}

.settings-item .arrow {
  color: var(--muted);
}

.empty-state,
.score-trend-empty {
  background: rgba(255,255,255,0.72);
  border: 1px dashed rgba(241,90,36,0.24);
  border-radius: 8px;
  color: var(--muted);
}

.dialog-overlay {
  background: rgba(17,23,19,0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dialog-box {
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(17,23,19,0.22);
}

.toast {
  border-radius: 8px;
  background: rgba(17,23,19,0.92);
}

.score-trend-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.score-trend-point .val {
  color: var(--brand-strong);
  font-weight: 900;
}

.btn-approve {
  background: var(--brand);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(241,90,36,0.16);
}

.btn-reject {
  background: var(--danger);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(239,68,68,0.14);
}

.approval-status {
  border-radius: 999px;
  font-weight: 800;
}

.approval-status.pending {
  background: #fff4e8;
  color: #b45309;
}

.approval-status.approved {
  background: #fff0e8;
  color: var(--brand-strong);
}

.approval-status.rejected {
  background: #feecec;
  color: #b91c1c;
}

.approval-detail,
.approval-meta,
.purchase-unit {
  color: var(--muted);
}

.purchase-row {
  background: transparent;
}

.purchase-date,
.purchase-classes {
  color: var(--ink);
  font-weight: 700;
}

.purchase-remaining {
  color: var(--brand-strong);
  font-weight: 800;
}

.tag-chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 700;
}

.location-check-wrap label,
.student-check-wrap label {
  color: var(--ink-soft);
  font-weight: 600;
}

.add-result-row input {
  background: var(--field);
  border-color: var(--line);
  border-radius: 8px;
}

.add-result-btn-wrap button {
  background: #fff;
  border: 1px dashed rgba(241,90,36,0.38);
  border-radius: 8px;
  color: var(--brand-strong);
  font-weight: 800;
}

.score-item-card .score-item-arrow,
.settings-item .arrow {
  color: #b4bdb6;
}

.month-report-header,
.month-report-day {
  color: var(--ink-soft);
}

.score-trend-item-bar {
  gap: 8px;
}

.score-trend-point {
  min-width: 58px;
  padding: 6px 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.onboarding-intro {
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
}

.onboarding-intro p {
  margin: 0 0 2px;
  color: var(--ink);
}

.onboarding-intro-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.onboarding-intro-item strong {
  color: var(--ink);
  font-size: 14px;
}

.onboarding-intro-item span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

#student-home-avatar {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.24);
}

#student-home-classes {
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
}

@media (min-width: 500px) {
  #app-main,
  #student-app {
    border-left: 1px solid rgba(221,229,221,0.9);
    border-right: 1px solid rgba(221,229,221,0.9);
    box-shadow: 0 0 50px rgba(16,32,51,0.08);
  }
}

/* ===== Role Dashboard Upgrade v1 ===== */
#page-home,
#student-page-home {
  padding-bottom: 18px;
}

.role-hero,
.student-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 154px;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(16, 32, 51, 0.96), rgba(31, 36, 46, 0.94)),
    radial-gradient(circle at 85% 10%, rgba(241, 90, 36, 0.34), transparent 34%);
  box-shadow: 0 18px 42px rgba(16, 32, 51, 0.18);
}

.role-hero::before,
.student-hero::before {
  content: "";
  position: absolute;
  inset: auto -30px 20px 46%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), rgba(241,90,36,0.92));
  transform: rotate(-13deg);
}

.role-hero::after,
.student-hero::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -18px;
  width: 150px;
  height: 80px;
  border: 1px solid rgba(255,255,255,0.16);
  transform: skewX(-18deg);
}

.role-hero h2,
.student-hero h2 {
  position: relative;
  z-index: 1;
  margin: 8px 0 8px;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: 0;
}

.role-hero p,
.student-hero p {
  position: relative;
  z-index: 1;
  max-width: 280px;
  color: rgba(255,255,255,0.76);
  font-size: 13px;
  line-height: 1.65;
}

.role-eyebrow {
  position: relative;
  z-index: 1;
  color: #ffb199;
  font-size: 12px;
  font-weight: 700;
}

.role-mark {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  white-space: nowrap;
}

.role-hero.admin {
  background:
    linear-gradient(135deg, #122033, #2b2f36),
    radial-gradient(circle at 88% 0%, rgba(241, 90, 36, 0.3), transparent 32%);
}

.role-hero.coach,
.student-hero {
  background:
    linear-gradient(135deg, #151922, #342018),
    radial-gradient(circle at 82% 12%, rgba(241, 90, 36, 0.42), transparent 34%);
}

.student-class-ring {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.1);
  display: grid;
  place-content: center;
  text-align: center;
  flex: 0 0 auto;
}

.student-class-ring strong {
  font-size: 30px;
  line-height: 1;
}

.student-class-ring span {
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-size: 11px;
}

.quick-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.quick-action {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 13px;
  border: 1px solid rgba(16,32,51,0.08);
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(16,32,51,0.06);
}

.quick-action.primary {
  border-color: transparent;
  background: #f15a24;
  color: #fff;
}

.quick-action b {
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-card {
  min-height: 100px;
  padding: 15px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16,32,51,0.07);
  box-shadow: 0 8px 22px rgba(16,32,51,0.05);
}

.metric-card.hot {
  border-color: rgba(241,90,36,0.22);
  background: linear-gradient(180deg, rgba(241,90,36,0.09), #fff 60%);
}

.metric-card.warn {
  border-color: rgba(196,61,20,0.26);
  background: #fff8f5;
}

.metric-value {
  color: #111827;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.metric-label {
  margin-top: 10px;
  color: #303846;
  font-size: 13px;
  font-weight: 700;
}

.metric-hint {
  margin-top: 5px;
  color: #7d8794;
  font-size: 12px;
}

.work-section {
  margin-top: 14px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 9px;
}

.section-heading span {
  color: #151922;
  font-size: 15px;
  font-weight: 800;
}

.section-heading small {
  color: #9098a4;
  font-size: 11px;
}

.task-list,
.role-course-list {
  display: grid;
  gap: 8px;
}

.task-card,
.course-mini-card,
.empty-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16,32,51,0.07);
  box-shadow: 0 8px 22px rgba(16,32,51,0.045);
}

.task-card {
  cursor: pointer;
}

.task-card.warn {
  border-color: rgba(241,90,36,0.22);
}

.task-card strong,
.course-mini-card strong {
  color: #151922;
  font-size: 14px;
}

.task-card p,
.course-mini-card p {
  margin-top: 4px;
  color: #7d8794;
  font-size: 12px;
  line-height: 1.45;
}

.task-card > span {
  color: #f15a24;
  font-size: 20px;
}

.course-mini-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  flex: 0 0 auto;
}

.course-mini-meta span {
  color: #151922;
  font-size: 15px;
  font-weight: 800;
}

.course-mini-meta em {
  color: #f15a24;
  font-style: normal;
  font-size: 12px;
}

.course-mini-meta small {
  color: #7d8794;
  font-size: 12px;
}

.empty-panel {
  justify-content: center;
  min-height: 54px;
  color: #9aa2ad;
  font-size: 13px;
  box-shadow: none;
}

#bottom-nav .nav-icon {
  font-size: 18px;
  line-height: 1;
}

#bottom-nav .nav-item.active {
  color: #f15a24;
}

@media (max-width: 380px) {
  .role-hero,
  .student-hero {
    padding: 18px;
  }
  .role-hero h2,
  .student-hero h2 {
    font-size: 22px;
  }
  .student-class-ring {
    width: 78px;
    height: 78px;
  }
  .student-class-ring strong {
    font-size: 25px;
  }
}

/* ===== Workflow Polish v1 ===== */
.student-row-v2 {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  margin-bottom: 9px;
  border: 1px solid rgba(16,32,51,0.07);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,32,51,0.045);
  cursor: pointer;
}

.student-row-v2.warn {
  border-color: rgba(241,90,36,0.28);
  background: linear-gradient(90deg, rgba(241,90,36,0.08), #fff 42%);
}

.student-row-v2.danger {
  border-color: rgba(196,61,20,0.34);
  background: linear-gradient(90deg, rgba(196,61,20,0.1), #fff 42%);
}

.student-avatar-v2 {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #102033;
  font-size: 17px;
  font-weight: 800;
}

.student-line-v2 {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.student-line-v2 strong {
  color: #151922;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-line-v2 span,
.student-line-v2 em {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f3f5f7;
  color: #5f6976;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.student-line-v2 em {
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(241,90,36,0.1);
  color: #c43d14;
}

.student-sub-v2 {
  margin-top: 5px;
  color: #87909d;
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-risk-v2 {
  min-width: 58px;
  text-align: right;
}

.student-risk-v2 b {
  display: block;
  color: #151922;
  font-size: 24px;
  line-height: 1;
}

.student-risk-v2 span {
  display: block;
  margin-top: 5px;
  color: #7d8794;
  font-size: 11px;
}

.student-row-v2.warn .student-risk-v2 b,
.student-row-v2.danger .student-risk-v2 b {
  color: #f15a24;
}

.student-ops-panel,
.course-closeout-panel {
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #151922;
  color: #fff;
  box-shadow: 0 14px 32px rgba(16,32,51,0.16);
}

.student-ops-panel.warn,
.student-ops-panel.danger,
.course-closeout-panel.warn {
  background: linear-gradient(135deg, #151922, #4a2114);
}

.student-ops-panel.ok,
.student-ops-panel.trial,
.course-closeout-panel.ready,
.course-closeout-panel.done {
  background: linear-gradient(135deg, #151922, #102033);
}

.student-ops-head,
.course-closeout-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.student-ops-head span,
.course-closeout-panel span {
  color: #ffb199;
  font-size: 12px;
  font-weight: 800;
}

.student-ops-head strong,
.course-closeout-panel strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 20px;
}

.student-ops-head p,
.course-closeout-panel p {
  margin-top: 5px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  line-height: 1.5;
}

.student-ops-head button,
.course-closeout-panel button {
  flex: 0 0 auto;
  border: none;
  border-radius: 7px;
  padding: 10px 12px;
  background: #f15a24;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.student-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.student-ops-grid div {
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  background: rgba(255,255,255,0.08);
}

.student-ops-grid b {
  display: block;
  font-size: 19px;
}

.student-ops-grid span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,0.68);
  font-size: 11px;
}

.student-ops-alert {
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 7px;
  background: rgba(241,90,36,0.22);
  color: #ffe5dc;
  font-size: 12px;
}

.timeline-card {
  margin: 12px 0;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 0;
  padding: 6px 0 2px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16,32,51,0.07);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 14px;
}

.timeline-item + .timeline-item {
  border-top: 1px solid rgba(16,32,51,0.06);
}

.timeline-item i {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #cbd3dc;
  box-shadow: 0 0 0 4px #f3f5f7;
}

.timeline-item.done i {
  background: #f15a24;
  box-shadow: 0 0 0 4px rgba(241,90,36,0.12);
}

.timeline-item strong {
  color: #151922;
  font-size: 13px;
}

.timeline-item p {
  margin-top: 4px;
  color: #7d8794;
  font-size: 12px;
  line-height: 1.45;
}

.course-closeout-panel {
  align-items: flex-start;
}

.course-closeout-panel > div {
  min-width: 0;
}

@media (max-width: 380px) {
  .student-row-v2 {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .student-risk-v2 {
    grid-column: 2;
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    text-align: left;
  }
  .student-risk-v2 b {
    font-size: 18px;
  }
  .student-ops-head,
  .course-closeout-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .student-ops-head button,
  .course-closeout-panel button {
    width: 100%;
  }
}

/* ===== Final Product Polish v1 ===== */
.flow-intro {
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #151922, #3a1d14);
  box-shadow: 0 14px 32px rgba(16,32,51,0.14);
}

.flow-intro span,
.settings-profile-card span,
.student-score-hero span {
  color: #ffb199;
  font-size: 12px;
  font-weight: 800;
}

.flow-intro strong,
.settings-profile-card strong,
.student-score-hero strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
}

.flow-intro p,
.settings-profile-card p,
.student-score-hero p {
  margin-top: 6px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  line-height: 1.55;
}

.flow-form-card,
.settings-card-v2 {
  border-radius: 8px !important;
  border: 1px solid rgba(16,32,51,0.07);
  box-shadow: 0 8px 22px rgba(16,32,51,0.045) !important;
}

.flow-form-card .form-group {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(16,32,51,0.06);
}

.flow-form-card .form-group:last-of-type {
  border-bottom: none;
}

.flow-form-card input,
.flow-form-card select,
.flow-form-card textarea,
.settings-card-v2 input,
.settings-card-v2 select,
.settings-card-v2 textarea {
  border-radius: 8px !important;
}

.stats-hero {
  margin-bottom: 14px;
}

.stats-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.stats-section-grid button {
  min-height: 46px;
  border: 1px solid rgba(16,32,51,0.08);
  border-radius: 8px;
  background: #fff;
  color: #151922;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(16,32,51,0.045);
}

.settings-profile-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #151922, #102033);
  box-shadow: 0 14px 32px rgba(16,32,51,0.14);
}

.settings-profile-card button {
  flex: 0 0 auto;
  border: none;
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 800;
}

.member-row-v2 {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
  padding: 13px;
  border-radius: 8px;
  border: 1px solid rgba(16,32,51,0.07);
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,32,51,0.045);
}

.member-avatar-v2 {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #102033;
  font-weight: 800;
}

.member-row-v2.admin .member-avatar-v2 {
  background: #f15a24;
}

.member-row-v2.owner .member-avatar-v2 {
  background: #151922;
}

.member-main-v2 div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-main-v2 strong {
  color: #151922;
  font-size: 15px;
}

.member-main-v2 em {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(241,90,36,0.1);
  color: #c43d14;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.member-main-v2 p {
  margin-top: 5px;
  color: #7d8794;
  font-size: 12px;
}

.member-main-v2 section {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.member-main-v2 section span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f3f5f7;
  color: #5f6976;
  font-size: 11px;
}

.member-actions {
  display: flex;
  gap: 6px;
}

.member-actions button {
  border: none;
  border-radius: 7px;
  padding: 7px 9px;
  background: #f3f5f7;
  color: #151922;
  font-size: 12px;
  font-weight: 800;
}

.member-actions button.danger {
  color: #c43d14;
  background: rgba(241,90,36,0.1);
}

.student-course-row,
.score-trend-card {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16,32,51,0.07);
  box-shadow: 0 8px 22px rgba(16,32,51,0.045);
}

.student-course-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.student-course-row strong,
.score-trend-head strong {
  color: #151922;
  font-size: 15px;
}

.student-course-row p {
  margin-top: 5px;
  color: #7d8794;
  font-size: 12px;
}

.student-course-row em,
.score-trend-head em {
  color: #f15a24;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.student-course-row section {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.student-course-row section span,
.score-trend-points span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3f5f7;
  color: #5f6976;
  font-size: 12px;
}

.student-course-row .student-rating-row {
  align-items: center;
  gap: 8px;
}

.student-rating-row button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(241,90,36,0.24);
  border-radius: 8px;
  background: #fff6f1;
  color: #f15a24;
  font-weight: 800;
}

.student-rating-row span,
.student-rating-done {
  color: #7d8794;
  font-size: 12px;
}

.classroom-performance-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.classroom-performance-form select,
.classroom-performance-form textarea {
  width: 100%;
  border: 1px solid rgba(16,32,51,0.1);
  border-radius: 8px;
  background: #f9f9fb;
  padding: 10px;
  font-size: 14px;
}

.classroom-performance-form textarea {
  min-height: 58px;
  resize: vertical;
}

.classroom-performance-form button {
  min-height: 40px;
  border: none;
  border-radius: 8px;
  background: #151922;
  color: #fff;
  font-weight: 800;
}

.performance-view,
.performance-empty,
.growth-record-body,
.growth-share-block {
  color: #3c3c43;
  font-size: 13px;
  line-height: 1.6;
}

.performance-view span,
.growth-record-body span {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff1ef;
  color: #f15a24;
  font-weight: 800;
}

.growth-record-body p,
.performance-view p,
.growth-share-block p {
  margin-top: 6px;
}

.growth-share-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  color: #151922;
  border: 1px solid rgba(16,32,51,0.08);
  box-shadow: 0 8px 22px rgba(26,37,56,0.08);
}

.growth-share-block b {
  display: block;
  color: #f15a24;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 3px;
}

.growth-share-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(16,32,51,0.08);
}

.growth-share-meta span {
  color: #151922;
  font-size: 20px;
  font-weight: 900;
}

.growth-share-meta em {
  color: #26b7a9;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.growth-share-level {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7f1;
}

.growth-share-level span {
  color: #f15a24;
  font-weight: 900;
}

.student-score-hero {
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, #151922, #3a1d14);
  color: #fff;
}

.score-trend-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.score-trend-points {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.score-trend-points span {
  display: grid;
  gap: 3px;
  min-width: 58px;
  text-align: center;
  border-radius: 8px;
}

.score-trend-points b {
  color: #151922;
  font-size: 14px;
}

.score-trend-points small {
  color: #87909d;
  font-size: 10px;
}

.score-trend-card p {
  color: #7d8794;
  font-size: 12px;
}

.course-form-card-v2 input,
.course-form-card-v2 select,
.course-form-card-v2 textarea,
.course-form-card-v2 .fill {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.course-form-card-v2 {
  overflow-x: hidden;
}

#cf-students {
  max-width: 100%;
  overflow-x: hidden;
  display: grid;
  gap: 8px;
}

#cf-students .student-check-wrap {
  padding: 0;
  border-bottom: none;
}

#cf-students .student-check-wrap label {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(16,32,51,0.08);
  border-radius: 8px;
  background: #fff;
  color: #151922 !important;
  white-space: normal;
  line-height: 1.4;
}

#cf-students .student-check-wrap input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px !important;
  margin: 0;
  grid-row: 1 / span 2;
}

#cf-students .course-student-name {
  display: block;
  min-width: 0;
  color: #151922 !important;
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}

#cf-students .course-student-meta {
  display: block;
  color: #7d8794 !important;
  font-size: 12px;
  font-weight: 500;
}

#cf-students .student-check-wrap.disabled label {
  background: #f6f7f9;
  border-color: rgba(16,32,51,0.05);
  cursor: not-allowed;
}

#cf-students .student-check-wrap.disabled .course-student-name,
#cf-students .student-check-wrap.disabled .course-student-meta {
  color: #a0a7b1 !important;
}

.btn-remove-qrcode {
  background: #fff1ef !important;
  color: #c9342a !important;
  border: 1px solid rgba(201,52,42,0.24) !important;
}

.course-form-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
  margin-top: 14px;
}

.course-form-actions button {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
}

.course-closeout-panel section {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.course-closeout-panel button.ghost {
  background: rgba(255,255,255,0.12);
}

.course-closeout-panel.cancelled {
  background: linear-gradient(135deg, #1c1f27, #3b1512);
}

.notify-dock {
  margin-bottom: 14px;
  cursor: pointer;
}

.notify-list {
  display: grid;
  gap: 8px;
}

.notify-item {
  position: relative;
  padding: 12px 13px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16,32,51,0.07);
  box-shadow: 0 8px 22px rgba(16,32,51,0.045);
}

.notify-item.unread {
  border-color: rgba(241,90,36,0.28);
  background: linear-gradient(90deg, rgba(241,90,36,0.08), #fff 45%);
}

.notify-item.unread::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f15a24;
}

.notify-item strong {
  display: block;
  color: #151922;
  font-size: 13px;
}

.notify-item p {
  margin-top: 5px;
  padding-right: 14px;
  color: #6f7885;
  font-size: 12px;
  line-height: 1.45;
}

.notify-item em {
  display: block;
  margin-top: 6px;
  color: #9aa2ad;
  font-style: normal;
  font-size: 11px;
}

.notify-read {
  width: 100%;
  margin-top: 8px;
  min-height: 38px;
  border: none;
  border-radius: 8px;
  background: rgba(241,90,36,0.1);
  color: #c43d14;
  font-size: 13px;
  font-weight: 800;
}

.notify-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16,32,51,0.08);
  box-shadow: 0 8px 22px rgba(16,32,51,0.045);
}

.notify-center-head strong {
  display: block;
  color: #151922;
  font-size: 18px;
}

.notify-center-head p {
  margin-top: 4px;
  color: #6f7885;
  font-size: 13px;
}

.notify-center-head button {
  min-height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 7px;
  background: rgba(241,90,36,0.1);
  color: #c43d14;
  font-size: 13px;
  font-weight: 800;
}

.notify-center-list {
  display: grid;
  gap: 9px;
}

.notify-center-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(16,32,51,0.07);
  box-shadow: 0 8px 22px rgba(16,32,51,0.04);
}

.notify-center-item.unread {
  border-color: rgba(241,90,36,0.3);
  background: linear-gradient(90deg, rgba(241,90,36,0.08), #fff 46%);
}

.notify-center-item strong {
  display: block;
  color: #151922;
  font-size: 14px;
}

.notify-center-item p {
  margin-top: 5px;
  color: #6f7885;
  font-size: 13px;
  line-height: 1.5;
}

.notify-center-item em {
  color: #9aa2ad;
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .stats-section-grid {
    grid-template-columns: 1fr;
  }
  .settings-profile-card,
  .member-row-v2 {
    align-items: stretch;
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .member-actions {
    grid-column: 2;
  }
  .course-form-actions,
  .course-closeout-panel section {
    grid-template-columns: 1fr;
  }
}
