:root {
  --navy: #10233f;
  --navy-soft: #3a4b66;
  --sky-blue: #2fa8e0;
  --sky-blue-bg: rgba(47, 168, 224, 0.13);
  --yellow: #ffce31;
  --yellow-dark: #b98900;
  --green: #16a34a;
  --bg-page: #f4f6fa;
  --card-bg: #ffffff;
  --border-light: #e7eaf0;
  --text-muted: #6b7684;
}

.admin-body {
  margin: 0;
  background: var(--bg-page);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--navy);
}

.admin-shell {
  min-height: 100vh;
  display: flex;
}

.admin-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-footer {
  text-align: center;
  padding: 14px 20px;
  font-size: 12px;
  color: var(--text-muted);
}

.admin-footer a {
  color: var(--sky-blue);
  text-decoration: none;
}

.admin-footer a:hover {
  text-decoration: underline;
}

.sidebar {
  width: 208px;
  flex-shrink: 0;
  background: var(--navy);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.sidebar-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 7px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
}

.sidebar-logo-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link.active {
  background: var(--sky-blue-bg);
  color: var(--sky-blue);
  box-shadow: inset 3px 0 0 var(--sky-blue);
}

.admin-shell.sidebar-collapsed .sidebar {
  width: 68px;
}

.admin-shell.sidebar-collapsed .sidebar-logo-text,
.admin-shell.sidebar-collapsed .sidebar-link-label {
  display: none;
}

.admin-shell.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding: 12px 0;
}

.admin-shell.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-light);
  padding: 8px 20px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  max-width: 420px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  color: var(--text-muted);
}

.topbar-search svg {
  flex: 0 0 auto;
}

.topbar-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--navy);
}

.topbar-search-input::placeholder {
  color: var(--text-muted);
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-page);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.topbar-notif-btn {
  position: relative;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid var(--card-bg);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-chip-chevron {
  color: var(--text-muted);
}

.avatar-photo {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #c7c9f5;
  color: #4b4fa8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--card-bg);
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.user-dropdown-menu {
  min-width: 240px;
  padding: 8px;
  border: 1px solid var(--border-light);
  box-shadow: 0 12px 28px rgba(20, 24, 60, 0.12);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
}

.user-meta-left {
  align-items: flex-start;
}

.user-dropdown-menu .dropdown-divider {
  margin: 4px 0;
}

.user-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--navy);
}

.user-dropdown-menu .dropdown-item:hover,
.user-dropdown-menu .dropdown-item:focus {
  background: var(--bg-page);
  color: var(--navy);
}

.dropdown-item-button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: inherit;
}

.admin-main {
  flex: 1;
  padding: 16px 20px 24px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.dashboard-greeting h1 {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 3px;
}

.dashboard-greeting p {
  color: var(--text-muted);
  margin: 0;
  font-size: 13px;
}

.dashboard-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 14px;
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  padding: 7px 12px;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-admin-outline {
  background: var(--card-bg);
  border-color: var(--border-light);
  color: var(--navy);
}

.btn-admin-outline:hover {
  border-color: var(--navy-soft);
}

.btn-admin-yellow {
  background: var(--yellow);
  color: var(--navy);
}

.btn-admin-yellow:hover {
  background: #ffc300;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(16, 35, 63, 0.06);
}

.stat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.icon-blue {
  background: var(--sky-blue-bg);
  color: var(--sky-blue);
}

.stat-icon.icon-yellow {
  background: rgba(255, 206, 49, 0.18);
  color: var(--yellow-dark);
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 8px 0 4px;
}

.stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

.stat-change svg {
  width: 13px;
  height: 13px;
}

.sparkline {
  width: 76px;
  height: 28px;
  overflow: visible;
}

.sparkline-area {
  fill: var(--sky-blue-bg);
  stroke: none;
}

.sparkline-line {
  fill: none;
  stroke: var(--sky-blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline-dot {
  fill: var(--yellow);
  stroke: var(--card-bg);
  stroke-width: 1.5;
}

.trend-card {
  margin-top: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px 14px 10px;
  box-shadow: 0 1px 3px rgba(16, 35, 63, 0.06);
}

.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.trend-head h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.trend-head span {
  font-size: 11px;
  color: var(--text-muted);
}

.trend-chart {
  width: 100%;
  height: 140px;
  display: block;
}

.trend-area {
  fill: var(--sky-blue-bg);
  stroke: none;
}

.trend-line {
  fill: none;
  stroke: var(--sky-blue);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-dot {
  fill: var(--yellow);
  stroke: var(--card-bg);
  stroke-width: 2;
}

.trend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .sidebar {
    width: 68px;
  }

  .sidebar-logo-text,
  .sidebar-link-label {
    display: none;
  }

  .sidebar-header {
    justify-content: center;
    padding: 12px 0;
  }

  .sidebar-link {
    justify-content: center;
    padding: 8px;
  }

  .admin-shell.sidebar-collapsed .sidebar {
    width: 0;
    border-right: none;
  }

  .admin-shell.sidebar-collapsed .sidebar-header,
  .admin-shell.sidebar-collapsed .sidebar-nav {
    display: none;
  }

  .stat-grid,
  .stat-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 8px 14px;
  }

  .topbar-search {
    display: none;
  }

  .admin-main {
    padding: 14px 14px 20px;
  }

  .user-meta {
    display: none;
  }

  .stat-grid,
  .stat-grid.cols-3,
  .stat-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .dashboard-actions {
    flex-wrap: wrap;
  }
}
