/* 预约表单、我的预约、后台预约记录和年级选择弹窗。 */

@media (max-width: 768px) {
  .reg-card { padding: 1.25rem 1.2rem; }

  .my-reg-item { padding-left: 1.2rem; padding-right: 1.2rem; }

  .reg-header { padding: 0.8rem 1.25rem; }

  .existing-reg-banner { padding: 1rem 1.25rem; }

  .reg-blocked-card { padding: 1.5rem 1.25rem; }
}

/* ===== 报名表单全新样式 ===== */
#tab-register { animation: regFadeIn 0.4s ease; }

.reg-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; font-weight: 700; color: #1e293b;
  margin-bottom: 0.4rem;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
  border-radius: 14px;
  border: 1px solid #c7d2fe;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(79,70,229,0.08);
}

.reg-header::after {
  content: '';
  position: absolute; right: 22px; top: -22px;
  width: 86px; height: 86px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.86) 0 34%, rgba(255,255,255,0) 35%);
  opacity: 0.65;
}

.reg-header-icon {
  width: 30px; height: 30px; border-radius: 10px;
  padding: 5px; flex-shrink: 0;
  background: rgba(255,255,255,0.76);
  box-shadow: 0 8px 18px rgba(79,70,229,0.16);
  object-fit: contain;
}

.reg-header > span:last-child { position: relative; z-index: 1; }

/* 主卡片 */
.reg-card {
  background: #fff; border-radius: 20px; padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #eef2f6;
  position: relative;
  overflow: hidden;
}

.reg-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #6366f1, #60a5fa, #4f46e5);
  background-size: 200% 100%;
  animation: regShimmer 3s ease-in-out infinite;
}

@keyframes regShimmer {
      0%, 100% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
    }

/* 步骤标题 */
.reg-card-step {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 1.2rem;
  padding: 0.6rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #eef2f6;
}

.reg-card-step span:last-child { font-weight: 600; font-size: 0.9rem; color: #1e293b; }

.reg-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff; font-size: 0.78rem; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(79,70,229,0.25);
}

.reg-divider {
  height: 1px; background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
  margin: 0.6rem 0;
}

/* 表单行 */
#tab-register .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

#tab-register .form-row.full { grid-template-columns: 1fr; }

@media (max-width: 480px) {
  #tab-register .form-row { grid-template-columns: 1fr; gap: 0.35rem; }

  .reg-card { padding: 1rem 0.95rem; }

  .my-reg-item { padding-left: 0.95rem; padding-right: 0.95rem; }

  .reg-header { padding: 0.6rem 1rem; }

  .existing-reg-banner { padding: 0.8rem 1rem; }

  .reg-blocked-card { padding: 1.2rem 1rem; }
}

#tab-register .form-group { display: flex; flex-direction: column; gap: 2px; }

#tab-register .form-group label {
  font-weight: 700; font-size: 0.92rem; color: #334155;
  display: flex; align-items: center; gap: 6px;
}

#tab-register .form-group label .label-icon {
  width: 22px; height: 22px; border-radius: 6px;
  background: #eef2ff; color: #4f46e5;
  padding: 3px; flex-shrink: 0;
  box-sizing: border-box;
}

#tab-register input,
#tab-register select {
  padding: 10px 14px; border: 1.8px solid #e2e8f0; border-radius: 12px;
  font-size: 0.68rem; outline: none; transition: all .25s;
  background: #f8fafc;
  max-width: 340px;
  font-family: inherit;
  color: #1e293b;
}

#tab-register input:hover,
#tab-register select:hover { border-color: #a5b4fc; background: #fff; }

#tab-register select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px; appearance: none;
  background-color: #f8fafc;
}

#tab-register select:hover { background-color: #fff; }

#tab-register input:focus,
#tab-register select:focus {
  border-color: #4f46e5; box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
  background: #fff;
}

#tab-register input:focus::placeholder { opacity: 0.5; }

#tab-register input::placeholder { color: #94a3b8; font-size: 0.8rem; }

/* 已有预约提示 */
.existing-reg-banner {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 14px; padding: 1rem 1.4rem;
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: 12px;
  animation: regFadeIn 0.35s ease;
}

.existing-reg-banner-icon { display: none; }

.existing-reg-banner-body { flex: 1; min-width: 0; }

.existing-reg-banner-title {
  font-weight: 700; font-size: 0.82rem; color: #92400e;
  margin-bottom: 6px;
}

.existing-reg-banner-list {
  font-size: 0.8rem; color: #a16207;
  display: flex; flex-wrap: wrap; gap: 4px 16px;
}

.existing-reg-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 9px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(252,211,77,0.55);
}

.existing-reg-item b { color: #78350f; }

.existing-reg-item em {
  font-style: normal; font-weight: 700; color: #92400e;
  background: #fef3c7; padding: 1px 7px; border-radius: 99px;
}

.existing-reg-banner-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

.existing-reg-banner-btn {
  padding: 5px 16px; border-radius: 8px; border: 1px solid #fcd34d;
  background: #fff; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit; color: #92400e;
  transition: all .15s;
}

.existing-reg-banner-btn:hover { background: #fef3c7; border-color: #f59e0b; }

.existing-reg-banner-btn.close-btn {
  border-color: transparent; background: transparent;
  color: #a8a29e; padding: 5px 8px;
}

.existing-reg-banner-btn.close-btn:hover { background: #f1f5f9; color: #78716c; }

/* 预约已存在时的阻塞卡片 */
.reg-blocked-card {
  background: #fff; border-radius: 20px; padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #fcd34d;
  text-align: center;
  animation: regFadeIn 0.35s ease;
}

.reg-blocked-icon { display: none; }

.reg-blocked-title {
  font-size: 1.1rem; font-weight: 700; color: #92400e;
  margin-bottom: 0.5rem;
}

.reg-blocked-desc {
  font-size: 0.85rem; color: #a16207; line-height: 1.8;
  margin-bottom: 1.2rem;
}

.reg-blocked-actions {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap;
}

.reg-blocked-btn {
  display: inline-block; padding: 10px 28px;
  border-radius: 12px; border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 0.9rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}

.reg-blocked-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

/* 手机号只读 */
#tab-register input[readonly] {
  cursor: not-allowed; color: #64748b;
  background: linear-gradient(135deg, #f1f5f9, #eef2f6);
  border-color: #e2e8f0;
}

/* 提交按钮 */
.reg-submit-btn {
  padding: 10px 36px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff; font-size: 0.92rem; font-weight: 700;
  cursor: pointer; transition: all .25s;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(79,70,229,0.3);
  width: auto; min-width: 140px;
  align-self: center;
  letter-spacing: 0.02em;
  position: relative;
}

.reg-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(79,70,229,0.4);
  background: linear-gradient(135deg, #4338ca, #312e81);
}

.reg-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

.reg-submit-btn:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
  box-shadow: 0 2px 8px rgba(79,70,229,0.15);
}

/* 校区选择 */
#reg-campus { max-width: 340px; }

#reg-message { margin-top: 0.8rem; }

/* 学科选择区提示 */
#tab-register .form-group label .multi-hint {
  font-size: 0.65rem; font-weight: 400; color: #94a3b8;
  background: #f8fafc; padding: 2px 8px; border-radius: 99px;
  border: 1px solid #e2e8f0;
}

/* ===== 预约记录样式 ===== */
.my-reg-card {
  background: #fff;
  border-radius: 20px; padding: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #eef2f6;
  overflow: hidden;
}

.my-reg-empty { text-align: center; padding: 2.5rem 1rem; }

.my-reg-empty-icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  opacity: 0.35;
}

.my-reg-empty-icon img { width: 40px; height: 40px; display: block; }

.my-reg-empty-title { font-size: 0.95rem; color: #64748b; margin-bottom: 4px; font-weight: 700; }

.my-reg-empty-desc { font-size: 0.8rem; color: #cbd5e1; }

.my-reg-item {
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid #f1f5f9;
  transition: all .2s;
  position: relative;
}

.my-reg-item:last-child { border-bottom: none; }

.my-reg-item:hover { background: linear-gradient(135deg, #fafbfc, #f8fafc); }

.my-reg-item::before {
  content: '';
  position: absolute; left: 0; top: 15%; height: 70%;
  width: 3px; border-radius: 0 3px 3px 0;
  transition: all .3s;
}

.my-reg-item:has(.pending)::before { background: #f59e0b; }

.my-reg-item:has(.confirmed)::before { background: #10b981; }

.my-reg-item:has(.cancelled)::before { background: #ef4444; }

.my-reg-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}

.my-reg-name { font-weight: 700; font-size: 0.95rem; color: #1e293b; }

.my-reg-status {
  font-size: 0.75rem; padding: 4px 14px; border-radius: 99px;
  font-weight: 700; flex-shrink: 0;
  letter-spacing: 0.02em;
}

.my-reg-status.pending { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

.my-reg-status.confirmed { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

.my-reg-status.cancelled { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.my-reg-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: 0.83rem; color: #64748b;
  margin-top: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
}

.my-reg-meta span { display: inline-flex; align-items: center; gap: 4px; }

.my-reg-meta span b {
  font-size: 0.7rem; color: #94a3b8; font-weight: 700;
  padding: 1px 6px; border-radius: 99px; background: #fff;
  border: 1px solid #e2e8f0;
}

.my-reg-actions { margin-top: 12px; display: flex; gap: 10px; }

.my-reg-btn {
  padding: 8px 20px; border-radius: 10px; border: 1.5px solid #e2e8f0;
  background: #fff; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
  font-family: inherit; color: #475569;
}

.my-reg-btn.edit { color: #4f46e5; border-color: #c7d2fe; background: #eef2ff; }

.my-reg-btn.edit:hover { background: #dbeafe; border-color: #a5b4fc; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(79,70,229,0.12); }

.my-reg-btn.cancel { color: #dc2626; border-color: #fecaca; background: #fef2f2; }

.my-reg-btn.cancel:hover { background: #fee2e2; border-color: #fca5a5; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(239,68,68,0.1); }

.my-reg-btn:active { transform: translateY(0) scale(0.98); }

.reg-mgmt-table-wrap {
  background: #fff;
  border-radius: 16px; padding: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  overflow-x: auto;
}

.reg-mgmt-table-wrap table { width: 100%; border-collapse: collapse; }

.reg-mgmt-table-wrap th {
  padding: 0.6rem 0.45rem;
  font-size: 0.72rem; font-weight: 700; color: #64748b;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.reg-mgmt-table-wrap td {
  padding: 0.55rem 0.45rem;
  font-size: 0.78rem; color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.reg-mgmt-table-wrap tr:hover td { background: #fafbfc; }

/* 移动端 tab */
@media (max-width: 640px) {
  /* 预约管理表格 → 卡片 */
  .reg-mgmt-table-wrap table,
  .reg-mgmt-table-wrap thead,
  .reg-mgmt-table-wrap tbody,
  .reg-mgmt-table-wrap th,
  .reg-mgmt-table-wrap td,
  .reg-mgmt-table-wrap tr { display: block; }

  .reg-mgmt-table-wrap thead tr { display: none; }

  .reg-mgmt-table-wrap tbody tr {
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
  }

  .reg-mgmt-table-wrap tbody td {
    padding: 3px 0;
    font-size: 0.82rem;
    border: none;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .reg-mgmt-table-wrap tbody td:before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    min-width: 70px;
    flex-shrink: 0;
  }

  .reg-mgmt-table-wrap tbody td:last-child {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
  }
}

.my-reg-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0.95rem 1.4rem; border-bottom: 1px solid #eef2f6;
  background: linear-gradient(135deg, #ffffff, #fbfcff);
}

.my-reg-card-title,
.my-reg-card-subtitle { display: block; }

.my-reg-card-title { color: #1e293b; font-size: 0.9rem; font-weight: 800; }

.my-reg-card-subtitle { margin-top: 2px; color: #94a3b8; font-size: 0.7rem; }

.my-reg-refresh {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px;
  border: 1px solid #c7d2fe; border-radius: 9px; background: #eef2ff; color: #4f46e5;
  font-size: 0.72rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .18s;
}

.my-reg-refresh svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.my-reg-refresh:hover { background: #e0e7ff; border-color: #a5b4fc; transform: translateY(-1px); }

.my-reg-refresh:disabled { opacity: 0.68; cursor: wait; transform: none; }

.my-reg-refresh.is-loading svg { animation: myRegRefreshSpin 0.8s linear infinite; }

@keyframes myRegRefreshSpin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .my-reg-card-head { padding: 0.8rem 0.95rem; }

  .my-reg-card-subtitle { font-size: 0.66rem; }
}

.reg-card { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07); }

.reg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.reg-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }

#tab-admin-registrations .admin-table-shell {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

/* 预约记录：状态概览、信息分组与移动端记录卡片。 */
.reg-admin-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem .25rem .85rem; }

.reg-admin-heading { display: flex; align-items: center; gap: .75rem; min-width: 0; }

.reg-admin-heading-icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 1px solid #dce2f7; border-radius: 12px; background: #eef1fb; }

.reg-admin-heading-icon img { width: 24px; height: 24px; }

.reg-admin-heading h2 { margin: 0; color: #1e293b; font-size: 1.15rem; line-height: 1.4; letter-spacing: .02em; }

.reg-admin-heading p { margin: .2rem 0 0; color: #7c879a; font-size: .76rem; line-height: 1.5; }

.reg-admin-header-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.reg-admin-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 36px; padding: .45rem .85rem; border: 1px solid #dce2ed; border-radius: 8px; background: #fff; color: #475569; font: inherit; font-size: .77rem; font-weight: 600; line-height: 1.4; cursor: pointer; transition: background .16s, border-color .16s, color .16s; }

.reg-admin-button svg,
.reg-admin-search svg,
.reg-admin-campus svg,
.reg-admin-confirm svg,
.reg-admin-delete svg,
.reg-admin-state-icon svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.reg-admin-button:hover { border-color: #a5b4fc; background: #f5f6ff; color: #4338ca; }

.reg-admin-button.primary { border-color: #4f46e5; background: #4f46e5; color: #fff; box-shadow: 0 2px 4px rgba(79,70,229,.12); }

.reg-admin-button.primary:hover { border-color: #4338ca; background: #4338ca; }

.reg-admin-button:disabled { opacity: .6; cursor: wait; }

.reg-admin-button.is-loading svg { animation: regAdminSpin .8s linear infinite; }

.reg-admin-panel { overflow: hidden; min-width: 0; margin-bottom: .65rem; border: 1px solid #e0e5ef; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(30,41,59,.035); }

.reg-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #e8ecf3; background: #fafbfe; }

.reg-admin-stat { position: relative; min-width: 0; padding: .6rem .85rem .55rem; border: 0; border-right: 1px solid #e8ecf3; background: transparent; text-align: left; font: inherit; cursor: pointer; transition: background .16s; }

.reg-admin-stat:last-child { border-right: 0; }

.reg-admin-stat::after { content: ''; position: absolute; inset: auto 0 -1px; height: 3px; background: transparent; }

.reg-admin-stat:not(:disabled):hover { background: #f0f3fc; }

.reg-admin-stat.active { background: #eef1fd; }

.reg-admin-stat.active::after { background: #6366f1; }

.reg-admin-stat-label { display: flex; align-items: center; gap: .4rem; color: #64748b; font-size: .75rem; font-weight: 500; white-space: nowrap; }

.reg-admin-stat-label i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }

.reg-admin-stat-label .pending { background: #e0a03c; }

.reg-admin-stat-label .confirmed { background: #2c9b80; }

.reg-admin-stat strong { display: block; margin-top: .15rem; color: #334155; font-size: 1.2rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }

.reg-admin-stat.active strong { color: #4f46e5; }

.reg-admin-stat[data-reg-status="pending"] strong { color: #b77925; }

.reg-admin-stat[data-reg-status="confirmed"] strong { color: #26846e; }

.reg-admin-stat:disabled { cursor: default; }

.reg-admin-toolbar { display: grid; grid-template-columns: minmax(180px, 340px) minmax(140px, 210px) minmax(0, 1fr); align-items: center; gap: .75rem; padding: 1rem 1.15rem; }

.reg-admin-search { display: flex; align-items: center; gap: .5rem; min-width: 0; min-height: 38px; padding: 0 .65rem; border: 1px solid #dce2eb; border-radius: 8px; color: #94a3b8; background: #fff; transition: border-color .16s, box-shadow .16s; }

.reg-admin-search:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

.reg-admin-search input { width: 100%; min-width: 0; padding: .55rem 0; border: 0; outline: none; box-shadow: none; border-radius: 0; background: transparent; color: #334155; font: inherit; font-size: .77rem; line-height: 1.4; }

.reg-admin-search input::placeholder { color: #9aa4b5; }

.reg-admin-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.reg-admin-search button { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; padding: 3px; border: 0; border-radius: 5px; color: #94a3b8; background: transparent; cursor: pointer; }

.reg-admin-search button:hover { background: #eef2f7; color: #475569; }

/* 原生选择框覆盖整个区域，标签文字和箭头不拦截点击。 */
.reg-admin-campus { position: relative; display: block; min-width: 0; min-height: 38px; border: 1px solid #dce2eb; border-radius: 8px; background: #fff; transition: border-color .16s, box-shadow .16s; }

.reg-admin-campus > span { position: absolute; top: 50%; left: .65rem; z-index: 1; transform: translateY(-50%); color: #94a3b8; font-size: .73rem; pointer-events: none; }

.reg-admin-campus select { position: absolute; inset: 0; appearance: none; min-width: 0; width: 100%; height: 100%; padding: 0 2.8rem; border: 0; outline: none; border-radius: 0; background: transparent; color: #475569; font: inherit; font-size: .77rem !important; line-height: 1.4; text-align: center; text-align-last: center; cursor: pointer; text-overflow: ellipsis; }

.reg-admin-campus select:disabled { cursor: not-allowed; opacity: .6; }

.reg-admin-campus svg { position: absolute; top: 50%; right: .65rem; z-index: 1; width: 14px; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }

.reg-admin-campus:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

.reg-admin-result-count { color: #8792a5; font-size: .73rem; line-height: 1.5; text-align: right; }

.reg-admin-notice { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 1.15rem; border-top: 1px solid #f5e5bc; background: #fffbef; color: #9a7026; font-size: .76rem; }

.reg-admin-notice button { flex-shrink: 0; padding: .2rem .5rem; border: 1px solid #e9d7ab; border-radius: 5px; background: #fff; color: #9a7026; font: inherit; font-weight: 600; cursor: pointer; }

.reg-admin-table-wrap { min-width: 0; }

.reg-admin-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }

.reg-admin-table th { padding: .7rem .85rem; border-top: 1px solid #e8ecf3; border-bottom: 1px solid #e8ecf3; background: #f6f8fc; color: #7c879a; font-size: .72rem; font-weight: 600; }

.reg-admin-table th:first-child { width: 18%; padding-left: 1.15rem; }

.reg-admin-table th:nth-child(2) { width: auto; }

.reg-admin-table th:nth-child(3) { width: 11%; }

.reg-admin-table th:nth-child(4) { width: 10%; }

.reg-admin-table th:nth-child(5) { width: 13%; }

.reg-admin-table th:nth-child(6) { width: 12%; }

.reg-admin-table th:last-child { width: 172px; padding-right: 1.15rem; text-align: right; }

.reg-admin-table td { padding: 1.05rem .85rem; border-bottom: 1px solid #edf0f5; color: #475569; font-size: .78rem; vertical-align: middle; overflow-wrap: anywhere; }

.reg-admin-table td:first-child { padding-left: 1.15rem; }

.reg-admin-table td:last-child { padding-right: 1.15rem; }

.reg-admin-row { transition: background .16s; }

.reg-admin-row:hover,
.reg-admin-row:focus-within { background: #fafbff; }

.reg-admin-row:last-child td { border-bottom: 0; }

.reg-admin-row.status-pending .reg-admin-student-cell { box-shadow: inset 3px 0 #e8b66a; }

.reg-admin-person { display: flex; align-items: center; gap: .6rem; min-width: 0; }

.reg-admin-avatar { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border: 1px solid #e0e5f5; border-radius: 10px; background: #f0f3fb; color: #6473a7; font-size: .9rem; font-weight: 600; }

.reg-admin-person-copy { min-width: 0; }

.reg-admin-person-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; line-height: 1.5; }

.reg-admin-person-name strong { color: #263449; font-size: .85rem; font-weight: 650; }

.reg-admin-person-name > span { color: #a0a9b9; font-size: .64rem; font-variant-numeric: tabular-nums; }

.reg-admin-phone { display: inline-block; margin-top: .22rem; color: #78869b; font-size: .74rem; line-height: 1.5; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }

.reg-admin-phone:hover { color: #4f46e5; text-decoration: underline; text-underline-offset: 3px; }

.reg-admin-course-meta { display: block; color: #475569; font-size: .77rem; line-height: 1.5; }

.reg-admin-subjects { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .4rem; }

.reg-admin-subjects > span { padding: .1rem .4rem; border: 1px solid #e7eaf2; border-radius: 4px; background: #f7f8fc; color: #6b7690; font-size: .68rem; line-height: 1.5; }

.reg-admin-campus-name { color: #58677c; font-size: .76rem; line-height: 1.6; }

.reg-admin-status { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .25rem .5rem; border: 1px solid #e6e9ee; border-radius: 5px; background: #f5f6f8; color: #8993a3; font-size: .7rem; line-height: 1.5; white-space: nowrap; }

.reg-admin-status::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: currentColor; }

.reg-admin-status.pending { border-color: #f4e0b5; background: #fff8e9; color: #b17a2e; }

.reg-admin-status.confirmed { border-color: #cce9df; background: #eef9f4; color: #2b8a70; }

.reg-admin-status.unknown { white-space: normal; overflow-wrap: anywhere; }

.reg-admin-source { color: #58677c; font-size: .76rem; line-height: 1.5; }

.reg-admin-source-cell small,
.reg-admin-time-cell small { display: block; margin-top: .25rem; color: #98a2b2; font-size: .67rem; line-height: 1.5; }

.reg-admin-time-cell time { color: #718096; font-size: .73rem; font-variant-numeric: tabular-nums; line-height: 1.5; }

.reg-admin-row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }

.reg-admin-confirm,
.reg-admin-delete { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 64px; min-height: 36px; padding: .375rem .5rem; border: 1px solid transparent; border-radius: 6px; font: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.4; white-space: nowrap; cursor: pointer; transition: background .16s, border-color .16s, color .16s; }

.reg-admin-confirm { border-color: #c7d2fe; background: transparent; color: #4f46e5; }

.reg-admin-confirm svg,
.reg-admin-delete svg { width: 15px; height: 15px; }

.reg-admin-confirm:hover:not(:disabled) { border-color: #a5b4fc; background: #f5f5ff; color: #4338ca; }

.reg-admin-confirm:active:not(:disabled) { border-color: #818cf8; background: #eef2ff; color: #3730a3; }

.reg-admin-delete { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

.reg-admin-delete:hover:not(:disabled) { border-color: #fca5a5; background: #fee2e2; color: #991b1b; }

.reg-admin-delete:active:not(:disabled) { border-color: #f87171; background: #fecaca; }

.reg-admin-confirm:disabled,
.reg-admin-delete:disabled { opacity: .55; cursor: wait; pointer-events: none; }

.reg-admin-muted { color: #a0a9b7; font-size: .72rem; }

.reg-admin-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; padding: .75rem 1.15rem; border-top: 1px solid #e8ecf3; color: #9aa3b3; font-size: .67rem; line-height: 1.5; }

.reg-admin-auto-update { display: inline-flex; align-items: center; gap: .4rem; }

.reg-admin-auto-update::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #87b1a2; }

.reg-admin-table .reg-admin-state-row td { padding: 0; border: 0; }

.reg-admin-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; padding: 2rem 1rem; text-align: center; }

.reg-admin-state-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: .85rem; border: 1px solid #e4e9f2; border-radius: 14px; background: #f6f8fc; color: #9aa7bd; }

.reg-admin-state-icon svg { width: 26px; height: 26px; stroke-width: 1.5; }

.reg-admin-state strong { color: #64748b; font-size: .88rem; font-weight: 600; }

.reg-admin-state p { margin: .45rem 0 0; color: #9aa3b3; font-size: .76rem; line-height: 1.7; }

.reg-admin-state .reg-admin-button { margin-top: 1rem; }

.reg-admin-spinner { width: 28px; height: 28px; margin-bottom: 1.1rem; border: 2px solid #e8ecf6; border-top-color: #818cf8; border-radius: 50%; animation: regAdminSpin .8s linear infinite; }

.reg-admin-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

#tab-admin-registrations [hidden] { display: none; }

#tab-admin-registrations button:focus-visible,
#tab-admin-registrations a:focus-visible { outline: 2px solid #818cf8; outline-offset: 3px; }

@keyframes regAdminSpin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .reg-admin-table,
  .reg-admin-table tbody { display: block; }

  .reg-admin-table thead { display: none; }

  .reg-admin-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding: .85rem; border-top: 1px solid #e8ecf3; background: #f7f9fc; }

  .reg-admin-table .reg-admin-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'student status' 'course course' 'campus time' 'source source' 'actions actions'; align-content: start; align-items: start; gap: .85rem 1rem; min-width: 0; padding: 1rem; border: 1px solid #e1e6ef; border-radius: 10px; background: #fff; }

  .reg-admin-row.status-pending { border-top: 3px solid #e8b66a; padding-top: calc(1rem - 2px); }

  .reg-admin-table .reg-admin-row td { display: block; min-width: 0; padding: 0; border: 0; }

  .reg-admin-row td::before { content: attr(data-label); display: block; margin-bottom: .3rem; color: #9aa3b3; font-size: .66rem; line-height: 1.5; }

  .reg-admin-row .reg-admin-student-cell { grid-area: student; }

  .reg-admin-row.status-pending .reg-admin-student-cell { box-shadow: none; }

  .reg-admin-row .reg-admin-status-cell { grid-area: status; text-align: right; }

  .reg-admin-table .reg-admin-row .reg-admin-course-cell { grid-area: course; padding-top: .75rem; border-top: 1px solid #edf0f5; }

  .reg-admin-row .reg-admin-campus-cell { grid-area: campus; }

  .reg-admin-row .reg-admin-time-cell { grid-area: time; }

  .reg-admin-table .reg-admin-row .reg-admin-source-cell { grid-area: source; display: flex; flex-wrap: wrap; gap: .2rem .65rem; }

  .reg-admin-source-cell::before { width: 100%; margin-bottom: .1rem; }

  .reg-admin-source-cell > * { min-width: 0; max-width: 100%; }

  .reg-admin-source-cell small { margin: 0; align-self: center; }

  .reg-admin-table .reg-admin-row .reg-admin-action-cell { grid-area: actions; padding-top: .7rem; border-top: 1px solid #edf0f5; }

  .reg-admin-student-cell::before,
  .reg-admin-status-cell::before,
  .reg-admin-action-cell::before { display: none !important; }

  .reg-admin-person { gap: .45rem; }

  .reg-admin-avatar { width: 28px; height: 30px; border-radius: 8px; }

  .reg-admin-time-cell time { display: flex; flex-wrap: wrap; gap: .15rem .4rem; }

  .reg-admin-time-cell small { margin-top: 0; }

  .reg-admin-row-actions { flex-wrap: nowrap; gap: .5rem; }

  .reg-admin-confirm,
  .reg-admin-delete { gap: .25rem; min-width: 60px; min-height: 30px; padding: .25rem .45rem; border-radius: 5px; font-size: .75rem; }

  .reg-admin-confirm svg,
  .reg-admin-delete svg { width: 13px; height: 13px; }

  .reg-admin-table .reg-admin-state-row { display: block; grid-column: 1 / -1; border: 0; background: transparent; }

  .reg-admin-table .reg-admin-state-row td { display: block; }
}

@media (max-width: 620px) {
  .reg-admin-header { gap: .5rem; padding: .75rem .15rem; }

  .reg-admin-heading { gap: .5rem; }

  .reg-admin-heading-icon { width: 34px; height: 36px; border-radius: 10px; }

  .reg-admin-heading-icon img { width: 22px; height: 22px; }

  .reg-admin-heading h2 { font-size: 1.05rem; }

  .reg-admin-heading p { margin-top: .15rem; font-size: .65rem; }

  .reg-admin-header-actions { gap: .4rem; }

  .reg-admin-header-actions .reg-admin-button { min-height: 34px; padding: .4rem .55rem; font-size: .7rem; }

  .reg-admin-refresh-label { display: none; }

  .reg-admin-panel { border-radius: 11px; }

  .reg-admin-stat { padding: .45rem .55rem .4rem; }

  .reg-admin-stat-label { gap: .25rem; font-size: .68rem; }

  .reg-admin-stat-label i { width: 5px; height: 5px; }

  .reg-admin-stat strong { margin-top: .1rem; font-size: 1rem; }

  .reg-admin-toolbar { grid-template-columns: minmax(0, 1fr) 132px; gap: .35rem .5rem; padding: .65rem .75rem .5rem; }

  .reg-admin-search { height: 34px; min-height: 34px; gap: .35rem; padding: 0 .45rem; border-radius: 6px; }

  .reg-admin-search input { height: 100%; padding: .25rem 0; }

  .reg-admin-search > svg { width: 14px; height: 14px; }

  .reg-admin-campus { height: 34px; min-height: 34px; border-radius: 6px; }

  .reg-admin-campus > span { left: .5rem; font-size: .68rem; }

  .reg-admin-campus select { padding: 0 2.1rem; }

  .reg-admin-campus svg { right: .4rem; }

  .reg-admin-result-count { grid-column: 1 / -1; font-size: .68rem; }

  .reg-admin-table tbody { grid-template-columns: minmax(0, 1fr); padding: .65rem; gap: .65rem; }

  .reg-admin-table .reg-admin-row { padding: .9rem; gap: .75rem .9rem; }

  .reg-admin-row.status-pending { padding-top: calc(.9rem - 2px); }

  .reg-admin-notice { align-items: flex-start; padding: .65rem .8rem; font-size: .7rem; }

  .reg-admin-footer { padding: .65rem .8rem; font-size: .62rem; }

  .reg-admin-state { min-height: 230px; padding: 1.5rem .5rem; }
}

@media (max-width: 360px) {
  .reg-admin-toolbar { grid-template-columns: 132px minmax(0, 1fr); }

  .reg-admin-search { grid-column: 1 / -1; }

  .reg-admin-result-count { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .reg-admin-spinner,
  .reg-admin-button.is-loading svg { animation: none; }
}

@media (max-width: 768px) {
  #tab-admin-registrations .admin-table-shell { padding: 0.35rem; border-radius: 16px; }
}

/* ===== Compact correction: restore desktop width and reduce empty spacing ===== */
@media (min-width: 769px) {
  #tab-admin-registrations .admin-table-shell {
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
  }

  #tab-admin-registrations .admin-table-shell { padding: 0.45rem; }
}

/* ===== Spacing correction: restore compact vertical rhythm ===== */
@media (min-width: 769px) {
  #tab-admin-registrations .admin-table-shell {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }

  #tab-admin-registrations .data-table { border-spacing: 0 5px; }

  #tab-admin-registrations .data-table tbody td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
}

#tab-admin-registrations .admin-table-shell { margin-top: 0 !important; }

@media (min-width: 769px) {
  #tab-admin-registrations .admin-table-shell { padding: 0.25rem !important; }

  #tab-admin-registrations .data-table { border-spacing: 0 4px !important; }

  #tab-admin-registrations .data-table thead th,
  #tab-admin-registrations .data-table tbody td {
    padding-top: 0.48rem !important;
    padding-bottom: 0.48rem !important;
  }
}

@media (max-width: 768px) {
  #tab-admin-registrations .admin-table-shell {
    padding: 0.6rem !important;
    border-radius: 14px !important;
    margin-bottom: 0.5rem !important;
  }

  #tab-admin-registrations .data-table { border-spacing: 0 3px !important; }

  #tab-admin-registrations .data-table thead th,
  #tab-admin-registrations .data-table tbody td {
    padding-top: 0.42rem !important;
    padding-bottom: 0.42rem !important;
  }
}

.reg-card,
.my-reg-item,
.existing-reg-banner,
.reg-blocked-card,
#tab-admin-registrations .admin-table-shell { margin-top: 0 !important; }

#tab-admin-registrations .admin-table-shell { margin-bottom: 0.55rem !important; }

@media (min-width: 769px) {
  #tab-admin-registrations .admin-table-shell { padding: 0.2rem !important; }
}

@media (max-width: 768px) {
  #tab-admin-registrations .admin-table-shell {
    padding: 0.52rem !important;
    margin-bottom: 0.45rem !important;
  }
}

/* ===== Mobile compact headers: registrations and announcements ===== */
@media (max-width: 768px) {
  #tab-admin-registrations > .section-header {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.45rem !important;
    padding: 0.42rem 0.55rem !important;
    margin-bottom: 0.3rem !important;
    border-radius: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  #tab-admin-registrations > .section-header::before { width: 3px !important; }

  #tab-admin-registrations > .section-header .tab-icon {
    width: 20px !important;
    height: 20px !important;
    padding: 3px !important;
    margin-right: 3px !important;
    border-radius: 7px !important;
  }

  #tab-admin-registrations > .section-header .btn-export {
    flex: 0 0 auto !important;
    min-height: 28px !important;
    padding: 0.28rem 0.62rem !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }
}

/* ===== My appointment edit: compact grade picker with confirm/cancel ===== */
.edit-grade-hidden { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

.mini-grade-picker-trigger { width: auto !important; min-width: 128px; max-width: 180px; height: 38px; padding: 0 0.8rem; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #334155; font-size: 0.9rem; font-weight: 600; text-align: left; cursor: pointer; box-shadow: 0 2px 8px rgba(15,23,42,0.04); }

.mini-grade-picker-trigger::after { content: '\25BE'; float: right; color: #94a3b8; margin-left: 12px; }

.mini-grade-picker-pop { position: sticky; bottom: 0; z-index: 5; margin-top: 0.75rem; padding: 0.75rem; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 -6px 24px rgba(15,23,42,0.12); }

.mini-grade-picker-head,
.mini-grade-picker-actions { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

.mini-grade-picker-head { margin-bottom: 0.55rem; }

.mini-grade-picker-head strong { font-size: 0.92rem; color: #1e293b; }

.mini-grade-picker-head button { width: 28px; height: 28px; border: none; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 1.1rem; }

.mini-grade-picker-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; max-height: 180px; overflow-y: auto; }

.mini-grade-option { min-height: 34px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; color: #475569; font-size: 0.82rem; font-weight: 600; }

.mini-grade-option.active { background: #4f46e5; border-color: #4f46e5; color: #fff; }

.mini-grade-picker-actions { margin-top: 0.65rem; }

.mini-grade-picker-actions button { flex: 1; min-height: 34px; border-radius: 10px; border: 1px solid #e2e8f0; font-weight: 700; font-size: 0.84rem; }

.mini-grade-cancel { background: #fff; color: #64748b; }

.mini-grade-confirm { background: #4f46e5; color: #fff; border-color: #4f46e5 !important; }

@media (max-width: 600px) {
  .mini-grade-picker-trigger { width: auto !important; min-width: 116px; max-width: 155px; height: 34px; font-size: 0.84rem; padding: 0 0.65rem; }

  .mini-grade-picker-pop { padding: 0.65rem; margin-top: 0.55rem; }

  .mini-grade-picker-options { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 156px; }

  .mini-grade-option { min-height: 32px; font-size: 0.78rem; }

  .edit-reg-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.55rem !important; }

  .edit-reg-actions .btn { width: 100% !important; }
}

/* ===== Mobile admin header icons unified ===== */
@media (max-width: 768px) {
  #tab-admin-registrations > .section-header .tab-icon {
    width: 28px !important;
    height: 28px !important;
    box-sizing: border-box !important;
    padding: 5px !important;
    margin: 0 6px 0 0 !important;
    border-radius: 10px !important;
    background: #eef2ff !important;
    box-shadow: inset 0 0 0 1px rgba(79,70,229,0.08) !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    flex: 0 0 auto !important;
  }

  #tab-admin-registrations > .section-header { align-items: center !important; }
}

.reg-card,
.my-reg-list,
#tab-admin-registrations .admin-table-shell { margin-top: 0 !important; }

.reg-card,
#tab-admin-registrations .admin-table-shell { margin-bottom: 0.42rem !important; }

@media (max-width: 768px) {
  .reg-card,
  #tab-admin-registrations .admin-table-shell { margin-bottom: 0.32rem !important; }
}

/* ===== User dashboard four tabs tighter spacing ===== */
#tab-my-registrations { --user-tab-gap: 0.28rem; }

#tab-my-registrations .user-page-hero {
  min-height: 118px !important;
  margin: 0 0 var(--user-tab-gap) !important;
  padding: 1rem 1.2rem !important;
  border-radius: 18px !important;
}

#tab-my-registrations .user-page-eyebrow {
  margin-bottom: 0.3rem !important;
  padding: 0.2rem 0.52rem !important;
}

#tab-my-registrations .user-page-hero h2 {
  margin: 0 !important;
  line-height: 1.28 !important;
}

#tab-my-registrations .user-page-hero p {
  margin-top: 0.22rem !important;
  line-height: 1.5 !important;
}

#tab-my-registrations .user-page-hero-mark {
  width: 86px !important;
  height: 86px !important;
  padding: 0.72rem !important;
  border-radius: 20px !important;
}

#tab-my-registrations .user-page-notes {
  margin: 0 0 var(--user-tab-gap) !important;
  gap: 0.38rem !important;
}

#tab-my-registrations .user-page-note {
  padding: 0.58rem 0.7rem !important;
  border-radius: 13px !important;
}

#tab-my-registrations .my-reg-card {
  margin-top: 0 !important;
  margin-bottom: var(--user-tab-gap) !important;
  border-radius: 16px !important;
}

#tab-my-registrations .my-reg-card-head { padding: 0.68rem 0.9rem !important; }

#tab-my-registrations #my-registrations-list { padding: 0.62rem 0.72rem !important; }

#tab-my-registrations .my-reg-item {
  margin-bottom: 0.42rem !important;
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
}

#tab-my-registrations .my-reg-meta {
  margin-top: 0.55rem !important;
  padding: 0.55rem 0.7rem !important;
  gap: 0.35rem 0.7rem !important;
}

#tab-my-registrations .my-reg-actions {
  margin-top: 0.55rem !important;
  gap: 0.45rem !important;
}

@media (max-width: 768px) {
  #tab-my-registrations { --user-tab-gap: 0.22rem; }

  #tab-my-registrations .user-page-hero {
    min-height: 96px !important;
    padding: 0.68rem 0.75rem !important;
    border-radius: 15px !important;
  }

  #tab-my-registrations .user-page-hero h2 { font-size: 1rem !important; }

  #tab-my-registrations .user-page-hero p { font-size: 0.75rem !important; }

  #tab-my-registrations .user-page-hero-mark {
    width: 58px !important;
    height: 58px !important;
    padding: 0.42rem !important;
    border-radius: 15px !important;
  }

  #tab-my-registrations .user-page-hero-mark span { display: none !important; }

  #tab-my-registrations .user-page-hero-mark strong { font-size: 1rem !important; }

  #tab-my-registrations .user-page-note {
    padding: 0.48rem 0.58rem !important;
    min-height: auto !important;
  }

  #tab-my-registrations .my-reg-card-head { padding: 0.55rem 0.68rem !important; }

  #tab-my-registrations #my-registrations-list { padding: 0.5rem 0.55rem !important; }

  #tab-my-registrations .my-reg-item {
    margin-bottom: 0.32rem !important;
    padding-top: 0.58rem !important;
    padding-bottom: 0.58rem !important;
  }
}

@media (max-width: 768px) {
  #tab-my-registrations #my-registrations-list { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important; }

  #tab-my-registrations .my-reg-item:last-child { margin-bottom: 0.85rem !important; }
}

/* ===== My appointment edit: polished grade picker dialog ===== */
.edit-grade-compact { min-width: 0; }

.edit-grade-compact .mini-grade-picker-trigger {
  width: 100% !important;
  max-width: none;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-sizing: border-box;
  padding: 0 0.9rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.edit-grade-compact .mini-grade-picker-trigger:hover,
.edit-grade-compact .mini-grade-picker-trigger:focus-visible {
  border-color: #818cf8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
  outline: none;
}

.edit-grade-compact .mini-grade-picker-trigger::after {
  float: none;
  margin-left: auto;
  content: '\25BE';
  color: #64748b;
  font-size: .78rem;
}

.grade-picker-open { overflow: hidden; }

.grade-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(3px);
  animation: gradePickerFadeIn .18s ease-out;
}

.grade-picker-dialog {
  width: min(440px, 100%);
  max-height: min(680px, calc(100vh - 2rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15,23,42,.24), 0 4px 12px rgba(15,23,42,.08);
  animation: gradePickerSlideIn .22s ease-out;
}

.grade-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem .9rem;
}

.grade-picker-kicker {
  display: block;
  margin-bottom: .25rem;
  color: #6366f1;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.grade-picker-header h3 { margin: 0; color: #0f172a; font-size: 1.15rem; line-height: 1.35; }

.grade-picker-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.grade-picker-close:hover,
.grade-picker-close:focus-visible { background: #e2e8f0; color: #1e293b; transform: rotate(90deg); outline: none; }

.grade-picker-current {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 1.25rem .85rem;
  padding: .7rem .8rem;
  border: 1px solid #e0e7ff;
  border-radius: 12px;
  background: #eef2ff;
  color: #6366f1;
  font-size: .78rem;
}

.grade-picker-current-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.grade-picker-current-value { margin-left: auto; color: #3730a3; font-size: .84rem; }

.grade-picker-groups { min-height: 0; overflow-y: auto; padding: 0 1.25rem .25rem; scrollbar-width: thin; }

.grade-picker-group { padding: .7rem 0 .8rem; border-top: 1px solid #f1f5f9; }

.grade-picker-group:first-child { padding-top: .25rem; border-top: 0; }

.grade-picker-group-title { display: flex; align-items: baseline; gap: .55rem; margin-bottom: .5rem; }

.grade-picker-group-title strong { color: #334155; font-size: .86rem; }

.grade-picker-group-title span { color: #94a3b8; font-size: .73rem; }

.grade-picker-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }

.mini-grade-option {
  min-height: 42px;
  padding: .35rem .25rem;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
  color: #475569;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.mini-grade-option:hover,
.mini-grade-option:focus-visible { border-color: #a5b4fc; background: #eef2ff; color: #4338ca; outline: none; transform: translateY(-1px); }

.mini-grade-option.active { border-color: #4f46e5; background: #4f46e5; color: #fff; box-shadow: 0 5px 12px rgba(79,70,229,.2); }

.grade-picker-dialog .mini-grade-picker-actions {
  display: flex;
  gap: .65rem;
  padding: 1rem 1.25rem 1.25rem;
  margin-top: .25rem;
  border-top: 1px solid #f1f5f9;
  background: #fff;
}

.grade-picker-dialog .mini-grade-picker-actions button {
  min-height: 42px;
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.grade-picker-dialog .mini-grade-picker-actions button:active { transform: scale(.98); }

.grade-picker-dialog .mini-grade-cancel { background: #fff; color: #64748b; }

.grade-picker-dialog .mini-grade-cancel:hover { background: #f8fafc; border-color: #cbd5e1; }

.grade-picker-dialog .mini-grade-confirm { border-color: #4f46e5; background: #4f46e5; color: #fff; }

.grade-picker-dialog .mini-grade-confirm:hover { background: #4338ca; border-color: #4338ca; }

@keyframes gradePickerFadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes gradePickerSlideIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 600px) {
  .grade-picker-overlay { align-items: flex-end; padding: .65rem; }

  .grade-picker-dialog { max-height: min(680px, calc(100vh - 1.3rem)); border-radius: 20px; }

  .grade-picker-header { padding: 1rem 1rem .75rem; }

  .grade-picker-current { margin-left: 1rem; margin-right: 1rem; }

  .grade-picker-groups { padding-left: 1rem; padding-right: 1rem; }

  .grade-picker-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .42rem; }

  .mini-grade-option { min-height: 40px; font-size: .78rem; }

  .grade-picker-dialog .mini-grade-picker-actions { padding: .8rem 1rem 1rem; }
}
