:root {
  --asrsa-navy: #0b1b34;
  --asrsa-royal: #1e4ed8;
  --asrsa-royal-soft: #e8efff;
  --asrsa-gold: #d3a74a;
  --asrsa-bg: #f3f6fb;
  --asrsa-surface: #ffffff;
  --asrsa-text: #0f172a;
  --asrsa-muted: #64748b;
  --asrsa-border: #e2e8f0;
  --asrsa-shadow: 0 10px 30px rgba(12, 27, 52, 0.08);
}

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top right, #eef4ff, #f6f8fc 38%, #f2f6fb 70%);
  color: var(--asrsa-text);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #0b1b34 0%, #122649 65%, #1b2f52 100%);
  color: #d7e3ff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.15rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #122649;
  background: linear-gradient(135deg, #f0d088, var(--asrsa-gold));
}

.brand-title {
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  color: #c5d2ef;
  font-size: 0.78rem;
}

.sidebar-menu-wrap {
  padding-bottom: 2rem;
}

.menu-section {
  margin-bottom: 1.1rem;
}

.menu-section-label {
  font-size: 0.68rem;
  color: #90a7d0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin: 0.5rem 0 0.65rem;
  padding: 0 0.5rem;
}

.menu-links {
  display: grid;
  gap: 0.35rem;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #d5def3;
  text-decoration: none;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(2px);
}

.menu-link.active {
  background: linear-gradient(90deg, rgba(212, 167, 74, 0.27), rgba(30, 78, 216, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
}

.menu-icon {
  width: 24px;
  text-align: center;
}

.main-content {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--asrsa-border);
  padding: 1rem 1.5rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.topbar-subtitle {
  font-size: 0.82rem;
  color: var(--asrsa-muted);
}

.topbar-search {
  position: relative;
  flex: 1 1 420px;
  max-width: 540px;
}

.topbar-search .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8da9;
  pointer-events: none;
}

.topbar-search .form-control {
  border-radius: 12px;
  padding-left: 2.45rem;
  border: 1px solid #d7e0ef;
  background: #fbfdff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #d6e0f3;
  border-radius: 10px;
  background: #fff;
  color: #17356d;
  font-weight: 600;
  padding: 0.52rem 0.8rem;
}

.btn-view-site:hover {
  background: var(--asrsa-royal-soft);
  border-color: #b9cdf8;
}

.btn-icon {
  position: relative;
  border-radius: 10px;
  border: 1px solid #d6e0f3;
  background: #fff;
  width: 40px;
  height: 40px;
}

.notif-dot {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--asrsa-gold);
}

.profile-trigger {
  border: 1px solid #d6e0f3;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.55rem;
}

.avatar-pill {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #1e4ed8, #2543a8);
}

.profile-meta {
  display: grid;
  line-height: 1.1;
  text-align: left;
}

.profile-meta strong {
  font-size: 0.82rem;
}

.profile-meta small {
  color: var(--asrsa-muted);
  font-size: 0.72rem;
}

.profile-dropdown {
  border-radius: 12px;
  border: 1px solid var(--asrsa-border);
  box-shadow: var(--asrsa-shadow);
}

.content-wrap {
  padding: 1.5rem;
}

.panel-card {
  border: 1px solid var(--asrsa-border);
  border-radius: 16px;
  background: var(--asrsa-surface);
  box-shadow: var(--asrsa-shadow);
}

.panel-card .card-header {
  border-bottom: 1px solid #e8edf6;
  background: transparent;
  padding: 0.9rem 1rem;
}

.card-stat {
  border: 1px solid #dfebff;
  border-radius: 16px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(20, 44, 85, 0.08);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.stat-label {
  color: #667995;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.stat-trend {
  margin-top: 0.5rem;
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: #edf5ff;
  color: #1f5ecf;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.btn-quick {
  border-radius: 10px;
  border: 1px solid #d6e2fa;
  background: #fff;
  color: #24426f;
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 0.75rem;
}

.btn-quick:hover {
  border-color: #b3ccff;
  background: #edf3ff;
}

.status-list {
  display: grid;
  gap: 0.55rem;
}

.status-item {
  border: 1px solid #e5edf9;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.status-item small {
  color: var(--asrsa-muted);
}

.activity-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.activity-timeline li {
  position: relative;
  padding-left: 1.2rem;
}

.activity-timeline li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3668d8;
  box-shadow: 0 0 0 4px #e9f0ff;
}

.widget-list {
  display: grid;
  gap: 0.65rem;
}

.widget-list-item {
  border: 1px solid #e3ebfa;
  border-radius: 10px;
  padding: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.widget-list-item .thumb {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  background: #edf2ff;
  flex-shrink: 0;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 280px;
}

.chart-wrap canvas {
  max-height: 280px;
}

.badge-soft-success {
  background: #e7f8ed;
  color: #177344;
}

.badge-soft-secondary {
  background: #eef2f7;
  color: #556478;
}

.table thead th {
  background: #f7faff;
  color: #4f6280;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table td,
.table th {
  vertical-align: middle;
}

@media (max-width: 1199px) {
  .admin-shell {
    grid-template-columns: 260px 1fr;
  }

  .topbar-search {
    max-width: 360px;
  }
}

@media (max-width: 991px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    width: min(86vw, 310px);
    z-index: 60;
    transition: left 0.22s ease;
  }

  body.sidebar-open .sidebar {
    left: 0;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-search {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .content-wrap {
    padding: 1rem;
  }
}

@media (max-width: 575px) {
  .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .profile-meta {
    display: none;
  }

  .btn-view-site span {
    display: none;
  }
}

.form-help {
  font-size: 0.85rem;
  color: #64748b;
}
