/* ================================================================
   APIKlone — Custom Design System
   Dark theme · Glassmorphism · Neon accent
   No dashmin. No third-party template dependency.
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* ── CSS Custom Properties ────────────────────────────────────── */
:root {
  /* Brand colours */
  --ak-bg: #0a0c14;
  --ak-surface: #111827;
  --ak-surface-2: #1a2235;
  --ak-surface-3: #1e293b;
  --ak-border: rgba(99, 118, 160, 0.18);
  --ak-border-glow: rgba(99, 179, 237, 0.30);

  /* Neon accent */
  --ak-accent: #38bdf8;
  --ak-accent-dim: rgba(56, 189, 248, 0.12);
  --ak-accent-glow: 0 0 22px rgba(56, 189, 248, 0.35);

  /* Secondary palette */
  --ak-green: #34d399;
  --ak-green-dim: rgba(52, 211, 153, 0.12);
  --ak-purple: #a78bfa;
  --ak-purple-dim: rgba(167, 139, 250, 0.12);
  --ak-red: #f87171;
  --ak-red-dim: rgba(248, 113, 113, 0.12);
  --ak-orange: #fb923c;
  --ak-orange-dim: rgba(251, 146, 60, 0.12);
  --ak-yellow: #fbbf24;

  /* Text */
  --ak-text: #e2e8f0;
  --ak-text-muted: #94a3b8;
  --ak-text-dim: #64748b;

  /* Sidebar */
  --ak-sidebar-w: 260px;

  /* Topbar */
  --ak-topbar-h: 64px;

  /* Radii */
  --ak-radius: 12px;
  --ak-radius-sm: 8px;
  --ak-radius-lg: 18px;

  /* Transitions */
  --ak-transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--ak-bg);
  color: var(--ak-text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--ak-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--ak-surface-3);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ak-accent);
}

/* ── Layout Shell ─────────────────────────────────────────────── */
.ak-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.ak-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--ak-sidebar-w);
  height: 100vh;
  background: var(--ak-surface);
  border-right: 1px solid var(--ak-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  transition: var(--ak-transition);
}

/* glow strip top */
.ak-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ak-accent), transparent);
}

/* Logo area */
.ak-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--ak-border);
  text-decoration: none;
}

.ak-brand-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ak-brand-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.ak-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.ak-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ak-text);
  letter-spacing: -0.3px;
}

.ak-brand-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--ak-accent);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Nav */
.ak-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.ak-nav-section {
  font-size: 10px;
  font-weight: 600;
  color: var(--ak-text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 8px;
  margin: 16px 0 6px;
}

.ak-nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--ak-radius-sm);
  color: var(--ak-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: var(--ak-transition);
  margin-bottom: 2px;
  position: relative;
}

.ak-nav-link i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ak-nav-link:hover {
  background: var(--ak-accent-dim);
  color: var(--ak-accent);
}

.ak-nav-link.active {
  background: var(--ak-accent-dim);
  color: var(--ak-accent);
}

.ak-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--ak-accent);
  border-radius: 0 3px 3px 0;
}

/* Sidebar footer / user */
.ak-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--ak-border);
  display: flex;
  align-items: center;
  gap: 11px;
}

.ak-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ak-accent), var(--ak-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.ak-avatar-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: var(--ak-green);
  border-radius: 50%;
  border: 2px solid var(--ak-surface);
}

.ak-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ak-text);
  line-height: 1.2;
}

.ak-user-role {
  font-size: 11px;
  color: var(--ak-text-dim);
}

/* ── Main Content Area ────────────────────────────────────────── */
.ak-main {
  margin-left: var(--ak-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ───────────────────────────────────────────────────── */
.ak-topbar {
  height: var(--ak-topbar-h);
  background: var(--ak-surface);
  border-bottom: 1px solid var(--ak-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  gap: 16px;
}

.ak-topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ak-text);
  flex: 1;
}

.ak-topbar-breadcrumb {
  font-size: 11px;
  color: var(--ak-text-dim);
  font-weight: 400;
}

.ak-topbar-breadcrumb span {
  color: var(--ak-text-muted);
}

/* ── Page Content ─────────────────────────────────────────────── */
.ak-page {
  flex: 1;
  padding: 28px 28px 0;
}

.ak-page-footer {
  padding: 20px 28px;
  margin-top: auto;
  border-top: 1px solid var(--ak-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ak-text-dim);
}

.ak-page-footer a {
  color: var(--ak-accent);
  text-decoration: none;
}

.ak-page-footer a:hover {
  text-decoration: underline;
}

/* ── Cards ────────────────────────────────────────────────────── */
.ak-card {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  padding: 24px;
  transition: var(--ak-transition);
}

.ak-card:hover {
  border-color: var(--ak-border-glow);
}

.ak-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.ak-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ak-text);
}

/* Stat cards */
.ak-stat {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--ak-transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.ak-stat::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color, var(--ak-accent));
  opacity: 0;
  transition: var(--ak-transition);
}

.ak-stat:hover {
  border-color: var(--ak-border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.ak-stat:hover::after {
  opacity: 1;
}

.ak-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--icon-bg, var(--ak-accent-dim));
  color: var(--icon-color, var(--ak-accent));
}



.ak-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--ak-text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ak-stat-label {
  font-size: 12px;
  color: var(--ak-text-dim);
  margin-top: 3px;
  font-weight: 500;
}

/* Hero banner */
.ak-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0c1a2e 100%);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-lg);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.ak-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.ak-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.ak-hero-icon {
  font-size: 48px;
  background: linear-gradient(135deg, var(--ak-accent), var(--ak-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.ak-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ak-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.ak-hero-subtitle {
  font-size: 14px;
  color: var(--ak-text-muted);
  margin-top: 6px;
}

.ak-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--ak-accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--ak-accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.ak-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--ak-radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: var(--ak-transition);
  white-space: nowrap;
}

.ak-btn-primary {
  background: var(--ak-accent);
  color: #0a0c14;
  border-color: var(--ak-accent);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.ak-btn-primary:hover {
  background: #67d3f5;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.45);
  color: #0a0c14;
  transform: translateY(-1px);
}

.ak-btn-ghost {
  background: transparent;
  color: var(--ak-accent);
  border-color: var(--ak-border-glow);
}

.ak-btn-ghost:hover {
  background: var(--ak-accent-dim);
}

.ak-btn-danger-ghost {
  background: transparent;
  color: var(--ak-red);
  border-color: rgba(248, 113, 113, 0.3);
}

.ak-btn-danger-ghost:hover {
  background: var(--ak-red-dim);
}

.ak-btn-success-ghost {
  background: transparent;
  color: var(--ak-green);
  border-color: rgba(52, 211, 153, 0.3);
}

.ak-btn-success-ghost:hover {
  background: var(--ak-green-dim);
}

.ak-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.ak-btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Quick action buttons */
.ak-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--ak-surface-2);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-sm);
  color: var(--ak-text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--ak-transition);
  flex: 1;
  min-width: 160px;
}

.ak-action-btn .ak-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.ak-action-btn:hover {
  border-color: var(--ak-border-glow);
  color: var(--ak-text);
  background: var(--ak-surface-3);
  transform: translateX(3px);
}

/* Step cards */
.ak-step {
  background: var(--ak-surface-2);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius);
  padding: 22px;
  transition: var(--ak-transition);
  position: relative;
  overflow: hidden;
}

.ak-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--step-color, var(--ak-accent));
}

.ak-step:hover {
  border-color: var(--ak-border-glow);
  transform: translateY(-2px);
}

.ak-step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--step-color, var(--ak-accent));
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ak-step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ak-text);
  margin-bottom: 8px;
}

.ak-step-title i {
  margin-right: 8px;
  color: var(--step-color, var(--ak-accent));
}

.ak-step-text {
  font-size: 13px;
  color: var(--ak-text-muted);
}

/* ── Forms ────────────────────────────────────────────────────── */
.ak-form-group {
  margin-bottom: 20px;
}

.ak-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ak-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.ak-input,
.ak-select,
.ak-textarea {
  width: 100%;
  background: var(--ak-surface-2);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-sm);
  color: var(--ak-text);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  padding: 10px 14px;
  transition: var(--ak-transition);
  outline: none;
  appearance: none;
}

.ak-input::placeholder,
.ak-textarea::placeholder {
  color: var(--ak-text-dim);
}

.ak-input:focus,
.ak-select:focus,
.ak-textarea:focus {
  border-color: var(--ak-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: var(--ak-surface-3);
}

.ak-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2394a3b8' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

.ak-form-hint {
  font-size: 11.5px;
  color: var(--ak-text-dim);
  margin-top: 5px;
}

.ak-form-hint code {
  background: var(--ak-surface-3);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: var(--ak-accent);
}

/* File input */
.ak-file-drop {
  background: var(--ak-surface-2);
  border: 2px dashed var(--ak-border);
  border-radius: var(--ak-radius);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--ak-transition);
}

.ak-file-drop:hover,
.ak-file-drop.dragover {
  border-color: var(--ak-accent);
  background: var(--ak-accent-dim);
}

.ak-file-drop input[type=file] {
  display: none;
}

/* ── Table ────────────────────────────────────────────────────── */
.ak-table-wrap {
  overflow-x: auto;
  border-radius: var(--ak-radius-sm);
}

.ak-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.ak-table th {
  background: var(--ak-surface-2);
  color: var(--ak-text-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 11px 16px;
  border-bottom: 1px solid var(--ak-border);
  white-space: nowrap;
}

.ak-table th:first-child {
  border-radius: var(--ak-radius-sm) 0 0 0;
}

.ak-table th:last-child {
  border-radius: 0 var(--ak-radius-sm) 0 0;
}

.ak-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--ak-border);
  color: var(--ak-text-muted);
  vertical-align: middle;
}

.ak-table tbody tr {
  transition: var(--ak-transition);
}

.ak-table tbody tr:hover td {
  background: var(--ak-surface-2);
  color: var(--ak-text);
}

.ak-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Badges / Pills ───────────────────────────────────────────── */
.ak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ak-badge-blue {
  background: var(--ak-accent-dim);
  color: var(--ak-accent);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.ak-badge-green {
  background: var(--ak-green-dim);
  color: var(--ak-green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.ak-badge-purple {
  background: var(--ak-purple-dim);
  color: var(--ak-purple);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.ak-badge-gray {
  background: rgba(99, 118, 160, 0.12);
  color: var(--ak-text-muted);
  border: 1px solid var(--ak-border);
}

.ak-badge-red {
  background: var(--ak-red-dim);
  color: var(--ak-red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.ak-badge-orange {
  background: var(--ak-orange-dim);
  color: var(--ak-orange);
  border: 1px solid rgba(251, 146, 60, 0.2);
}

/* Method badges */
.ak-method-GET {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.ak-method-POST {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.ak-method-PUT {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.ak-method-PATCH {
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.ak-method-DELETE {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.ak-method-ALL {
  background: rgba(99, 118, 160, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(99, 118, 160, 0.25);
}

/* Mode badges */
.ak-mode-select {
  background: var(--ak-surface-3);
  border: 1px solid var(--ak-border);
  border-radius: 8px;
  color: var(--ak-text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 26px 5px 10px;
  transition: var(--ak-transition);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2394a3b8' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  min-width: 130px;
}

.ak-mode-select:focus {
  border-color: var(--ak-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Search input */
.ak-search {
  position: relative;
}

.ak-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ak-text-dim);
  font-size: 13px;
  pointer-events: none;
}

.ak-search input {
  width: 260px;
  padding-left: 36px;
}

/* ── Alerts ───────────────────────────────────────────────────── */
.ak-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--ak-radius-sm);
  margin-bottom: 20px;
  font-size: 13.5px;
}

.ak-alert-success {
  background: var(--ak-green-dim);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--ak-green);
}

.ak-alert-danger {
  background: var(--ak-red-dim);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--ak-red);
}

.ak-alert-info {
  background: var(--ak-accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--ak-accent);
}

.ak-alert .ak-alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}

.ak-alert .ak-alert-close:hover {
  opacity: 1;
}

/* ── Modals ───────────────────────────────────────────────────── */
.modal-content {
  background: var(--ak-surface) !important;
  border: 1px solid var(--ak-border) !important;
  border-radius: var(--ak-radius) !important;
  color: var(--ak-text) !important;
}

.modal-header {
  background: var(--ak-surface-2) !important;
  border-bottom: 1px solid var(--ak-border) !important;
  border-radius: var(--ak-radius) var(--ak-radius) 0 0 !important;
  padding: 16px 20px !important;
}

.modal-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--ak-text) !important;
}

.modal-body {
  padding: 20px !important;
}

.modal-footer {
  background: var(--ak-surface-2) !important;
  border-top: 1px solid var(--ak-border) !important;
  padding: 14px 20px !important;
}

.btn-close {
  filter: invert(1) !important;
}

.list-group-item {
  background: var(--ak-surface-2) !important;
  border-color: var(--ak-border) !important;
  color: var(--ak-text-muted) !important;
}

.list-group-item:hover {
  background: var(--ak-surface-3) !important;
  color: var(--ak-text) !important;
}

/* ── Spinner / Loading ────────────────────────────────────────── */
#ak-spinner {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ak-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.4s ease;
}

#ak-spinner.hidden {
  opacity: 0;
  pointer-events: none;
}

.ak-spinner-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--ak-surface-3);
  border-top-color: var(--ak-accent);
  border-radius: 50%;
  animation: ak-spin 0.8s linear infinite;
}

.ak-spinner-text {
  font-size: 13px;
  color: var(--ak-text-dim);
  font-weight: 500;
}

@keyframes ak-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Back to Top ──────────────────────────────────────────────── */
.ak-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  background: var(--ak-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0c14;
  font-size: 16px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  text-decoration: none;
  transition: var(--ak-transition);
  opacity: 0;
  pointer-events: none;
}

.ak-back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.ak-back-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.6);
}

/* ── Help page ────────────────────────────────────────────────── */


.ak-accordion-item {
  background: var(--ak-surface);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.ak-accordion-trigger {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--ak-text);
  font-family: 'Inter', sans-serif;
  transition: var(--ak-transition);
}

.ak-accordion-trigger:hover {
  background: var(--ak-surface-2);
}

.ak-accordion-trigger .ak-chevron {
  transition: var(--ak-transition);
  color: var(--ak-text-dim);
}

.ak-accordion-trigger.open .ak-chevron {
  transform: rotate(180deg);
  color: var(--ak-accent);
}

.ak-accordion-body {
  display: none;
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: var(--ak-text-muted);
  line-height: 1.7;
}

.ak-accordion-body.open {
  display: block;
}

.ak-accordion-body code {
  background: var(--ak-surface-3);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--ak-accent);
}

.ak-accordion-body pre {
  background: var(--ak-surface-3);
  border: 1px solid var(--ak-border);
  border-radius: var(--ak-radius-sm);
  padding: 14px 16px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--ak-text);
  overflow-x: auto;
  margin-top: 10px;
}

/* Tab-like section headers on help */
.ak-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ak-tab {
  padding: 8px 16px;
  border-radius: var(--ak-radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ak-text-muted);
  background: none;
  font-family: 'Inter', sans-serif;
  transition: var(--ak-transition);
}

.ak-tab:hover {
  background: var(--ak-surface-2);
  color: var(--ak-text);
}

.ak-tab.active {
  background: var(--ak-accent-dim);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--ak-accent);
}

/* ── Mono / Code ──────────────────────────────────────────────── */
.ak-mono {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--ak-text-muted);
}

.ak-endpoint {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--ak-text);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* ── Grid helpers ─────────────────────────────────────────────── */
.ak-grid {
  display: grid;
  gap: 20px;
}

.ak-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.ak-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

@media (max-width: 1100px) {
  .ak-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {

  .ak-grid-4,
  .ak-grid-3,
  .ak-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes ak-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

.ak-animate {
  animation: ak-fade-up 0.35s ease both;
}

.ak-animate-1 {
  animation-delay: 0.05s;
}

.ak-animate-2 {
  animation-delay: 0.10s;
}

.ak-animate-3 {
  animation-delay: 0.15s;
}

.ak-animate-4 {
  animation-delay: 0.20s;
}

/* ── Sidebar toggle (mobile) ──────────────────────────────────── */
.ak-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ak-text-muted);
  font-size: 20px;
  padding: 0;
}

@media (max-width: 900px) {
  .ak-sidebar-toggle {
    display: flex;
    align-items: center;
  }

  .ak-sidebar {
    transform: translateX(-100%);
  }

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

  .ak-main {
    margin-left: 0;
  }
}

/* ── Mono textarea (mock editor) ─────────────────────────────── */
#mockFileEditor {
  background: #0d1117 !important;
  color: #a5f3fc !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 12.5px !important;
  border: 1px solid var(--ak-border) !important;
  border-radius: var(--ak-radius-sm) !important;
  resize: vertical;
}

#mockFileEditor:focus {
  border-color: var(--ak-accent) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
}

/* ── Divider ──────────────────────────────────────────────────── */
.ak-divider {
  height: 1px;
  background: var(--ak-border);
  margin: 20px 0;
}

/* ── Empty state ──────────────────────────────────────────────── */
.ak-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ak-text-dim);
}

.ak-empty i {
  font-size: 40px;
  margin-bottom: 14px;
  opacity: 0.4;
}

.ak-empty p {
  font-size: 14px;
}