:root {
  --navy-950: #0a1d5a;
  --navy-900: #113f9e;
  --teal-500: #00a6bb;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --line: rgba(17, 63, 158, 0.12);
  --text: #0a1d5a;
  --muted: #64748b;
  --danger: #b13b3b;
  --success: #00a6bb;
  --shadow: 0 18px 40px rgba(11, 23, 40, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--text);
  background: #f4f8fb;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy-900), var(--teal-500));
  color: white;
}

.btn-outline {
  background: white;
  border-color: var(--line);
}

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

.admin-sidebar {
  background: linear-gradient(180deg, #0a1d5a 0%, #113f9e 100%);
  color: white;
  padding: 28px 18px;
  display: grid;
  align-content: start;
  gap: 22px;
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.sidebar-brand span {
  display: grid;
}

.sidebar-brand small {
  color: rgba(255, 255, 255, 0.74);
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav a,
.sidebar-logout {
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 0;
  text-align: right;
  font: inherit;
  cursor: pointer;
}

.sidebar-nav a.active,
.sidebar-nav a:hover,
.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.admin-main {
  display: grid;
  grid-template-rows: auto 1fr;
}

.admin-topbar {
  padding: 26px 28px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.admin-topbar h1,
.panel h2 {
  margin: 0 0 8px;
  font-family: "Cairo", sans-serif;
}

.admin-topbar p,
.admin-userbox span {
  margin: 0;
  color: var(--muted);
}

.admin-userbox {
  display: grid;
  justify-items: end;
}

.admin-content {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.panel,
.stat-card,
.auth-card,
.flash-message,
.pagination {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.panel,
.auth-card {
  padding: 24px;
}

.panel-head,
.admin-filters,
.actions,
.split-fields,
.checkbox-grid,
.stats-grid,
.admin-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.panel-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.admin-filters input,
.admin-filters select,
.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font: inherit;
  background: white;
}

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

.admin-form label,
.admin-form fieldset {
  display: grid;
  gap: 8px;
}

.admin-form fieldset {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.split-fields > * {
  flex: 1 1 240px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.check-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
}

.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--navy-900);
  font-size: 0.9rem;
}

.link-button {
  background: transparent;
  border: 0;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.danger {
  color: var(--danger);
}

.flash-stack {
  display: grid;
  gap: 12px;
}

.flash-message {
  padding: 14px 16px;
}

.flash-message.success {
  color: var(--success);
  background: #edf9f7;
}

.flash-message.error,
.form-errors {
  color: var(--danger);
  background: #fff1f1;
}

.form-errors {
  margin: 0;
  padding: 14px 18px;
  border-radius: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 20px;
  display: grid;
  gap: 10px;
}

.stat-card strong {
  font-size: 2rem;
  font-family: "Cairo", sans-serif;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid.single-column {
  grid-template-columns: 1fr;
}

.inline-editor {
  display: grid;
  grid-template-columns: 1.3fr 1fr 160px auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.details-list {
  display: grid;
  gap: 14px;
}

.details-list > div {
  display: flex;
  gap: 10px;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top right, rgba(26, 165, 162, 0.14), transparent 28%), linear-gradient(180deg, #f3f7fb 0%, #ffffff 100%);
}

.auth-shell {
  width: min(880px, calc(100% - 32px));
}

.auth-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.auth-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--teal-500);
  background: rgba(26, 165, 162, 0.1);
  margin-bottom: 12px;
}

.pagination {
  margin-top: 22px;
  padding: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pagination .active {
  background: var(--navy-900);
  color: white;
}

.file-preview {
  color: var(--muted);
}

@media (max-width: 1080px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    gap: 12px;
  }

  .stats-grid,
  .admin-grid,
  .auth-card {
    grid-template-columns: 1fr;
  }

  .inline-editor {
    grid-template-columns: 1fr;
  }
}

/* 2026 admin brand refinement */
:root {
  --navy-950: #081645;
  --navy-900: #0a1d5a;
  --teal-500: #00a6bb;
  --surface-soft: #fff7f1;
  --line: rgba(15, 34, 62, 0.1);
  --text: #1b2d49;
  --muted: #64758b;
  --shadow: 0 22px 52px rgba(9, 20, 40, 0.08);
}

body {
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 166, 187, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.admin-sidebar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #081645 0%, #0a1d5a 100%);
}

.admin-sidebar::before {
  content: "";
  position: absolute;
  inset: auto -30% 10% auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 166, 187, 0.22), transparent 68%);
}

.sidebar-brand {
  display: grid;
  gap: 10px;
}

.sidebar-brand__logo {
  width: min(170px, 100%);
  height: auto;
}

.sidebar-meta {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.8;
}

.sidebar-nav a,
.sidebar-logout {
  position: relative;
  border-radius: 16px;
  font-weight: 700;
}

.sidebar-nav a.active,
.sidebar-nav a:hover,
.sidebar-logout:hover {
  background: linear-gradient(135deg, rgba(0, 166, 187, 0.18), rgba(255, 255, 255, 0.08));
}

.admin-topbar {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(15, 34, 62, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.admin-topbar h1 {
  font-size: 1.8rem;
}

.admin-userbox {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(0, 166, 187, 0.08);
  justify-items: initial;
}

.admin-userbox img {
  width: 44px;
  height: 44px;
}

.admin-userbox div {
  display: grid;
}

.panel,
.stat-card,
.auth-card,
.flash-message,
.pagination {
  border-radius: 26px;
  border-color: rgba(15, 34, 62, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, #00a6bb, #42d4e0);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #081645, #0a1d5a);
  box-shadow: var(--shadow);
  color: white;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 166, 187, 0.32), transparent 68%);
}

.dashboard-hero__copy,
.dashboard-hero__logo {
  position: relative;
  z-index: 1;
}

.dashboard-hero__copy h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.dashboard-hero__copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  max-width: 60ch;
  line-height: 1.9;
}

.dashboard-hero__logo {
  width: min(220px, 35%);
  height: auto;
}

.stat-card {
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.94));
}

.stat-card--accent {
  background: linear-gradient(135deg, rgba(255, 247, 241, 0.98), rgba(255, 255, 255, 0.96));
}

.stat-card span {
  color: var(--muted);
}

.stat-card small {
  color: var(--muted);
  line-height: 1.8;
}

.panel-head a,
.dashboard-list__item a,
.admin-table a {
  color: #00a6bb;
  font-weight: 700;
}

.dashboard-list {
  display: grid;
  gap: 12px;
}

.dashboard-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(15, 34, 62, 0.08);
}

.dashboard-list__item:last-child {
  border-bottom: 0;
}

.dashboard-list__item div {
  display: grid;
  gap: 4px;
}

.dashboard-list__item span {
  color: var(--muted);
}

.auth-card {
  padding: 28px;
}

.auth-copy__logo {
  width: min(220px, 100%);
  height: auto;
  margin-bottom: 10px;
}

.auth-copy__list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.auth-copy__list li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--muted);
}

.auth-copy__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 11px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #00a6bb;
}

@media (max-width: 1080px) {
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero__logo {
    width: min(220px, 70%);
  }
}

/* 2026 admin mobile refinement */
.admin-body {
  font-family: "Cairo", sans-serif;
}

.admin-sidebar-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 72;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #00a6bb, #42d4e0);
  color: #fff;
  box-shadow: 0 18px 36px rgba(0, 166, 187, 0.24);
  cursor: pointer;
}

.admin-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: rgba(6, 16, 31, 0.46);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.admin-sidebar-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.admin-sidebar__head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-sidebar__kicker,
.admin-topbar__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 166, 187, 0.1);
  color: #42d4e0;
  font-size: 0.85rem;
  font-weight: 800;
}

.admin-topbar__eyebrow {
  margin-bottom: 10px;
  color: #00a6bb;
}

.admin-sidebar__close {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.admin-sidebar .sidebar-logout {
  width: 100%;
}

@media (max-width: 1080px) {
  .admin-sidebar-toggle {
    display: inline-flex;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: min(88vw, 360px);
    z-index: 70;
    transform: translateX(calc(100% + 32px));
    transition: transform 0.24s ease;
    border-radius: 28px;
    box-shadow: 0 28px 64px rgba(5, 14, 28, 0.32);
    padding: 18px;
    overflow: auto;
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-sidebar__head {
    display: flex;
  }

  .admin-content {
    padding: 20px;
  }

  body.admin-nav-open {
    overflow: hidden;
  }
}

.bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.admin-sidebar-toggle .bi,
.admin-sidebar__close .bi {
  font-size: 1.15rem;
}
