:root {
  --bg: #030712;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.14);
  --text: #f8fbff;
  --muted: #a8b3c7;
  --blue: #2667ff;
  --blue-bright: #4f8cff;
  --cyan: #38d8ff;
  --success: #36e29a;
  --danger: #ff5f7a;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(38, 103, 255, 0.22), transparent 32%),
    radial-gradient(circle at 95% 10%, rgba(56, 216, 255, 0.14), transparent 30%),
    linear-gradient(180deg, #02050d, var(--bg));
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

.glass {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.admin-shell {
  display: grid;
  grid-template-columns: 286px 1fr;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 5, 13, 0.82);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 28px;
  font-size: 1.18rem;
  font-weight: 900;
}

.brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 34px rgba(38, 103, 255, 0.36);
}

.side-nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  background: rgba(38, 103, 255, 0.18);
  transform: translateX(4px);
}

.support-card {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 18px;
  border-radius: var(--radius);
}

.support-card i {
  color: var(--cyan);
  font-size: 1.6rem;
}

.support-card p {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.support-card a {
  display: block;
  margin-top: 4px;
  color: white;
  font-weight: 900;
}

.main-area {
  min-width: 0;
  padding: 24px;
}

/* Top Header */
.topbar {
  position: sticky;
  z-index: 10;
  top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: var(--radius);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: white;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar h1 {
  margin-top: 2px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: fit-content;
}

.admin-profile small {
  display: block;
  color: var(--muted);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 18px rgba(54, 226, 154, 0.8);
}

main {
  display: grid;
}

.page {
  display: none;
  animation: fadeIn 0.35s ease both;
}

.page.active {
  display: block;
}

/* Dashboard Home */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card,
.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.stat-card {
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover,
.panel:hover {
  border-color: rgba(79, 140, 255, 0.45);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 36px rgba(38, 103, 255, 0.28);
}

.stat-card p {
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.dashboard-grid,
.manager-layout,
.settings-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
}

.panel {
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-head h2 {
  margin-top: 4px;
  font-size: 1.3rem;
}

.panel-head > i {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(38, 103, 255, 0.16);
}

.activity-list,
.announcement-list,
.service-list,
.card-grid {
  display: grid;
  gap: 14px;
}

.activity-item,
.announcement-item,
.mini-card,
.service-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.activity-item,
.announcement-item,
.service-item {
  padding: 15px;
}

.activity-item {
  display: flex;
  gap: 12px;
}

.activity-item i {
  color: var(--cyan);
  margin-top: 4px;
}

.activity-item p,
.announcement-item,
.mini-card p,
.service-item p {
  color: var(--muted);
}

.compact-form {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  color: white;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  outline: none;
  padding: 13px 14px;
  color: white;
  background: rgba(0, 0, 0, 0.22);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 4px rgba(38, 103, 255, 0.18);
}

input[type="file"] {
  cursor: pointer;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-3px);
}

.primary {
  background: linear-gradient(135deg, var(--blue), #0e46dd);
  box-shadow: 0 16px 36px rgba(38, 103, 255, 0.28);
}

.ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
}

.danger {
  background: rgba(255, 95, 122, 0.14);
  color: #ffd8df;
}

.upload-preview {
  display: grid;
  min-height: 168px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(79, 140, 255, 0.45);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(38, 103, 255, 0.08);
  text-align: center;
}

.upload-preview i {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 2rem;
}

.upload-preview img,
.mini-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.mini-card {
  overflow: hidden;
}

.mini-card-body {
  padding: 15px;
}

.mini-card h3,
.service-item h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(56, 216, 255, 0.26);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(38, 103, 255, 0.12);
  font-size: 0.76rem;
  font-weight: 900;
}

.stars {
  color: var(--warning);
  margin-bottom: 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.actions button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.service-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
}

.service-item > i {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: var(--radius);
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.service-item .actions {
  grid-column: 2;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  padding: 14px 18px;
  border: 1px solid rgba(54, 226, 154, 0.35);
  border-radius: var(--radius);
  background: rgba(3, 7, 18, 0.86);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 25;
    left: 0;
    top: 0;
    width: min(286px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .manager-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .main-area {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    top: 10px;
  }

  .admin-profile {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .stat-card {
    padding: 18px;
  }

  .compact-form {
    grid-template-columns: 1fr;
  }

  .service-item,
  .service-item .actions {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
}
