/* ============================================================
   admin.css  –  Admin Panel Styles
   ============================================================ */

/* ── Layout ─────────────────────────────────────────────── */
:root {
  --sidebar-w: 240px;
  --neon: #00f5ff;
}

.sidebar-panel {
  width: var(--sidebar-w);
  background: rgba(6, 13, 26, 0.98);
  border-right: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.3s ease;
}

.admin-main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
}

@media (max-width: 1023px) {
  .sidebar-panel {
    transform: translateX(-100%);
  }
  .sidebar-panel.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
    width: 100%;
  }
}

/* ── Sidebar nav links ──────────────────────────────────── */
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.825rem;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.2s ease;
  text-decoration: none;
}
.admin-nav-link:hover {
  background: rgba(0,245,255,0.07);
  color: #e5e7eb;
}
.admin-nav-link.active {
  background: rgba(0,245,255,0.1);
  color: var(--neon);
  font-weight: 600;
}
.admin-nav-link.active i { color: var(--neon); }

/* ── Cards ──────────────────────────────────────────────── */
.admin-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.admin-card:hover { border-color: rgba(255,255,255,0.12); }

.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: rgba(0,245,255,0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,245,255,0.06);
}

/* ── Form inputs (admin) ────────────────────────────────── */
.admin-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  color: #fff;
  font-size: 0.875rem;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.25s ease;
  outline: none;
}
.admin-input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(0,245,255,0.08);
  background: rgba(0,245,255,0.03);
}
.admin-input::placeholder { color: #374151; }
textarea.admin-input { resize: vertical; min-height: 100px; }
select.admin-input { cursor: pointer; }
select.admin-input option { background: #060d1a; color: #fff; }

/* ── Label ──────────────────────────────────────────────── */
.admin-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

/* ── Form group ─────────────────────────────────────────── */
.admin-field { margin-bottom: 1.1rem; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-admin-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  border-radius: 9px;
  background: var(--neon);
  color: #060d1a;
  font-weight: 700;
  font-size: 0.825rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px rgba(0,245,255,0.25);
}
.btn-admin-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,245,255,0.4);
}
.btn-admin-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  border-radius: 9px;
  background: rgba(239,68,68,0.1);
  color: #f87171;
  font-weight: 600;
  font-size: 0.825rem;
  border: 1px solid rgba(239,68,68,0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-admin-danger:hover { background: rgba(239,68,68,0.18); }
.btn-admin-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  border-radius: 9px;
  background: rgba(255,255,255,0.05);
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.825rem;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-admin-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.2); }

/* ── Table ──────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.admin-table thead tr {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}
.admin-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.admin-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.admin-table tbody td { padding: 0.875rem 1rem; color: #d1d5db; vertical-align: middle; }

/* ── Badge ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-neon    { background: rgba(0,245,255,0.1);  border:1px solid rgba(0,245,255,0.2);  color: var(--neon); }
.badge-green   { background: rgba(34,197,94,0.1);  border:1px solid rgba(34,197,94,0.2);  color: #4ade80; }
.badge-red     { background: rgba(239,68,68,0.1);  border:1px solid rgba(239,68,68,0.2);  color: #f87171; }
.badge-yellow  { background: rgba(234,179,8,0.1);  border:1px solid rgba(234,179,8,0.2);  color: #facc15; }
.badge-gray    { background: rgba(107,114,128,0.1);border:1px solid rgba(107,114,128,0.2);color: #9ca3af; }

/* ── Toggle switch ──────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-input { display: none; }
.toggle-track {
  width: 40px; height: 22px; border-radius: 99px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative; transition: background 0.3s;
  flex-shrink: 0;
}
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #6b7280; transition: all 0.3s;
}
.toggle-input:checked ~ .toggle-track { background: rgba(0,245,255,0.25); border-color: var(--neon); }
.toggle-input:checked ~ .toggle-track .toggle-thumb { left: 20px; background: var(--neon); }

/* ── Range slider ───────────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--neon);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,245,255,0.5);
}

/* ── Image preview ──────────────────────────────────────── */
.img-preview-box {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 2px dashed rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.3s;
}
.img-preview-box:hover { border-color: rgba(0,245,255,0.3); }
.img-preview-box img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.img-preview-box .upload-hint {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: #4b5563; text-align: center; padding: 1rem;
  pointer-events: none;
}
.img-preview-box.has-image .upload-hint { display: none; }

/* ── Skill row ──────────────────────────────────────────── */
.skill-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.skill-row:hover { border-color: rgba(255,255,255,0.1); }

/* ── Page section header ────────────────────────────────── */
.page-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,245,255,0.15);
}

/* ── Color input ────────────────────────────────────────── */
input[type="color"] {
  -webkit-appearance: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border-radius: 5px; border: none; }

/* ── Alert ──────────────────────────────────────────────── */
.alert { display: flex; align-items: center; gap: 10px; padding: 0.875rem 1.25rem; border-radius: 10px; font-size: 0.825rem; }
.alert-success { background:rgba(34,197,94,0.1);  border:1px solid rgba(34,197,94,0.25);  color:#4ade80; }
.alert-error   { background:rgba(239,68,68,0.1);   border:1px solid rgba(239,68,68,0.25);   color:#f87171; }

/* ── Misc ───────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 1.5rem 0; }
.text-muted { color: #6b7280; }
.required { color: #f87171; margin-left: 2px; }
