/* Dashboard page styles.
   Source of truth for dashboard-specific CSS extracted from public/dashboard.html.
   Keep public/dashboard.html as the page source; Docker copies public/ into the image. */

/* Extracted from public/dashboard.html style block #3, original lines 100-119. */
    /* ===== 横幅下最新消息预览 ===== */
    .ann-preview-wrap { margin: 0.5rem 0 0.75rem; display: flex; align-items: center; gap: 8px; background: #f8fafc; border-radius: 10px; padding: 0.45rem 0.75rem; border: 1px solid var(--gray-100); cursor: pointer; }
    .ann-preview-wrap:hover { background: #f1f5f9; }
    .ann-preview-label { display: flex; align-items: center; gap: 5px; flex-shrink: 0; font-size: 0.82rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
    .ann-preview-label img { width: 20px; height: 20px; }
    .ann-preview-scroll { flex: 1; overflow: hidden; position: relative; height: 1.4em; }
    .ann-preview-track { display: flex; gap: 24px; animation: annScroll 20s linear infinite; width: max-content; }
    .ann-preview-track:hover { animation-play-state: paused; }
    .ann-preview-item { white-space: nowrap; font-size: 0.82rem; color: var(--gray-600); display: flex; align-items: center; gap: 6px; }
    .ann-preview-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
    .ann-preview-dot.important { background: #ef4444; }
    .ann-preview-empty { font-size: 0.82rem; color: var(--gray-400); }
    @keyframes annScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
    @media (max-width: 600px) {
      .ann-preview-wrap { padding: 0.35rem 0.75rem; }
      .ann-preview-label { font-size: 0.75rem; }
      .ann-preview-item { font-size: 0.75rem; }
    }
    
/* Extracted from public/dashboard.html style block #4, original lines 1379-1449. */
    /* 升学计算器链接放大 */
    .nav-calc-link {
      font-size: 1rem;
      font-weight: 700;
      padding: 0.4rem 1rem;
      border-radius: 20px;
      background: #f0fdf4;
      color: #16a34a;
      transition: all 0.2s;
    }
    .nav-calc-link:hover {
      background: #dcfce7;
      transform: scale(1.05);
    }
    .chat-btn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      padding: 0.5rem 1rem;
      border-radius: 50px;
      background: linear-gradient(135deg, #4f46e5, #4338ca);
      color: white;
      border: none;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
      transition: all 0.2s;
      z-index: 9999;
      display: flex;
      align-items: center;
      gap: 6px;
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      user-select: none;
    }
    .chat-btn:hover {
      box-shadow: 0 6px 22px rgba(37, 99, 235, 0.55);
      transform: scale(1.05);
    }
    .chat-btn .chat-icon {
      font-size: 1rem;
    }
    @media (max-width: 480px) {
      /* 升学计算器链接放大 */
    .nav-calc-link {
      font-size: 1rem;
      font-weight: 700;
      padding: 0.4rem 1rem;
      border-radius: 20px;
      background: #f0fdf4;
      color: #16a34a;
      transition: all 0.2s;
    }
    .nav-calc-link:hover {
      background: #dcfce7;
      transform: scale(1.05);
    }
      .chat-btn {
        bottom: 16px;
        right: 16px;
        top: auto;
        transform: none;
        padding: 0.45rem 0.9rem;
        font-size: 0.75rem;
        border-radius: 50px;
        box-shadow: 0 4px 18px rgba(37, 99, 235, 0.5);
      }
    }
  
/* Extracted from public/dashboard.html style block #5, original lines 2042-4759. */
    .modal-overlay {
      position: fixed; top:0; left:0; right:0; bottom:0;
      background: rgba(0,0,0,0.5);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
    }
    .modal-overlay.show { display: flex; }
    .modal {
      background: white;
      border-radius: 16px;
      padding: 1.2rem;
      width: 90%;
      max-width: 600px;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }
    .modal h3 { margin-bottom: 1.5rem; font-size: 1.2rem; }
    .modal .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
    .modal .btn-group { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
    .modal .btn-group .btn { flex: 1; }
    .admin-card {
      background: #fff;
      border-radius: 10px;
      padding: 1.25rem 1.25rem 1.25rem 1rem;
      border: 1px solid var(--gray-200);
      border-left: 4px solid var(--gray-300);
    }
    .admin-card h4 {
      display: flex; align-items: center; gap: 8px;
    }
    .admin-card h4::before {
      content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    }
    .pwd-wrap {
      position: relative; display: flex; align-items: center;
    }
    .pwd-wrap input { flex: 1; padding-right: 40px !important; }
    .pwd-toggle {
      position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
      background: none; border: none; cursor: pointer; padding: 4px;
      color: #94a3b8; display: flex; align-items: center;
      -webkit-tap-highlight-color: transparent;
    }
    .pwd-toggle:active { color: #64748b; }

    .batch-actions {
      display: inline-flex;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      padding: 4px 6px 4px 12px;
      gap: 6px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }
    .btn-batch {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 5px 12px; border: none; border-radius: 8px;
      font-size: 12px; font-weight: 600; cursor: pointer;
      font-family: inherit; transition: all 0.12s;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-batch._edit {
      background: #eef2ff; color: #4f46e5;
    }
    .btn-batch._edit:active { background: #e0e7ff; transform: scale(0.95); }
    .btn-batch._del {
      background: #fef2f2; color: #dc2626;
    }
    .btn-batch._del:active { background: #fee2e2; transform: scale(0.95); }

    @media (max-width: 600px) {
      .admin-section-header { align-items: flex-start; gap: 10px; }
      .course-admin-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
      .course-admin-actions .batch-actions { order: 3; width: 100%; box-sizing: border-box; justify-content: space-between; }
      .course-admin-actions .btn-batch { flex: 1; justify-content: center; min-height: 34px; }
      .course-admin-actions #batch-count { white-space: nowrap; }
    }

    .admin-section { margin-bottom: 2rem; }
    .conv-item { transition: all 0.2s ease; }
    .conv-item:hover { background: var(--primary-light) !important; }

    /* Toast */
    #toast-container {
      position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
      z-index: 9999; display: flex; flex-direction: column; gap: 8px;
      pointer-events: none;
    }
    .toast {
      padding: 12px 24px; border-radius: 12px;
      font-size: 0.9rem; font-weight: 500;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
      animation: toastIn 0.3s ease;
      pointer-events: auto;
      white-space: nowrap;
      overflow: hidden; text-overflow: ellipsis; max-width: 90vw;
    }
    .toast.toast-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
    .toast.toast-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
    @keyframes toastIn {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* 学科多选复选框 */
    .subj-cb-grid {
      display: flex; flex-wrap: wrap; gap: 10px;
    }
    .subj-cb {
      display: inline-flex; align-items: center; justify-content: center;
      padding: 8px 18px;
      border: 2px solid #e2e8f0; border-radius: 10px;
      cursor: pointer; font-size: 0.9rem; font-weight: 500;
      transition: all 0.2s ease;
      user-select: none;
      background: #f8fafc;
      color: #475569;
    }
    .subj-cb:hover { border-color: #a5b4fc; background: #eef2ff; color: #4338ca; }
    .subj-cb:has(input:checked) {
      border-color: #6366f1; background: #4f46e5; color: #fff;
      box-shadow: 0 2px 8px rgba(79,70,229,0.3);
    }
    .subj-cb input { display: none; }

    .conv-item.active { background: #dbeafe !important; border-color: #6366f1 !important; box-shadow: 0 0 0 1px #6366f1; }

    @media (max-width: 600px) { .modal .form-row { grid-template-columns: 1fr; gap: 0.5rem; } .modal .form-group { margin-bottom: 0.4rem; } .modal h3 { margin-bottom: 0.8rem; } .modal .btn-group { margin-top: 0.8rem; } }
    @media (max-width: 768px) {
      .admin-card .form-row { grid-template-columns: 1fr !important; }
      .admin-card .form-row-3 { grid-template-columns: 1fr !important; }
      /* 课程管理表格横向滚动 */
      div[style*="overflow-x:auto"] { -webkit-overflow-scrolling: touch; }
      div[style*="overflow-x:auto"] table { min-width: 600px; }

      /* 按钮触控优化 */
      .btn { min-height: 40px; }
      .btn-sm { min-height: 36px; }
      input, select, textarea { font-size: 16px !important; } /* iOS 防缩放 */
      .modal { padding: 1.25rem; }
      .modal .btn-group { flex-direction: column; }
      .modal .btn-group .btn { width: 100%; }
      .admin-section--wide { max-width: 1436px; }
      #tab-admin-types .admin-section--wide,
      #tab-admin-campus .admin-section--wide { width: 100%; }
      .tab-content.active { padding-left: 0; padding-right: 0; }
    }
    /* 学科多选 */
    .subject-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      min-height: 42px;
      align-items: center;
    }
    .subject-grid .subject-empty {
      color: var(--gray-400);
      font-size: 0.9rem;
    }

            /* ===== 学习资料管理 ===== */
    .mat-cat-tabs { justify-content: center; display: flex; gap: 10px; margin-bottom: 12px; }
    .mat-tab { padding: 8px 28px; border-radius: 99px; border: none; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; background: #f1f5f9; color: #64748b; transition: all 0.2s; }
    .mat-tab.active { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,0.2); }
    .mat-tab:active { transform: scale(0.96); }
    .mat-add-row { background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
    .mat-add-fields { display: flex; flex-wrap: wrap; gap: 10px; }
    .mat-add-grp { flex: 1; min-width: 130px; }
    .mat-add-grp label { display: block; font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 3px; }
    .mat-add-input { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; box-sizing: border-box; transition: border-color 0.2s; }
    .mat-add-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,0.1); }
    .mat-add-row-actions { display: flex; gap: 8px; margin-top: 10px; }
    .mat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; transition: all 0.2s; }
    .mat-card:hover { border-color: #cbd5e1; box-shadow: 0 1px 6px rgba(0,0,0,0.04); }
    .mat-card-top { display: flex; align-items: flex-start; gap: 12px; }
    .mat-card-num { width: 30px; height: 30px; border-radius: 8px; background: #f1f5f9; color: #64748b; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
    .mat-card-body { flex: 1; min-width: 0; }
    .mat-card-title { font-size: 15px; font-weight: 700; color: #1e293b; }
    .mat-card-desc { font-size: 13px; color: #94a3b8; margin-top: 2px; }
    .mat-card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #4f46e5; text-decoration: none; margin-top: 6px; }
    .mat-card-link:hover { text-decoration: underline; }
    .mat-card-actions { display: flex; gap: 6px; margin-top: 8px; }
    .mat-card-edit { padding: 6px 14px; border-radius: 8px; border: none; background: #eef2ff; color: #4f46e5; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }
    .mat-card-edit:hover { background: #dbeafe; }
    .mat-card-del { padding: 6px 14px; border-radius: 8px; border: none; background: #fef2f2; color: #ef4444; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }
    .mat-card-del:hover { background: #fee2e2; }
    .mat-edit-fields { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
    .mat-edit-grp { flex: 1; min-width: 100px; }
    .mat-edit-grp label { display: block; font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 3px; }
    .mat-edit-input { width: 100%; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; box-sizing: border-box; }
    .mat-edit-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,0.1); }
    .mat-edit-actions { display: flex; gap: 6px; }
    .btn-light { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; }
    .btn-light:hover { background: #e2e8f0; }
    .mat-empty { text-align: center; padding: 2rem; color: #94a3b8; font-size: 14px; }
    @media (max-width: 640px) { .mat-tab { flex: 1; text-align: center; border-radius: 10px; } .mat-cat-tabs { justify-content: stretch; } .mat-card { padding: 12px; } .mat-add-grp { min-width: 100%; } .mat-edit-grp { min-width: 100%; } }

/* ===== 升学计算器 ===== */
    .calc-card-inline { max-width:700px; margin:0 auto; background:white; border-radius:20px; box-shadow:0 8px 40px rgba(79,70,229,0.1); overflow:hidden; }
    .calc-card-inline .calc-header { background:linear-gradient(135deg,#312e81,#4f46e5); color:white; padding:1.5rem 2rem; text-align:center; }
    .calc-card-inline .calc-header h1 { font-size:1.4rem; margin:0 0 0.4rem; }
    .calc-card-inline .calc-header p { opacity:0.85; font-size:0.85rem; margin:0; }
    .calc-card-inline .calc-body { padding:1.5rem 2rem; }
    .calc-card-inline .calc-steps { display:flex; justify-content:center; align-items:center; gap:0; margin-bottom:1.5rem; }
    .calc-card-inline .calc-step { display:flex; align-items:center; gap:8px; font-size:0.85rem; color:var(--gray-400); }
    .calc-card-inline .calc-step .num { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:0.8rem; font-weight:700; background:var(--gray-200); color:white; transition:all 0.3s; }
    .calc-card-inline .calc-step.active .num { background:var(--primary); box-shadow:0 2px 8px rgba(79,70,229,0.3); }
    .calc-card-inline .calc-step.done .num { background:#22c55e; }
    .calc-card-inline .calc-step.active { color:var(--primary); font-weight:600; }
    .calc-card-inline .calc-step.done { color:#22c55e; }
    .calc-card-inline .step-arrow { color:var(--gray-300); margin:0 12px; }
    .calc-card-inline .calc-form { display:block; }
    .calc-card-inline .calc-form.hidden { display:none; }
    .calc-card-inline .form-group { margin-bottom:1rem; }
    .calc-card-inline .form-group label { display:block; font-size:0.85rem; font-weight:600; color:var(--gray-700); margin-bottom:5px; }
    .calc-card-inline .form-group label .hint { font-weight:400; color:var(--gray-400); font-size:0.8rem; }
    .calc-card-inline .form-group input, .calc-card-inline .form-group select { width:100%; padding:0.6rem 0.9rem; border:2px solid var(--gray-200); border-radius:10px; font-size:0.95rem; outline:none; transition:all 0.2s; box-sizing:border-box; }
    .calc-card-inline .form-group input:focus, .calc-card-inline .form-group select:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(79,70,229,0.1); }
    .calc-card-inline .score-group { position:relative; }
    .calc-card-inline .score-display { font-size:2.2rem; font-weight:800; text-align:center; color:var(--primary); margin:0.4rem 0; }
    .calc-card-inline .score-slider { width:100%; -webkit-appearance:none; height:6px; border-radius:3px; background:linear-gradient(to right,#dc2626,#eab308,#22c55e); outline:none; }
    .calc-card-inline .score-slider::-webkit-slider-thumb { -webkit-appearance:none; width:22px; height:22px; border-radius:50%; background:white; border:3px solid var(--primary); cursor:pointer; box-shadow:0 2px 8px rgba(79,70,229,0.3); }
    .calc-card-inline .score-labels { display:flex; justify-content:space-between; font-size:0.75rem; color:var(--gray-400); margin-top:4px; }
    .calc-card-inline .calc-btn { width:100%; padding:0.75rem; border:none; border-radius:12px; font-size:1rem; font-weight:700; cursor:pointer; transition:all 0.2s; }
    .calc-card-inline .calc-btn.primary { background:linear-gradient(135deg,#312e81,#4f46e5); color:white; box-shadow:0 4px 16px rgba(79,70,229,0.3); }
    .calc-card-inline .calc-btn.primary:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(79,70,229,0.4); }
    .calc-card-inline .calc-btn.primary:disabled { opacity:0.5; cursor:not-allowed; transform:none; }
    .calc-card-inline .calc-btn.outline { background:white; color:var(--primary); border:2px solid var(--primary); max-width:200px; }
    .calc-card-inline .calc-btn.outline:hover { background:#f0f4ff; }
    .calc-card-inline .calc-results { display:none; }
    .calc-card-inline .calc-results.show { display:block; }
    .calc-card-inline .result-score { text-align:center; padding:1.25rem; background:linear-gradient(135deg,#f0f4ff,#e0e7ff); border-radius:16px; margin-bottom:1.25rem; }
    .calc-card-inline .result-score .big { font-size:2.5rem; font-weight:800; color:var(--primary); }
    .calc-card-inline .result-section { margin-bottom:1.25rem; }
    .calc-card-inline .result-section h3 { font-size:0.9rem; font-weight:700; margin:0 0 0.6rem; display:flex; align-items:center; gap:8px; }
    .calc-card-inline .school-card { padding:0.85rem 1.1rem; border-radius:12px; border-left:4px solid; display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
    .calc-card-inline .school-card .name { font-weight:600; font-size:0.9rem; }
    .calc-card-inline .school-card .line { font-size:0.78rem; color:var(--gray-500); }
    .calc-card-inline .school-card .prob { width:52px; height:24px; border-radius:12px; font-size:0.72rem; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
    .calc-card-inline .school-card.dash { border-color:#22c55e; background:#f0fdf4; }
    .calc-card-inline .school-card.dash .prob { background:#22c55e; color:white; }
    .calc-card-inline .school-card.steady { border-color:#4f46e5; background:#eef2ff; }
    .calc-card-inline .school-card.steady .prob { background:#4f46e5; color:white; }
    .calc-card-inline .school-card.safe { border-color:#eab308; background:#fefce8; }
    .calc-card-inline .school-card.safe .prob { background:#eab308; color:white; }
    .calc-card-inline .school-card.gap { border-color:#94a3b8; background:#f8fafc; }
    .calc-card-inline .school-card.gap .prob { background:#94a3b8; color:white; }
    .calc-card-inline .fade-up { opacity:0; transform:translateY(20px); animation:fadeUp 0.5s ease forwards; }
    .calc-card-inline .fade-up:nth-child(2) { animation-delay:0.1s; }
    .calc-card-inline .fade-up:nth-child(3) { animation-delay:0.2s; }
    @keyframes fadeUp { to { opacity:1; transform:translateY(0); } }
    @media (max-width:480px) {
      .calc-card-inline .calc-body { padding:1rem; }
      .calc-card-inline .calc-header { padding:1.25rem; }
      .calc-card-inline .calc-header h1 { font-size:1.2rem; }
      .calc-card-inline .calc-step span { display:none; }
      .calc-card-inline .score-display { font-size:1.8rem; }
      .calc-card-inline .result-score .big { font-size:2rem; }
    }

/* 预约记录手机端卡片 */
@media (max-width: 640px) {
  .admin-card table, .admin-card thead, .admin-card tbody, .admin-card th, .admin-card td, .admin-card tr { display:block; }
  .admin-card thead tr { display:none; }
  .admin-card tbody tr { margin-bottom:0.75rem; border:1px solid #e5e7eb; border-radius:10px; padding:0.75rem; background:#fff; }
  .admin-card tbody td { padding:4px 0; font-size:0.82rem; border:none; text-align:left; }
  .admin-card tbody td:before { content:attr(data-label); font-weight:600; display:inline-block; width:80px; color:var(--gray-500); }
}

/* 页面视觉优化 */
.admin-section {
  background: #fff;
  border-radius: 12px;
  padding: 0.25rem 1.25rem 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
}
@media (max-width: 768px) {
  .admin-section { padding: 0.1rem 1rem 0.75rem 1rem; margin-left: 0; margin-right: 0; }
  .reg-card { padding: 1.25rem 1.2rem; }
  .section-header { padding-left: 1.2rem; padding-right: 1.2rem; }
  .my-reg-item { padding-left: 1.2rem; padding-right: 1.2rem; }
  .photos-wrap { padding: 1.25rem; }
  .msg-user-head { padding: 1rem 1.25rem; }
  .msg-user-card .msg-user-body { padding: 1rem 1.25rem; }
  .reg-header { padding: 0.8rem 1.25rem; }
  .ann-card { padding: 1rem 1.25rem; }
  .existing-reg-banner { padding: 1rem 1.25rem; }
  .reg-blocked-card { padding: 1.5rem 1.25rem; }
  .ann-admin-item { padding-left: 1.25rem; padding-right: 1.25rem; }
  .info-card { padding: 1.25rem; }
  .photo-gallery-wrap { padding: 1.25rem; }
  .photo-card-upload { padding: 0.8rem 1.25rem; }
}
.admin-section--wide {
  max-width: 1436px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-section-header h2 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
}
.header-actions {
  display: flex;
  gap: 6px;
}
.btn-primary {
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-primary:hover { background: #4338ca; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(79,70,229,0.2); }
.btn-primary:active { transform: translateY(0); }
.ai-ctrl-head .btn { padding:6px 20px; font-size:0.82rem; }
@media (max-width: 600px) { .ai-ctrl-head .btn { min-height:38px; } }
.btn-outline {
  background: transparent;
  color: #475569;
  border: 1px solid #d1d5db;
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-outline:hover { background: #f1f5f9; border-color: #94a3b8; }
.btn-sm { padding: 4px 12px; font-size: 0.78rem; }

.mat-cat-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.mat-tab {
  padding: 6px 22px; border-radius: 99px; border: none; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; font-family: inherit; background: #f1f5f9; color: #64748b;
  transition: all 0.2s;
}
.mat-tab.active {
  background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}
.mat-tab:hover:not(.active) { background: #e2e8f0; }
.mat-tab:active { transform: scale(0.95); }

.mat-add-row {
  background: #f8fafc; border: 1.5px dashed #cbd5e1;
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
}
.mat-add-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.mat-add-grp { flex: 1; min-width: 120px; }
.mat-add-grp label { display: block; font-size: 0.75rem; font-weight: 600; color: #64748b; margin-bottom: 2px; }
.mat-add-input { width: 100%; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.85rem; font-family: inherit; outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.mat-add-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,0.1); }
.mat-add-row-actions { display: flex; gap: 6px; margin-top: 8px; }

.mat-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px;
  transition: all 0.15s;
}
.mat-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.mat-card-top { display: flex; align-items: flex-start; gap: 10px; }
.mat-card-num {
  background: #f1f5f9; color: #64748b; font-size: 0.78rem; font-weight: 700;
  width: 26px; height: 26px; display: flex; align-items: center;
  justify-content: center; border-radius: 6px; flex-shrink: 0;
}
.mat-card-body { flex: 1; min-width: 0; }
.mat-card-title { font-weight: 600; font-size: 0.9rem; color: #1e293b; }
.mat-card-desc { font-size: 0.8rem; color: #94a3b8; margin-top: 1px; }
.mat-card-link { font-size: 0.78rem; }
.mat-card-link a { color: #4f46e5; text-decoration: none; }
.mat-card-link a:hover { text-decoration: underline; }
.mat-card-actions { margin-top: 6px; display: flex; gap: 4px; }
.mat-card-edit, .mat-card-del {
  padding: 4px 10px; border-radius: 6px; border: none;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.15s;
}
.mat-card-edit { background: #eef2ff; color: #4f46e5; }
.mat-card-edit:hover { background: #dbeafe; }
.mat-card-del { background: #fef2f2; color: #ef4444; }
.mat-card-del:hover { background: #fee2e2; }

/* 用户端我的资料 */
.materials-hero { background: linear-gradient(118deg, #ecfdf5 0%, #dff7ef 48%, #dbeafe 100%); border-color: #ccefe2; }
.materials-hero-mark { color: #059669; }
.materials-hero-mark img { width: 34px; height: 34px; object-fit: contain; margin-bottom: 5px; filter: drop-shadow(0 7px 10px rgba(30,41,59,0.14)); }
.materials-notes .user-page-note-icon { background: #ecfdf5; color: #059669; }
.materials-panel {
  background: #fff; border: 1px solid #e2eee9; border-radius: 20px;
  box-shadow: 0 14px 34px rgba(30,41,59,0.07); overflow: hidden;
}
.materials-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 1rem 1.35rem; border-bottom: 1px solid #eef2f6;
  background: linear-gradient(135deg, #fff, #fbfefc);
}
.materials-panel-title, .materials-panel-subtitle { display: block; }
.materials-panel-title { color: #1e293b; font-size: 0.92rem; font-weight: 800; }
.materials-panel-subtitle { margin-top: 2px; color: #94a3b8; font-size: 0.7rem; }
.materials-refresh {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px;
  border: 1px solid #a7f3d0; border-radius: 9px; background: #ecfdf5; color: #059669;
  font-size: 0.72rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .18s;
}
.materials-refresh svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.materials-refresh:hover { background: #d1fae5; border-color: #6ee7b7; transform: translateY(-1px); }
#my-materials-list { padding: 0.85rem 1rem 1rem; background: #fbfefc; }
.my-mat-item {
  display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 0.65rem; padding: 1rem 1.05rem;
  background: #fff; border: 1px solid #e6f0eb; border-left: 3px solid #6ee7b7; border-radius: 16px;
  box-shadow: 0 3px 10px rgba(30,41,59,0.045); transition: all .22s;
}
.my-mat-item:last-child { margin-bottom: 0; }
.my-mat-item:hover { border-color: #a7f3d0; box-shadow: 0 8px 20px rgba(5,150,105,0.1); transform: translateY(-2px); }
.my-mat-item.junior { border-left-color: #fda4af; }
.my-mat-item.general { border-left-color: #6ee7b7; }
.my-mat-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  flex: 0 0 42px; border-radius: 13px; background: #ecfdf5;
}
.my-mat-icon img { width: 25px; height: 25px; object-fit: contain; }
.my-mat-item.junior .my-mat-icon { background: #fff1f2; }
.my-mat-item.general .my-mat-icon { background: #ecfdf5; }
.my-mat-main { flex: 1; min-width: 0; }
.my-mat-title { color: #1e293b; font-size: 0.88rem; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.my-mat-meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: #a0aec0; font-size: 0.68rem; }
.my-mat-category { padding: 2px 8px; border-radius: 99px; background: #ecfdf5; color: #059669; font-size: 0.65rem; font-weight: 800; }
.my-mat-item.junior .my-mat-category { background: #fff1f2; color: #be123c; }
.my-mat-item.general .my-mat-category { background: #ecfdf5; color: #047857; }
.my-mat-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.my-mat-open, .my-mat-remove {
  display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px;
  border-radius: 9px; font-size: 0.7rem; font-weight: 800; font-family: inherit; white-space: nowrap; transition: all .18s;
}
.my-mat-open { background: #eef2ff; border: 1px solid #c7d2fe; color: #4f46e5; text-decoration: none; }
.my-mat-open:hover { background: #e0e7ff; border-color: #a5b4fc; }
.my-mat-remove { background: #fff1f2; border: 1px solid #fecdd3; color: #e11d48; cursor: pointer; }
.my-mat-remove:hover { background: #ffe4e6; border-color: #fda4af; transform: translateY(-1px); }
.materials-loading, .materials-error, .materials-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 210px; padding: 2.5rem 1rem; text-align: center;
}
.materials-loading-icon, .materials-empty-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  margin-bottom: 5px; border-radius: 15px; background: #ecfdf5; box-shadow: 0 8px 18px rgba(5,150,105,0.1);
}
.materials-loading-icon img, .materials-empty-icon img { width: 30px; height: 30px; object-fit: contain; opacity: 0.7; }
.materials-loading strong, .materials-empty strong, .materials-error strong { color: #475569; font-size: 0.88rem; }
.materials-loading small, .materials-empty small, .materials-error small { color: #a0aec0; font-size: 0.72rem; }
.materials-empty a { color: #059669; font-weight: 700; text-decoration: none; }
.materials-empty a:hover { text-decoration: underline; }
.materials-error { color: #dc2626; }
.materials-error strong { color: #dc2626; }
@media (max-width: 640px) {
  .materials-hero { min-height: 150px; }
  .materials-hero-mark { width: 78px; height: 78px; padding: 0.65rem; border-radius: 20px; }
  .materials-hero-mark img { width: 24px; height: 24px; }
  .materials-panel-head { padding: 0.8rem 0.95rem; }
  .materials-panel-subtitle { font-size: 0.66rem; }
  #my-materials-list { padding: 0.7rem; }
  .my-mat-item { align-items: flex-start; padding: 0.9rem 0.8rem; }
  .my-mat-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  .my-mat-icon img { width: 22px; height: 22px; }
  .my-mat-actions { flex-direction: column; align-items: stretch; }
  .my-mat-open, .my-mat-remove { height: 30px; padding: 0 9px; }
}

#materials-empty { text-align: center; padding: 2.5rem 1rem; color: #94a3b8; font-size: 0.9rem; }
.btn-light { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 14px; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.btn-light:hover { background: #e2e8f0; }

/* 预约记录手机端卡片 */
@media (max-width: 640px) {
  .admin-card table, .admin-card thead, .admin-card tbody, .admin-card th, .admin-card td, .admin-card tr { display: block; }
  .admin-card thead tr { display: none; }
  .admin-card tbody tr { margin-bottom: 0.75rem; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0.75rem; background: #fff; }
  .admin-card tbody td { padding: 4px 0; font-size: 0.82rem; border: none; text-align: left; }
  .admin-card tbody td:before { content: attr(data-label); font-weight: 600; display: inline-block; width: 80px; color: #64748b; }
}

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    /* ===== 留言板样式 ===== */
    .msg-user-card {
      background: #fff;
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid #eef2f6;
      box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    }
    .msg-user-head {
      background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 50%, #e0e7ff 100%);
      padding: 1.4rem 1.8rem;
      border-bottom: 1px solid #c7d2fe;
      display: flex; align-items: center; gap: 14px;
    }
    .msg-user-head-icon {
      width: 46px; height: 46px; flex-shrink: 0;
      background: linear-gradient(135deg, #4f46e5, #6366f1);
      border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 12px rgba(79,70,229,0.25);
    }
    .msg-user-head-icon svg {
      width: 20px; height: 20px;
      fill: none; stroke: #fff; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round;
    }
    .msg-user-head-text {
      flex: 1; min-width: 0;
    }
    .msg-user-head-title {
      font-size: 1.05rem; font-weight: 700; color: #1e293b;
    }
    .msg-user-head-desc {
      font-size: 0.8rem; color: #64748b;
      margin: 2px 0 0;
    }
    .msg-user-body {
      padding: 1.5rem 1.8rem 1.8rem;
    }
    .msg-user-body textarea {
      width: 100%; padding: 14px 18px;
      border: 1.8px solid #e2e8f0; border-radius: 14px;
      font-size: 0.9rem; font-family: inherit; line-height: 1.8;
      outline: none; resize: vertical; min-height: 130px;
      box-sizing: border-box;
      transition: all .2s;
      background: #fafbfc;
      color: #1e293b;
    }
    .msg-user-body textarea:hover {
      border-color: #cbd5e1;
      background: #fff;
    }
    .msg-user-body textarea:focus {
      border-color: #4f46e5;
      box-shadow: 0 0 0 4px rgba(79,70,229,0.08);
      background: #fff;
    }
    .msg-user-body textarea::placeholder { color: #b0b8c4; }
    .msg-user-foot {
      display: flex; justify-content: space-between; align-items: center;
      margin-top: 14px;
    }
    .msg-user-count {
      font-size: 0.78rem; color: #b0b8c4;
      font-weight: 500;
    }
    .msg-submit-btn {
      padding: 10px 32px; border: none; border-radius: 12px;
      background: linear-gradient(135deg, #4f46e5, #6366f1);
      color: #fff; font-size: 0.88rem; font-weight: 700;
      cursor: pointer; font-family: inherit;
      transition: all .2s;
      display: inline-flex; align-items: center; gap: 8px;
      box-shadow: 0 4px 14px rgba(79,70,229,0.25);
    }
    .msg-submit-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(79,70,229,0.35);
      background: linear-gradient(135deg, #4338ca, #4f46e5);
    }
    .msg-submit-btn:active { transform: translateY(0) scale(0.97); }
    .msg-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .msg-submit-btn svg {
      width: 16px; height: 16px;
      fill: none; stroke: currentColor; stroke-width: 2.5;
      stroke-linecap: round; stroke-linejoin: round;
    }

    /* 管理员留言列表 */
    .msg-mgmt-wrap {
      background: #fff;
      border-radius: 20px;
      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;
    }
    .msg-item {
      display: flex; align-items: stretch;
      border-bottom: 1px solid #f1f5f9;
      transition: all .2s;
      position: relative;
    }
    .msg-item:last-child { border-bottom: none; }
    .msg-item:hover { background: #fafcfd; }
    .msg-item.unread {
      background: linear-gradient(135deg, #f0f7ff, #fafcff);
    }
    .msg-item.unread::before {
      content: '';
      position: absolute; left: 0; top: 0; bottom: 0;
      width: 4px;
      background: linear-gradient(to bottom, #4f46e5, #6366f1);
      border-radius: 0 3px 3px 0;
    }
    .msg-item-check {
      display: flex; align-items: flex-start;
      padding: 18px 0 18px 18px;
    }
    .msg-item-check input[type=checkbox] {
      width: 18px; height: 18px; margin-top: 3px;
      accent-color: #4f46e5; cursor: pointer;
      border-radius: 4px;
    }
    .msg-item-body {
      flex: 1; padding: 16px 20px 16px 14px;
      min-width: 0;
    }
    .msg-item-top {
      display: flex; justify-content: space-between;
      align-items: baseline; gap: 8px; margin-bottom: 6px;
    }
    .msg-item-user {
      display: flex; align-items: center; gap: 10px;
    }
    .msg-item-avatar {
      width: 36px; height: 36px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.85rem; font-weight: 700; color: #fff;
      flex-shrink: 0;
      box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
    .msg-item-avatar._0 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
    .msg-item-avatar._1 { background: linear-gradient(135deg, #6366f1, #06b6d4); }
    .msg-item-avatar._2 { background: linear-gradient(135deg, #10b981, #14b8a6); }
    .msg-item-avatar._3 { background: linear-gradient(135deg, #f59e0b, #f97316); }
    .msg-item-avatar._4 { background: linear-gradient(135deg, #ef4444, #ec4899); }
    .msg-item-name {
      font-weight: 700; font-size: 0.88rem; color: #1e293b;
    }
    .msg-item-meta-tags {
      display: flex; gap: 6px; align-items: center;
    }
    .msg-item-tag {
      font-size: 0.7rem; padding: 2px 10px; border-radius: 99px;
      font-weight: 600;
    }
    .msg-item-tag.grade {
      background: #eef2ff; color: #4f46e5;
      border: 1px solid #c7d2fe;
    }
    .msg-item-tag.phone {
      background: #f0fdf4; color: #059669;
      border: 1px solid #a7f3d0;
    }
    .msg-item-time {
      font-size: 0.73rem; color: #94a3b8; flex-shrink: 0;
      font-weight: 500;
    }
    .msg-item-text {
      font-size: 0.9rem; color: #475569; line-height: 1.8;
      white-space: pre-wrap; word-break: break-word;
      margin-bottom: 10px;
      padding: 12px 16px;
      background: #f8fafc;
      border-radius: 12px;
      border: 1px solid #f1f5f9;
    }
    .msg-item-actions {
      display: flex; gap: 8px;
    }
    .msg-item-del {
      padding: 6px 18px; border-radius: 8px; border: 1.5px solid #fecaca;
      font-size: 0.75rem; font-weight: 700; cursor: pointer;
      font-family: inherit;
      background: #fff; color: #dc2626;
      transition: all .2s;
    }
    .msg-item-del:hover { background: #fef2f2; border-color: #ef4444; transform: translateY(-1px); }
    .msg-item-del:active { transform: translateY(0) scale(0.97); }
    .msg-empty {
      text-align: center; padding: 4rem 1rem; color: #94a3b8; font-size: 0.9rem;
    }
    .msg-bar {
      display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    }
    .msg-bar label {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 0.83rem; cursor: pointer; color: #475569;
      padding: 6px 14px; border-radius: 8px;
      user-select: none;
      border: 1.5px solid #e2e8f0;
      background: #fff;
      transition: all .15s;
    }
    .msg-bar label:hover { background: #f1f5f9; border-color: #cbd5e1; }
    .msg-batch-bar {
      display: inline-flex; align-items: center; gap: 10px;
      font-size: 0.83rem;
      background: #fff;
      border: 1.5px solid #e2e8f0;
      padding: 4px 6px 4px 14px;
      border-radius: 10px;
    }
    #msg-batch-count {
      font-weight: 600; color: #4f46e5;
    }
    .msg-item-actions .msg-item-del.batch-btn {
      background: #dc2626;
      color: #fff;
      border: none;
      padding: 6px 18px;
      border-radius: 8px;
      font-size: 0.75rem;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      transition: all .2s;
    }
    .msg-item-actions .msg-item-del.batch-btn:hover {
      background: #b91c1c;
    }
    /* 筛选标签 */
    .msg-filter-tabs {
      display: flex; gap: 4px;
      background: #f1f5f9; border-radius: 10px;
      padding: 3px;
    }
    .msg-filter-tab {
      padding: 5px 16px; border: none; border-radius: 8px;
      font-size: 0.78rem; font-weight: 600; cursor: pointer;
      font-family: inherit; background: transparent; color: #64748b;
      transition: all .15s;
    }
    .msg-filter-tab:hover { color: #334155; }
    .msg-filter-tab.active {
      background: #fff; color: #1e293b;
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
    /* 回复区域 */
    .msg-reply-section {
      margin-top: 10px;
      border-top: 1px dashed #e2e8f0;
      padding-top: 10px;
    }
    .msg-reply-display {
      display: flex; gap: 10px; align-items: flex-start;
      padding: 10px 14px;
      background: #f0fdf4; border-radius: 10px;
      border: 1px solid #bbf7d0;
    }
    .msg-reply-avatar {
      width: 28px; height: 28px; border-radius: 8px;
      background: linear-gradient(135deg, #10b981, #059669);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.7rem; color: #fff; font-weight: 700; flex-shrink: 0;
    }
    .msg-reply-content {
      flex: 1; font-size: 0.85rem; color: #065f46; line-height: 1.7;
    }
    .msg-reply-meta {
      font-size: 0.7rem; color: #6ee7b7; margin-top: 2px;
    }
    .msg-reply-form {
      display: flex; gap: 8px; align-items: flex-start;
    }
    .msg-reply-form textarea {
      flex: 1; padding: 9px 14px;
      border: 1.8px solid #d1fae5; border-radius: 10px;
      font-size: 0.82rem; font-family: inherit; line-height: 1.6;
      outline: none; resize: vertical; min-height: 48px;
      background: #fafdfc;
      transition: all .2s;
      box-sizing: border-box;
    }
    .msg-reply-form textarea:focus {
      border-color: #10b981;
      box-shadow: 0 0 0 3px rgba(16,185,129,0.08);
      background: #fff;
    }
    .msg-reply-form textarea::placeholder { color: #a7f3d0; }
    .msg-reply-btn {
      padding: 8px 18px; border: none; border-radius: 10px;
      background: linear-gradient(135deg, #10b981, #059669);
      color: #fff; font-size: 0.78rem; font-weight: 700;
      cursor: pointer; font-family: inherit; flex-shrink: 0;
      transition: all .15s;
      box-shadow: 0 2px 8px rgba(16,185,129,0.2);
    }
    .msg-reply-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(16,185,129,0.3);
    }
    .msg-reply-delete {
      font-size: 0.7rem; color: #94a3b8; cursor: pointer;
      padding: 2px 8px; border-radius: 6px; border: none;
      background: transparent; font-family: inherit;
      transition: all .15s;
    }
    .msg-reply-delete:hover { color: #ef4444; background: #fef2f2; }
    /* 用户端留言历史 */
    .my-msg-list {
      margin-top: 1.2rem;
    }
    .my-msg-item {
      background: #fff; border-radius: 14px;
      padding: 1rem 1.2rem; margin-bottom: 0.75rem;
      box-shadow: 0 1px 4px rgba(0,0,0,0.04);
      border: 1px solid #f1f5f9;
      transition: all .15s;
    }
    .my-msg-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
    .my-msg-time {
      font-size: 0.75rem; color: #94a3b8; margin-bottom: 6px;
    }
    .my-msg-content {
      font-size: 0.9rem; color: #475569; line-height: 1.75;
      padding: 8px 14px; background: #f8fafc;
      border-radius: 10px; border: 1px solid #f1f5f9;
    }
    .my-msg-reply {
      margin-top: 8px; padding: 10px 14px;
      background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
      border-radius: 10px; border: 1px solid #bbf7d0;
      display: flex; gap: 10px; align-items: flex-start;
    }
    .my-msg-reply-avatar {
      width: 26px; height: 26px; border-radius: 7px;
      background: linear-gradient(135deg, #10b981, #059669);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.65rem; color: #fff; font-weight: 700; flex-shrink: 0;
    }
    .my-msg-reply-body {
      flex: 1; font-size: 0.85rem; color: #065f46; line-height: 1.7;
    }
    .my-msg-reply-label {
      font-size: 0.7rem; color: #6ee7b7; font-weight: 600; margin-bottom: 2px;
    }
    /* ===== 报名表单全新样式 ===== */
    #tab-register {
      animation: regFadeIn 0.4s ease;
    }
    @keyframes regFadeIn {
      0% { opacity: 0; }
      100% { opacity: 1; }
    }
    .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; } .section-header { padding-left: 0.95rem; padding-right: 0.95rem; } .my-reg-item { padding-left: 0.95rem; padding-right: 0.95rem; } .photos-wrap { padding: 1rem; } .msg-user-head { padding: 0.8rem 1rem; } .msg-user-card .msg-user-body { padding: 0.8rem 1rem; } .admin-section { padding: 0.1rem 1rem 0.75rem 1rem; } .reg-header { padding: 0.6rem 1rem; } .ann-card { padding: 0.8rem 1rem; } .existing-reg-banner { padding: 0.8rem 1rem; } .reg-blocked-card { padding: 1.2rem 1rem; } .info-card { padding: 1rem; } .photo-gallery-wrap { padding: 1rem; } .photo-card-upload { padding: 0.6rem 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; }
    /* 学科多选增强 */
    .subject-grid {
      display: flex; flex-wrap: wrap; gap: 10px;
      min-height: 42px; align-items: center;
    }
    .subject-grid .subject-empty {
      color: #94a3b8; font-size: 0.8rem;
      padding: 8px 0;
    }
    /* 学科选择区提示 */
    #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;
    }

    /* ===== 机构信息全新样式 ===== */
    #tab-admin-info {
      animation: regFadeIn 0.3s ease;
    }

    .info-card {
      background: #fff; border-radius: 18px; padding: 1.2rem;
      box-shadow: 0 2px 12px rgba(0,0,0,0.06);
      border: 1px solid #f0f0f0;
    }
    .info-section-title {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 0.75rem;
    }
    .info-section-title span:last-child {
      font-weight: 600; font-size: 0.82rem; color: #1e293b;
    }
    .info-step-num {
      display: inline-flex; align-items: center; justify-content: center;
      width: 20px; height: 20px; border-radius: 50%;
      background: linear-gradient(135deg, #4f46e5, #6366f1);
      color: #fff; font-size: 0.7rem; font-weight: 700;
      flex-shrink: 0;
    }
    .info-grid {
      display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem;
    }
    @media (min-width: 601px) { .info-field input { max-width: none; } }
    @media (max-width: 600px) { .info-grid { grid-template-columns: 1fr; } }
    .info-field {
      display: flex; flex-direction: column; gap: 5px;
    }
    .info-field label {
      font-weight: 600; font-size: 0.78rem; color: #475569;
    }
    .info-field input {
      padding: 8px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px;
      font-size: 0.82rem; outline: none; transition: all .2s;
      background: #f8fafc; font-family: inherit;
    }
    .info-field input:hover {
      border-color: #cbd5e1; background: #fff;
    }
    .info-field input:focus {
      border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
      background: #fff;
    }
    .info-field input::placeholder { color: #94a3b8; }
    .info-area-card {
      display: flex; gap: 0; margin-bottom: 0.75rem;
      background: #fafbfc; border-radius: 14px;
      border: 1px solid #eef2f6;
      overflow: hidden; transition: box-shadow .2s;
    }
    .info-area-card:hover {
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
      border-color: #e2e8f0;
    }
    .info-area-card-accent {
      width: 4px; flex-shrink: 0;
      background: linear-gradient(to bottom, #6366f1, #60a5fa);
    }
    .info-area-card-body {
      flex: 1; padding: 0.8rem 1rem;
    }
    .info-area-header {
      display: flex; align-items: center; gap: 6px;
      margin-bottom: 6px;
    }
    .info-area-header label {
      font-weight: 700; font-size: 0.8rem; color: #1e293b;
    }
    .info-area-card textarea {
      width: 100%; box-sizing: border-box;
      padding: 8px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px;
      font-size: 0.82rem; outline: none; transition: all .2s;
      background: #fff; font-family: inherit; resize: vertical;
      min-height: 80px; line-height: 1.6;
    }
    .info-area-card textarea:focus {
      border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
    }
    .info-area-card textarea::placeholder { color: #94a3b8; }
    .info-save-row {
      display: flex; justify-content: center; margin-top: 1rem;
    }
    .info-save-btn {
      padding: 8px 28px; border: none; border-radius: 10px;
      background: linear-gradient(135deg, #4f46e5, #4338ca);
      color: #fff; font-size: 0.85rem; font-weight: 600;
      cursor: pointer; transition: opacity .15s;
      font-family: inherit;
      box-shadow: 0 3px 12px rgba(79,70,229,0.25);
    }
    .info-save-btn:hover {
      opacity: 0.9;
    }
    #info-message { margin-top: 0.5rem; }

    /* ===== 预约记录样式 ===== */
    .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); }
    .section-header {
      display: flex; align-items: center; gap: 8px;
      font-size: 1.05rem; font-weight: 700; color: #1e293b;
      margin-top: 0.5rem;
      margin-bottom: 0.5rem;
      padding: 0.6rem 1rem;
      background: linear-gradient(135deg, #f8fafc, #f1f5f9);
      border-radius: 12px;
      border-left: 4px solid #4f46e5;
    }
    .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;
    }
    .btn-export {
      margin-left: auto;
      padding: 0.35rem 0.75rem; border: 1.5px solid #c7d2fe; border-radius: 8px;
      background: #fff; color: #4f46e5;
      font-size: 0.73rem; font-weight: 700;
      cursor: pointer; transition: all .15s;
      font-family: inherit; white-space: nowrap;
    }
    .btn-export:hover {
      background: #eef2ff; border-color: #a5b4fc;
    }
    .btn-export:active { transform: scale(0.96); }

    /* ===== 最新消息样式 ===== */
    .news-hero { background: linear-gradient(118deg, #eef2ff 0%, #e0e7ff 52%, #dbeafe 100%); }
    .news-hero-mark { color: #4f46e5; }
    .news-hero-mark img { width: 34px; height: 34px; object-fit: contain; margin-bottom: 5px; filter: drop-shadow(0 7px 10px rgba(30,41,59,0.14)); }
    .news-notes .user-page-note-icon { background: #eef2ff; color: #4f46e5; }
    .announcements-panel {
      background: #fff; border: 1px solid #e5eaf2; border-radius: 20px;
      box-shadow: 0 14px 34px rgba(30,41,59,0.07); overflow: hidden;
    }
    .announcements-panel-head {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 1rem 1.35rem; border-bottom: 1px solid #eef2f6;
      background: linear-gradient(135deg, #fff, #fbfcff);
    }
    .announcements-panel-title, .announcements-panel-subtitle { display: block; }
    .announcements-panel-title { color: #1e293b; font-size: 0.92rem; font-weight: 800; }
    .announcements-panel-subtitle { margin-top: 2px; color: #94a3b8; font-size: 0.7rem; }
    .ann-refresh {
      display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px;
      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;
    }
    .ann-refresh svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .ann-refresh:hover { background: #e0e7ff; border-color: #a5b4fc; transform: translateY(-1px); }
    #announcements-list { padding: 0.85rem 1rem 1rem; background: #fbfcfe; }
    .ann-empty {
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
      min-height: 210px; padding: 2.5rem 1rem; color: #64748b; text-align: center;
    }
    .ann-empty-icon {
      display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
      margin-bottom: 5px; border-radius: 15px; background: #eef2ff; color: #6366f1;
      font-size: 1.2rem; font-weight: 800; box-shadow: 0 8px 18px rgba(79,70,229,0.1);
    }
    .ann-empty-icon img { width: 30px; height: 30px; object-fit: contain; opacity: 0.7; }
    .ann-empty strong { color: #475569; font-size: 0.88rem; }
    .ann-empty small { color: #a0aec0; font-size: 0.72rem; }
    .ann-empty.ann-error .ann-empty-icon { background: #fef2f2; color: #dc2626; box-shadow: none; }
    .ann-card {
      background: linear-gradient(135deg, #fff 0%, #fafbff 100%); border-radius: 16px; padding: 1.05rem 1.15rem 0.9rem;
      margin-bottom: 0.65rem; cursor: pointer; border: 1px solid #e8edf5; border-left: 3px solid #c7d2fe;
      box-shadow: 0 3px 10px rgba(30,41,59,0.045); transition: all .2s; position: relative; overflow: hidden;
    }
    .ann-card:last-child { margin-bottom: 0; }
    .ann-card:hover { border-color: #c7d2fe; box-shadow: 0 8px 20px rgba(79,70,229,0.1); transform: translateY(-2px); }
    .ann-card.ann-unread { border-left-color: #6366f1; background: linear-gradient(135deg, #fff, #f8f9ff); }
    .ann-card.ann-important { background: linear-gradient(135deg, #fff8f8, #fff 75%); border-color: #fecaca; border-left-color: #f87171; }
    .ann-card.ann-important:hover { border-color: #fca5a5; box-shadow: 0 8px 20px rgba(239,68,68,0.1); }
    .ann-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 9px; }
    .ann-card-title-wrap { display: flex; align-items: flex-start; gap: 9px; min-width: 0; flex: 1; }
    .ann-card-icon {
      display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
      flex: 0 0 32px; border-radius: 10px; background: #eef2ff;
    }
    .ann-card-icon img { width: 19px; height: 19px; object-fit: contain; }
    .ann-important .ann-card-icon { background: #fef2f2; }
    .ann-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; padding-top: 2px; color: #1e293b; font-size: 0.92rem; font-weight: 800; line-height: 1.45; }
    .ann-card-title-text { min-width: 0; overflow-wrap: anywhere; }
    .ann-dot { width: 7px; height: 7px; border-radius: 50%; background: #6366f1; flex: 0 0 7px; box-shadow: 0 0 0 3px rgba(99,102,241,0.14); }
    .ann-badge-imp { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; font-size: 0.66rem; font-weight: 800; }
    .ann-date { padding-top: 3px; color: #94a3b8; font-size: 0.7rem; font-weight: 600; flex-shrink: 0; }
    .ann-card-body { padding-left: 41px; color: #64748b; font-size: 0.82rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
    .ann-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 11px 0 0 41px; padding-top: 9px; border-top: 1px solid #f1f5f9; }
    .ann-card-state { padding: 2px 7px; border-radius: 99px; font-size: 0.66rem; font-weight: 800; }
    .ann-card-state.unread { background: #eef2ff; color: #4f46e5; }
    .ann-card-state.read { background: #f1f5f9; color: #94a3b8; }
    .ann-card-action { color: #a0aec0; font-size: 0.68rem; }
    .ann-card-footer { margin: 10px 0 0 41px; padding-top: 8px; color: #dc2626; border-top: 1px solid #fee2e2; font-size: 0.72rem; font-weight: 700; }
    @media (max-width: 640px) {
      .news-hero { min-height: 150px; }
      .news-hero-mark { width: 78px; height: 78px; padding: 0.65rem; border-radius: 20px; }
      .news-hero-mark img { width: 24px; height: 24px; }
      .announcements-panel-head { padding: 0.8rem 0.95rem; }
      .announcements-panel-subtitle { font-size: 0.66rem; }
      #announcements-list { padding: 0.7rem; }
      .ann-card { padding: 0.9rem 0.85rem 0.8rem; }
      .ann-card-top { gap: 6px; }
      .ann-card-title { font-size: 0.86rem; }
      .ann-card-body { padding-left: 0; margin-top: 8px; font-size: 0.78rem; }
      .ann-card-meta, .ann-card-footer { margin-left: 0; }
      .ann-date { font-size: 0.66rem; }
    }
    .ann-admin-wrap {
      background: #fff; border-radius: 16px;
      box-shadow: 0 2px 16px rgba(0,0,0,0.05);
      border: 1px solid #eef2f6; overflow: hidden;
    }
    .ann-admin-list { display: flex; flex-direction: column; }
    .ann-admin-item {
      display: flex; justify-content: space-between; align-items: center;
      padding: 1rem 1.2rem;
      border-bottom: 1px solid #f1f5f9;
      transition: all .15s;
      background: #fff;
    }
    .ann-admin-item:last-child { border-bottom: none; }
    .ann-admin-item:hover { background: linear-gradient(135deg, #fafbff, #f8f9ff); }
    .ann-admin-left { flex: 1; min-width: 0; }
    .ann-admin-title { font-size: 0.9rem; font-weight: 700; color: #1e293b; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
    .ann-admin-preview { font-size: 0.78rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ann-admin-date { font-size: 0.72rem; color: #cbd5e1; margin-top: 2px; }
    .ann-admin-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: 12px; }
    .ann-admin-btn {
      border-radius: 8px; border: 1px solid #e2e8f0;
      background: #fff; cursor: pointer; transition: all .15s;
      display: inline-flex; align-items: center; justify-content: center;
      padding: 5px 18px; font-size: 0.8rem; font-weight: 600;
      font-family: inherit; white-space: nowrap;
      -webkit-tap-highlight-color: transparent;
    }
    .ann-admin-btn.edit { color: #6366f1; background: #eef2ff; border-color: #c7d2fe; }
    .ann-admin-btn.edit:hover { background: #e0e7ff; border-color: #a5b4fc; }
    .ann-admin-btn.del { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
    .ann-admin-btn.del:hover { background: #fee2e2; border-color: #fca5a5; }
    @media (max-width: 600px) {
      .ann-admin-actions { gap: 4px; margin-left: 8px; }
      .ann-admin-btn { padding: 4px 10px; font-size: 0.75rem; }
    }
    /* 公告弹窗输入框 */
    .ann-input {
      width: 100%; padding: 0.6rem 0.8rem;
      border: 1px solid #d1d9e6; border-radius: 10px;
      font-size: 0.88rem; font-family: inherit;
      outline: none; transition: border-color .2s; box-sizing: border-box;
    }
    .ann-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }
    textarea.ann-input { resize: vertical; min-height: 80px; }
    .modal-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 1.2rem 1.4rem 0;
    }
    .modal-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #1e293b; }
    .modal-close {
      width: 32px; height: 32px; border: none; background: #f1f5f9;
      border-radius: 10px; font-size: 1rem; cursor: pointer;
      display: flex; align-items: center; justify-content: center; color: #94a3b8;
      transition: all .15s;
    }
    .modal-close:hover { background: #e2e8f0; color: #475569; }
    .modal-body { padding: 1rem 1.4rem; }
    .modal-body .form-group { margin-bottom: 0.8rem; }
    .modal-body .form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: #475569; margin-bottom: 4px; }
    .modal-footer {
      display: flex; gap: 8px; justify-content: flex-end;
      padding: 0.8rem 1.4rem 1.2rem;
    }

    #tab-admin-photos {
      animation: regFadeIn 0.3s ease;
    }

    /* 上传区卡片 */
    .photo-upload-toast {
      position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
      z-index: 99999; background: #059669; color: #fff;
      padding: 10px 24px; border-radius: 12px;
      font-size: 0.85rem; font-weight: 600;
      box-shadow: 0 4px 20px rgba(5,150,105,0.3);
      opacity: 0; transition: opacity .3s, transform .3s;
      pointer-events: none;
    }
    .photo-upload-toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    .photo-card-upload {
      position: relative;
      overflow: hidden;
      background:
        radial-gradient(circle at 92% 10%, rgba(79,70,229,0.15) 0 16%, transparent 34%),
        radial-gradient(circle at 8% 100%, rgba(14,165,233,0.10) 0 18%, transparent 38%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 56%, #f3f7ff 100%);
      border-radius: 24px;
      padding: 1.25rem;
      box-shadow: 0 18px 46px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.92);
      border: 1px solid rgba(226,232,240,0.86);
      max-width: 100%;
      margin: 0 auto 1.5rem;
    }
    .photo-card-upload::before {
      content: '';
      position: absolute;
      width: 190px;
      height: 190px;
      right: -92px;
      top: -108px;
      border-radius: 52px;
      transform: rotate(18deg);
      background: rgba(79,70,229,0.10);
      pointer-events: none;
    }
    .photo-upload-head {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .photo-upload-head-copy strong {
      display: block;
      font-size: 1.08rem;
      line-height: 1.2;
      color: #0f172a;
      font-weight: 900;
      letter-spacing: 0.01em;
    }
    .photo-upload-eyebrow {
      display: block;
      margin-bottom: 3px;
      color: #4f46e5;
      font-size: 0.68rem;
      font-weight: 900;
      letter-spacing: 0.12em;
    }
    .photo-upload-head-copy p {
      margin: 0.35rem 0 0;
      color: #64748b;
      font-size: 0.8rem;
      line-height: 1.6;
    }
    .photo-upload-head-mark {
      width: 48px;
      height: 48px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      background: linear-gradient(135deg, #eef2ff, #ffffff);
      border: 1px solid rgba(199,210,254,0.72);
      box-shadow: 0 10px 22px rgba(79,70,229,0.12);
    }
    .photo-upload-head-mark img { width: 28px; height: 28px; object-fit: contain; }
    .photo-upload-form-row {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
      gap: 1rem;
      align-items: stretch;
    }
    .photo-upload-col-left,
    .photo-upload-col-right {
      min-width: 0;
      min-height: 260px;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      height: 100%;
      padding: 1rem;
      border-radius: 20px;
      background: rgba(255,255,255,0.66);
      border: 1px solid rgba(226,232,240,0.78);
      box-shadow: 0 8px 20px rgba(15,23,42,0.035);
    }
    .photo-upload-col-right { justify-content: stretch; }
    .photo-upload-area {
      position: relative;
      min-height: 178px;
      border: 1.8px dashed #c7d2fe;
      border-radius: 20px;
      padding: 1.25rem;
      text-align: center;
      cursor: pointer;
      transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
      background: rgba(255,255,255,0.72);
      width: 100%;
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.7rem;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 8px 20px rgba(15,23,42,0.035);
    }
    .photo-upload-glow {
      position: absolute;
      inset: 12px;
      border-radius: 16px;
      background:
        linear-gradient(90deg, rgba(79,70,229,0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(79,70,229,0.06) 1px, transparent 1px);
      background-size: 22px 22px;
      opacity: 0.55;
      pointer-events: none;
      mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
      -webkit-mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
    }
    .photo-upload-area:hover,
    .photo-upload-area:focus-within {
      transform: translateY(-2px);
      border-color: #6366f1;
      background: rgba(255,255,255,0.94);
      box-shadow: 0 14px 32px rgba(79,70,229,0.12);
    }
    .photo-upload-area:active { transform: translateY(0); }
    .photo-file-input {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      cursor: pointer;
      z-index: 5;
    }
    .photo-upload-icon {
      position: relative;
      z-index: 1;
      width: auto;
      height: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #94a3b8;
      background: transparent;
      border: 0;
      box-shadow: none;
      opacity: 0.86;
      pointer-events: none;
    }
    .photo-upload-main { position: relative; z-index: 1; pointer-events: none; }
    .photo-upload-text { font-size: 0.96rem; color: #334155; font-weight: 900; }
    .photo-upload-text .file-name {
      display: inline-block;
      max-width: 100%;
      color: #4f46e5;
      font-weight: 900;
      overflow: hidden;
      text-overflow: ellipsis;
      vertical-align: bottom;
    }
    .photo-upload-subtext { margin-top: 0.28rem; color: #94a3b8; font-size: 0.76rem; line-height: 1.5; }
    .photo-field-group {
      flex: 0 0 auto;
      display: flex;
      flex-direction: column;
    }
    .photo-caption-help {
      font-size: 0.75rem;
      color: #94a3b8;
      margin: -0.25rem 0 0.65rem 0;
      line-height: 1.55;
    }
    .photo-caption-input {
      width: 100%;
      min-height: 42px;
      padding: 10px 12px;
      border: 1.5px solid #e2e8f0;
      border-radius: 12px;
      font-size: 0.88rem;
      outline: none;
      font-family: inherit;
      color: #334155;
      background: #f8fafc;
      transition: all .2s;
    }
    .photo-caption-input:focus {
      border-color: #4f46e5;
      box-shadow: 0 0 0 4px rgba(79,70,229,0.10);
      background: #fff;
    }
    .photo-caption-input:disabled { color: #94a3b8; background: #f1f5f9; cursor: not-allowed; }
    .photo-category-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .photo-category-label {
      font-size: 0.82rem;
      font-weight: 900;
      color: #475569;
      white-space: nowrap;
    }
    .photo-category-select {
      flex: 1;
      min-width: 0;
      min-height: 42px;
      padding: 10px 12px;
      border: 1.5px solid #e2e8f0;
      border-radius: 12px;
      font-size: 0.86rem;
      font-family: inherit;
      color: #334155;
      background-color: rgba(255,255,255,0.9);
      outline: none;
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' 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 12px center;
      padding-right: 34px;
      box-shadow: 0 1px 2px rgba(15,23,42,0.03);
    }
    .photo-category-select:focus {
      border-color: #4f46e5;
      box-shadow: 0 0 0 4px rgba(79,70,229,0.09);
      background-color: #fff;
    }
    .photo-upload-tips {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.65rem;
      margin-top: auto;
    }
    .photo-upload-tips div {
      min-width: 0;
      padding: 0.78rem 0.85rem;
      border-radius: 16px;
      background: rgba(248,250,252,0.86);
      border: 1px solid rgba(226,232,240,0.78);
      box-shadow: 0 6px 16px rgba(15,23,42,0.035);
    }
    .photo-upload-tips b {
      display: block;
      margin-bottom: 0.22rem;
      color: #334155;
      font-size: 0.78rem;
      font-weight: 900;
    }
    .photo-upload-tips span {
      display: block;
      color: #94a3b8;
      font-size: 0.72rem;
      line-height: 1.5;
    }
    .photo-upload-btns {
      display: flex;
      justify-content: flex-end;
      gap: 0.65rem;
      width: 100%;
      margin-top: 1.2rem;
      padding-top: 0.15rem;
    }
    .photo-upload-btn,
    .photo-cancel-btn {
      min-height: 40px;
      padding: 0 18px;
      border-radius: 999px;
      font-size: 0.86rem;
      font-weight: 900;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
      transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    .photo-upload-btn {
      border: none;
      background: linear-gradient(135deg, #6366f1, #4338ca);
      color: #fff;
      box-shadow: 0 10px 20px rgba(79,70,229,0.24);
    }
    .photo-upload-btn:hover {
      box-shadow: 0 14px 26px rgba(79,70,229,0.30);
      transform: translateY(-1px);
    }
    .photo-cancel-btn {
      border: 1.5px solid #e2e8f0;
      background: #fff;
      color: #64748b;
    }
    .photo-cancel-btn:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }
    .photo-upload-btn:disabled,
    .photo-cancel-btn:disabled {
      cursor: wait;
      opacity: 0.72;
      transform: none !important;
      box-shadow: none;
    }
    .photo-upload-btn.is-loading { padding-left: 38px; }
    .photo-upload-btn.is-loading::before {
      content: '';
      position: absolute;
      left: 16px;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      border: 2px solid rgba(255,255,255,0.45);
      border-top-color: #fff;
      animation: photoUploadSpin .75s linear infinite;
    }
    @keyframes photoUploadSpin { to { transform: rotate(360deg); } }
    @media (max-width: 860px) {
      .photo-upload-form-row { grid-template-columns: 1fr; }
      .photo-upload-tips { grid-template-columns: 1fr 1fr; }
    }
    @media (max-width: 600px) {
      .photo-card-upload {
        border-radius: 20px;
        padding: 0.9rem;
        margin-bottom: 0.8rem;
      }
      .photo-upload-head { align-items: flex-start; margin-bottom: 0.8rem; }
      .photo-upload-head-copy strong { font-size: 1rem; }
      .photo-upload-head-copy p { font-size: 0.74rem; }
      .photo-upload-head-mark { width: 42px; height: 42px; border-radius: 14px; }
      .photo-upload-head-mark img { width: 24px; height: 24px; }
      .photo-category-wrap { flex-direction: column; align-items: stretch; gap: 6px; }
      .photo-category-select,
      .photo-caption-input { min-height: 40px; font-size: 0.82rem; }
      .photo-upload-area { flex: initial; min-height: 154px; padding: 1rem 0.75rem; border-radius: 18px; }
      .photo-upload-icon { width: auto; height: auto; border-radius: 0; }
      .photo-upload-text { font-size: 0.88rem; }
      .photo-upload-subtext { font-size: 0.7rem; }
      .photo-upload-col-left,
      .photo-upload-col-right { min-height: auto; padding: 0.8rem; border-radius: 18px; }
      .photo-field-group { min-height: auto; }
      .photo-upload-tips { grid-template-columns: 1fr; margin-top: 0.2rem; gap: 0.5rem; }
      .photo-upload-tips div { padding: 0.65rem 0.75rem; }
      .photo-upload-btns { gap: 0.5rem; }
      .photo-upload-btn,
      .photo-cancel-btn { flex: 1; min-height: 40px; padding: 0 12px; }
    }

    /* 照片列表区 */
    .photo-gallery-wrap {
      background: #fff; border-radius: 18px; padding: 1.5rem;
      box-shadow: 0 2px 12px rgba(0,0,0,0.06);
      border: 1px solid #f0f0f0;
    }
    .photo-gallery-header {
      display: flex; align-items: center;
      margin-bottom: 1.2rem;
    }
    .photo-gallery-title {
      font-weight: 700; font-size: 1.15rem; color: #1e293b;
      display: inline-flex; align-items: center; gap: 6px;
    }
    .photo-gallery-title .tab-icon { width: 24px; height: 24px; }
    .photo-gallery-count {
      font-size: 0.75rem; font-weight: 600;
      color: #64748b; background: #f1f5f9;
      padding: 2px 10px; border-radius: 10px;
    }
    .photo-gallery-count .num { font-size: 1.05rem; }
    /* 照片卡片 */
    #tab-admin-photos .photo-gallery {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 1rem;
    }
    #tab-admin-photos .photo-card {
      border-radius: 12px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
      border: 1px solid #f0f0f0;
      transition: all .2s;
    }
    #tab-admin-photos .photo-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    }
    #tab-admin-photos .photo-card-img {
      position: relative; overflow: hidden;
    }
    #tab-admin-photos .photo-card-img img {
      width: 100%; height: 180px; object-fit: cover;
      display: block;
    }
    #tab-admin-photos .photo-card-del {
      position: absolute; top: 8px; right: 8px;
      min-width: 56px; height: 28px; border-radius: 14px;
      border: none; background: rgba(239,68,68,0.85);
      color: #fff; font-size: 0.78rem; font-weight: 700;
      cursor: pointer; transition: all .2s;
      display: flex; align-items: center; justify-content: center;
      padding: 0 10px; gap: 3px;
    }
    #tab-admin-photos .photo-card:hover .photo-card-del { opacity: 1; }
    #tab-admin-photos .photo-card-del:hover { background: #dc2626; transform: scale(1.05); }
    #tab-admin-photos .photo-card-caption {
      padding: 0.7rem 1rem;
      font-size: 0.85rem; color: #475569;
    }
    /* 手机端 */
    @media (max-width: 600px) {
      .photo-gallery-wrap { padding: 1rem; margin-top: 1rem; }
      .photo-gallery-header { margin-bottom: 0.8rem; }
      .photo-gallery-title { font-size: 0.85rem; }
      .photo-gallery-count { font-size: 0.68rem; padding: 2px 8px; }
      .photo-gallery-count .num { font-size: 0.76rem; }
    }
    /* ===== 学员风采（用户端）样式 ===== */
    #tab-photos {
      animation: regFadeIn 0.3s ease;
    }

    .photos-wrap {
      background: #fff; border-radius: 18px; padding: 1.5rem;
      box-shadow: 0 2px 12px rgba(0,0,0,0.06);
      border: 1px solid #f0f0f0;
    }
    #tab-photos .photo-gallery {
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 1rem;
    }
    #tab-photos .photo-card {
      border-radius: 14px; overflow: hidden;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
      border: 1px solid #f0f0f0;
      transition: all .25s;
      background: #fff;
    }
    #tab-photos .photo-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }
    #tab-photos .photo-card-inner {
      position: relative; overflow: hidden;
    }
    #tab-photos .photo-card-inner img {
      width: 100%; height: 200px; object-fit: cover;
      display: block; transition: transform .3s;
    }
    #tab-photos .photo-card:hover .photo-card-inner img {
      transform: scale(1.08);
    }
    #tab-photos .photo-card-overlay {
      position: absolute; inset: 0;
      background: rgba(0,0,0,0.3);
      display: flex; align-items: center; justify-content: center;
      opacity: 0; transition: opacity .25s;
    }
    #tab-photos .photo-card:hover .photo-card-overlay {
      opacity: 1;
    }
    .photo-card-view {
      padding: 6px 20px; border-radius: 20px;
      background: rgba(255,255,255,0.9);
      color: #1e293b; font-size: 0.85rem; font-weight: 600;
      backdrop-filter: blur(4px);
    }
    #tab-photos .photo-card-caption {
      padding: 0.7rem 1rem;
      font-size: 0.85rem; color: #475569;
      text-align: center;
    }

    /* ===== 课程介绍全新样式 ===== */
    #tab-course-intro {
      animation: regFadeIn 0.3s ease;
      padding-top: 0.6rem;
    }
    .intro-header {
      font-size: 1.12rem; font-weight: 800; color: #0f172a;
      margin-bottom: 0.85rem;
      display: inline-flex;
      align-items: center;
      gap: 3px;
    }

    /* ===== 筛选卡片容器 ===== */
    .course-filter-card {
      --course-filter-accent: #4f46e5;
      position: relative;
      overflow: hidden;
      border-radius: 22px;
      padding: 1rem;
      margin-bottom: 1rem;
      background:
        radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--course-filter-accent) 18%, transparent) 0 18%, transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, color-mix(in srgb, var(--course-filter-accent) 8%, #ffffff) 100%);
      border: 1px solid color-mix(in srgb, var(--course-filter-accent) 16%, #e2e8f0);
      box-shadow: 0 16px 42px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.9);
    }
    .course-filter-card::before {
      content: '';
      position: absolute;
      width: 160px;
      height: 160px;
      right: -78px;
      top: -86px;
      border-radius: 46px;
      transform: rotate(18deg);
      background: color-mix(in srgb, var(--course-filter-accent) 12%, transparent);
      pointer-events: none;
    }
    .course-filter-card-hd {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 0.9rem;
    }
    .course-filter-card-hd strong {
      display: block;
      font-size: 1rem;
      line-height: 1.2;
      font-weight: 900;
      color: #0f172a;
      letter-spacing: 0.01em;
    }
    .course-filter-kicker {
      display: block;
      margin-bottom: 2px;
      font-size: 0.68rem;
      font-weight: 800;
      letter-spacing: 0.11em;
      text-transform: uppercase;
      color: color-mix(in srgb, var(--course-filter-accent) 78%, #64748b);
    }
    .course-filter-head-actions {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .course-filter-current {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 5px;
      flex-wrap: wrap;
      min-width: 0;
      max-width: min(54vw, 420px);
    }
    .course-filter-current span {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      color: #64748b;
      font-size: 0.74rem;
      font-weight: 800;
      background: rgba(248,250,252,0.9);
      border: 1px solid rgba(226,232,240,0.86);
      white-space: nowrap;
    }
    .course-filter-count {
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      min-height: 30px;
      padding: 0 12px;
      border-radius: 999px;
      color: #fff;
      font-size: 0.78rem;
      font-weight: 800;
      background: linear-gradient(135deg, color-mix(in srgb, var(--course-filter-accent) 86%, #fff), var(--course-filter-accent));
      box-shadow: 0 8px 18px color-mix(in srgb, var(--course-filter-accent) 24%, transparent);
    }
    .course-filter-row {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr);
      align-items: start;
      gap: 10px;
      padding: 0.7rem 0;
      border-top: 1px dashed rgba(148,163,184,0.22);
    }
    .course-filter-row:first-of-type { border-top: 0; padding-top: 0; }
    .course-filter-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 28px;
      border-radius: 999px;
      background: #f1f5f9;
      color: #64748b;
      font-size: 0.74rem;
      font-weight: 800;
      white-space: nowrap;
    }
    .course-filter-options {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      min-width: 0;
    }
    .course-broad-tabs { margin-bottom: 0; }
    .course-broad-tab,
    .course-filter-chip {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 32px;
      padding: 7px 14px;
      border: 1px solid #e2e8f0;
      border-radius: 999px;
      background: rgba(255,255,255,0.86);
      color: #475569;
      font-size: 0.82rem;
      font-weight: 800;
      font-family: inherit;
      line-height: 1;
      cursor: pointer;
      transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
      box-shadow: 0 1px 2px rgba(15,23,42,0.03);
    }
    .course-broad-tab:hover,
    .course-filter-chip:hover {
      transform: translateY(-1px);
      border-color: color-mix(in srgb, var(--course-filter-accent) 28%, #cbd5e1);
      color: var(--course-filter-accent);
      background: #fff;
      box-shadow: 0 8px 18px rgba(15,23,42,0.07);
    }
    .course-broad-tab.active,
    .course-filter-chip.active {
      color: #fff;
      border-color: transparent;
      background: linear-gradient(135deg, color-mix(in srgb, var(--course-filter-accent) 82%, #fff), var(--course-filter-accent));
      box-shadow: 0 8px 18px color-mix(in srgb, var(--course-filter-accent) 22%, transparent);
    }
    .course-broad-tab.active { background: linear-gradient(135deg, color-mix(in srgb, var(--c, #4f46e5) 82%, #fff), var(--c, #4f46e5)); }
    .course-filter-row-subject { position: relative; }
    .course-filter-sep { display: none; }
    .course-filter-bar { display: contents; }
    @media (max-width: 640px) {
      .course-filter-card {
        border-radius: 18px;
        padding: 0.9rem;
        margin-left: -0.1rem;
        margin-right: -0.1rem;
      }
      .course-filter-card-hd { align-items: flex-start; margin-bottom: 0.75rem; }
      .course-filter-card-hd strong { font-size: 0.95rem; }
      .course-filter-head-actions { flex-direction: column; align-items: flex-end; gap: 5px; }
      .course-filter-current { max-width: 54vw; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-end; }
      .course-filter-current::-webkit-scrollbar { display: none; }
      .course-filter-current span { min-height: 24px; padding: 0 8px; font-size: 0.68rem; }
      .course-filter-count { min-height: 26px; padding: 0 9px; font-size: 0.7rem; }
      .course-filter-row {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
        padding: 0.62rem 0;
      }
      .course-filter-label { height: 26px; font-size: 0.7rem; }
      .course-filter-options {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
      }
      .course-filter-options::-webkit-scrollbar { display: none; }
      .course-filter-row-subject .course-filter-options { padding-right: 84px; }
      .course-filter-row-subject::after {
        content: '左右滑动 →';
        position: absolute;
        right: 0;
        top: 0.62rem;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        height: 26px;
        padding: 0 8px 0 18px;
        border-radius: 999px;
        color: color-mix(in srgb, var(--course-filter-accent) 78%, #64748b);
        font-size: 0.68rem;
        font-weight: 900;
        white-space: nowrap;
        pointer-events: none;
        background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.94) 24%, #fff 100%);
      }
      .course-broad-tab,
      .course-filter-chip {
        flex: 0 0 auto;
        min-height: 30px;
        padding: 7px 12px;
        font-size: 0.76rem;
      }
    }

    /* ===== 课程列表容器 ===== */
    .course-list-wrap { min-height: 80px; }
    /* ===== 空态消息 ===== */
    .course-empty-msg {
      color: var(--gray-400); text-align: center;
      padding: 1.5rem; font-size: 0.88rem;
    }

    .course-section {
      margin-bottom: 1rem;
      padding: 0.85rem;
      border: 1px solid rgba(226,232,240,0.7);
      border-radius: 20px;
      background: #fff;
      background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent, #4f46e5) 14%, transparent) 0, transparent 36%),
        linear-gradient(145deg, color-mix(in srgb, var(--accent, #4f46e5) 10%, white) 0%, #fff 54%, color-mix(in srgb, var(--accent, #4f46e5) 4%, white) 100%);
      box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    }
    .course-section-header {
      display: flex; align-items: center; gap: 8px;
      font-size: 1rem; font-weight: 800; color: #0f172a;
      margin-bottom: 0.75rem;
      padding: 0.15rem 0;
      border-left: 0;
    }
    .course-section-dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 999px;
    }
    .course-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 1rem;
    }
    .course-item {
      background: linear-gradient(180deg, color-mix(in srgb, var(--accent, #4f46e5) 5%, white) 0%, color-mix(in srgb, var(--accent, #4f46e5) 2%, white) 100%);
      border-radius: 18px;
      transition: transform .35s cubic-bezier(0.34,1.56,0.64,1), box-shadow .35s cubic-bezier(0.34,1.56,0.64,1), border-color .35s cubic-bezier(0.34,1.56,0.64,1);
      display: flex; overflow: hidden;
      box-shadow: 0 12px 32px rgba(15,23,42,0.055);
      border: 1px solid rgba(226,232,240,0.9);
      position: relative;
    }
    .course-item::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
      background: linear-gradient(90deg, color-mix(in srgb, var(--accent, #4f46e5) 16%, white), var(--accent, #4f46e5), color-mix(in srgb, var(--accent, #4f46e5) 22%, white));
      opacity: 1;
      pointer-events: none;
    }
    .course-item:hover {
      box-shadow: 0 18px 44px -12px rgba(15,23,42,0.18);
      transform: translateY(-5px);
      border-color: #dde7f0;
    }
    .course-item-accent {
      width: 4px; flex-shrink: 0;
      background: var(--accent, #4f46e5);
      border-radius: 18px 0 0 18px;
    }
    .course-item-body {
      flex: 1; padding: 1.1rem 1.05rem 1rem;
      display: flex; flex-direction: column; gap: 9px;
      align-items: stretch; text-align: left;
    }
    .course-item-body .course-item-top,
    .course-item-body .course-item-meta,
    .course-item-body .course-desc { flex-shrink: 0; }
    .course-item-top {
      display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    }
    .course-subject-tag {
      display: inline-block;
      padding: 5px 12px; border-radius: 999px;
      background: #eef2ff;
      background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #4f46e5) 16%, white), color-mix(in srgb, var(--accent, #4f46e5) 8%, white));
      color: var(--accent, #4f46e5);
      color: color-mix(in srgb, var(--accent, #4f46e5) 92%, black); font-size: 0.85rem; font-weight: 800;
      letter-spacing: 0.02em;
      box-shadow: 0 2px 6px rgba(15,23,42,0.05);
    }
    .course-type-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px 4px 5px; border-radius: 999px;
      background: #fff;
      background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #4f46e5) 8%, white), #fff);
      color: #475569;
      color: color-mix(in srgb, var(--accent, #4f46e5) 72%, #334155);
      font-size: 0.76rem; font-weight: 700;
      border: 1px solid #e2e8f0;
      border: 1px solid color-mix(in srgb, var(--accent, #4f46e5) 12%, #e2e8f0);
      line-height: 1.2;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 2px 6px rgba(15,23,42,0.04);
    }
    .course-type-tag img {
      width: 28px;
      height: 28px;
      display: inline-flex;
      flex-shrink: 0;
      object-fit: contain;
      padding: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }
    .course-section-header {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .course-section-icon {
      width: 32px;
      height: 32px;
      display: block;
      flex-shrink: 0;
      object-fit: contain;
      padding: 2px;
      border-radius: 10px;
      background: rgba(255,255,255,0.72);
      box-shadow: 0 1px 4px rgba(15,23,42,0.08);
    }
    .course-section-icon-hs {
      width: 36px;
      height: 36px;
      padding: 0;
    }
    .course-item-meta {
      display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap;
      background: #f8fafc;
      background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #4f46e5) 5%, white), #fff);
      padding: 7px 11px; border-radius: 12px;
      border: 1px solid rgba(226,232,240,0.72);
    }
    .course-grade {
      font-size: 0.78rem; color: #475569;
      font-weight: 600;
    }
    .course-grade::before {
      content: '年级 ';
    }
    .course-duration {
      font-size: 0.8rem; color: #7c3aed; font-weight: 600;
      background: linear-gradient(135deg, #f5f3ff, #ede9fe);
      padding: 3px 10px; border-radius: 8px;
      display: inline-flex; align-items: center; gap: 3px;
    }
    .type-icon-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
    }
    .type-icon-option {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 7px 5px;
      border: 1px solid #dbe4ee;
      border-radius: 8px;
      background: #fff;
      color: #334155;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.2s;
      min-height: 38px;
    }
    .type-icon-option img {
      width: 24px;
      height: 24px;
      display: block;
      object-fit: contain;
    }
    .type-icon-option.is-active {
      border-color: #4f46e5;
      border-width: 2px;
      background: #eef2ff;
      color: #3730a3;
      box-shadow: 0 0 0 2px rgba(79,70,229,0.18), 0 2px 8px rgba(79,70,229,0.16);
      transform: translateY(-1px);
    }
    .type-icon-option.is-active img {
      transform: scale(1.06);
      filter: drop-shadow(0 1px 3px rgba(79,70,229,0.24));
    }
    .type-icon-option:hover:not(.is-active) {
      border-color: #cbd5e1;
      background: #f8fafc;
    }
    .course-desc {
      font-size: 0.82rem; color: #5b6777;
      line-height: 1.5;
      padding: 6px 10px;
      background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
      border-radius: 10px;
      border: 1px solid #f1f5f9;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .course-detail-link {
      margin-top: auto;
      padding: 8px 13px; border-radius: 10px;
      background: #eef2ff;
      background: color-mix(in srgb, var(--accent, #4f46e5) 10%, white);
      font-size: 0.83rem; font-weight: 700; color: var(--accent, #4f46e5);
      text-decoration: none; transition: all .25s;
      display: inline-flex; align-items: center; justify-content: center; gap: 4px;
      border: 1px solid #e0e7ff;
      border: 1px solid color-mix(in srgb, var(--accent, #4f46e5) 18%, white);
    }
    .course-detail-link:hover {
      background: var(--accent, #4f46e5);
      color: #fff;
      box-shadow: 0 6px 16px color-mix(in srgb, var(--accent, #4f46e5) 28%, transparent);
      transform: translateY(-1px);
    }
    .course-section-header {
      font-size: 1.05rem;
    }
    /* 移动端适配 */
    @media (max-width: 600px) {
      .course-section { padding: 0.75rem; border-radius: 16px; }
      .course-grid { grid-template-columns: 1fr; }
      .course-item-body { padding: 0.95rem 1rem; align-items: flex-start; text-align: left; }
      .course-item-top { justify-content: flex-start; }
      .course-item-meta { justify-content: flex-start; }
      .course-type-tag img { width: 24px; height: 24px; }
    }

    /* 桌面端课程卡片加宽减高 */
    @media (min-width: 1024px) {
      .course-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
      .course-item-body { padding: 0.7rem 1.5rem 0.7rem; }
      .course-item-top { justify-content: flex-start; gap: 12px; }
    }

    /* ===== Tab 标签美化 ===== */
    .tabs {
      display: flex !important;
      flex-wrap: wrap; column-gap: 12px; row-gap: 6px; align-items: center;
      background: rgba(255,255,255,0.85);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid #eef2f6;
      border-radius: 14px;
      padding: 8px 10px;
      min-height: 52px;
      margin-bottom: 0.15rem;
      box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.02);
      grid-template-columns: none !important;
    }
    .tab {
      padding: 8px 16px; border-radius: 10px;
      border: none; cursor: pointer;
      font-size: 0.82rem; font-weight: 600;
      color: #64748b;
      background: transparent;
      transition: all .2s;
      font-family: inherit;
      white-space: nowrap;
      touch-action: manipulation;
    }
    .tab:hover {
      color: #334155;
      background: rgba(79,70,229,0.05);
    }
    .tab.active {
      color: #4f46e5;
      background: linear-gradient(135deg, #eef2ff, #fff);
      box-shadow: 0 2px 8px rgba(79,70,229,0.12);
      border: 1px solid rgba(79,70,229,0.08);
      position: relative;
    }
    .tab.active::after {
      content: '';
      position: absolute; bottom: -1px; left: 20%; right: 20%;
      height: 2px; border-radius: 2px;
      background: #4f46e5;
    }
    /* 角标适配 */
    .tab .chat-badge {
      vertical-align: middle;
    }
    /* 移动端 tab */
    @media (max-width: 640px) {
      .tabs {
        flex-wrap: nowrap; overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 4px; padding: 6px 1rem;
        border-radius: 12px;
        position: relative;
      }
      .tabs::-webkit-scrollbar { display: none; }
      .tabs::after {
        content: '';
        position: sticky; right: 0;
        width: 40px; height: 32px; flex-shrink: 0;
        background:
          linear-gradient(to right, transparent 0%, rgba(255,255,255,0.92) 55%),
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14' viewBox='0 0 8 14'%3E%3Cpath d='M1 1l6 6-6 6' stroke='%230f172a' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 8px 14px;
        pointer-events: none;
        margin-left: -40px;
      }
      .tabs::-webkit-scrollbar { display: none; }
      .tab {
        padding: 6px 12px; font-size: 0.82rem;
        flex-shrink: 0;
      }
      .tab.active::after {
        left: 10%; right: 10%;
      }
      /* 预约管理表格 → 卡片 */
      .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;
      }
    }
    /* ===== 用户端留言与预约升级 ===== */
    .user-page-hero {
      position: relative;
      display: flex; align-items: center; justify-content: space-between;
      min-height: 172px; margin: 0.5rem 0 0.8rem; padding: 1.7rem 2rem;
      border-radius: 22px; overflow: hidden;
      border: 1px solid #dbe4ff;
      box-shadow: 0 14px 34px rgba(30,41,59,0.08);
    }
    .user-page-hero::before,
    .user-page-hero::after {
      content: ''; position: absolute; border-radius: 50%; pointer-events: none;
    }
    .user-page-hero::before {
      width: 220px; height: 220px; right: 7%; top: -145px;
      border: 1px solid rgba(255,255,255,0.58);
      box-shadow: 0 0 0 18px rgba(255,255,255,0.12), 0 0 0 36px rgba(255,255,255,0.08);
    }
    .user-page-hero::after {
      width: 90px; height: 90px; right: 24%; bottom: -58px;
      background: rgba(255,255,255,0.18);
    }
    .appointment-hero { background: linear-gradient(118deg, #eef2ff 0%, #e0e7ff 52%, #dbeafe 100%); }
    .message-hero { background: linear-gradient(118deg, #ecfdf5 0%, #dff7ef 48%, #dbeafe 100%); border-color: #ccefe2; }
    .user-page-hero-copy { position: relative; z-index: 1; max-width: 660px; }
    .user-page-eyebrow {
      display: inline-block; margin-bottom: 0.45rem; color: #6366f1;
      font-size: 0.67rem; font-weight: 800; letter-spacing: 0.16em;
    }
    .message-hero .user-page-eyebrow { color: #059669; }
    .user-page-hero h2 {
      margin: 0 0 0.35rem; color: #172554; font-size: clamp(1.2rem, 2.5vw, 1.72rem);
      line-height: 1.35; letter-spacing: -0.02em;
    }
    .message-hero h2 { color: #064e3b; }
    .user-page-hero p { margin: 0; color: #52627d; font-size: 0.84rem; line-height: 1.75; }
    .message-hero p { color: #37675c; }
    .user-page-hero-mark {
      position: relative; z-index: 1; display: flex; flex-direction: column;
      justify-content: center; align-items: center; flex-shrink: 0;
      width: 112px; height: 112px; padding: 1rem;
      color: #4f46e5; border: 1px solid rgba(255,255,255,0.8); border-radius: 28px;
      background: rgba(255,255,255,0.46); box-shadow: inset 0 1px 0 #fff, 0 12px 24px rgba(79,70,229,0.12);
      transform: rotate(4deg);
    }
    .user-page-hero-mark img { width: 34px; height: 34px; object-fit: contain; margin-bottom: 5px; filter: drop-shadow(0 7px 10px rgba(30,41,59,0.14)); }
    .user-page-hero-mark span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; }
    .user-page-hero-mark strong { font-size: 2.9rem; line-height: 1; letter-spacing: -0.08em; }
    .message-hero-mark { color: #059669; }
    .message-hero-mark img { width: 34px; height: 34px; object-fit: contain; margin-bottom: 5px; filter: drop-shadow(0 7px 10px rgba(30,41,59,0.14)); }
    .user-page-notes {
      display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 0.85rem;
    }
    .user-page-note {
      display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0.72rem 0.8rem;
      background: rgba(255,255,255,0.88); border: 1px solid #e7edf5; border-radius: 14px;
      box-shadow: 0 4px 14px rgba(30,41,59,0.035);
    }
    .user-page-note-num, .user-page-note-icon {
      display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px;
      flex-shrink: 0; border-radius: 9px; background: #eef2ff; color: #4f46e5;
      font-size: 0.68rem; font-weight: 800;
    }
    .message-notes .user-page-note-icon { background: #ecfdf5; color: #059669; font-size: 0.82rem; }
    .user-page-note div { min-width: 0; }
    .user-page-note b, .user-page-note small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .user-page-note b { color: #334155; font-size: 0.75rem; }
    .user-page-note small { margin-top: 2px; color: #94a3b8; font-size: 0.67rem; }
    .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); } }
    .msg-user-card { box-shadow: 0 14px 34px rgba(30,41,59,0.08); border-color: #dfe8e5; }
    .msg-user-head { background: linear-gradient(135deg, #f0fdf9 0%, #ecfdf5 58%, #eff6ff 100%); border-bottom-color: #d5eee5; }
    .msg-head-note {
      display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
      color: #059669; font-size: 0.72rem; font-weight: 700;
      white-space: nowrap;
    }
    .msg-head-note::before {
      content: ''; width: 6px; height: 6px; border-radius: 50%;
      background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
    }
    .msg-compose-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 0.55rem; }
    .msg-compose-head strong, .msg-compose-head span { display: block; }
    .msg-compose-head strong { color: #1e293b; font-size: 0.88rem; }
    .msg-compose-head div > span { margin-top: 2px; color: #94a3b8; font-size: 0.7rem; }
    .msg-compose-limit { color: #94a3b8; font-size: 0.68rem; white-space: nowrap; }
    .msg-user-count small { color: #b0b8c4; font-size: 0.68rem; }
    .msg-submit-btn .msg-submit-label { display: inline-block; }
    @media (max-width: 640px) {
      .user-page-hero { min-height: 150px; padding: 1.25rem 1.1rem; border-radius: 18px; }
      .user-page-hero-mark { width: 72px; height: 72px; padding: 0.55rem; border-radius: 18px; overflow: hidden; }
      .user-page-hero-mark img { width: 24px; height: 24px; margin-bottom: 3px; }
      .user-page-hero-mark span { max-width: 100%; font-size: 0.52rem; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .user-page-hero-mark strong { max-width: 100%; font-size: 1.75rem; letter-spacing: -0.05em; }
      .message-hero-mark img { width: 24px; height: 24px; }
      .user-page-hero p { font-size: 0.75rem; max-width: 235px; }
      .user-page-eyebrow { font-size: 0.58rem; letter-spacing: 0.1em; }
      .user-page-notes { grid-template-columns: 1fr; gap: 7px; }
      .user-page-note { padding: 0.58rem 0.72rem; }
      .my-reg-card-head { padding: 0.8rem 0.95rem; }
      .my-reg-card-subtitle { font-size: 0.66rem; }
      .msg-user-head { align-items: flex-start; flex-wrap: wrap; }
      .msg-head-note { margin-left: 56px; margin-top: -4px; }
      .msg-compose-head { align-items: flex-start; flex-direction: column; gap: 2px; }
      .msg-user-foot { align-items: stretch; gap: 10px; }
      .msg-submit-btn { justify-content: center; width: 100%; }
    }

/* ===== Dashboard polish: cleaner admin/user workspace ===== */
.dashboard {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem clamp(0.75rem, 2vw, 1.5rem) 2rem;
}
.dashboard-welcome {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.16);
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.13);
}
.dashboard-welcome::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -95px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.42), rgba(255,255,255,0));
  pointer-events: none;
}
.ann-preview-wrap {
  border-color: rgba(99, 102, 241, 0.14);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0.85rem 0 1rem;
  padding: 0.45rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.tab {
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
}
.tab:hover {
  border-color: rgba(99, 102, 241, 0.18);
  background: #f8fafc;
  transform: translateY(-1px);
}
.tab.active {
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
}
.tab-content.active {
  animation: dashboardFadeUp 0.22s ease-out;
}
.admin-card,
.admin-section,
.course-card,
.my-mat-item,
.message-card,
.reg-card,
.photo-card {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}
.admin-card:hover,
.course-card:hover,
.my-mat-item:hover,
.message-card:hover,
.reg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}
.admin-card,
.course-card,
.my-mat-item,
.message-card,
.reg-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
@keyframes dashboardFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
  .dashboard { padding: 0.85rem 0.7rem 1.5rem; }
  .tabs { top: 0; border-radius: 16px; overflow-x: auto; flex-wrap: nowrap; }
  .tab { flex: 0 0 auto; }
}

/* ===== Admin operations polish: info, registrations, campus, announcements, messages ===== */
.admin-polish-page {
  position: relative;
}
.admin-polish-page > .section-header,
.admin-polish-page .admin-section-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.92));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.admin-polish-page > .section-header::before,
.admin-polish-page .admin-section-header::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #4f46e5, #06b6d4);
}
.admin-polish-page > .section-header .tab-icon,
.admin-polish-page .admin-section-header .tab-icon {
  padding: 7px;
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px rgba(79,70,229,0.08);
}
.admin-polish-page .btn-export,
.admin-polish-page .header-actions .btn,
.admin-polish-page .info-save-btn,
.admin-polish-page .ann-admin-btn,
.admin-polish-page .ann-refresh {
  border-radius: 999px !important;
  box-shadow: 0 8px 18px rgba(79,70,229,0.16);
}
#tab-admin-info .info-card,
#tab-admin-campus .admin-section,
#tab-admin-registrations .admin-table-shell,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap {
  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;
}
#tab-admin-info .info-card {
  padding: 1.25rem;
}
#tab-admin-info .info-section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}
#tab-admin-info .info-step-num {
  box-shadow: 0 6px 14px rgba(79,70,229,0.22);
}
#tab-admin-info .info-field,
#tab-admin-info .info-area-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
#tab-admin-info .info-field:hover,
#tab-admin-info .info-area-card:hover {
  transform: translateY(-2px);
}
#tab-admin-info .edit-info,
#tab-admin-info textarea,
#tab-admin-campus input,
#tab-admin-campus textarea,
#tab-admin-campus select {
  border-radius: 12px !important;
  border-color: #dbe3ef !important;
  background: #fbfdff !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
#tab-admin-info .edit-info:focus,
#tab-admin-info textarea:focus,
#tab-admin-campus input:focus,
#tab-admin-campus textarea:focus,
#tab-admin-campus select:focus {
  border-color: #6366f1 !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.1) !important;
}
#tab-admin-registrations .admin-table-shell {
  padding: 0.75rem;
  overflow-x: auto;
}
#tab-admin-registrations .data-table {
  border-collapse: separate;
  border-spacing: 0 8px;
  background: transparent;
}
#tab-admin-registrations .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 0.65rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  border: none;
}
#tab-admin-registrations .data-table tbody tr {
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
#tab-admin-registrations .data-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}
#tab-admin-registrations .data-table tbody td {
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  padding: 0.72rem 0.65rem;
}
#tab-admin-registrations .data-table tbody td:first-child { border-left: 1px solid #edf2f7; border-radius: 12px 0 0 12px; }
#tab-admin-registrations .data-table tbody td:last-child { border-right: 1px solid #edf2f7; border-radius: 0 12px 12px 0; }
#tab-admin-campus .admin-section {
  padding: 1.15rem;
}
#tab-admin-campus > .admin-section > p {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px solid #e2e8f0;
}
#tab-admin-campus #amap-key-row {
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
#tab-admin-campus .campus-polish-list {
  display: grid;
  gap: 12px;
}
#tab-admin-campus .campus-item {
  position: relative;
  background: linear-gradient(135deg, #ffffff, #f8fafc) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 12px 28px rgba(15,23,42,0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
#tab-admin-campus .campus-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #10b981, #06b6d4);
}
#tab-admin-campus .campus-item:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe !important;
  box-shadow: 0 16px 36px rgba(15,23,42,0.11);
}
#tab-admin-announcements .ann-admin-wrap {
  display: grid;
  gap: 12px;
  padding: 1rem;
}
#tab-admin-announcements .ann-admin-item {
  border-radius: 16px;
  border-color: #e2e8f0;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
#tab-admin-announcements .ann-admin-item:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 16px 34px rgba(15,23,42,0.1);
}
#tab-admin-announcements .ann-admin-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 0 4px #eef2ff;
}
#tab-admin-messages .section-header {
  align-items: stretch;
}
#tab-admin-messages .msg-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#tab-admin-messages .msg-bar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
}
#tab-admin-messages .msg-bar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.82rem;
}
#tab-admin-messages .msg-mgmt-wrap {
  padding: 1rem;
}
#tab-admin-messages #admin-messages-list {
  display: grid;
  gap: 12px;
}
#tab-admin-messages .msg-item {
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
#tab-admin-messages .msg-item:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 16px 34px rgba(15,23,42,0.1);
}
#tab-admin-messages .msg-item-avatar {
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
}
#tab-admin-messages .msg-item-text {
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
}
#tab-announcements .announcements-panel,
#tab-announcements .user-page-note,
#tab-announcements .announcement-card,
#tab-announcements .ann-item {
  box-shadow: 0 12px 30px rgba(15,23,42,0.07);
}
#tab-announcements .announcements-panel {
  border-radius: 22px;
  border: 1px solid rgba(226,232,240,0.95);
  overflow: hidden;
}
#tab-announcements .announcements-panel-head {
  background: linear-gradient(135deg, #ffffff, #eef2ff);
  border-bottom: 1px solid #e2e8f0;
}
#tab-announcements .announcement-card,
#tab-announcements .ann-item {
  border-radius: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
#tab-announcements .announcement-card:hover,
#tab-announcements .ann-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15,23,42,0.1);
}
@media (max-width: 768px) {
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header { align-items: flex-start; flex-direction: column; padding: 0.9rem; }
  #tab-admin-registrations .admin-table-shell { padding: 0.35rem; border-radius: 16px; }
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-campus .admin-section,
  #tab-admin-info .info-card { padding: 0.75rem; border-radius: 18px; }
  #tab-admin-messages .msg-item { border-radius: 16px; }
}

/* ===== Course intro polish: card catalogue ===== */
#tab-course-intro .course-filter-card {
  border: 1px solid color-mix(in srgb, var(--course-filter-accent, #4f46e5) 18%, #e2e8f0);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--course-filter-accent, #4f46e5) 16%, transparent), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
#tab-course-intro .course-filter-card-hd {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(226,232,240,0.8);
}
#tab-course-intro .course-filter-kicker {
  color: var(--course-filter-accent, #4f46e5);
  letter-spacing: 0.08em;
}
#tab-course-intro .course-filter-current span,
#tab-course-intro .course-filter-count {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
#tab-course-intro .course-broad-tab,
#tab-course-intro .course-filter-chip {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 6px 16px rgba(15,23,42,0.05);
}
#tab-course-intro .course-broad-tab:hover,
#tab-course-intro .course-filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}
#tab-course-intro .course-list-wrap {
  margin-top: 1.1rem;
}
#tab-course-intro .course-section {
  border-radius: 24px;
  border: 1px solid rgba(226,232,240,0.95);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.92));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}
#tab-course-intro .course-section-header {
  position: relative;
  padding: 0.15rem 0 0.8rem;
  color: #0f172a;
}
#tab-course-intro .course-section-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
}
#tab-course-intro .course-grid {
  gap: 1rem;
}
#tab-course-intro .course-item {
  position: relative;
  isolation: isolate;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--accent, #4f46e5) 14%, #e2e8f0);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent, #4f46e5) 13%, transparent), transparent 36%),
    linear-gradient(145deg, #ffffff 0%, #fbfdff 52%, color-mix(in srgb, var(--accent, #4f46e5) 4%, #ffffff) 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
#tab-course-intro .course-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.32), transparent 42%);
  pointer-events: none;
  z-index: 0;
}
#tab-course-intro .course-item:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent, #4f46e5) 30%, #cbd5e1);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.13);
}
#tab-course-intro .course-item-accent {
  width: 5px;
  background: linear-gradient(180deg, var(--accent, #4f46e5), color-mix(in srgb, var(--accent, #4f46e5) 50%, #06b6d4));
}
#tab-course-intro .course-item-body {
  position: relative;
  z-index: 1;
  gap: 0.75rem;
}
#tab-course-intro .course-subject-tag {
  font-size: 1.02rem;
  color: #0f172a;
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 0;
}
#tab-course-intro .course-type-tag {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
}
#tab-course-intro .course-item-meta {
  border-radius: 16px;
  background: rgba(248,250,252,0.78);
  backdrop-filter: blur(10px);
}
#tab-course-intro .course-duration {
  color: color-mix(in srgb, var(--accent, #4f46e5) 72%, #334155);
  background: color-mix(in srgb, var(--accent, #4f46e5) 10%, white);
}
#tab-course-intro .course-desc {
  min-height: 3.35em;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border-color: rgba(226,232,240,0.82);
}
#tab-course-intro .course-detail-link {
  width: 100%;
  min-height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #4f46e5) 12%, white), #fff);
}
#tab-course-intro .course-detail-link:hover {
  letter-spacing: 0.02em;
}
@media (max-width: 600px) {
  #tab-course-intro .course-filter-card,
  #tab-course-intro .course-section { border-radius: 18px; }
  #tab-course-intro .course-item { border-radius: 18px; }
  #tab-course-intro .course-detail-link { width: 100%; }
}

/* ===== Compact correction: restore desktop width and reduce empty spacing ===== */
@media (min-width: 769px) {
  .dashboard {
    max-width: 1500px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .dashboard-welcome {
    padding: 1.05rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.09);
  }
  .tabs {
    position: static;
    margin: 0.6rem 0 0.85rem;
    padding: 0.28rem;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  }
  .tab {
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
    border-radius: 11px;
  }
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-registrations .admin-table-shell,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap {
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
  }
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header {
    padding: 0.72rem 0.95rem;
    margin-bottom: 0.75rem;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
  }
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap {
    padding: 0.85rem;
  }
  #tab-admin-registrations .admin-table-shell {
    padding: 0.45rem;
  }
  #tab-admin-messages .msg-item,
  #tab-admin-announcements .ann-admin-item,
  #tab-admin-campus .campus-item {
    border-radius: 13px;
    box-shadow: 0 6px 16px rgba(15,23,42,0.045);
  }
  #tab-course-intro .course-filter-card,
  #tab-course-intro .course-section {
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
  }
  #tab-course-intro .course-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.8rem;
  }
  #tab-course-intro .course-item {
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
  }
  #tab-course-intro .course-item:hover,
  #tab-admin-messages .msg-item:hover,
  #tab-admin-announcements .ann-admin-item:hover,
  #tab-admin-campus .campus-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15,23,42,0.08);
  }
  #tab-course-intro .course-desc {
    min-height: auto;
  }
  #tab-course-intro .course-detail-link {
    width: auto;
    min-height: 34px;
    padding: 7px 12px;
  }
}

/* ===== Spacing correction: restore compact vertical rhythm ===== */
@media (min-width: 769px) {
  .dashboard {
    padding-top: 0.75rem;
    padding-bottom: 1.25rem;
  }
  .dashboard-welcome {
    margin-bottom: 0.45rem;
  }
  .ann-preview-wrap {
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    padding-top: 0.34rem;
    padding-bottom: 0.34rem;
  }
  .tabs {
    margin-top: 0.45rem;
    margin-bottom: 0.55rem;
  }
  .tab-content.active {
    padding-top: 0 !important;
  }
  .section-header,
  .admin-section-header,
  .course-section-header,
  .announcements-panel-head,
  .user-page-hero {
    margin-top: 0 !important;
  }
  .section-header,
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header {
    margin-bottom: 0.5rem !important;
    padding-top: 0.58rem !important;
    padding-bottom: 0.58rem !important;
  }
  .admin-section {
    margin-bottom: 1rem;
  }
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
  #tab-admin-info .info-section-title {
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
  }
  #tab-admin-info .info-grid,
  #tab-admin-messages #admin-messages-list,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-campus .campus-polish-list {
    gap: 8px;
  }
  #tab-admin-info .info-area-card,
  #tab-admin-campus .campus-item,
  #tab-admin-messages .msg-item,
  #tab-admin-announcements .ann-admin-item {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  #tab-admin-campus > .admin-section > p,
  #tab-admin-campus #amap-key-row {
    margin-bottom: 0.65rem !important;
    padding-top: 0.58rem !important;
    padding-bottom: 0.58rem !important;
  }
  #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-course-intro .course-filter-card {
    margin-bottom: 0.65rem;
  }
  #tab-course-intro .course-list-wrap {
    margin-top: 0.65rem;
  }
  #tab-course-intro .course-section {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.8rem;
  }
  #tab-course-intro .course-section-header {
    padding-bottom: 0.48rem;
    margin-bottom: 0.65rem;
  }
  #tab-course-intro .course-grid {
    gap: 0.65rem;
  }
  #tab-course-intro .course-item-body {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    gap: 0.52rem;
  }
  #tab-announcements .user-page-hero {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    margin-bottom: 0.6rem;
  }
  #tab-announcements .user-page-notes {
    margin-bottom: 0.65rem;
    gap: 0.55rem;
  }
  #tab-announcements .announcements-panel-head {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
}

/* ===== Header alignment fix: single-title admin headers stay left ===== */
#tab-admin-info > .section-header {
  justify-content: flex-start !important;
  text-align: left !important;
  flex-direction: row !important;
}
#tab-admin-info > .section-header .tab-icon {
  margin-right: 6px;
}

/* ===== Final rhythm reset: restore original compact vertical spacing ===== */
.dashboard {
  max-width: 1480px !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.8rem !important;
}
.dashboard-welcome {
  margin-bottom: 0.5rem !important;
}
.ann-preview-wrap {
  margin-top: 0.35rem !important;
  margin-bottom: 0.45rem !important;
}
.tabs {
  position: static !important;
  margin-top: 0.35rem !important;
  margin-bottom: 0.55rem !important;
}
.tab-content.active {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.section-header,
.admin-section-header,
.user-page-hero,
.announcements-panel-head,
.course-section-header {
  margin-top: 0 !important;
}
.section-header,
.admin-polish-page > .section-header,
.admin-polish-page .admin-section-header {
  margin-bottom: 0.45rem !important;
}
.admin-section {
  margin-top: 0 !important;
  margin-bottom: 0.85rem !important;
}
#tab-admin-info .info-card,
#tab-admin-campus .admin-section,
#tab-admin-registrations .admin-table-shell,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap,
#tab-announcements .announcements-panel,
#tab-course-intro .course-filter-card,
#tab-course-intro .course-section {
  margin-top: 0 !important;
}
#tab-admin-info .info-section-title {
  margin-top: 0.55rem !important;
  margin-bottom: 0.4rem !important;
}
#tab-admin-info .info-section-title:first-child {
  margin-top: 0 !important;
}
#tab-admin-info .info-area-card,
#tab-admin-campus .campus-item,
#tab-admin-messages .msg-item,
#tab-admin-announcements .ann-admin-item,
#tab-course-intro .course-item,
#tab-announcements .user-page-note {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
#tab-admin-info .info-grid,
#tab-admin-messages #admin-messages-list,
#tab-admin-campus .campus-polish-list,
#tab-course-intro .course-grid,
#tab-announcements .user-page-notes {
  gap: 0.5rem !important;
}
#tab-course-intro .course-list-wrap {
  margin-top: 0.5rem !important;
}
#tab-course-intro .course-filter-card {
  margin-bottom: 0.5rem !important;
}
#tab-course-intro .course-section {
  margin-bottom: 0.65rem !important;
}
#tab-announcements .user-page-hero {
  margin-bottom: 0.5rem !important;
}
#tab-announcements .user-page-notes {
  margin-bottom: 0.5rem !important;
}
@media (min-width: 769px) {
  .dashboard {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  .dashboard-welcome {
    padding: 1.05rem 1.35rem !important;
  }
  .tabs {
    padding: 0.22rem !important;
    border-radius: 12px !important;
  }
  .tab {
    padding: 0.55rem 0.48rem !important;
  }
  .section-header,
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header {
    padding-top: 0.52rem !important;
    padding-bottom: 0.52rem !important;
  }
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap {
    padding: 0.65rem !important;
  }
  #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;
  }
  #tab-course-intro .course-section {
    padding: 0.65rem !important;
  }
  #tab-course-intro .course-item-body {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    gap: 0.45rem !important;
  }
}
@media (max-width: 768px) {
  .dashboard {
    padding: 0.6rem !important;
  }
  .dashboard-welcome {
    padding: 0.85rem !important;
    margin-bottom: 0.45rem !important;
    border-radius: 14px !important;
    gap: 0.35rem !important;
  }
  .welcome-eyebrow {
    margin-bottom: 0.35rem !important;
  }
  .ann-preview-wrap {
    padding: 0.32rem 0.6rem !important;
    margin: 0.32rem 0 0.42rem !important;
  }
  .tabs {
    padding: 3px !important;
    margin: 0.35rem 0 0.45rem !important;
    border-radius: 12px !important;
    gap: 2px !important;
  }
  .tab {
    padding: 0.34rem 0.42rem !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
  }
  .tab-icon {
    width: 20px !important;
    height: 20px !important;
    margin-right: 2px !important;
  }
  .section-header,
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header {
    padding: 0.5rem 0.75rem !important;
    margin-bottom: 0.4rem !important;
    border-radius: 12px !important;
  }
  .admin-section {
    padding: 0.1rem 0.75rem 0.6rem 0.75rem !important;
    margin-bottom: 0.65rem !important;
  }
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-registrations .admin-table-shell,
  #tab-announcements .announcements-panel,
  #tab-course-intro .course-filter-card,
  #tab-course-intro .course-section {
    padding: 0.6rem !important;
    border-radius: 14px !important;
    margin-bottom: 0.5rem !important;
  }
  #tab-admin-info .info-section-title {
    margin-top: 0.45rem !important;
    margin-bottom: 0.35rem !important;
    padding: 0.28rem 0.55rem !important;
  }
  #tab-admin-info .info-area-card,
  #tab-admin-campus .campus-item,
  #tab-admin-messages .msg-item,
  #tab-admin-announcements .ann-admin-item {
    border-radius: 12px !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;
  }
  #tab-course-intro .course-list-wrap {
    margin-top: 0.45rem !important;
  }
  #tab-course-intro .course-grid {
    gap: 0.45rem !important;
  }
  #tab-course-intro .course-item-body {
    padding: 0.62rem 0.72rem !important;
    gap: 0.4rem !important;
  }
  #tab-announcements .user-page-hero {
    padding: 0.75rem !important;
    margin-bottom: 0.45rem !important;
    border-radius: 14px !important;
  }
  #tab-announcements .user-page-notes {
    gap: 0.4rem !important;
    margin-bottom: 0.45rem !important;
  }
  #tab-announcements .announcements-panel-head {
    padding: 0.55rem 0.7rem !important;
  }
}

/* ===== Course grid correction: desktop restores 4 cards per row ===== */
@media (min-width: 1024px) {
  #tab-course-intro .course-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }
}
@media (min-width: 769px) and (max-width: 1023px) {
  #tab-course-intro .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
#tab-course-intro .course-item {
  width: 100%;
  min-width: 0;
}

/* ===== Course intro exact rhythm check/fix ===== */
#tab-course-intro.active {
  padding-top: 0.6rem !important;
  margin-top: 0 !important;
}
#tab-course-intro #course-intro-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#tab-course-intro .course-filter-card {
  padding: 1rem !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
}
#tab-course-intro .course-filter-card-hd {
  margin-bottom: 0.9rem !important;
}
#tab-course-intro .course-filter-row {
  padding-top: 0.7rem !important;
  padding-bottom: 0.7rem !important;
}
#tab-course-intro .course-filter-row:first-of-type {
  padding-top: 0 !important;
}
#tab-course-intro .course-list-wrap {
  margin-top: 0 !important;
}
#tab-course-intro .course-section {
  padding: 1rem !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
}
#tab-course-intro .course-section-header {
  padding-bottom: 0 !important;
  margin-bottom: 0.85rem !important;
}
#tab-course-intro .course-section-header::after {
  display: none !important;
}
#tab-course-intro .course-grid {
  gap: 1rem !important;
}
#tab-course-intro .course-item-body {
  padding: 1rem 1.1rem !important;
  gap: 0.65rem !important;
}
@media (min-width: 1024px) {
  #tab-course-intro .course-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }
}
@media (max-width: 768px) {
  #tab-course-intro.active {
    padding-top: 0.45rem !important;
  }
  #tab-course-intro .course-filter-card {
    padding: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
  #tab-course-intro .course-filter-card-hd {
    margin-bottom: 0.65rem !important;
  }
  #tab-course-intro .course-filter-row {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    gap: 8px !important;
  }
  #tab-course-intro .course-section {
    padding: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
  #tab-course-intro .course-section-header {
    margin-bottom: 0.6rem !important;
  }
  #tab-course-intro .course-grid {
    gap: 0.65rem !important;
  }
  #tab-course-intro .course-item-body {
    padding: 0.75rem 0.85rem !important;
    gap: 0.5rem !important;
  }
}

/* ===== Admin wide sections follow dashboard width ===== */
#tab-admin-types .admin-section--wide,
#tab-admin-campus .admin-section--wide {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#tab-admin-types #type-mgmt-list,
#tab-admin-campus #campus-list,
#tab-admin-campus .campus-polish-list,
#tab-admin-campus #campus-form-area,
#tab-admin-campus #amap-key-row {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}
#tab-admin-types .admin-section-header,
#tab-admin-campus .admin-section-header {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ===== Final compact layout pass: tighter panels and larger mobile controls ===== */
.dashboard {
  max-width: 1480px !important;
}
.dashboard-welcome,
.ann-preview-wrap,
.tabs,
.section-header,
.admin-section-header,
.admin-section,
.info-card,
.photos-wrap,
.reg-card,
.my-reg-item,
.ann-card,
.existing-reg-banner,
.reg-blocked-card,
.photo-gallery-wrap,
.photo-card-upload,
#tab-admin-info .info-card,
#tab-admin-campus .admin-section,
#tab-admin-registrations .admin-table-shell,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap,
#tab-announcements .announcements-panel,
#tab-course-intro .course-filter-card,
#tab-course-intro .course-section {
  margin-top: 0 !important;
}
.dashboard-welcome { margin-bottom: 0.4rem !important; }
.ann-preview-wrap { margin: 0.25rem 0 0.35rem !important; }
.tabs { margin: 0.25rem 0 0.42rem !important; }
.tab-content.active { padding-top: 0 !important; }
.section-header,
.admin-section-header,
.admin-polish-page > .section-header,
.admin-polish-page .admin-section-header {
  margin-bottom: 0.35rem !important;
}
.admin-section,
#tab-admin-info .info-card,
#tab-admin-campus .admin-section,
#tab-admin-registrations .admin-table-shell,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap,
#tab-announcements .announcements-panel,
#tab-course-intro .course-filter-card,
#tab-course-intro .course-section {
  margin-bottom: 0.55rem !important;
}
#tab-admin-info .info-grid,
#tab-admin-campus .campus-polish-list,
#tab-admin-messages #admin-messages-list,
#tab-admin-announcements .ann-admin-wrap,
#tab-course-intro .course-grid,
#tab-announcements .user-page-notes {
  gap: 0.45rem !important;
}
#tab-admin-campus .admin-section-header h2,
#tab-admin-types .admin-section-header h2 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0;
}
.admin-header-subtitle {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-500);
  line-height: 1.3;
}
#tab-admin-campus #amap-key-row {
  margin-top: 0.55rem !important;
  margin-bottom: 0 !important;
}
#tab-course-intro.active { padding-top: 0.45rem !important; }
#tab-course-intro .course-filter-card { margin-bottom: 0.6rem !important; }
#tab-course-intro .course-section { margin-bottom: 0.6rem !important; }
@media (min-width: 769px) {
  .dashboard { padding: 0.5rem 2rem 0.8rem !important; }
  .dashboard-welcome { padding: 0.95rem 1.25rem !important; }
  .section-header,
  .admin-section-header,
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header { padding: 0.48rem 0.85rem !important; }
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap { padding: 0.55rem !important; }
  #tab-admin-registrations .admin-table-shell { padding: 0.2rem !important; }
  #tab-course-intro .course-filter-card { padding: 0.85rem !important; }
  #tab-course-intro .course-section { padding: 0.8rem !important; }
}
@media (max-width: 768px) {
  .dashboard { padding: 0.5rem !important; }
  .dashboard-welcome { padding: 0.8rem !important; margin-bottom: 0.35rem !important; }
  .ann-preview-wrap {
    margin: 0.22rem 0 0.35rem !important;
    padding: 0.42rem 0.65rem !important;
    min-height: 36px;
  }
  .ann-preview-label,
  .ann-preview-item,
  .ann-preview-empty { font-size: 0.82rem !important; }
  .ann-preview-label img { width: 22px !important; height: 22px !important; }
  .tabs {
    margin: 0.25rem 0 0.4rem !important;
    padding: 4px !important;
    gap: 3px !important;
  }
  .tab {
    padding: 0.46rem 0.52rem !important;
    font-size: 0.78rem !important;
    min-height: 36px !important;
  }
  .tab-icon { width: 22px !important; height: 22px !important; }
  .section-header,
  .admin-section-header,
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header {
    padding: 0.48rem 0.65rem !important;
    margin-bottom: 0.32rem !important;
  }
  .admin-section,
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-registrations .admin-table-shell,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap,
  #tab-announcements .announcements-panel,
  #tab-course-intro .course-filter-card,
  #tab-course-intro .course-section {
    padding: 0.52rem !important;
    margin-bottom: 0.45rem !important;
  }
  #tab-course-intro.active { padding-top: 0.35rem !important; }
  #tab-course-intro .course-filter-row { padding-top: 0.42rem !important; padding-bottom: 0.42rem !important; }
  #tab-course-intro .course-item-body { padding: 0.58rem 0.68rem !important; }
  .admin-header-subtitle { font-size: 0.72rem; flex-basis: 100%; }
}

/* ===== Admin dashboard width final lock ===== */
#tab-admin-types,
#tab-admin-campus {
  box-sizing: border-box !important;
}
#tab-admin-types > .admin-section--wide,
#tab-admin-campus > .admin-section--wide {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
#tab-admin-types #type-mgmt-list,
#tab-admin-types #type-mgmt-list > div,
#tab-admin-campus #campus-list,
#tab-admin-campus #campus-list > .campus-item,
#tab-admin-campus #campus-list > p,
#tab-admin-campus .campus-polish-list,
#tab-admin-campus #campus-form-area,
#tab-admin-campus #amap-key-row {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

/* ===== Mobile compact headers: registrations and announcements ===== */
@media (max-width: 768px) {
  #tab-admin-registrations > .section-header,
  #tab-admin-announcements > .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,
  #tab-admin-announcements > .section-header::before {
    width: 3px !important;
  }
  #tab-admin-registrations > .section-header .tab-icon,
  #tab-admin-announcements > .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,
  #tab-admin-announcements > .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;
  }
}

/* ===== Course type panel matches campus/dashboard content width ===== */
#tab-admin-types > .admin-section--wide {
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055) !important;
  overflow: hidden !important;
}
@media (min-width: 769px) {
  #tab-admin-types > .admin-section--wide {
    padding: 0.55rem !important;
  }
}
@media (max-width: 768px) {
  #tab-admin-types > .admin-section--wide {
    padding: 0.52rem !important;
  }
}

/* ===== Stable dashboard width across tabs ===== */
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* ===== Mobile dashboard content edge alignment ===== */
@media (max-width: 640px) {
  #tab-course-intro .course-filter-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ===== Course type header alignment + course intro closer to tabs ===== */
#tab-admin-types .admin-section-header {
  align-items: center !important;
}
#tab-admin-types .admin-section-header h2 {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  line-height: 1.1 !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  margin: 0 !important;
}
#tab-admin-types .admin-section-header h2 .tab-icon {
  width: 22px !important;
  height: 22px !important;
  padding: 3px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  vertical-align: middle !important;
  border-radius: 7px !important;
}
#tab-admin-types #type-mgmt-list {
  margin-top: 0.45rem !important;
}
#tab-course-intro.active {
  padding-top: 0.18rem !important;
}
#tab-course-intro .course-filter-card {
  margin-top: 0 !important;
}
.tabs {
  margin-bottom: 0.25rem !important;
}
@media (max-width: 768px) {
  #tab-admin-types .admin-section-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  #tab-admin-types .admin-section-header h2 {
    font-size: 0.95rem !important;
    gap: 5px !important;
  }
  #tab-admin-types .admin-section-header h2 .tab-icon {
    width: 20px !important;
    height: 20px !important;
    padding: 2px !important;
  }
  #tab-course-intro.active {
    padding-top: 0.12rem !important;
  }
  .tabs {
    margin-bottom: 0.22rem !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) {
  .modal .edit-grade-compact { display: flex; flex-direction: column; align-items: flex-start; }
  .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; }
}

/* ===== Campus header icon alignment ===== */
#tab-admin-campus .admin-section-header h2 .tab-icon {
  width: 22px !important;
  height: 22px !important;
  padding: 3px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  vertical-align: middle !important;
  border-radius: 7px !important;
}
@media (max-width: 768px) {
  #tab-admin-campus .admin-section-header h2 .tab-icon {
    width: 20px !important;
    height: 20px !important;
    padding: 2px !important;
  }
}

/* ===== Admin type/campus header icon size and compact campus button ===== */
#tab-admin-types .admin-section-header h2,
#tab-admin-campus .admin-section-header h2 {
  align-items: center !important;
  line-height: 1.15 !important;
}
#tab-admin-types .admin-section-header h2 .tab-icon,
#tab-admin-campus .admin-section-header h2 .tab-icon {
  width: 34px !important;
  height: 34px !important;
  padding: 7px !important;
  margin: 0 6px 0 0 !important;
  border-radius: 12px !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;
}
@media (min-width: 769px) {
  #tab-admin-campus .header-actions .btn,
  #tab-admin-campus .header-actions .btn-sm {
    min-height: 30px !important;
    padding: 0.32rem 0.8rem !important;
    font-size: 0.78rem !important;
    line-height: 1 !important;
    border-radius: 999px !important;
  }
}
@media (max-width: 768px) {
  #tab-admin-types .admin-section-header h2 .tab-icon,
  #tab-admin-campus .admin-section-header h2 .tab-icon {
    width: 28px !important;
    height: 28px !important;
    padding: 5px !important;
    border-radius: 10px !important;
  }
}

/* ===== Mobile admin header icons unified ===== */
@media (max-width: 768px) {
  #tab-admin-types .admin-section-header h2 .tab-icon,
  #tab-admin-info > .section-header .tab-icon,
  #tab-admin-registrations > .section-header .tab-icon,
  #tab-admin-campus .admin-section-header h2 .tab-icon,
  #tab-admin-announcements > .section-header .tab-icon,
  #tab-admin-messages > .section-header .tab-icon,
  #tab-admin-messages .msg-bar > span:first-child img {
    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-info > .section-header,
  #tab-admin-registrations > .section-header,
  #tab-admin-announcements > .section-header,
  #tab-admin-messages > .section-header,
  #tab-admin-types .admin-section-header,
  #tab-admin-campus .admin-section-header {
    align-items: center !important;
  }
  #tab-admin-messages .msg-bar > span:first-child {
    align-items: center !important;
    gap: 0 !important;
  }
}

/* ===== Admin messages desktop header icon unified ===== */
#tab-admin-messages .msg-bar > span:first-child img {
  width: 34px !important;
  height: 34px !important;
  box-sizing: border-box !important;
  padding: 7px !important;
  margin: 0 6px 0 0 !important;
  border-radius: 12px !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-messages .msg-bar > span:first-child {
  align-items: center !important;
  gap: 0 !important;
}
@media (max-width: 768px) {
  #tab-admin-messages .msg-bar > span:first-child img {
    width: 28px !important;
    height: 28px !important;
    padding: 5px !important;
    border-radius: 10px !important;
  }
}



/* ===== Mobile message management + board overflow fixes ===== */
.my-msg-card {
  margin-top: 1rem;
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}
.my-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f6;
  background: linear-gradient(135deg, #ffffff, #fbfcff);
}
.my-msg-head > div { min-width: 0; }
.my-msg-head strong {
  display: block;
  color: #1e293b;
  font-size: 0.92rem;
  line-height: 1.35;
}
.my-msg-head span {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.my-msg-refresh {
  flex: 0 0 auto;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #059669;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.my-msg-empty {
  padding: 1.25rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.86rem;
  line-height: 1.6;
}
.my-msg-empty.error { color: #dc2626; }
.my-msg-list { padding: 0.85rem 1rem 1rem; background: #fbfcfe; }
.my-msg-content,
.my-msg-reply-body,
.msg-user-head-title,
.msg-user-head-desc,
.msg-compose-head,
.msg-item-name,
.msg-item-text,
.ann-admin-title,
.ann-admin-preview {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.my-msg-content { white-space: pre-wrap; }
#tab-admin-announcements .ann-admin-left,
#tab-admin-messages .msg-item-user > div { min-width: 0; }
#tab-admin-announcements .ann-admin-title,
#tab-admin-messages .msg-item-meta-tags { flex-wrap: wrap; }
#tab-admin-announcements .ann-admin-actions,
#tab-admin-messages .msg-item-actions { display: flex !important; }

@media (max-width: 640px) {
  .msg-user-head,
  .msg-user-foot,
  .my-msg-head {
    align-items: stretch;
    flex-direction: column;
  }
  .msg-head-note,
  .msg-submit-btn,
  .my-msg-refresh { width: 100%; justify-content: center; }
  .my-msg-card { border-radius: 16px; margin-top: 0.75rem; }
  .my-msg-list { padding: 0.65rem; }
  .my-msg-item { padding: 0.85rem; margin-bottom: 0.6rem; }
  #tab-admin-announcements .ann-admin-item {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0.85rem !important;
  }
  #tab-admin-announcements .ann-admin-left {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  #tab-admin-announcements .ann-admin-preview {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.6 !important;
  }
  #tab-admin-announcements .ann-admin-actions {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }
  #tab-admin-announcements .ann-admin-btn {
    flex: 0 0 auto !important;
    min-width: 72px !important;
    min-height: 34px !important;
    padding: 6px 14px !important;
  }
  #tab-admin-messages .msg-item {
    align-items: flex-start !important;
  }
  #tab-admin-messages .msg-item-top {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
  #tab-admin-messages .msg-item-actions {
    width: 100% !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }
}


/* ===== User message delete action ===== */
.my-msg-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
}
.my-msg-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.my-msg-del:hover { background: #fee2e2; border-color: #fca5a5; }
.my-msg-del:active { transform: scale(0.97); }
@media (max-width: 640px) {
  .my-msg-actions { justify-content: stretch; }
  .my-msg-del { width: 100%; }
}


/* ===== Dashboard compact vertical spacing final pass ===== */
.dashboard {
  padding-top: 0.32rem !important;
  padding-bottom: 0.45rem !important;
}
.dashboard-welcome {
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
  margin-bottom: 0.26rem !important;
}
.welcome-eyebrow { margin-bottom: 0.36rem !important; }
.dashboard-welcome p { margin-top: 0.18rem !important; }
.ann-preview-wrap { margin-top: 0.16rem !important; margin-bottom: 0.22rem !important; }
.tabs { margin-top: 0.14rem !important; margin-bottom: 0.24rem !important; }
.tab-content.active { padding-top: 0 !important; }
.user-page-hero,
.user-page-notes,
.reg-card,
.my-reg-list,
.msg-user-card,
.my-msg-card,
.announcements-panel,
.photos-wrap,
.photo-gallery-wrap,
.admin-section,
.admin-polish-page > .section-header,
.admin-polish-page .admin-section-header,
#tab-course-intro .course-filter-card,
#tab-course-intro .course-section,
#tab-admin-info .info-card,
#tab-admin-campus .admin-section,
#tab-admin-registrations .admin-table-shell,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap {
  margin-top: 0 !important;
}
.user-page-hero,
.user-page-notes,
.reg-card,
.msg-user-card,
.my-msg-card,
.announcements-panel,
.photos-wrap,
.photo-gallery-wrap,
.admin-section,
#tab-course-intro .course-filter-card,
#tab-course-intro .course-section,
#tab-admin-info .info-card,
#tab-admin-campus .admin-section,
#tab-admin-registrations .admin-table-shell,
#tab-admin-announcements .ann-admin-wrap,
#tab-admin-messages .msg-mgmt-wrap {
  margin-bottom: 0.42rem !important;
}
.section-header,
.admin-section-header,
.admin-polish-page > .section-header,
.admin-polish-page .admin-section-header {
  margin-bottom: 0.25rem !important;
}
#tab-course-intro.active { padding-top: 0.16rem !important; }
#tab-course-intro .course-list-wrap { margin-top: 0.28rem !important; }
#tab-course-intro .course-grid,
#tab-admin-info .info-grid,
#tab-admin-campus .campus-polish-list,
#tab-admin-messages #admin-messages-list,
#tab-admin-announcements .ann-admin-wrap,
#tab-announcements .user-page-notes {
  gap: 0.36rem !important;
}
@media (min-width: 769px) {
  .dashboard { padding-top: 0.28rem !important; padding-bottom: 0.55rem !important; }
  .dashboard-welcome { padding: 0.78rem 1.15rem !important; }
  .tabs { margin-bottom: 0.22rem !important; }
}
@media (max-width: 768px) {
  .dashboard { padding: 0.32rem 0.5rem 0.42rem !important; }
  .dashboard-welcome { padding: 0.62rem 0.75rem !important; margin-bottom: 0.2rem !important; }
  .welcome-eyebrow { margin-bottom: 0.28rem !important; }
  .dashboard-welcome h2 { line-height: 1.25 !important; }
  .dashboard-welcome p { margin-top: 0.12rem !important; }
  .ann-preview-wrap { margin: 0.12rem 0 0.18rem !important; min-height: 32px !important; }
  .tabs { margin: 0.12rem 0 0.2rem !important; padding: 3px !important; }
  .tab { min-height: 34px !important; padding-top: 0.4rem !important; padding-bottom: 0.4rem !important; }
  .user-page-hero,
  .user-page-notes,
  .reg-card,
  .msg-user-card,
  .my-msg-card,
  .announcements-panel,
  .photos-wrap,
  .photo-gallery-wrap,
  .admin-section,
  #tab-course-intro .course-filter-card,
  #tab-course-intro .course-section,
  #tab-admin-info .info-card,
  #tab-admin-campus .admin-section,
  #tab-admin-registrations .admin-table-shell,
  #tab-admin-announcements .ann-admin-wrap,
  #tab-admin-messages .msg-mgmt-wrap {
    margin-bottom: 0.32rem !important;
  }
  .section-header,
  .admin-section-header,
  .admin-polish-page > .section-header,
  .admin-polish-page .admin-section-header {
    margin-bottom: 0.22rem !important;
  }
}


/* ===== Dashboard navbar compact override ===== */
.navbar {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.navbar-row {
  min-height: 32px !important;
}
.navbar .nav-links {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1.35 !important;
}
.navbar .nav-links a,
.navbar .nav-links .btn-logout {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
@media (max-width: 768px) {
  .navbar { padding-left: 0.65rem !important; padding-right: 0.65rem !important; }
  .navbar-row { min-height: 31px !important; }
  .navbar .nav-links { padding-bottom: 2px !important; }
}


/* ===== Compact my-message actions on mobile ===== */
@media (max-width: 640px) {
  .my-msg-head {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .my-msg-head > div {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .my-msg-refresh {
    width: auto !important;
    flex: 0 0 auto !important;
    align-self: flex-start !important;
    min-height: 28px !important;
    padding: 4px 10px !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }
  .my-msg-actions {
    justify-content: flex-end !important;
    margin-top: 0.5rem !important;
  }
  .my-msg-del {
    width: auto !important;
    min-height: 28px !important;
    padding: 4px 12px !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
  }
}


/* ===== My materials mobile bottom safe space ===== */
@media (max-width: 768px) {
  #tab-my-materials {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  #tab-my-materials #my-materials-list {
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  #tab-my-materials .my-mat-item:last-child {
    margin-bottom: 0.85rem !important;
  }
}


/* ===== User dashboard four tabs tighter spacing ===== */
#tab-my-materials,
#tab-my-registrations,
#tab-announcements,
#tab-messages {
  --user-tab-gap: 0.28rem;
}
#tab-my-materials .user-page-hero,
#tab-my-registrations .user-page-hero,
#tab-announcements .user-page-hero,
#tab-messages .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-materials .user-page-eyebrow,
#tab-my-registrations .user-page-eyebrow,
#tab-announcements .user-page-eyebrow,
#tab-messages .user-page-eyebrow {
  margin-bottom: 0.3rem !important;
  padding: 0.2rem 0.52rem !important;
}
#tab-my-materials .user-page-hero h2,
#tab-my-registrations .user-page-hero h2,
#tab-announcements .user-page-hero h2,
#tab-messages .user-page-hero h2 {
  margin: 0 !important;
  line-height: 1.28 !important;
}
#tab-my-materials .user-page-hero p,
#tab-my-registrations .user-page-hero p,
#tab-announcements .user-page-hero p,
#tab-messages .user-page-hero p {
  margin-top: 0.22rem !important;
  line-height: 1.5 !important;
}
#tab-my-materials .user-page-hero-mark,
#tab-my-registrations .user-page-hero-mark,
#tab-announcements .user-page-hero-mark,
#tab-messages .user-page-hero-mark {
  width: 86px !important;
  height: 86px !important;
  padding: 0.72rem !important;
  border-radius: 20px !important;
}
#tab-my-materials .user-page-notes,
#tab-my-registrations .user-page-notes,
#tab-announcements .user-page-notes,
#tab-messages .user-page-notes {
  margin: 0 0 var(--user-tab-gap) !important;
  gap: 0.38rem !important;
}
#tab-my-materials .user-page-note,
#tab-my-registrations .user-page-note,
#tab-announcements .user-page-note,
#tab-messages .user-page-note {
  padding: 0.58rem 0.7rem !important;
  border-radius: 13px !important;
}
#tab-my-materials .materials-panel,
#tab-my-registrations .my-reg-card,
#tab-announcements .announcements-panel,
#tab-messages .msg-user-card,
#tab-messages .my-msg-card {
  margin-top: 0 !important;
  margin-bottom: var(--user-tab-gap) !important;
  border-radius: 16px !important;
}
#tab-my-materials .materials-panel-head,
#tab-my-registrations .my-reg-card-head,
#tab-announcements .announcements-panel-head,
#tab-messages .msg-user-head,
#tab-messages .my-msg-head {
  padding: 0.68rem 0.9rem !important;
}
#tab-my-materials #my-materials-list,
#tab-my-registrations #my-registrations-list,
#tab-announcements #announcements-list,
#tab-messages .msg-user-body,
#tab-messages .my-msg-list {
  padding: 0.62rem 0.72rem !important;
}
#tab-my-materials .my-mat-item,
#tab-my-registrations .my-reg-item,
#tab-announcements .ann-card,
#tab-messages .my-msg-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;
}
#tab-messages .msg-compose-head { margin-bottom: 0.45rem !important; }
#tab-messages .msg-user-body textarea { min-height: 108px !important; }
#tab-messages .msg-user-foot { margin-top: 0.55rem !important; }
@media (max-width: 768px) {
  #tab-my-materials,
  #tab-my-registrations,
  #tab-announcements,
  #tab-messages { --user-tab-gap: 0.22rem; }
  #tab-my-materials .user-page-hero,
  #tab-my-registrations .user-page-hero,
  #tab-announcements .user-page-hero,
  #tab-messages .user-page-hero {
    min-height: 96px !important;
    padding: 0.68rem 0.75rem !important;
    border-radius: 15px !important;
  }
  #tab-my-materials .user-page-hero h2,
  #tab-my-registrations .user-page-hero h2,
  #tab-announcements .user-page-hero h2,
  #tab-messages .user-page-hero h2 { font-size: 1rem !important; }
  #tab-my-materials .user-page-hero p,
  #tab-my-registrations .user-page-hero p,
  #tab-announcements .user-page-hero p,
  #tab-messages .user-page-hero p { font-size: 0.75rem !important; }
  #tab-my-materials .user-page-hero-mark,
  #tab-my-registrations .user-page-hero-mark,
  #tab-announcements .user-page-hero-mark,
  #tab-messages .user-page-hero-mark {
    width: 58px !important;
    height: 58px !important;
    padding: 0.42rem !important;
    border-radius: 15px !important;
  }
  #tab-my-materials .user-page-hero-mark span,
  #tab-my-registrations .user-page-hero-mark span,
  #tab-announcements .user-page-hero-mark span,
  #tab-messages .user-page-hero-mark span { display: none !important; }
  #tab-my-materials .user-page-hero-mark strong,
  #tab-my-registrations .user-page-hero-mark strong,
  #tab-announcements .user-page-hero-mark strong,
  #tab-messages .user-page-hero-mark strong { font-size: 1rem !important; }
  #tab-my-materials .user-page-note,
  #tab-my-registrations .user-page-note,
  #tab-announcements .user-page-note,
  #tab-messages .user-page-note {
    padding: 0.48rem 0.58rem !important;
    min-height: auto !important;
  }
  #tab-my-materials .materials-panel-head,
  #tab-my-registrations .my-reg-card-head,
  #tab-announcements .announcements-panel-head,
  #tab-messages .msg-user-head,
  #tab-messages .my-msg-head {
    padding: 0.55rem 0.68rem !important;
  }
  #tab-my-materials #my-materials-list,
  #tab-my-registrations #my-registrations-list,
  #tab-announcements #announcements-list,
  #tab-messages .msg-user-body,
  #tab-messages .my-msg-list {
    padding: 0.5rem 0.55rem !important;
  }
  #tab-my-materials .my-mat-item,
  #tab-my-registrations .my-reg-item,
  #tab-announcements .ann-card,
  #tab-messages .my-msg-item {
    margin-bottom: 0.32rem !important;
    padding-top: 0.58rem !important;
    padding-bottom: 0.58rem !important;
  }
  #tab-messages .msg-user-body textarea { min-height: 92px !important; }
}


/* ===== My materials bottom safe space priority ===== */
@media (max-width: 768px) {
  #tab-my-materials {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  #tab-my-materials #my-materials-list {
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* ===== Dashboard user tabs mobile bottom safe space ===== */
@media (max-width: 768px) {
  #tab-my-registrations,
  #tab-messages,
  #tab-announcements {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  #tab-my-registrations #my-registrations-list,
  #tab-messages .my-msg-list,
  #tab-announcements #announcements-list {
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  #tab-my-registrations .my-reg-item:last-child,
  #tab-messages .my-msg-item:last-child,
  #tab-announcements .ann-card:last-child {
    margin-bottom: 0.85rem !important;
  }
}


/* ===== Polished floating chat button ===== */
.chat-btn {
  right: 22px !important;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: 44px !important;
  padding: 0.42rem 0.9rem 0.42rem 0.48rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.55) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.06)) padding-box,
    linear-gradient(135deg, #22c55e 0%, #06b6d4 42%, #4f46e5 100%) border-box !important;
  color: #fff !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  gap: 0.42rem !important;
  box-shadow: 0 12px 30px rgba(37,99,235,0.24), 0 5px 14px rgba(15,23,42,0.14) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  isolation: isolate;
  overflow: visible !important;
}
.chat-btn::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 46%, #4f46e5 100%);
  z-index: -1;
}
.chat-btn::after {
  content: '';
  position: absolute;
  right: 7px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.22);
}
.chat-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 34px rgba(37,99,235,0.3), 0 8px 18px rgba(15,23,42,0.18) !important;
}
.chat-btn:active {
  transform: translateY(0) scale(0.97) !important;
}
.chat-btn .chat-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.22) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24) !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
}
.chat-btn #chat-badge {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  border: 2px solid #fff !important;
  background: #ef4444 !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem !important;
  font-weight: 800 !important;
  margin-left: 0 !important;
  box-shadow: 0 6px 14px rgba(239,68,68,0.28) !important;
}
.chat-btn #chat-badge[style*="display:none"],
.chat-btn #chat-badge[style*="display: none"] {
  display: none !important;
}
@media (max-width: 480px) {
  .chat-btn {
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 40px !important;
    padding: 0.34rem 0.74rem 0.34rem 0.4rem !important;
    font-size: 0.74rem !important;
    gap: 0.34rem !important;
  }
  .chat-btn .chat-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.92rem !important;
  }
  .chat-btn::after {
    right: 6px;
    top: 6px;
    width: 6px;
    height: 6px;
  }
}


/* ===== Floating chat button calmer palette ===== */
.chat-btn {
  border: 1px solid #dbeafe !important;
  background: rgba(255,255,255,0.96) !important;
  color: #1d4ed8 !important;
  box-shadow: 0 10px 24px rgba(15,23,42,0.12), 0 3px 10px rgba(37,99,235,0.12) !important;
}
.chat-btn::before {
  inset: auto !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
.chat-btn::after {
  background: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.18) !important;
}
.chat-btn:hover {
  background: #f8fbff !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 12px 26px rgba(15,23,42,0.14), 0 5px 12px rgba(37,99,235,0.14) !important;
}
.chat-btn .chat-icon {
  background: #eff6ff !important;
  color: #2563eb !important;
  box-shadow: inset 0 0 0 1px #dbeafe !important;
}
@media (max-width: 480px) {
  .chat-btn {
    box-shadow: 0 8px 20px rgba(15,23,42,0.12), 0 3px 9px rgba(37,99,235,0.1) !important;
  }
}


/* ===== Floating chat button balanced blue palette ===== */
.chat-btn {
  border: 1px solid rgba(191,219,254,0.95) !important;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(37,99,235,0.26), 0 4px 12px rgba(15,23,42,0.14) !important;
}
.chat-btn::before {
  inset: auto !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}
.chat-btn::after {
  background: #34d399 !important;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.2) !important;
}
.chat-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%) !important;
  border-color: rgba(147,197,253,0.95) !important;
  box-shadow: 0 15px 30px rgba(37,99,235,0.32), 0 6px 15px rgba(15,23,42,0.16) !important;
}
.chat-btn .chat-icon {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24) !important;
}
@media (max-width: 480px) {
  .chat-btn {
    box-shadow: 0 10px 22px rgba(37,99,235,0.24), 0 3px 10px rgba(15,23,42,0.13) !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; }
}

.subject-selection-hint {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 .55rem;
  padding: .55rem .7rem;
  border: 1px solid #fde68a;
  border-radius: 9px;
  background: #fffbeb;
  color: #a16207;
  font-size: .78rem;
  line-height: 1.5;
}

/* ===== Welcome banner: slightly more breathing room ===== */
.dashboard-welcome {
  padding-top: .92rem !important;
  padding-bottom: .92rem !important;
}
@media (min-width: 769px) {
  .dashboard-welcome {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}
@media (max-width: 768px) {
  .dashboard-welcome {
    padding-top: .76rem !important;
    padding-bottom: .76rem !important;
  }
}
