:root {
  --bg: #f5f5f7; /* Apple-like light gray background */
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --text: #1d1d1f; /* Apple-like dark text */
  --muted: #86868b; /* Apple-like secondary text */
  --line: #d2d2d7;
  --primary: #0066cc; /* Apple blue */
  --primary-soft: #e8f0fe;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08); /* Softer, wider shadow */
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --radius-lg: 24px; /* More rounded corners */
  --radius-md: 16px;
  --content-width: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  width: min(var(--content-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav a,
.button-link {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav a:hover,
.button-link:hover {
  background: var(--surface);
  border-color: var(--muted);
}

.button-link.button-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.button-link.button-primary:hover {
  background: #0055b3;
  border-color: #0055b3;
}

.hero,
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.hero {
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  margin-bottom: 32px;
  border: none; /* Clean look */
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0 0 24px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-summary {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.avatar-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  text-align: center;
}

.avatar-frame {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-sm);
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meta-block {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.meta-value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.grid {
  display: grid;
  gap: 32px;
}

.section-title {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card {
  padding: 40px;
  border: none;
}

.list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  transition: background 0.3s ease;
}

.timeline-item:hover {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.timeline-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  background: #e5e5ea;
  padding: 4px 10px;
  border-radius: 999px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: all 0.3s ease;
}

.chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.landing-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
}

.landing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.landing-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.landing-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  flex-grow: 1;
}

.landing-card span {
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.landing-card span::after {
  content: "→";
  transition: transform 0.3s ease;
}

.landing-card:hover span::after {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .hero,
  .split,
  .landing-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .avatar-frame {
    max-width: 160px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(var(--content-width), calc(100% - 20px));
    padding-top: 20px;
    padding-bottom: 48px;
  }

  .card,
  .timeline-item {
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .nav-actions {
    width: 100%;
  }

  .nav a,
  .button-link {
    width: 100%;
    text-align: center;
  }

  .hero {
    gap: 20px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .avatar-card {
    padding: 16px;
  }

  .avatar-frame {
    max-width: 132px;
    border-radius: 14px;
  }

  .meta-block {
    padding: 16px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .topbar,
  .footer-note {
    display: none;
  }

  .hero,
  .card,
  .timeline-item,
  .landing-card {
    box-shadow: none;
    border: 1px solid #d0d7de;
    break-inside: avoid;
  }
}

/* ==========================================================================
   Welcome & Dashboard Styles
   ========================================================================== */

.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 640px;
  margin-bottom: 48px;
}

.welcome-icon {
  font-size: 72px;
  margin-bottom: 24px;
  line-height: 1;
}

.welcome-card h1 {
  margin: 0 0 24px;
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.welcome-card p {
  font-size: 18px;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.welcome-muted {
  color: #a1a1a6;
  font-size: 15px;
}

.footer-admin {
  font-size: 12px;
  color: rgba(0,0,0,0.1);
  cursor: pointer;
  padding: 10px;
  user-select: none;
  transition: color 0.3s ease;
  letter-spacing: 0.05em;
}

.footer-admin:hover {
  color: var(--muted);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 12px;
}

.stat-value {
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dashboard-tables {
  margin-bottom: 32px;
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  background: var(--surface);
}

.data-table th,
.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-soft);
  letter-spacing: 0.01em;
}

.data-table tbody tr {
  transition: background 0.2s ease;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--surface-soft);
}

@media (max-width: 900px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

