* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

:root {
  --blue-900: #0b1f4a;
  --blue-800: #102a63;
  --blue-700: #143b8a;
  --blue-600: #1c4ed8;
  --blue-500: #2563eb;
  --blue-400: #60a5fa;
  --blue-300: #93c5fd;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --white: #ffffff;
  --ink: #0f172a;
  --muted: #52607a;
  --card: #f8fbff;
  --border: #d1ddf7;
  --shadow: 0 16px 40px rgba(11, 31, 74, 0.15);
}

.muted {
  color: var(--muted);
}

body {
  background: radial-gradient(100% 140% at 0% 0%, #e7f0ff 0%, #f4f8ff 40%, #ffffff 100%);
  color: var(--ink);
  min-height: 100vh;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--white);
  padding: 4px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-300));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--white);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill.active {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  font-weight: 700;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 36px rgba(14, 60, 159, 0.15);
  padding: 8px;
  display: none;
  z-index: 20;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-item {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--blue-900);
  text-decoration: none;
  font-size: 13px;
}

.nav-dropdown-item:hover {
  background: rgba(59, 130, 246, 0.12);
}

.page-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 36px rgba(14, 60, 159, 0.1);
  padding: 24px;
}

.card h2 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--blue-900);
}

.card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--blue-800);
  position: relative;
}

.field .hint {
  color: var(--muted);
  font-size: 12px;
}

.field .error {
  color: #b91c1c;
  font-size: 12px;
  display: none;
}


.field.is-error .error {
  display: block;
}

.field.is-error input,
.field.is-error select,
.field.is-error textarea {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field input,
.field select,
.field textarea {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.span-2 {
  grid-column: span 2;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.is-loading,
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: var(--white);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--blue-700);
  border: 1px solid var(--blue-300);
}

.btn-outline.on-dark {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.btn-link:focus-visible,
.option-link:focus-visible,
.pill:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.4);
  outline-offset: 2px;
}

.btn-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-card {
  background: linear-gradient(160deg, var(--blue-900), var(--blue-700));
  color: var(--white);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.info-card h3 {
  font-size: 20px;
}

.info-card .card h4,
.info-card .card p {
  color: var(--white);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  color: var(--white);
}

.stat h4 {
  font-size: 18px;
  margin-bottom: 4px;
}

.stat span {
  font-size: 12px;
  opacity: 0.8;
}

.table-card {
  background: var(--white);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  margin-top: 20px;
}

.table-card h3 {
  margin-bottom: 12px;
  color: var(--blue-800);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.radio-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--blue-800);
}

.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-search input,
.table-search select {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: var(--card);
  min-width: 220px;
  font-size: 13px;
  color: var(--ink);
}

.table-search select {
  min-width: 170px;
  cursor: pointer;
}

.table-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.pagination .page-info {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 16px;
  font-size: 13px;
}

.is-hidden {
  display: none;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-responsive .table {
  min-width: 760px;
}

.table.table-wide {
  min-width: 1100px;
}

.table.table-nowrap th,
.table.table-nowrap td {
  white-space: nowrap;
}

.table th {
  text-align: left;
  padding: 10px 8px;
  color: var(--blue-700);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef2ff;
  color: var(--muted);
}

.file-input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--card);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.file-input::file-selector-button {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  margin-right: 12px;
  background: var(--blue-500);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
}

.file-input::file-selector-button:hover {
  background: var(--blue-600);
}

.table-state td {
  text-align: center;
  color: var(--muted);
  padding: 18px 8px;
}

.is-hidden {
  display: none;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--blue-600);
  color: var(--white);
}

.login-shell {
  max-width: 480px;
  margin: 40px auto;
  padding: 28px;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.login-shell h1 {
  color: var(--blue-900);
  font-size: 26px;
  margin-bottom: 8px;
}

.login-shell p {
  color: var(--muted);
  margin-bottom: 18px;
}

.login-shell .btn-row {
  margin-top: 18px;
}

.hero {
  margin-top: 26px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.hero h1 {
  font-size: 28px;
  color: var(--white);
  margin-bottom: 6px;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.option-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.option-card {
  background: var(--white);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 28px rgba(14, 60, 159, 0.08);
  display: grid;
  gap: 10px;
}

.option-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--blue-600);
  color: var(--white);
  font-size: 22px;
}

.option-card h3 {
  color: var(--blue-900);
  font-size: 20px;
}

.option-card p {
  color: var(--muted);
  font-size: 14px;
}

.option-link {
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 600;
  margin-top: 6px;
}

.option-link:hover {
  color: var(--blue-600);
}

.about-section {
  margin-top: 30px;
  padding: 22px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 12px 26px rgba(14, 60, 159, 0.08);
}

.about-section h2 {
  color: var(--blue-900);
  margin-bottom: 6px;
}

.about-section p {
  color: var(--muted);
  margin-bottom: 18px;
}

.print-only {
  display: none;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
}

.about-card h4 {
  color: var(--blue-900);
  margin-bottom: 4px;
}

.about-card span {
  color: var(--muted);
  font-size: 13px;
}

.about-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--blue-600);
  color: var(--white);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 15, 43, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 26px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
  text-align: center;
}

.report-exclude-card {
  max-width: 560px;
  text-align: left;
}

.report-exclude-body {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 10px;
  background: #f8fafc;
  max-height: 260px;
  overflow: auto;
  margin-bottom: 16px;
}

.report-exclude-state {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 6px;
}

.report-exclude-list {
  display: grid;
  gap: 8px;
}

.report-exclude-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--white);
  cursor: pointer;
}

.report-exclude-item input {
  margin-top: 3px;
}

.report-exclude-item span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--blue-900);
}

.report-exclude-item small {
  color: var(--muted);
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
}

.modal-success .modal-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #0f766e;
}

.modal-error .modal-icon {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.modal-card h3 {
  color: var(--blue-900);
  margin-bottom: 8px;
}

.modal-card p {
  color: var(--muted);
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}


.notice-bar {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.notice-bar strong {
  color: var(--white);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.repeater {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.repeater-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  border: 1px solid var(--blue-200);
  font-size: 13px;
}

.chip-tag button {
  border: none;
  background: transparent;
  color: var(--blue-700);
  cursor: pointer;
  font-size: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--blue-100);
  color: var(--blue-700);
}

.chip.success {
  background: rgba(16, 185, 129, 0.15);
  color: #0f766e;
}

.chip.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: grid;
  gap: 10px;
}

.toast {
  background: var(--white);
  color: var(--blue-900);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 10px 24px rgba(14, 60, 159, 0.15);
  border-left: 4px solid var(--blue-600);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 280px;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-left-color: #16a34a;
}

.toast-error {
  border-left-color: #dc2626;
}

.profile-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
}

.profile-card {
  background: var(--white);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 32px rgba(14, 60, 159, 0.08);
}

.profile-card h2 {
  color: var(--blue-900);
  margin-bottom: 6px;
}

.profile-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 24px;
  object-fit: cover;
  border: 4px solid var(--blue-100);
  box-shadow: 0 12px 24px rgba(14, 60, 159, 0.12);
}

.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 960px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .table-actions {
    flex-wrap: wrap;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .notice-bar,
  .btn,
  .pill,
  .table-tools,
  .pagination,
  .toast-container {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .card,
  .table-card,
  .info-card {
    box-shadow: none;
    border: 1px solid #e2e8f0;
  }
}
