/* ════════════════════════════════════════════════
   OLAMI PORTFOLIO — ADMIN DASHBOARD
   Premium Dark Glassmorphism Design
   ════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── TOKENS ─── */
:root {
  --bg-deep:      #07050f;
  --bg-dark:      #0d0a1a;
  --bg-card:      #130f22;
  --bg-glass:     rgba(19, 15, 34, 0.75);
  --bg-input:     rgba(10, 8, 20, 0.7);

  --crimson:      #c0293a;
  --crimson-l:    #e63950;
  --crimson-glow: rgba(192, 41, 58, 0.22);
  --violet:       #4a2d8a;
  --violet-l:     #7b52d1;

  --accent-grad: linear-gradient(135deg, #c0293a, #7b52d1);
  --sidebar-w:    260px;

  --text-primary:   #f0eeff;
  --text-secondary: #9d93c2;
  --text-muted:     #5a5279;
  --border:         rgba(255,255,255,0.07);
  --border-accent:  rgba(192, 41, 58, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 30px rgba(192, 41, 58, 0.15);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── LOCK SCREEN ─── */
#lockScreen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.lock-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%; max-width: 380px;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.lock-icon {
  width: 64px; height: 64px;
  background: var(--accent-grad);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px var(--crimson-glow);
}
.lock-icon svg { width: 28px; height: 28px; color: #fff; }
.lock-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.4rem; }
.lock-sub { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.8rem; }
.lock-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 0.9rem;
  outline: none;
  transition: var(--transition);
  margin-bottom: 1.2rem;
}
.lock-input:focus { border-color: var(--crimson-l); box-shadow: 0 0 0 3px rgba(192,41,58,0.2); }
.lock-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--accent-grad);
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-family: 'Outfit', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  letter-spacing: 0.03em;
}
.lock-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 20px var(--crimson-glow); }
.lock-error {
  color: var(--crimson-l); font-size: 0.82rem;
  margin-top: 0.8rem; min-height: 1.1em;
  transition: var(--transition);
}
.lock-hint { color: var(--text-muted); font-size: 0.78rem; margin-top: 1rem; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-glass);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  padding: 0 0 1.5rem;
  transition: var(--transition);
}

.sidebar-logo {
  padding: 1.6rem 1.5rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.75rem;
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: var(--accent-grad);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--crimson-glow);
}
.sidebar-logo-icon svg { width: 18px; height: 18px; color: #fff; }
.sidebar-logo-text { line-height: 1.2; }
.sidebar-logo-text strong { display: block; font-size: 0.95rem; font-weight: 700; }
.sidebar-logo-text small { font-size: 0.73rem; color: var(--text-muted); }

.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); padding: 0.6rem 0.75rem 0.3rem; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-secondary);
  border: none; background: none; width: 100%; text-align: left;
  margin-bottom: 2px;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.nav-item.active {
  background: rgba(192, 41, 58, 0.12);
  color: var(--crimson-l);
  border: 1px solid rgba(192, 41, 58, 0.18);
}
.nav-item.active svg { opacity: 1; }

.sidebar-bottom {
  padding: 0 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.sidebar-bottom-btn {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted); background: none; border: none;
  width: 100%; text-align: left;
}
.sidebar-bottom-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.sidebar-bottom-btn svg { width: 16px; height: 16px; }

/* ─── MAIN CONTENT ─── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ─── TOP BAR ─── */
.topbar {
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title {
  font-size: 1.15rem; font-weight: 700;
}
.topbar-subtitle { font-size: 0.78rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.preview-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none; font-size: 0.83rem; font-weight: 500;
  transition: var(--transition);
}
.preview-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.preview-btn svg { width: 14px; height: 14px; }

/* ─── CONTENT AREA ─── */
.content-area {
  padding: 2rem;
  flex: 1;
}
.panel { display: none; }
.panel.active { display: block; animation: fadeUp 0.3s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── PANEL HEADER ─── */
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.8rem;
  flex-wrap: wrap; gap: 1rem;
}
.panel-header h2 {
  font-size: 1.4rem; font-weight: 700;
}
.panel-header p { color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.2rem; }
.header-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ─── SECTION CARD ─── */
.section-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  backdrop-filter: blur(16px);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}
.section-card:hover { border-color: rgba(255,255,255,0.1); }
.section-card-title {
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600; margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.section-card-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── FORM GRID ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }

.form-label {
  font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.form-label span { color: var(--crimson-l); }
.form-input, .form-textarea, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--crimson-l);
  box-shadow: 0 0 0 3px rgba(192,41,58,0.15);
  background: rgba(10, 8, 20, 0.9);
}
.form-textarea {
  min-height: 100px; resize: vertical;
  line-height: 1.6;
}
.form-textarea.tall { min-height: 140px; }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-dark); }
.form-hint { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ─── TOGGLE / CHECKBOX ─── */
.toggle-group {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0;
}
.toggle-label { font-size: 0.85rem; color: var(--text-secondary); }
.toggle {
  position: relative; display: inline-block; width: 40px; height: 22px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 22px; cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 15px; width: 15px;
  left: 3px; top: 50%; transform: translateY(-50%);
  background: var(--text-muted); border-radius: 50%;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--crimson); border-color: var(--crimson); }
.toggle input:checked + .toggle-slider::before { transform: translateY(-50%) translateX(18px); background: #fff; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  border: none; text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 16px var(--crimson-glow);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 24px var(--crimson-glow); }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.btn-danger {
  background: rgba(192,41,58,0.15);
  border: 1px solid rgba(192,41,58,0.3);
  color: var(--crimson-l);
}
.btn-danger:hover { background: rgba(192,41,58,0.25); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.78rem; }
.btn-icon {
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}

/* ─── LIST ITEMS (skills / projects / testimonials) ─── */
.list-container { display: flex; flex-direction: column; gap: 0.75rem; }
.list-item {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}
.list-item:hover { border-color: rgba(255,255,255,0.1); }
.list-item-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  user-select: none;
}
.list-item-drag {
  color: var(--text-muted); cursor: grab;
  padding: 0 0.2rem;
  flex-shrink: 0;
}
.list-item-drag svg { width: 14px; height: 14px; }
.list-item-title {
  flex: 1; font-size: 0.9rem; font-weight: 600;
}
.list-item-meta { font-size: 0.75rem; color: var(--text-muted); }
.list-item-badge {
  font-size: 0.68rem; padding: 0.2rem 0.55rem;
  border-radius: 4px; font-weight: 600; letter-spacing: 0.05em;
  background: rgba(192,41,58,0.15); color: var(--crimson-l);
  border: 1px solid rgba(192,41,58,0.25);
}
.list-item-actions { display: flex; gap: 0.4rem; }
.list-item-chevron {
  color: var(--text-muted); transition: transform 0.25s;
  flex-shrink: 0;
}
.list-item-chevron svg { width: 16px; height: 16px; }
.list-item.expanded .list-item-chevron { transform: rotate(180deg); }

.list-item-body {
  display: none;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}
.list-item.expanded .list-item-body { display: block; padding-top: 1rem; }

.add-item-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  color: var(--text-muted); cursor: pointer;
  font-size: 0.85rem; font-weight: 500;
  transition: var(--transition); width: 100%;
}
.add-item-btn:hover {
  background: rgba(192,41,58,0.07);
  border-color: rgba(192,41,58,0.25);
  color: var(--crimson-l);
}
.add-item-btn svg { width: 16px; height: 16px; }

/* ─── TAGS EDITOR ─── */
.tags-editor { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(74, 45, 138, 0.2);
  border: 1px solid rgba(123, 82, 209, 0.3);
  border-radius: 4px; padding: 0.25rem 0.6rem;
  font-size: 0.75rem; font-weight: 500; color: var(--violet-l);
}
.tag-chip button {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: 0.6; padding: 0;
  line-height: 1; font-size: 0.9em;
  display: flex; align-items: center;
}
.tag-chip button:hover { opacity: 1; }
.tag-input-inline {
  background: transparent; border: none; outline: none;
  font-size: 0.78rem; color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  min-width: 100px; max-width: 150px;
}
.tag-input-inline::placeholder { color: var(--text-muted); }

/* ─── IMAGE UPLOAD ─── */
.img-upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer; transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.img-upload-zone:hover {
  border-color: var(--crimson-l);
  background: rgba(192,41,58,0.05);
}
.img-upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.img-upload-icon { color: var(--text-muted); margin-bottom: 0.5rem; }
.img-upload-icon svg { width: 28px; height: 28px; }
.img-upload-text { font-size: 0.8rem; color: var(--text-muted); }
.img-upload-text strong { color: var(--crimson-l); }
.img-preview {
  width: 100%; max-height: 140px; object-fit: cover;
  border-radius: var(--radius-sm); display: none;
  margin-top: 0.75rem;
}
.img-preview.visible { display: block; }
.img-filename { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ─── TOAST ─── */
#toastContainer {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: 0.6rem;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.1rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  font-size: 0.85rem; font-weight: 500;
  animation: slideInRight 0.3s ease, fadeOut 0.4s ease 2.6s forwards;
  pointer-events: auto;
  min-width: 240px; max-width: 340px;
}
.toast.success { border-color: rgba(52, 199, 89, 0.3); }
.toast.success .toast-icon { color: #34c759; }
.toast.error   { border-color: rgba(192, 41, 58, 0.4); }
.toast.error   .toast-icon { color: var(--crimson-l); }
.toast-icon svg { width: 18px; height: 18px; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  from { opacity: 1; } to { opacity: 0; }
}

/* ─── DASHBOARD HOME ─── */
.dash-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  backdrop-filter: blur(16px);
  transition: var(--transition);
}
.dash-stat-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.dash-stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.9rem;
}
.dash-stat-icon svg { width: 18px; height: 18px; }
.dash-stat-icon.red   { background: rgba(192,41,58,0.15);  color: var(--crimson-l); }
.dash-stat-icon.violet{ background: rgba(74,45,138,0.2);   color: var(--violet-l); }
.dash-stat-icon.green { background: rgba(52,199,89,0.1);   color: #34c759; }
.dash-stat-icon.blue  { background: rgba(10,132,255,0.1);  color: #0a84ff; }
.dash-stat-num { font-size: 2rem; font-weight: 800; line-height: 1; }
.dash-stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

.dash-quick-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.quick-action {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.83rem; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.quick-action svg { width: 15px; height: 15px; }
.quick-action:hover { background: rgba(192,41,58,0.1); border-color: var(--border-accent); color: var(--crimson-l); }

/* ─── SECTION DIVIDER ─── */
.section-divider {
  height: 1px; background: var(--border); margin: 1.5rem 0;
}

/* ─── SAVE FOOTER ─── */
.save-footer {
  position: sticky; bottom: 0; left: 0; right: 0;
  background: var(--bg-glass);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.save-footer-info { font-size: 0.8rem; color: var(--text-muted); }
.save-footer-info strong { color: var(--text-secondary); }
.save-footer-actions { display: flex; gap: 0.75rem; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    cursor: pointer; color: var(--text-secondary);
  }
  .mobile-toggle svg { width: 18px; height: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .form-group.span-2, .form-group.span-3 { grid-column: span 1; }
}
@media (min-width: 901px) {
  .mobile-toggle { display: none; }
}

/* ─── BG ORBS (decorative) ─── */
.bg-orbs {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-orbs::before, .bg-orbs::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.06;
}
.bg-orbs::before {
  width: 500px; height: 500px;
  background: var(--crimson);
  top: -100px; right: -100px;
}
.bg-orbs::after {
  width: 400px; height: 400px;
  background: var(--violet);
  bottom: -80px; left: -80px;
}
