
:root {
  --navy: #142238;
  --navy-light: #1d304b;
  --blue: #3568df;
  --blue-light: #edf3ff;
  --background: #f4f6fa;
  --white: #ffffff;
  --text: #202b3c;
  --muted: #7d899b;
  --border: #e8ecf2;
  --green: #16865b;
  --orange: #c27a19;
  --purple: #7955c7;
  --red: #d34e4e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--background);
  color: var(--text);
}

button, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 255px;
  background: var(--navy);
  color: white;
  padding: 27px 18px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 34px;
}

.brand-icon {
  width: 43px;
  height: 43px;
  background: var(--blue);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand small {
  color: #aab8cc;
  font-size: 11px;
  display: block;
  margin-top: 4px;
}

.nav-label {
  color: #8191a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  padding: 0 12px 12px;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.nav-link {
  background: transparent;
  border: 0;
  color: #bdc9d9;
  text-align: left;
  padding: 13px 14px;
  border-radius: 9px;
  font-size: 13px;
  transition: .2s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--navy-light);
  color: white;
}

.nav-link.active {
  box-shadow: inset 3px 0 var(--blue);
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}

.admin-status {
  border-top: 1px solid #304159;
  padding: 20px 9px 0;
  font-size: 12px;
}

.admin-status small {
  display: block;
  color: #94a4ba;
  margin: 8px 0 0 17px;
  font-size: 10px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #36c78b;
  border-radius: 50%;
  margin-right: 7px;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 0 35px 20px;
}

.topbar {
  min-height: 91px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  margin-bottom: 6px;
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.system-label {
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.welcome {
  background: linear-gradient(115deg, #1c3150, #315ca5);
  color: white;
  border-radius: 13px;
  padding: 27px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 23px;
}

.welcome h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.welcome p {
  margin: 0;
  color: #d0ddf1;
  font-size: 13px;
}

.environment {
  border: 1px solid #7894bf;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 9px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 22px;
}

.stat-card,
.content-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 21px;
}

.stat-icon {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  margin-bottom: 16px;
}

.stat-icon.blue {
  background: #eaf0ff;
  color: var(--blue);
}

.stat-icon.purple {
  background: #f1ecff;
  color: var(--purple);
}

.stat-icon.green {
  background: #e6f7ef;
  color: var(--green);
}

.stat-icon.orange {
  background: #fff3e3;
  color: var(--orange);
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stat-card h2 {
  margin: 7px 0;
  font-size: 28px;
}

.stat-card small {
  color: #9aa4b2;
  font-size: 10px;
}

.card-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.content-card h3 {
  font-size: 15px;
  margin: 0 0 6px;
}

.content-card p,
.section-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.overview-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.overview-row strong {
  font-weight: 600;
}

.notice {
  background: #f3f6fb;
  padding: 13px;
  border-radius: 7px;
  margin-top: 17px !important;
  line-height: 1.6;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: 19px;
  margin: 0 0 6px;
}

.form-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.form-row label {
  font-size: 12px;
  font-weight: 600;
}

select {
  border: 1px solid var(--border);
  background: white;
  border-radius: 7px;
  padding: 10px 13px;
  min-width: 150px;
  color: var(--text);
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 7px;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 600;
}

.primary-btn {
  background: var(--blue);
  color: white;
}

.primary-btn:hover {
  background: #2856c3;
}

.secondary-btn {
  background: var(--blue-light);
  color: var(--blue);
}

.generated-code {
  margin-top: 17px;
  padding: 15px;
  border: 1px dashed #a6b9e9;
  border-radius: 8px;
  background: #f7f9ff;
  font-weight: 700;
  letter-spacing: 1px;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 650px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  background: #f8f9fb;
  text-transform: uppercase;
  letter-spacing: .5px;
}

th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}

td {
  color: #485467;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}

.tag {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
}

.tag.neutral {
  background: #edf0f5;
  color: #697587;
}

.coming-icon {
  font-size: 32px;
  color: var(--blue);
  margin-bottom: 15px;
}

.content-card > .tag {
  margin-top: 17px;
}

footer {
  color: #9aa4b2;
  text-align: center;
  font-size: 10px;
  padding: 35px 0 15px;
}

footer span {
  padding: 0 5px;
}

@media (max-width: 1000px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .app {
    display: block;
  }

  .sidebar {
    width: 100%;
    padding: 15px;
  }

  .brand {
    padding: 0 5px 17px;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-link {
    white-space: nowrap;
    padding: 11px;
  }

  .nav-label,
  .sidebar-bottom {
    display: none;
  }

  .main {
    padding: 0 15px 20px;
  }

  .topbar {
    min-height: 75px;
  }

  .system-label {
    display: none;
  }

  .welcome {
    padding: 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card h2 {
    font-size: 23px;
  }
}
