/* =====================================================
   和田职业技术学院教务查询系统 v3.0
   设计语言：高端蓝 #1677FF | 悬浮圆润毛玻璃 | 紧凑排版
   适配：手机端 / 微信内置浏览器 / PC端
   ===================================================== */

/* ===== Design Tokens ===== */
:root {
  --brand: #1677FF;
  --brand-light: #4096FF;
  --brand-dark: #0958D9;
  --brand-bg: #E6F4FF;
  --brand-gradient: linear-gradient(135deg, #1677FF, #4096FF);
  --success: #52C41A;
  --warning: #FAAD14;
  --danger: #FF4D4F;
  --text: #1a1a1a;
  --text-secondary: #595959;
  --text-light: #8c8c8c;
  --text-placeholder: #bfbfbf;
  --bg-page: #F0F2F5;
  --bg-card: #FFFFFF;
  --border: #E8E8E8;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --shadow: 0 1px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-nav: 0 -2px 16px rgba(22,119,255,0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page); color: var(--text); min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; font-size: 13px; line-height: 1.5;
}
body { -webkit-touch-callout: none; }
input, textarea { user-select: auto; -webkit-user-select: auto; }

/* ===== Watermark ===== */
.watermark-layer {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; overflow: hidden; opacity: 0.045;
}
.watermark-layer .wm-row { display: flex; white-space: nowrap; transform: rotate(-25deg); margin-top: 60px; }
.watermark-layer .wm-text { font-size: 11px; color: #000; font-weight: 500; margin-right: 40px; flex-shrink: 0; }

/* ===== App Wrapper ===== */
.app-wrapper { max-width: 100%; min-height: 100vh; margin: 0 auto; position: relative; }
@media(min-width: 768px) {
  .app-wrapper { max-width: 430px; box-shadow: 0 0 48px rgba(0,0,0,0.06); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  body { background: #E8E8E8; }
}
@media(max-width: 767px) { .app-wrapper { width: 100%; } }

/* ===== Page Transitions ===== */
.page-container { opacity: 0; transform: translateY(8px); animation: fadeInUp .3s ease forwards; padding: 0 14px; padding-bottom: calc(var(--nav-height) + 28px); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.page-exit { animation: fadeOut .2s ease forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-6px); } }

/* ================================================================
   TOP NAV
   ================================================================ */
.top-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; border-bottom: 1px solid rgba(0,0,0,0.03);
}
.top-nav .nav-left { display: flex; align-items: center; gap: 8px; }
.top-nav .nav-back {
  width: 30px; height: 30px; border: none; background: rgba(0,0,0,0.03); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); text-decoration: none;
}
.top-nav .nav-back:active { background: rgba(0,0,0,0.06); }
.top-nav .nav-title { font-size: 15px; font-weight: 600; }
.top-nav .nav-right { display: flex; align-items: center; gap: 6px; }
.top-nav .logo { font-size: 15px; font-weight: 600; color: var(--brand); }
.top-nav .lang-btn {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-bg); border: none;
  color: var(--brand); font-size: 11px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.top-nav .lang-btn:active { transform: scale(0.9); background: var(--brand); color: #fff; }
.top-nav .nav-icon-btn,
.top-nav .refresh-btn {
  width: 30px; height: 30px; border: none; background: rgba(0,0,0,0.03); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary);
  transition: all .2s; padding: 0;
}
.top-nav .nav-icon-btn:active,
.top-nav .refresh-btn:active { background: var(--brand-bg); color: var(--brand); }
.top-nav .refresh-btn.spinning svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   BOTTOM NAV - 悬浮圆润毛玻璃导航栏
   ================================================================ */
.bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 50%; transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 360px;
  height: var(--nav-height);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 32px;
  box-shadow: 0 6px 28px rgba(22,119,255,0.08), 0 1px 6px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  padding: 0 6px;
}
@media(max-width: 767px) {
  .bottom-nav { width: calc(100% - 28px); }
}
.bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 48px; border-radius: 24px; cursor: pointer; transition: all .25s cubic-bezier(.34,1.56,.64,1);
  color: var(--text-light); text-decoration: none;
}
.bottom-nav .nav-item svg { width: 20px; height: 20px; transition: all .25s; }
.bottom-nav .nav-item span { font-size: 9px; font-weight: 500; }
.bottom-nav .nav-item.active {
  color: var(--brand); background: rgba(22,119,255,0.07);
  transform: translateY(-2px);
}
.bottom-nav .nav-item.active svg { transform: scale(1.1); }
.bottom-nav .nav-item:active { transform: scale(0.92); }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page {
  position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 20px; overflow: hidden;
  background: linear-gradient(165deg, #EEF3FF 0%, #D9E4FF 40%, #C5D5FF 100%);
}
.login-page::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(22,119,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(64,150,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}
.login-lang-switcher {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.5);
  padding: 5px 14px; border-radius: var(--radius-pill); font-size: 12px; color: var(--text-secondary);
  cursor: pointer; transition: all .2s;
}
.login-lang-switcher:active { transform: scale(0.95); background: rgba(255,255,255,0.9); }
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 360px;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--radius-xl); border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 10px 40px rgba(22,119,255,0.1); padding: 36px 24px 24px; text-align: center;
}
.login-logo {
  width: 64px; height: 64px; border-radius: 50%; background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
  box-shadow: 0 5px 18px rgba(22,119,255,0.25); font-size: 24px; color: #fff; font-weight: 700;
}
.school-name-cn { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.school-name-en { font-size: 10px; color: var(--text-light); margin-top: 2px; margin-bottom: 18px; }
.login-title-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.login-title-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--brand), transparent); }
.login-title-text { font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }

/* Input - supports both .input-group (old login.php) and .login-input-group (CSS) */
.input-group, .login-input-group { margin-bottom: 14px; text-align: left; position: relative; }
.input-group .input-wrap, .login-input-group .input-wrap {
  display: flex; align-items: center; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0 14px; height: 46px; transition: all .25s;
}
.input-group .input-wrap:focus-within, .login-input-group .input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,119,255,0.07); }
.input-group .input-wrap svg, .login-input-group .input-wrap svg { width: 16px; height: 16px; color: var(--text-light); flex-shrink: 0; margin-right: 10px; }
.input-group .input-wrap:focus-within svg, .login-input-group .input-wrap:focus-within svg { color: var(--brand); }
.input-group input, .login-input-group input { flex: 1; height: 100%; border: none; outline: none; background: transparent; font-size: 14px; color: var(--text); }
.input-group input::placeholder, .login-input-group input::placeholder { color: var(--text-placeholder); }
.input-group .password-toggle, .login-input-group .password-toggle {
  background: none; border: none; color: var(--text-light); cursor: pointer; padding: 4px; display: flex;
  transition: color .2s;
}
.input-group .password-toggle:active, .login-input-group .password-toggle:active { color: var(--brand); }

/* Button - supports both .btn-primary and .login-btn */
.btn-primary, .login-btn {
  width: 100%; height: 46px; background: var(--brand-gradient); color: #fff; font-size: 15px; font-weight: 600;
  border: none; border-radius: var(--radius-pill); cursor: pointer; transition: all .25s;
  box-shadow: 0 3px 14px rgba(22,119,255,0.22); margin-top: 4px;
}
.btn-primary:active, .login-btn:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(22,119,255,0.18); }
.btn-primary:disabled, .login-btn:disabled { opacity: 0.6; }
.forgot-password { display: block; margin-top: 14px; font-size: 12px; color: var(--brand); text-decoration: none; }
.login-tips { margin-top: 14px; font-size: 10px; color: var(--text-light); line-height: 1.6; }
.login-footer { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; z-index: 1; font-size: 10px; color: rgba(101,101,101,0.45); }

/* ================================================================
   HOME PAGE
   ================================================================ */
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 6px; }
.home-card {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; color: var(--text); background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: all .2s;
}
.home-card:active { transform: scale(0.96); }
.home-card .icon-box {
  width: 48px; height: 48px; border-radius: 16px; background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 4px 14px rgba(22,119,255,0.18);
}
.home-card .icon-box svg { width: 24px; height: 24px; }
.home-card span { font-size: 13px; font-weight: 600; }

/* ================================================================
   CARDS - supports both .glass-card and .content-card
   ================================================================ */
.glass-card, .content-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-title .dot { width: 3px; height: 16px; border-radius: 2px; background: var(--brand); }
.card-subtitle { font-size: 11px; color: var(--text-light); }

/* Profile header */
.profile-header { text-align: center; padding: 14px 0; }
.profile-avatar {
  width: 60px; height: 60px; border-radius: 50%; background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
  color: #fff; font-size: 24px; font-weight: 700; box-shadow: 0 4px 14px rgba(22,119,255,0.18);
}
.profile-name { font-size: 16px; font-weight: 700; }
.profile-id { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.profile-dept { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ================================================================
   SCHEDULE PAGE
   ================================================================ */
.schedule-top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--border);
  gap: 6px; flex-wrap: wrap;
}
.schedule-top-bar .semester-picker {
  display: flex; align-items: center; gap: 4px;
  background: var(--brand-bg); padding: 5px 12px; border-radius: var(--radius-pill); cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--brand); transition: all .2s;
}
.schedule-top-bar .semester-picker:active { transform: scale(0.96); }
.schedule-top-bar .semester-picker svg { width: 11px; height: 11px; }
.schedule-top-bar .week-nav {
  display: flex; align-items: center; gap: 3px;
}
.schedule-top-bar .week-nav .week-btn {
  width: 28px; height: 28px; border: none; background: rgba(0,0,0,0.03); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); font-size: 14px;
  transition: all .2s;
}
.schedule-top-bar .week-nav .week-btn:active { background: var(--brand-bg); color: var(--brand); }
.schedule-top-bar .week-nav .week-display {
  min-width: 60px; text-align: center; font-size: 13px; font-weight: 600; color: var(--text);
}
.schedule-top-bar .view-toggle {
  display: flex; gap: 2px; background: #f0f0f0; border-radius: var(--radius-pill); padding: 2px;
}
.schedule-top-bar .view-toggle button {
  padding: 5px 10px; border: none; border-radius: var(--radius-pill); font-size: 11px; font-weight: 500; cursor: pointer;
  color: var(--text-secondary); background: transparent; transition: all .2s;
}
.schedule-top-bar .view-toggle button.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

/* Date bar */
.schedule-date-bar {
  padding: 8px 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  background: #fff; border-bottom: 1px solid var(--border);
}
.schedule-date-bar::-webkit-scrollbar { display: none; }
.schedule-date-tabs { display: flex; gap: 6px; }
.schedule-date-tab {
  flex-shrink: 0; padding: 6px 12px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-pill); text-align: center; cursor: pointer; font-size: 12px; color: var(--text-secondary);
  transition: all .2s; white-space: nowrap; min-width: 50px;
}
.schedule-date-tab .dow { font-weight: 500; display: block; font-size: 11px; }
.schedule-date-tab .day { font-size: 10px; color: var(--text-light); }
.schedule-date-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.schedule-date-tab.active .day { color: rgba(255,255,255,0.7); }
.schedule-date-tab.today { border-color: var(--brand-light); background: var(--brand-bg); color: var(--brand); }
.schedule-date-tab.today.active { background: var(--brand); color: #fff; }

/* Course list cards */
.schedule-list-view { display: block; padding: 0 14px; margin-top: 2px; }
.course-list-card {
  background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border);
  padding: 14px; margin-bottom: 8px; display: flex; gap: 12px; align-items: flex-start;
  box-shadow: var(--shadow); transition: all .2s;
}
.course-list-card:active { transform: scale(0.98); }
.course-list-card .time-col { text-align: center; min-width: 46px; }
.course-list-card .time-col .period { font-size: 14px; font-weight: 700; color: var(--brand); }
.course-list-card .time-col .clock { font-size: 10px; color: var(--text-light); margin-top: 1px; }
.course-list-card .course-color-bar {
  width: 3px; align-self: stretch; border-radius: 3px; flex-shrink: 0;
  background: var(--brand);
}
.course-list-card .course-body { flex: 1; }
.course-list-card .course-body .name { font-size: 14px; font-weight: 600; }
.course-list-card .course-body .meta { font-size: 11px; color: var(--text-secondary); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.course-list-card .course-body .meta .meta-tag { display: inline-flex; align-items: center; gap: 3px; }
.course-list-card .course-body .meta .meta-tag svg { width: 11px; height: 11px; }

/* Course colors */
.course-list-card:nth-child(6n+1) .course-color-bar { background: linear-gradient(180deg, #4A90D9, #6BA5E7); }
.course-list-card:nth-child(6n+2) .course-color-bar { background: linear-gradient(180deg, #E07A5F, #F4A261); }
.course-list-card:nth-child(6n+3) .course-color-bar { background: linear-gradient(180deg, #2EC4B6, #3DDC97); }
.course-list-card:nth-child(6n+4) .course-color-bar { background: linear-gradient(180deg, #9B59B6, #AF7AC5); }
.course-list-card:nth-child(6n+5) .course-color-bar { background: linear-gradient(180deg, #E74C3C, #E7826B); }
.course-list-card:nth-child(6n+6) .course-color-bar { background: linear-gradient(180deg, #2ECC71, #58D68D); }

/* Grid view */
.schedule-grid-view { display: none; padding: 0 14px; overflow-x: auto; }
.schedule-grid-view.show { display: block; }
.schedule-grid-view .schedule-grid {
  display: grid; grid-template-columns: 48px repeat(7, minmax(72px, 1fr)); gap: 1px;
  background: var(--border); border-radius: var(--radius); overflow: hidden; min-width: 560px;
}
.schedule-grid-view .schedule-header {
  background: #fff; padding: 6px 3px; text-align: center; font-size: 10px; font-weight: 500; color: var(--text-secondary);
  display: flex; flex-direction: column; align-items: center;
}
.schedule-grid-view .schedule-header .day-num { font-size: 13px; font-weight: 700; color: var(--text); }
.schedule-grid-view .schedule-header.today { background: var(--brand-bg); }
.schedule-grid-view .schedule-header.today .day-num { color: var(--brand); }
.schedule-grid-view .schedule-time {
  background: #fff; padding: 5px 3px; text-align: center; font-size: 9px; color: var(--text-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px;
}
.schedule-grid-view .schedule-cell { background: #fff; min-height: 56px; padding: 2px; }
.schedule-grid-view .grid-course-card {
  height: 100%; border-radius: var(--radius-sm); padding: 4px 5px;
  display: flex; flex-direction: column; justify-content: center; gap: 1px; cursor: pointer;
  transition: transform .15s;
}
.schedule-grid-view .grid-course-card:active { transform: scale(0.95); }
.schedule-grid-view .grid-course-card .g-name { font-size: 10px; font-weight: 600; color: #fff; line-height: 1.2; }
.schedule-grid-view .grid-course-card .g-loc { font-size: 8px; color: rgba(255,255,255,0.85); }
.grid-color1 { background: linear-gradient(135deg, #4A90D9, #6BA5E7); }
.grid-color2 { background: linear-gradient(135deg, #E07A5F, #F4A261); }
.grid-color3 { background: linear-gradient(135deg, #2EC4B6, #3DDC97); }
.grid-color4 { background: linear-gradient(135deg, #9B59B6, #AF7AC5); }
.grid-color5 { background: linear-gradient(135deg, #E74C3C, #E7826B); }
.grid-color6 { background: linear-gradient(135deg, #2ECC71, #58D68D); }

/* Float refresh button */
.float-refresh-btn {
  position: fixed; right: 14px; bottom: calc(96px + var(--safe-bottom));
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-gradient); color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(22,119,255,0.3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  z-index: 300; transition: all .2s;
}
.float-refresh-btn:active { transform: scale(0.88); }
.float-refresh-btn svg { width: 18px; height: 18px; }

/* Semester modal */
.semester-modal { display: none; }
.semester-modal.show { display: flex; }
.semester-list { max-height: 280px; overflow-y: auto; }
.semester-item {
  padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,0.03); cursor: pointer;
  font-size: 13px; color: var(--text); transition: all .2s;
}
.semester-item:last-child { border: none; }
.semester-item:active { background: var(--brand-bg); color: var(--brand); }
.semester-item.active { color: var(--brand); font-weight: 600; }

/* ================================================================
   GRADE PAGE
   ================================================================ */
.grade-summary, .grade-stat-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.grade-summary .summary-box, .grade-stat-item { flex: 1; text-align: center; background: var(--brand-bg); border-radius: var(--radius); padding: 12px 6px; }
.grade-summary .summary-box .num, .grade-stat-item .num { font-size: 20px; font-weight: 700; color: var(--brand); line-height: 1.2; }
.grade-summary .summary-box .label, .grade-stat-item .label { font-size: 10px; color: var(--text-secondary); margin-top: 3px; }
.grade-summary .primary-box, .grade-stat-item.primary { background: var(--brand-gradient); }
.grade-summary .primary-box .num, .grade-stat-item.primary .num { color: #fff; }
.grade-summary .primary-box .label, .grade-stat-item.primary .label { color: rgba(255,255,255,0.8); }

.grade-table { width: 100%; border-collapse: collapse; }
.grade-table thead { background: var(--brand-gradient); }
.grade-table th { padding: 10px 8px; font-size: 11px; font-weight: 500; color: #fff; text-align: left; }
.grade-table th:first-child { border-radius: 6px 0 0 0; }
.grade-table th:last-child { border-radius: 0 6px 0 0; }
.grade-table td { padding: 10px 8px; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,0.03); }
.grade-table .score { font-weight: 700; color: var(--brand); }
.grade-table .gpa-score { font-weight: 700; }
.grade-table tr:last-child td { border-bottom: none; }

/* ================================================================
   EXAM PAGE - supports both old and new class names
   ================================================================ */
.exam-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 8px; display: flex; gap: 12px; align-items: flex-start;
  box-shadow: var(--shadow); transition: all .2s;
}
.exam-card:active { transform: scale(0.98); }

/* New class names (from CSS) */
.exam-card .date-badge {
  min-width: 50px; text-align: center; background: var(--brand-bg); border-radius: var(--radius);
  padding: 8px 6px; flex-shrink: 0;
}
.exam-card .date-badge .mon { font-size: 9px; color: var(--brand); font-weight: 600; }
.exam-card .date-badge .day { font-size: 22px; font-weight: 800; color: var(--brand); line-height: 1; }
.exam-card .exam-body { flex: 1; }
.exam-card .exam-body .name { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.exam-card .exam-body .detail { font-size: 11px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 2px; }
.exam-card .exam-body .detail .detail-row { display: flex; align-items: center; gap: 5px; }
.exam-card .exam-body .detail .detail-row svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--text-light); }

/* Old class names (from exam.php HTML) */
.exam-card .date-box {
  min-width: 50px; text-align: center; background: var(--brand-bg); border-radius: var(--radius);
  padding: 8px 6px; flex-shrink: 0;
}
.exam-card .date-box .month { font-size: 9px; color: var(--brand); font-weight: 600; }
.exam-card .date-box .day { font-size: 22px; font-weight: 800; color: var(--brand); line-height: 1; }
.exam-card .exam-info { flex: 1; }
.exam-card .exam-info .exam-name { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.exam-card .exam-info .exam-detail { font-size: 11px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 2px; }
.exam-card .exam-info .exam-detail .detail-row { display: flex; align-items: center; gap: 5px; }
.exam-card .exam-info .exam-detail .detail-row svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--text-light); }

/* ================================================================
   PROFILE PAGE
   ================================================================ */
.profile-header-card { text-align: center; padding: 20px 0; }
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; box-shadow: var(--shadow); transition: all .2s;
}
.menu-item:active { transform: scale(0.98); background: var(--brand-bg); }
.menu-item .icon-box {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-bg);
  display: flex; align-items: center; justify-content: center; color: var(--brand); flex-shrink: 0;
}
.menu-item .icon-box svg { width: 16px; height: 16px; }
.menu-item .text, .menu-item .menu-text { flex: 1; font-size: 14px; font-weight: 500; }
.menu-item .arrow { color: var(--text-light); font-size: 16px; }

/* ================================================================
   FLOAT BUTTON
   ================================================================ */
.float-btn {
  position: fixed; right: 14px; bottom: calc(96px + var(--safe-bottom));
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-gradient); color: #fff; border: none;
  box-shadow: 0 4px 14px rgba(22,119,255,0.25); z-index: 300;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  touch-action: none; transition: transform .15s;
}
.float-btn:active { transform: scale(0.85); }
.float-btn.bounce { animation: bounceIn .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes bounceIn { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

/* ================================================================
   TOAST & MODAL
   ================================================================ */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.9);
  background: rgba(0,0,0,0.78); backdrop-filter: blur(12px); color: #fff;
  padding: 12px 24px; border-radius: var(--radius); font-size: 13px; z-index: 10000;
  opacity: 0; pointer-events: none; transition: all .3s;
}
.toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); backdrop-filter: blur(4px);
  z-index: 500; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius-xl); padding: 24px 20px;
  width: 100%; max-width: 280px; text-align: center; box-shadow: var(--shadow-lg);
  transform: scale(.9); opacity: 0; transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.show .modal-box { transform: scale(1); opacity: 1; }
.modal-box h3 { font-size: 15px; margin-bottom: 4px; }
.modal-box p { font-size: 12px; color: var(--text-secondary); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions button { flex: 1; height: 40px; border: none; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; }
.modal-actions .btn-cancel { background: #F5F5F5; color: var(--text); }
.modal-actions .btn-confirm { background: var(--brand); color: #fff; }
.modal-actions button:active { transform: scale(.96); }

/* ================================================================
   EMPTY & SKELETON
   ================================================================ */
.empty-state { text-align: center; padding: 36px 20px; color: var(--text-light); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 10px; opacity: .3; }
.empty-state p { font-size: 13px; }
.skeleton { background: linear-gradient(90deg,#f0f0f0 25%,#f8f8f8 50%,#f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; height: 18px; margin-bottom: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media(max-width: 499px) {
  .schedule-grid-view { display: none !important; }
  .schedule-list-view { display: block; }
}
