:root {
    --primary: #FF944D;
    --primary-dark: #E86A1A;
    --primary-light: #FFB87A;
    --primary-soft: #FFF4EC;
    --gradient: linear-gradient(135deg, #FF944D 0%, #FF7A28 50%, #FFB366 100%);
    --gradient-soft: linear-gradient(180deg, #FFF8F3 0%, #FFFFFF 100%);
    --accent: #FF944D;
    --success: #E86A1A;
    --success-bg: #FFF0E6;
    --warning: #D97706;
    --warning-bg: #FEF3C7;
    --danger: #DC2626;
    --danger-bg: #FEE2E2;
    --bg: #F7F8FA;
    --card: #FFFFFF;
    --text: #2D3436;
    --text-secondary: #4A5568;
    --text-muted: #8B95A5;
    --border: #E8ECF0;
    --shadow: 0 2px 12px rgba(45, 52, 54, 0.06);
    --shadow-lg: 0 8px 28px rgba(255, 148, 77, 0.18);
    --radius: 16px;
    --radius-sm: 12px;
    --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.app-body {
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
}

.page-home { padding-bottom: 24px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.icon-svg { display: block; flex-shrink: 0; }

/* ========== Header（白底 + 橙品牌） ========== */
.top-header {
    background: var(--card);
    color: var(--text);
    padding: 14px 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(45, 52, 54, 0.04);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 148, 77, 0.25);
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
    background: var(--gradient);
    box-shadow: 0 2px 8px rgba(255, 148, 77, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.logo-text strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
}

.logo-text small {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.header-nav-btn .icon-svg { color: currentColor; }

.header-nav-btn:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.header-nav-btn.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.header-nav-btn:active { transform: scale(0.94); }

.btn-header-login {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn-header-login:hover {
    background: var(--primary);
    color: #fff;
}

.btn-header-login:active { transform: scale(0.96); }

.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #EF4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.header-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 148, 77, 0.15);
    background: #fff;
}

.search-box .icon-svg { color: var(--text-muted); }

.search-box:focus-within .icon-svg { color: var(--primary); }

.search-box input {
    flex: 1;
    border: none;
    font-size: 0.9rem;
    outline: none;
    color: var(--text);
    background: transparent;
    min-width: 0;
}

.search-box input::placeholder { color: var(--text-muted); }

.main-content { min-height: 50vh; }

/* ========== Hero Banner ========== */
.hero-banner.carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 20px 0 24px;
    min-height: 220px;
    box-shadow: var(--shadow-lg);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: stretch;
}

.hero-slide.active { opacity: 1; z-index: 1; }

.hero-slide__bg {
    position: absolute;
    inset: 0;
    background: var(--gradient);
}

.hero-slide__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    padding: 24px 20px 32px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-slide__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
    margin-bottom: 10px;
}

.hero-slide__title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}

.hero-slide__desc {
    font-size: 0.8rem;
    line-height: 1.6;
    opacity: 0.92;
    margin-bottom: 16px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 12px 32px;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    border: 2px solid #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.btn-hero:active { transform: scale(0.97); }

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s;
}

.carousel-dot.active {
    background: #fff;
    width: 22px;
    box-shadow: 0 0 0 2px rgba(255, 148, 77, 0.5);
}

/* ========== 首页快捷卡片 ========== */
.shortcut-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.shortcut-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.shortcut-chip .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.shortcut-chip .icon-svg { color: var(--primary); }

.shortcut-chip span:last-child {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.shortcut-chip:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.shortcut-chip:active { transform: scale(0.98); }

/* 准考证 / 成绩 */
.admit-view .admit-info-block {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.admit-view .admit-info-block h2 {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.admit-meta-list {
    list-style: none;
    font-size: 0.88rem;
}

.admit-meta-list li {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}

.admit-meta-list li span:first-child {
    width: 72px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.admit-img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.admit-pdf-frame {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.score-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

@media print {
    .admit-pdf-frame { height: 100vh; }
    .no-print { display: none !important; }
}

/* ========== Section ========== */
.section-block { margin-bottom: 8px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section-more {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: 999px;
    background: #EEF1F5;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.2s;
}

.category-tab:hover {
    background: #E4E8ED;
    color: var(--text-secondary);
}

.category-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(255, 148, 77, 0.35);
}

/* ========== Exam list cards ========== */
.exam-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.exam-list-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.exam-list-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.exam-list-card:active { transform: scale(0.99); }

.exam-list-card__main { flex: 1; min-width: 0; }

.exam-list-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.exam-list-card__title {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.exam-list-card__time {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.exam-list-card__time .label {
    color: var(--text);
    font-weight: 600;
    margin-right: 4px;
}

.exam-list-card__time--sub { margin-top: 2px; }

.exam-list-card__arrow {
    color: var(--primary-light);
    flex-shrink: 0;
}

.category-tag--muted {
    font-size: 0.68rem;
    padding: 2px 8px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 999px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}

.status-open {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.status-closed { background: #EEF1F5; color: var(--text-muted); }
.status-upcoming { background: var(--warning-bg); color: #92400E; }
.status-pending { background: var(--warning-bg); color: #92400E; }
.status-approved { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.status-rejected { background: var(--danger-bg); color: #991B1B; }
.status-payment { background: #FFF0E6; color: var(--primary-dark); font-weight: 700; }
.status-payment-review { background: #FFE8D6; color: #C2410C; font-weight: 600; }

.payment-info-box,
.payment-qrcode-box {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.payment-info-box h3,
.payment-qrcode-box h3 {
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.payment-qrcode-img {
    max-width: 240px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: block;
    margin: 0 auto;
}

.payment-fee {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

/* Legacy grid card (exams page) */
.exam-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exam-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.exam-card-header {
    background: var(--gradient-soft);
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.exam-card .category-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 3px 10px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    margin-bottom: 8px;
}

.exam-card h3 { font-size: 1rem; font-weight: 700; }
.exam-card-body { padding: 16px; }
.exam-card-footer { padding: 12px 16px; border-top: 1px solid var(--border); }

.exam-meta { font-size: 0.82rem; color: var(--text-muted); }
.exam-meta > div { margin-bottom: 6px; }
.exam-meta dt { font-weight: 600; color: var(--text); display: inline; }
.exam-meta dd { display: inline; }

/* ========== Bottom nav ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 24px rgba(45, 52, 54, 0.06);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 8px 14px;
    min-width: 68px;
    transition: color 0.2s, transform 0.15s;
}

.nav-item .icon-svg { color: var(--text-muted); transition: color 0.2s; }

.nav-item.active {
    color: var(--primary);
    font-weight: 700;
}

.nav-item.active .icon-svg { color: var(--primary); }

.nav-item:active { transform: scale(0.92); }

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 148, 77, 0.4);
}

.btn-primary:hover { filter: brightness(1.03); box-shadow: 0 6px 18px rgba(255, 148, 77, 0.45); }

.btn-primary:active { transform: scale(0.97); }

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.8);
    color: #fff;
}

.btn-outline-dark {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

/* ========== Forms & pages ========== */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-card h1 { text-align: center; margin-bottom: 8px; font-size: 1.35rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }

.form-group { margin-bottom: 18px; }

fieldset.form-group { border: none; padding: 0; margin: 0 0 18px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 148, 77, 0.15);
}

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }

.login-tabs {
    display: flex;
    margin-bottom: 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-tab.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.88rem;
}

.alert-error { background: var(--danger-bg); color: #991B1B; }
.alert-success { background: var(--success-bg); color: #065F46; }

.auth-links { text-align: center; margin-top: 16px; font-size: 0.88rem; }
.auth-links a { color: var(--primary); text-decoration: none; }

.page-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: var(--gradient);
    border-radius: var(--radius);
    color: #fff;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.menu-list { list-style: none; }
.menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
}

.menu-list a:hover { color: var(--primary); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table th { background: var(--bg); color: var(--text-muted); font-weight: 600; }

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.message-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.message-item.unread { background: var(--primary-soft); border-left: 3px solid var(--primary); }
.message-item h4 { font-size: 0.92rem; margin-bottom: 4px; }
.message-item .time { font-size: 0.75rem; color: var(--text-muted); }

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.quick-link {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 200px;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s;
}

.carousel-slide.active { opacity: 1; z-index: 1; }

@media print {
    .top-header, .bottom-nav, .no-print { display: none !important; }
    .app-body { padding: 0; }
}

.admit-card-print {
    border: 2px solid var(--text);
    padding: 32px;
    max-width: 600px;
    margin: 0 auto;
}

.sms-row { display: flex; gap: 10px; }
.sms-row input { flex: 1; }
.sms-row button { white-space: nowrap; }

@media (min-width: 768px) {
    .container { max-width: 720px; }
    .hero-slide__title { font-size: 1.5rem; }
}
