﻿/* 武夷山市同心学校 - 主题样式 */
:root {
  --school-red: #C62828;
  --school-red-dark: #9E1B1B;
  --school-red-light: #EF5350;
  --school-orange: #FFB300;
  --school-gold: #F9C440;
  --school-green: #4CAF50;
  --school-green-dark: #388E3C;
  --school-blue: #5BA4E5;
  --school-slate: #2C3E50;
  --school-charcoal: #1a2332;
  --school-gray-bg: #f0f2f5;
  --school-card-shadow: 0 4px 20px rgba(198, 40, 40, 0.08);
  --radius-lg: 12px;
  --radius-md: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--school-gray-bg);
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* LED 校训滚动条 */
.school-ticker {
  background: linear-gradient(180deg, #1a0a0a 0%, #2d1515 100%);
  color: var(--school-red-light);
  font-size: 14px;
  padding: 8px 0;
  overflow: hidden;
  border-bottom: 2px solid var(--school-red);
}

.school-ticker-inner {
  display: flex;
  animation: ticker-scroll 25s linear infinite;
  white-space: nowrap;
}

.school-ticker-inner span {
  padding: 0 40px;
  letter-spacing: 2px;
}

.school-ticker-inner .ticker-date {
  color: var(--school-gold);
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 横幅背景 */
.hero-banner {
  position: relative;
  height: 420px;
  background: url('/images/campus-track.png') center center / cover no-repeat;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--school-red), var(--school-orange), var(--school-gold));
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.55) 0%,
    rgba(15, 23, 42, 0.35) 50%,
    rgba(198, 40, 40, 0.28) 100%
  );
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: min(92%, 880px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-panel {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 26px 36px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.hero-logo {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  background: white;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  object-fit: contain;
}

.hero-copy {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(249, 196, 64, 0.45);
}

.hero-title {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.14em;
  line-height: 1.35;
  margin: 0;
}

.hero-subtitle {
  font-size: 15px;
  margin: 0;
  letter-spacing: 0.2em;
  color: var(--school-gold);
  font-weight: 500;
}

.hero-motto-bar {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hero-motto-bar li {
  padding: 12px 28px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  color: #fff;
  background: linear-gradient(180deg, var(--school-red) 0%, var(--school-red-dark) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-motto-bar li:last-child {
  border-right: none;
}

/* 兼容旧结构 */
.hero-motto {
  display: none;
}

.hero-content h1:not(.hero-title) {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.14em;
  margin: 0;
}

/* 子页面紧凑横幅 */
.page-hero-compact {
  position: relative;
  height: 160px;
  background: center center / cover no-repeat;
  overflow: hidden;
}

.page-hero-compact .hero-overlay {
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.65) 0%,
    rgba(198, 40, 40, 0.35) 100%
  );
}

.page-hero-compact .hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
  width: auto;
  max-width: 92%;
  padding-top: 25px;
  position: relative;
  top: -8px;
}

.page-hero-compact .hero-logo {
  width: 56px;
  height: 56px;
  margin: 0;
  flex-shrink: 0;
}

.page-hero-compact .hero-copy,
.page-hero-compact .hero-text {
  text-align: left;
}

.page-hero-compact h1,
.page-hero-compact .hero-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #fff;
  margin: 0 0 4px;
  text-shadow: none;
}

.page-hero-compact .hero-subtitle {
  font-size: 14px;
  margin: 0;
  letter-spacing: 0.15em;
  color: var(--school-gold);
  font-weight: 500;
  text-shadow: none;
}

.page-hero--admin { background-image: url('/images/campus-entrance.png'); }
.page-hero--teacher { background-image: url('/images/campus-building.png'); }
.page-hero--moral { background-image: url('/images/campus-5.jpg'); }
.page-hero--parent { background-image: url('/images/campus-track.png'); }
.page-hero--gate { background-image: url('/images/achievement-wall.png'); }
.page-hero--dormitory { background-image: url('/images/courtyard.png'); }

/* 校园风采 */
.campus-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.campus-gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--school-card-shadow);
}

.campus-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.campus-gallery-item:hover img {
  transform: scale(1.08);
}

.campus-gallery-item span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  font-size: 12px;
}

/* 主导航栏 */
.main-nav {
  background: var(--school-charcoal);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--school-red);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  min-height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  justify-self: start;
  text-decoration: none;
  color: white;
  grid-column: 1;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  padding: 3px;
}

.nav-brand span {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  grid-column: 2;
  justify-self: center;
}

.nav-link {
  color: #ccc;
  text-decoration: none;
  padding: 14px 16px;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--school-gold);
  border-bottom-color: var(--school-orange);
  background: rgba(255, 179, 0, 0.1);
}

/* 头部导航（子页面） */
.header {
  background: linear-gradient(135deg, var(--school-charcoal) 0%, var(--school-slate) 100%);
  color: white;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border-bottom: 3px solid var(--school-red);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.header-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  padding: 4px;
}

.header h1 {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  color: #e0e0e0;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.3s;
  font-size: 14px;
}

.nav a:hover {
  background: rgba(255, 179, 0, 0.2);
  color: var(--school-gold);
}

/* 功能介绍行 */
.features-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.feature-link {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fafafa;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  border: 1px solid #eee;
  border-left: 4px solid var(--school-red);
}

.feature-link:hover {
  background: #fff8f0;
  transform: translateY(-2px);
  box-shadow: var(--school-card-shadow);
  border-left-color: var(--school-orange);
}

.feature-link .feature-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.feature-link .feature-text {
  display: flex;
  flex-direction: column;
}

.feature-link .feature-text strong {
  color: var(--school-red-dark);
  font-size: 14px;
  margin-bottom: 2px;
}

.feature-link .feature-text span {
  color: #888;
  font-size: 12px;
  line-height: 1.4;
}

/* 欢迎卡片 */
.welcome-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--school-card-shadow);
  border-top: 4px solid var(--school-red);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #fafafa;
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.feature-item:hover {
  background: #fff8f0;
  transform: translateX(5px);
}

.feature-icon {
  font-size: 32px;
}

.feature-text {
  display: flex;
  flex-direction: column;
}

.feature-text strong {
  color: #333;
  margin-bottom: 2px;
}

.feature-text span {
  color: #666;
  font-size: 13px;
}

/* 区块标题 */
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--school-red-dark);
  padding-left: 15px;
  border-left: 4px solid var(--school-red);
}

/* 页脚 */
.footer {
  background: var(--school-charcoal);
  color: #fff;
  text-align: center;
  padding: 24px 20px;
  margin-top: 40px;
  border-top: 3px solid var(--school-red);
}

.footer p {
  font-size: 14px;
}

.footer-motto {
  color: var(--school-gold);
  letter-spacing: 8px;
  margin-top: 8px;
  font-size: 13px;
}

.footer .footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  margin-top: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #eee;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--school-red-dark);
  border-bottom: 2px solid var(--school-red);
  padding-bottom: 10px;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--school-card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 3px solid var(--school-red);
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(198, 40, 40, 0.15);
}

.stat-card .icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.stat-card .value {
  font-size: 20px;
  font-weight: bold;
  color: var(--school-red);
}

.stat-card .label {
  color: #666;
  font-size: 13px;
  margin-top: 5px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--school-red);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* 按钮样式 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--school-red);
  color: white;
}

.btn-primary:hover {
  background: var(--school-red-dark);
}

.btn-success {
  background: var(--school-green);
  color: white;
}

.btn-success:hover {
  background: var(--school-green-dark);
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-warning {
  background: var(--school-orange);
  color: #333;
}

.btn-warning:hover {
  background: #e6a200;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

table th,
table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

table th {
  background: #fafafa;
  font-weight: 600;
  color: var(--school-red-dark);
}

table tr:hover {
  background: #fff8f8;
}

.checkbox-column {
  width: 44px;
  text-align: center !important;
}

.checkbox-column input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  vertical-align: middle;
}

/* 状态标签 */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-pending {
  background: #fff3cd;
  color: #856404;
}

.badge-teacher_approved {
  background: #cce5ff;
  color: #004085;
}

.badge-approved {
  background: #d4edda;
  color: #155724;
}

.badge-rejected {
  background: #f8d7da;
  color: #721c24;
}

.badge-returned {
  background: #e2e3e5;
  color: #383d41;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border-top: 4px solid var(--school-red);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  color: var(--school-red-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.modal-close:hover {
  color: #333;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
  flex: 1;
  min-width: 150px;
}

/* 日 / 周 / 月班级请假统计 */
.class-stats-heading {
  margin-bottom: 14px;
}

.class-stats-heading .card-title {
  margin-bottom: 8px;
}

.class-stats-summary {
  color: #666;
  font-size: 13px;
}

.class-stats-summary strong {
  color: var(--school-red-dark);
  font-size: 16px;
}

.class-stats-filter {
  align-items: center;
}

.period-tabs {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.stats-date-input {
  max-width: 190px;
}

.class-stats-filter .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 提示信息 */
.alert {
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-info {
  background: #e3f2fd;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ===== 移动端门户登录（家长/教师/德育/生管） ===== */
.portal-login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  padding-top: max(24px, env(safe-area-inset-top, 0));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0));
  padding-left: max(20px, env(safe-area-inset-left, 0));
  padding-right: max(20px, env(safe-area-inset-right, 0));
  position: relative;
  background: center center / cover no-repeat;
  -webkit-tap-highlight-color: transparent;
}

.portal-login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(26, 35, 50, 0.88) 0%,
    rgba(198, 40, 40, 0.55) 100%
  );
}

.portal-login--parent { background-image: url('/images/campus-track.png'); }
.portal-login--teacher { background-image: url('/images/campus-building.png'); }
.portal-login--moral { background-image: url('/images/campus-5.jpg'); }
.portal-login--dormitory { background-image: url('/images/courtyard.png'); }

.portal-login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 32px 24px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border-top: 4px solid var(--school-red);
  position: relative;
  z-index: 1;
}

.portal-login-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: white;
  padding: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  object-fit: contain;
}

.portal-login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--school-red-dark);
  margin: 0 0 6px;
  letter-spacing: 0.05em;
}

.portal-login-subtitle {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin: 0 0 24px;
  letter-spacing: 0.08em;
}

.portal-login-motto {
  text-align: center;
  font-size: 13px;
  color: var(--school-gold);
  letter-spacing: 0.35em;
  margin: -12px 0 20px;
  font-weight: 600;
}

.portal-login-card .form-group {
  margin-bottom: 18px;
}

.portal-login-card .form-group label {
  font-size: 15px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
}

.portal-login-card .form-control {
  padding: 14px 16px;
  font-size: 16px;
  min-height: 50px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.portal-login-card .form-control:focus {
  border-color: var(--school-red);
  box-shadow: 0 0 0 4px rgba(198, 40, 40, 0.12);
}

.portal-login-card .btn-primary {
  width: 100%;
  min-height: 52px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 10px;
  margin-top: 4px;
  background: linear-gradient(135deg, var(--school-red) 0%, var(--school-red-dark) 100%);
  touch-action: manipulation;
}

.portal-login-card .btn-primary:active {
  transform: scale(0.98);
}

.portal-login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.portal-login-footer a {
  color: var(--school-red);
  text-decoration: none;
  font-weight: 500;
}

.portal-login-footer a:hover {
  text-decoration: underline;
}

.portal-login-legal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  margin-top: 18px;
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.portal-login-legal p {
  margin: 0;
}

.portal-login-legal-motto {
  color: var(--school-gold);
  letter-spacing: 0.24em;
}

/* 审批列表卡片 */
.approval-summary {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border-radius: 10px;
  font-size: 15px;
  border-left: 4px solid var(--school-blue);
}

.approval-card-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s;
}

.approval-card-item:hover {
  box-shadow: 0 4px 16px rgba(198, 40, 40, 0.08);
}

.approval-card-item h3 {
  font-size: 17px;
  margin-bottom: 10px;
  word-break: break-word;
  color: #333;
}

.approval-card-item h3 .meta {
  font-size: 14px;
  color: #888;
  font-weight: 400;
}

.approval-card-item p {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: #555;
  word-break: break-word;
}

.approval-card-item p strong {
  color: #333;
}

.approval-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.approval-card-body {
  flex: 1;
  min-width: 0;
}

.approval-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 15px;
}

.approve-info-panel {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  border-left: 4px solid var(--school-red);
}

.approve-info-panel p {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.6;
}

.approve-info-panel p:last-child {
  margin-bottom: 0;
}

/* 管理员全屏登录（勿与子页面 login-container 混用） */
.login-screen {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url('/images/campus-entrance.png') center center / cover no-repeat fixed;
  position: relative;
}

.login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.85) 0%, rgba(198, 40, 40, 0.6) 100%);
}

/* 班主任 / 德育处 / 生管 登录卡片 */
.auth-container {
  max-width: 420px;
  margin: 24px auto 40px;
  padding: 0 20px;
}

#loginSection.card {
  margin: 0;
  padding: 28px 24px 24px;
}

#loginSection .card-title {
  text-align: center;
  margin-bottom: 20px;
}

#loginSection .btn-primary {
  width: 100%;
  margin-top: 4px;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  border-top: 4px solid var(--school-red);
}

.login-box .login-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.login-box h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--school-red-dark);
  font-size: 20px;
}

.login-box a {
  color: var(--school-red);
}

/* 门卫大屏 */
.gate-board {
  background: linear-gradient(180deg, #1a2332 0%, #0f1419 100%);
  min-height: 100vh;
  padding: 20px;
  color: white;
}

.gate-board-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--school-red);
}

.gate-board-header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  margin-bottom: 10px;
}

.gate-board h1 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 6px;
  color: white;
}

.gate-board .gate-motto {
  color: var(--school-gold);
  letter-spacing: 8px;
  font-size: 14px;
}

.gate-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 10px;
}

.gate-list::-webkit-scrollbar {
  width: 8px;
}

.gate-list::-webkit-scrollbar-track {
  background: #1a2332;
  border-radius: 4px;
}

.gate-list::-webkit-scrollbar-thumb {
  background: var(--school-red);
  border-radius: 4px;
}

.gate-list::-webkit-scrollbar-thumb:hover {
  background: var(--school-red-light);
}

.gate-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  border-left: 4px solid var(--school-orange);
  backdrop-filter: blur(4px);
}

.gate-item h3 {
  color: var(--school-gold);
  margin-bottom: 10px;
}

.gate-item p {
  margin: 5px 0;
  color: #ccc;
}

.gate-item .btn {
  margin-top: 15px;
  width: 100%;
}

.refresh-info {
  text-align: center;
  color: #888;
  margin-top: 20px;
}

/* 值观展示 */
.values-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.value-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--school-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
  border: 2px solid var(--school-gold);
}

/* 门卫大屏：保持桌面布局，手机端横向滚动即可 */
body.gate-desktop {
  min-width: 1000px;
  overflow-x: auto;
}

/* 移动端通用（除门卫外各系统 body.mobile-app） */
@media (max-width: 768px) {
  body.mobile-app {
    -webkit-text-size-adjust: 100%;
  }

  body.mobile-app.has-page-hero .header-brand {
    display: none;
  }

  body.mobile-app.has-page-hero .header-inner {
    padding: 10px 14px;
  }

  body.mobile-app.has-page-hero .header .nav {
    margin-top: 0;
    justify-content: center;
  }

  body.mobile-app.has-page-hero .header .nav a {
    flex: 1;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.mobile-app .page-hero-compact {
    height: 110px;
  }

  body.mobile-app .page-hero-compact .hero-content {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
    top: 0;
  }

  body.mobile-app .page-hero-compact h1 {
    font-size: 18px;
  }

  body.mobile-app .page-hero-compact .hero-subtitle {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  body.mobile-app .auth-container {
    max-width: none;
    margin: 12px auto 24px;
    padding: 0 12px;
  }

  body.mobile-app .search-bar .btn {
    width: 100%;
  }

  body.mobile-app .table-container {
    overflow-x: visible;
  }

  body.mobile-app .table-container table thead {
    display: none;
  }

  body.mobile-app .table-container table,
  body.mobile-app .table-container table tbody,
  body.mobile-app .table-container table tr,
  body.mobile-app .table-container table td {
    display: block;
    width: 100%;
  }

  body.mobile-app .table-container table tr {
    margin-bottom: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  }

  body.mobile-app .table-container table td {
    padding: 8px 0;
    border: none;
    position: relative;
    padding-left: 42%;
    text-align: right;
    font-size: 14px;
    word-break: break-word;
  }

  body.mobile-app .table-container table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 40%;
    padding-right: 8px;
    text-align: left;
    font-weight: 600;
    color: #666;
    font-size: 13px;
  }

  body.mobile-app .table-container table td:last-child {
    padding-left: 0;
    text-align: left;
    margin-top: 8px;
  }

  body.mobile-app .table-container table td:last-child:before {
    display: none;
  }

  body.mobile-app .table-container table td:last-child .btn {
    width: 100%;
    margin-top: 6px;
  }

  body.mobile-app .table-container table td[colspan] {
    padding-left: 0;
    text-align: center;
  }

  body.mobile-app .table-container table td[colspan]:before {
    display: none;
  }

  body.mobile-app .approval-card .approval-actions {
    width: 100%;
    margin-top: 10px;
  }

  body.mobile-app .approval-card .approval-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  body.mobile-app .header-inner {
    padding: 12px 14px;
  }

  body.mobile-app .header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
  }

  body.mobile-app .header-top-row .header-brand {
    margin-bottom: 0;
    justify-content: flex-start;
    flex: 1;
    min-width: 0;
  }

  body.mobile-app .header-top-row .header-brand h1 {
    font-size: 16px;
    text-align: left;
  }

  body.mobile-app .header-top-row .header-brand img {
    width: 36px;
    height: 36px;
  }

  body.mobile-app .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 179, 0, 0.25);
    color: var(--school-gold);
    font-size: 22px;
    cursor: pointer;
  }

  body.mobile-app .header .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  body.mobile-app .header .nav.is-open {
    display: flex;
  }

  body.mobile-app .header .nav a {
    text-align: center;
    padding: 12px;
    font-size: 15px;
  }

  body.mobile-app .login-screen {
    padding: 16px;
    align-items: flex-start;
    padding-top: 12vh;
  }

  body.mobile-app .login-box {
    padding: 28px 22px;
    max-width: 100%;
  }

  body.mobile-app .portal-login-screen {
    padding: 20px 16px;
    padding-top: max(20px, env(safe-area-inset-top, 0));
  }

  body.mobile-app .portal-login-card {
    padding: 28px 20px 24px;
    border-radius: 14px;
  }

  body.mobile-app .portal-login-title {
    font-size: 20px;
  }

  body.mobile-app .approval-card-item {
    padding: 14px;
  }

  body.mobile-app .approval-card-item h3 {
    font-size: 16px;
  }

  body.mobile-app .approval-actions {
    width: 100%;
  }

  body.mobile-app .approval-actions .btn {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
  }

  body.mobile-app .main-nav .nav-links {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 0;
    padding-bottom: 4px;
    max-width: 100%;
  }

  body.mobile-app .main-nav .nav-link {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 12px 14px;
    font-size: 13px;
  }

  body.mobile-app .welcome-card {
    padding: 18px 14px;
  }

  body.mobile-app .footer-motto {
    letter-spacing: 4px;
  }
}

.nav-toggle {
  display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .hero-banner {
    height: auto;
    min-height: 340px;
    padding: 48px 0;
  }

  .hero-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto;
    padding: 24px 16px;
  }

  .hero-panel {
    flex-direction: column;
    text-align: center;
    padding: 22px 20px;
    gap: 16px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-logo {
    width: 72px;
    height: 72px;
  }

  .hero-eyebrow {
    font-size: 12px;
    letter-spacing: 0.2em;
  }

  .hero-title {
    letter-spacing: 0.08em;
  }

  .hero-motto-bar {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 8px;
  }

  .hero-motto-bar li {
    padding: 10px 16px;
    font-size: 14px;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
    flex: 1 1 40%;
    text-align: center;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero-motto-bar li:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero-motto-bar li:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .campus-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-container {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 8px 12px;
    min-height: auto;
  }

  .nav-brand {
    grid-column: 1;
    justify-self: center;
    padding: 6px 0;
  }

  .nav-brand span {
    display: none;
  }

  .nav-links {
    grid-column: 1;
    justify-self: center;
    width: 100%;
  }

  .nav-link {
    padding: 10px 10px;
    font-size: 13px;
  }

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

  .features-row {
    flex-direction: column;
  }

  .feature-link {
    min-width: auto;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
  }

  .search-bar input,
  .search-bar select {
    width: 100%;
  }

  table {
    font-size: 12px;
  }

  table th,
  table td {
    padding: 8px;
  }

  .card {
    padding: 15px;
    margin-bottom: 15px;
  }

  .card-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .form-control {
    padding: 12px 15px;
    font-size: 16px;
    border-radius: 8px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .form-group label {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 8px;
    min-height: 44px;
  }

  .btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 38px;
  }

  .header h1 {
    font-size: 18px;
  }

  .nav {
    gap: 6px;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card .value {
    font-size: 18px;
  }

  .stat-card .icon {
    font-size: 28px;
  }

  .modal-content {
    width: 95%;
    max-width: none;
    padding: 20px 15px;
    border-radius: 12px;
    max-height: 90vh;
  }

  .modal-header h3 {
    font-size: 18px;
  }

  .modal-close {
    font-size: 28px;
    padding: 5px;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .badge {
    padding: 5px 10px;
    font-size: 13px;
  }

  .alert {
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
  }

  .page-hero-compact {
    height: 130px;
  }

  .page-hero-compact h1 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 8px;
  }

  .campus-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .card {
    padding: 12px;
    border-radius: 10px;
  }

  .card-title {
    font-size: 15px;
  }

  .form-control {
    padding: 11px 13px;
    font-size: 16px;
  }

  .btn {
    padding: 11px 18px;
    font-size: 14px;
  }

  .btn-sm {
    padding: 7px 12px;
    font-size: 12px;
  }

  .table-container {
    overflow-x: visible;
  }

  table thead {
    display: none;
  }

  table, table tbody, table tr, table td {
    display: block;
    width: 100%;
  }

  table tr {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: white;
  }

  table td {
    padding: 8px 0;
    border: none;
    position: relative;
    padding-left: 40%;
    text-align: right;
  }

  table td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 38%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: 600;
    color: #666;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 12px;
  }

  .modal-content {
    padding: 18px 12px;
  }

  .search-bar {
    gap: 8px;
  }
}

/* 工具类 */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

/* ==========================================
   优化 & 美化补充样式 (2026)
   ========================================== */

/* 平滑滚动与淡入 */
html { scroll-behavior: smooth; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 页面内容淡入 */
.container, .dormitory-board, .parent-content,
.gate-board, .auth-container {
  animation: fadeInUp 0.45s ease-out both;
}

.stat-card { animation: fadeInUp 0.5s ease-out both; }
.stat-card:nth-child(1) { animation-delay: 0.0s; }
.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.16s; }
.stat-card:nth-child(4) { animation-delay: 0.24s; }
.stat-card:nth-child(5) { animation-delay: 0.32s; }
.stat-card:nth-child(6) { animation-delay: 0.40s; }

.campus-gallery-item { animation: fadeInUp 0.5s ease-out both; }
.campus-gallery-item:nth-child(1) { animation-delay: 0.0s; }
.campus-gallery-item:nth-child(2) { animation-delay: 0.1s; }
.campus-gallery-item:nth-child(3) { animation-delay: 0.2s; }
.campus-gallery-item:nth-child(4) { animation-delay: 0.3s; }

.feature-link { animation: fadeInUp 0.5s ease-out both; }
.feature-link:nth-child(1) { animation-delay: 0.0s; }
.feature-link:nth-child(2) { animation-delay: 0.08s; }
.feature-link:nth-child(3) { animation-delay: 0.16s; }
.feature-link:nth-child(4) { animation-delay: 0.24s; }
.feature-link:nth-child(5) { animation-delay: 0.32s; }
.feature-link:nth-child(6) { animation-delay: 0.40s; }

/* 按钮效果 */
.btn:active:not(.btn-sm) { transform: scale(0.97); }
.btn-sm:active { transform: scale(0.95); }

.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-primary:hover::after { opacity: 1; }

/* 模态框过渡 */
.modal {
  opacity: 0;
  transition: opacity 0.25s ease, backdrop-filter 0.25s ease;
  backdrop-filter: blur(0px);
}
.modal.show { opacity: 1; backdrop-filter: blur(4px); }
.modal-content {
  transform: scale(0.92) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.show .modal-content { transform: scale(1) translateY(0); }

/* 表格行滑入 */
table tbody tr { animation: fadeIn 0.3s ease-out both; }
table tbody tr:nth-child(1) { animation-delay: 0.0s; }
table tbody tr:nth-child(2) { animation-delay: 0.04s; }
table tbody tr:nth-child(3) { animation-delay: 0.08s; }
table tbody tr:nth-child(4) { animation-delay: 0.12s; }
table tbody tr:nth-child(5) { animation-delay: 0.16s; }
table tbody tr:nth-child(6) { animation-delay: 0.20s; }
table tbody tr:nth-child(7) { animation-delay: 0.24s; }
table tbody tr:nth-child(8) { animation-delay: 0.28s; }

/* 状态标签增强 */
.badge { border-radius: 20px; font-weight: 600; }
.badge-pending { animation: pulse 2s ease-in-out infinite; }

/* 卡片微阴影 */
.card { transition: box-shadow 0.3s ease; }
.card:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite; border-radius: 4px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333; color: #fff;
  padding: 14px 28px; border-radius: 10px;
  font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  z-index: 9999; opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: #2e7d32; }
.toast.toast-error { background: #c62828; }
.toast.toast-info { background: #1565c0; }

/* 门卫大屏 */
.gate-board .gate-title-wrap { text-align: center; margin-bottom: 20px; }
.gate-board .gate-logo {
  width: 60px; height: 60px; border-radius: 50%;
  background: white; padding: 5px; margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(255, 179, 0, 0.3);
  object-fit: contain;
}
.gate-board .gate-title {
  font-size: 30px; font-weight: 700; color: #fff;
  letter-spacing: 2px; margin-bottom: 4px;
}
.gate-board .gate-motto {
  color: var(--school-gold); letter-spacing: 10px;
  font-size: 14px; font-weight: 500;
}

/* 门卫统计卡片 */
.gate-stats-row {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 24px;
}
.gate-stat-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px; padding: 18px 32px;
  min-width: 150px; text-align: center;
  transition: all 0.3s;
}
.gate-stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}
.gate-stat-card .stat-number {
  font-size: 36px; font-weight: 800;
  line-height: 1.2; display: block;
}
.gate-stat-card .stat-label {
  font-size: 14px; color: #aaa;
  margin-top: 4px; letter-spacing: 1px;
}
.gate-stat-card.stat-pending .stat-number { color: #ffb300; }
.gate-stat-card.stat-approved .stat-number { color: #4caf50; }
.gate-stat-card.stat-today .stat-number { color: #5ba4e5; }

/* 门卫学生卡片发光 */
.gate-item {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}
.gate-item:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(249, 196, 64, 0.3);
  box-shadow: 0 8px 32px rgba(198, 40, 40, 0.15);
  transform: translateY(-2px);
}
.gate-item .record-number {
  position: absolute; top: 10px; right: 10px;
  background: var(--school-gold); color: #1a2332;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.gate-item .btn-success {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
  border-radius: 8px; font-weight: 600; letter-spacing: 1px;
}
.gate-item .btn-success:hover {
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
  transform: scale(1.02);
}

/* 校园风采悬停 */
.campus-gallery-item {
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.campus-gallery-item:hover {
  box-shadow: 0 8px 28px rgba(198, 40, 40, 0.15);
  transform: translateY(-4px);
}
.campus-gallery-item:hover img { transform: scale(1.12) !important; }

/* 入口卡片装饰 */
.stat-card { position: relative; overflow: hidden; }
.stat-card::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(198,40,40,0.06) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -30%);
  transition: transform 0.4s ease;
}
.stat-card:hover::before { transform: translate(30%, -30%) scale(2); }

/* 特色链接图标 */
.feature-link .feature-icon { transition: transform 0.3s ease; }
.feature-link:hover .feature-icon { transform: scale(1.2); }

/* 导航链接动效 */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  width: 0; height: 3px;
  background: var(--school-orange);
  transition: all 0.3s ease; transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after { width: 60%; }

/* 移动端导航 */
body.mobile-app .nav-toggle { transition: background 0.2s; }
body.mobile-app .nav-toggle:active { background: rgba(255, 179, 0, 0.4); }
body.mobile-app .header .nav { transition: all 0.3s ease; }

/* 页脚光条 */
.footer { position: relative; overflow: hidden; }
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--school-red), var(--school-gold), var(--school-red), transparent);
}

/* 工具 */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.accent-bar { height: 4px; background: linear-gradient(90deg, var(--school-red), var(--school-orange), var(--school-gold)); }
.loading-dots::after { content: ''; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* ==========================================
   移动端门户增强 (家长/教师/德育/生管)
   ========================================== */

/* 学生头像 */
.student-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--school-red) 0%, var(--school-red-dark) 100%);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.25);
}
.student-avatar--sm { width: 36px; height: 36px; font-size: 14px; }
.student-avatar--md { width: 48px; height: 48px; font-size: 18px; }
.student-avatar--lg { width: 64px; height: 64px; font-size: 24px; }

/* 统计条 */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.portal-stat {
  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.portal-stat:active { transform: scale(0.98); }
.portal-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--school-red);
  line-height: 1.2;
}
.portal-stat-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}
.portal-stat.stat-urgent .portal-stat-value { color: #e65100; }
.portal-stat.stat-success .portal-stat-value { color: var(--school-green-dark); }
.portal-stat.stat-info .portal-stat-value { color: #1976d2; }

/* 空状态 */
.portal-empty {
  text-align: center;
  padding: 36px 20px;
}
.portal-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.85;
}
.portal-empty-text {
  font-size: 16px;
  color: #666;
  margin: 0 0 6px;
}
.portal-empty-hint {
  font-size: 13px;
  color: #aaa;
  margin: 0;
}

/* 智能提示 */
.smart-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  font-size: 14px;
  color: #2e7d32;
  margin-bottom: 14px;
  line-height: 1.5;
}
.smart-hint-icon { font-size: 18px; flex-shrink: 0; }

/* 事由快捷选择 */
.reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.reason-chip {
  padding: 8px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.reason-chip:active,
.reason-chip.active {
  border-color: var(--school-red);
  background: #fff5f5;
  color: var(--school-red-dark);
  font-weight: 600;
}

/* 时长标签 */
.duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.urgent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fff3e0;
  color: #e65100;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  animation: pulse 2s ease-in-out infinite;
}

/* 增强审批卡片 */
.approval-card-item {
  border-left: 4px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.approval-card-item.card-urgent {
  border-left-color: #ff9800;
  background: linear-gradient(135deg, #fff 0%, #fffaf5 100%);
}
.approval-card-item.card-normal {
  border-left-color: var(--school-red);
}
.approval-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.approval-card-head h3 {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
}
.approval-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.approval-card-skeleton { pointer-events: none; }

/* 移动端状态筛选标签 */
.status-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 12px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.status-tabs::-webkit-scrollbar { display: none; }
.status-tab {
  flex-shrink: 0;
  padding: 10px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 22px;
  background: #fff;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.status-tab.active {
  background: linear-gradient(135deg, var(--school-red) 0%, var(--school-red-dark) 100%);
  border-color: var(--school-red);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.25);
}

/* 刷新浮动按钮 */
.fab-refresh {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0));
  right: calc(20px + env(safe-area-inset-right, 0));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--school-red) 0%, var(--school-red-dark) 100%);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(198, 40, 40, 0.4);
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
}
.fab-refresh:active { transform: scale(0.92); }
.fab-refresh.spinning { animation: fabSpin 0.8s linear; }
@keyframes fabSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 家长端增强 */
.parent-page .parent-card {
  border-top: 3px solid var(--school-red);
  transition: box-shadow 0.3s;
}
.parent-page .parent-card:hover {
  box-shadow: 0 4px 20px rgba(198, 40, 40, 0.1);
}
.parent-student-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #eee;
}
.parent-student-header .student-name {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0 0 4px;
}
.parent-student-header .student-class {
  font-size: 14px;
  color: #888;
  margin: 0;
}
.parent-page .step-indicator {
  background: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 16px;
}
.parent-page .step.active .step-number {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.2);
}
.parent-page .leave-record-item {
  transition: box-shadow 0.2s;
  border-left: 3px solid var(--school-red);
}
.parent-page .leave-record-item:active {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 生管端卡片列表（移动端） */
.dormitory-leave-cards { display: none; }
.dormitory-leave-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--school-blue);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dormitory-leave-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.dormitory-leave-card-head h4 {
  margin: 0;
  font-size: 17px;
  color: #333;
  flex: 1;
}
.dormitory-leave-card p {
  margin: 6px 0;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  word-break: break-word;
}
.dormitory-leave-card p strong { color: #333; }

/* 自动刷新提示 */
.auto-refresh-hint {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  margin-top: -8px;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  body.mobile-app .portal-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  body.mobile-app .portal-stat {
    padding: 12px 6px;
  }
  body.mobile-app .portal-stat-value {
    font-size: 20px;
  }
  body.mobile-app .approval-card-row {
    flex-direction: column;
  }
  body.mobile-app .approval-card-head {
    flex-wrap: wrap;
  }
  body.mobile-app .approval-actions {
    width: 100%;
    display: flex;
    gap: 10px;
  }
  body.mobile-app .approval-actions .btn-success {
    flex: 1;
    min-height: 48px;
    font-size: 15px;
    border-radius: 10px;
  }
  body.mobile-app .dormitory-board .filter-bar select {
    display: none;
  }
  body.mobile-app .dormitory-board .status-tabs {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overscroll-behavior-inline: contain;
  }
  body.mobile-app .dormitory-board .filter-bar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body.mobile-app .dormitory-board .leaves-table {
    display: none;
  }
  body.mobile-app .dormitory-board .dormitory-leave-cards {
    display: block;
  }
  body.mobile-app .container {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
  }
}

@media (min-width: 769px) {
  .status-tabs { display: none; }
  .status-tabs.period-tabs { display: flex; }
  .fab-refresh { display: none; }
}
