* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background:
    radial-gradient(ellipse 55% 34% at 50% 48%, rgba(7, 58, 99, 0.2), transparent 72%),
    #070a10;
  color: #ffffff;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* Ард талын Glow эффект */
.glow-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.glow-bg::before,
.glow-bg::after {
  position: absolute;
  width: 72vw;
  height: 160px;
  content: "";
  filter: blur(42px);
  opacity: 0.7;
}

.glow-bg::before {
  top: 43%;
  left: -12%;
  background: linear-gradient(90deg, transparent, #075a9f 35%, #0ea5e9 64%, transparent);
  transform: rotate(9deg);
}

.glow-bg::after {
  top: 46%;
  right: -14%;
  background: linear-gradient(90deg, transparent, #7c3aed 35%, #ec4899 60%, #0ea5e9 82%, transparent);
  transform: rotate(-8deg);
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  padding: 20px;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 3;
  width: 100%;
}

.site-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(7, 10, 16, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar,
.footer-content {
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
}

.navbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.nav-brand i {
  color: #38bdf8;
  font-size: 21px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links a {
  padding: 9px 16px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  color: #fff;
}

.nav-links a.is-active {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.22);
  color: #fff;
}

.page-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  width: 100%;
  align-items: center;
  justify-content: center;
}

/* Glassmorphism Кардан хүрээ */
.card {
  background: rgba(18, 26, 38, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 0 30px rgba(14, 165, 233, 0.15), 0 20px 40px rgba(0, 0, 0, 0.5);
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.logo-icon {
  display: inline-block;
  font-size: 26px;
  background: linear-gradient(135deg, #a855f7 0%, #38bdf8 58%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 7px rgba(56, 189, 248, 0.45));
}

.header h1 {
  font-size: 22px;
  font-weight: 600;
  background: linear-gradient(90deg, #38bdf8 0%, #22d3ee 55%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

/* Хайлтын хэсэг */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  padding: 12px 40px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.search-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-size: 14px;
}

.search-hint {
  margin: -7px 0 14px;
  color: #94a3b8;
  font-size: 11px;
}

.search-hint span {
  color: #cbd5e1;
}

.settings-icon {
  position: absolute;
  right: 14px;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
}

/* Тасралтгүй скроллтой хүснэгт */
.table-container {
  max-height: min(400px, calc(100dvh - 250px));
  overflow-y: auto;
  border-radius: 6px;
}

.table-container::-webkit-scrollbar {
  width: 6px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  font-size: 13px;
}

th:first-child,
td:first-child {
  width: 15%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 15%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 38%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 32%;
}

thead th {
  position: sticky;
  top: 0;
  background: #0284c7;
  color: #ffffff;
  padding: 10px 12px;
  font-weight: 600;
  z-index: 3;
}

thead th:first-child {
  border-top-left-radius: 6px;
}

thead th:last-child {
  border-top-right-radius: 6px;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(56, 189, 248, 0.1);
}

tbody td {
  padding: 10px 12px;
  color: #cbd5e1;
  overflow-wrap: anywhere;
}

tbody td:first-child,
tbody td:nth-child(2) {
  font-weight: 500;
  color: #f8fafc;
}

.empty-state {
  padding: 28px 12px;
  color: #94a3b8;
  text-align: center;
}

.card-footer {
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
}

.banner-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
}

.banner-modal[hidden] {
  display: none;
}

.banner-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.banner-card {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  min-height: 300px;
  padding: 54px 28px 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  background:
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.25), transparent 38%),
    linear-gradient(145deg, #111827, #030712);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.banner-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.banner-close:hover,
.banner-close:focus-visible {
  background: rgba(56, 189, 248, 0.35);
}

.banner-content {
  color: #e2e8f0;
  text-align: center;
}

.banner-label {
  margin-bottom: 12px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.banner-content h2 {
  margin-bottom: 16px;
  color: #fff;
  font-size: 26px;
  line-height: 1.2;
}

.banner-content p:not(.banner-label) {
  font-size: 15px;
  line-height: 1.6;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(7, 10, 16, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 110px;
  align-items: center;
  gap: 24px;
  color: #94a3b8;
  font-size: 13px;
}

.footer-contact {
  line-height: 1.8;
}

.footer-contact span {
  color: #cbd5e1;
}

.footer-contact a {
  color: #38bdf8;
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  transition: 0.2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  color: #fff;
}

.copyright {
  text-align: right;
}

@media (max-width: 680px) {
  .page-content {
    align-items: flex-start;
  }

  .navbar {
    width: min(100% - 24px, 1080px);
    min-height: auto;
    padding: 14px 0 9px;
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .nav-links {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 6px;
  }

  .nav-links a {
    padding: 8px 9px;
    font-size: 12px;
    text-align: center;
  }

  .nav-brand {
    font-size: 16px;
    white-space: nowrap;
  }

  .nav-brand i {
    font-size: 18px;
  }

  body {
    padding: 0;
  }

  .container {
    padding: 18px 12px 24px;
  }

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

  .header {
    gap: 8px;
    margin-bottom: 16px;
  }

  .logo-icon {
    font-size: 20px;
  }

  .header h1 {
    font-size: clamp(17px, 5vw, 20px);
    letter-spacing: 0;
  }

  .search-box {
    margin-bottom: 12px;
  }

  .search-box input {
    font-size: 16px;
    padding: 11px 36px;
  }

  .search-icon {
    left: 12px;
  }

  .settings-icon {
    right: 12px;
  }

  thead th,
  tbody td {
    padding: 9px 7px;
  }

  table {
    font-size: 12px;
  }

  .banner-modal {
    padding: 16px;
  }

  .banner-card {
    min-height: 280px;
    padding: 50px 22px 30px;
    border-radius: 16px;
  }

  .footer-content {
    width: min(100% - 24px, 1080px);
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
    padding: 20px 0;
    text-align: center;
  }

  .copyright {
    text-align: center;
  }
}

@media (max-width: 680px) {
  .navbar { min-height: 64px; padding: 0; }
  .container { display: block; height: auto; min-height: auto; }
  .card { display: block; flex: none; min-height: auto; }
  .table-container { flex: none; min-height: 0; max-height: min(410px, calc(100dvh - 420px)); }
}
