:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #172033;
  --muted: #6b7280;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #eef3fb 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.search-wrap {
  flex: 1 1 320px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.search-wrap input:focus {
  border-color: #93c5fd;
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.stat-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.status {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 18px;
}

.section-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.section-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.section-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}

tbody tr:nth-child(even) td {
  background: #fbfdff;
}

tbody tr:hover td {
  background: #f2f7ff;
}

td.is-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.is-empty {
  color: #9ca3af;
  font-style: italic;
}

.empty-box {
  background: var(--surface);
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
  padding: 36px 22px;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #4CAF50;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .page {
    padding: 14px;
  }

  .hero {
    padding: 22px 18px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .toolbar {
    padding: 12px;
  }

  .section-head {
    padding: 16px;
  }

  tbody td,
  thead th {
    padding: 12px 14px;
  }
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.home-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 24px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  background: #f8fbff;
}

.home-card span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.home-note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .home-card {
    min-height: 96px;
    font-size: 18px;
    border-radius: 18px;
  }
}