/* ============================================================
   DJ ARCTIC VIBE — Admin Panel Styles
   ============================================================ */

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

:root {
  --bg:         #0a0e18;
  --bg-2:       #111827;
  --bg-3:       #1a2035;
  --border:     rgba(255,255,255,0.08);
  --border-2:   rgba(0,212,255,0.2);
  --text:       #e8eaf0;
  --text-soft:  #b0b8cc;
  --muted:      #6b7a99;
  --accent:     #00d4ff;
  --accent-2:   #00ffcc;
  --accent-3:   #7b2fff;
  --danger:     #ff4d6a;
  --warning:    #ffb400;
  --success:    #00ff96;
  --sidebar-w:  240px;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Login ───────────────────────────────────────────── */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 30%, rgba(0,212,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 70%, rgba(123,47,255,0.06) 0%, transparent 60%),
              var(--bg);
}

.login-box {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.login-logo i { font-size: 1.5rem; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-sub {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.login-error {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1.2em;
  margin-bottom: 0.5rem;
}


/* ── App Layout ──────────────────────────────────────── */
#app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.sidebar-logo i { animation: spin 10s linear infinite; font-size: 1.1rem; }

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0.75rem 1rem 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  color: var(--text-soft);
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  font-size: 0.875rem;
  margin: 1px 0.5rem;
  border-radius: var(--radius);
}
.nav-item i { width: 18px; text-align: center; font-size: 0.85rem; }
.nav-item:hover { background: rgba(0,212,255,0.07); color: var(--text); }
.nav-item.active { background: rgba(0,212,255,0.12); color: var(--accent); font-weight: 500; }

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.view-site-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: rgba(0,212,255,0.08);
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.15s;
}
.view-site-link:hover { background: rgba(0,212,255,0.16); }

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: none;
  border: 1px solid rgba(255,77,106,0.3);
  color: var(--danger);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}
.logout-btn:hover { background: rgba(255,77,106,0.1); }

/* Sidebar mobile toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}


/* ── Main Content ─────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2rem;
  max-width: calc(100vw - var(--sidebar-w));
  overflow-x: hidden;
}


/* ── Page Header ─────────────────────────────────────── */
.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  flex: 1;
}
.page-header h1 + p {
  color: var(--muted);
  font-size: 0.85rem;
  flex-basis: 100%;
  order: 3;
  margin-top: -1.2rem;
}


/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}


/* ── Forms ───────────────────────────────────────────── */
.field-group { margin-bottom: 1.25rem; }

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}
.field-hint { color: var(--muted); font-weight: 400; font-size: 0.78rem; }

.field-input,
.field-textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.875rem;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}
.field-input:focus,
.field-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,0.1); }
.field-input::placeholder,
.field-textarea::placeholder { color: var(--muted); }
.field-textarea { resize: vertical; min-height: 80px; }

select.field-input { cursor: pointer; }
select.field-input option { background: var(--bg-2); }

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  flex-direction: row !important;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.section-divider {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin: 1.5rem 0 1rem;
}
.section-divider:first-child { margin-top: 0; }

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1rem; }


/* ── Buttons ─────────────────────────────────────────── */
.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  font-family: inherit;
}
.btn-save:hover { opacity: 0.88; }
.btn-save:active { transform: scale(0.97); }
.btn-save.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

.btn-cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-soft);
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-cancel:hover { background: var(--bg-3); }

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border-2);
  color: var(--accent);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-outline-sm:hover { background: rgba(0,212,255,0.08); }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); }


/* ── Tabs ────────────────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }


/* ── Items List ──────────────────────────────────────── */
.items-list { margin-bottom: 1.25rem; }

.item-row {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.15s;
}
.item-row:hover { border-color: rgba(0,212,255,0.2); }

.item-icon {
  font-size: 1.75rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  border-radius: 8px;
  flex-shrink: 0;
}

.item-info { flex: 1; min-width: 0; }
.item-title {
  font-weight: 500;
  color: var(--text);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.item-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(0,212,255,0.1);
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.25);
  flex-shrink: 0;
}

.item-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.drag-handle {
  color: var(--muted);
  cursor: grab;
  padding: 0 0.25rem;
  font-size: 0.85rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state i { font-size: 2.5rem; opacity: 0.3; margin-bottom: 0.75rem; display: block; }


/* ── Form Panel ──────────────────────────────────────── */
.form-panel { border-color: rgba(0,212,255,0.2); }
.form-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}


/* ── Dashboard Cards ─────────────────────────────────── */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.15s;
}
.dash-card:hover { border-color: rgba(0,212,255,0.2); }
.dash-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.dash-stat { font-family: 'Orbitron', sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.dash-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }


/* ── Toggle Switch ───────────────────────────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: 0.3s;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--muted);
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: rgba(0,212,255,0.2); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--accent); }

.toggle-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}


/* ── Announcement Preview ────────────────────────────── */
.announcement-preview {
  transition: background 0.3s, border-color 0.3s;
}


/* ── Visibility List ─────────────────────────────────── */
.visibility-list { display: flex; flex-direction: column; gap: 0; }
.visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.visibility-row:last-child { border-bottom: none; }
.vis-title { font-weight: 500; font-size: 0.9rem; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.vis-title i { color: var(--accent); font-size: 0.85rem; }
.vis-desc { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }


/* ── Toast ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: rgba(0,255,150,0.15); border: 1px solid rgba(0,255,150,0.35); color: #00ff96; }
.toast.error   { background: rgba(255,77,106,0.15); border: 1px solid rgba(255,77,106,0.35); color: var(--danger); }


/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.3); }

code { font-family: monospace; font-size: 0.82em; }


/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,0.5);
  }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .main-content { margin-left: 0; padding: 1rem; padding-top: 4rem; max-width: 100vw; }
  .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 480px) {
  .dashboard-cards { grid-template-columns: 1fr 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions button { width: 100%; justify-content: center; }
}


/* ── PHOTOS ──────────────────────────────────────────────── */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.photo-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}

.photo-card:hover {
  border-color: rgba(255,110,180,0.4);
  transform: translateY(-2px);
}

.photo-card-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-3);
}

.photo-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.photo-card:hover .photo-card-img-wrap img {
  transform: scale(1.05);
}

.photo-card-info {
  padding: 0.6rem 0.75rem 0.4rem;
}

.photo-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card-caption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card-actions {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem 0.6rem;
  justify-content: flex-end;
}

/* Drop Zone */
.photo-drop-zone {
  border: 2px dashed rgba(255,110,180,0.35);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 1rem;
  color: var(--muted);
}

.photo-drop-zone:hover,
.photo-drop-zone.drag-over {
  background: rgba(255,110,180,0.06);
  border-color: rgba(255,110,180,0.7);
}

.photo-drop-zone i {
  font-size: 2.5rem;
  color: rgba(255,110,180,0.6);
  display: block;
  margin-bottom: 0.75rem;
}

.photo-drop-zone p {
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.drop-browse {
  color: #ff6eb4;
  text-decoration: underline;
  cursor: pointer;
}


/* ── Star Picker ─────────────────────────────────────────── */
.star-picker {
  display: flex;
  gap: 6px;
  cursor: pointer;
  width: fit-content;
}

.star-pick {
  font-size: 1.6rem;
  color: rgba(255,255,255,0.15);
  transition: color 0.15s, transform 0.15s;
}

.star-pick.active,
.star-pick.hover {
  color: #fbbf24;
}

.star-pick:hover {
  transform: scale(1.15);
}


/* ═══════════════════════════════════════════════════════════
   BLOG / FAQ / EPK / CALENDAR / SETTINGS (merged panels)
════════════════════════════════════════════════════════════ */

/* Article list */
.article-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

.article-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.article-item-info { flex: 1; }

.article-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-item-meta { font-size: 0.78rem; color: var(--muted); }

.article-item-actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--pub   { background: var(--success); }
.status-dot--draft { background: var(--muted); }

/* Calendar ID rows */
.cal-id-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.cal-id-row { display: flex; gap: 0.5rem; align-items: center; }
.cal-id-row .field-input { flex: 1; }

/* FAQ items */
.faq-admin-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

/* Article Editor Modal */
.editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,9,15,0.9);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.editor-overlay.open { opacity: 1; pointer-events: all; }

.editor-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  transform: translateY(20px);
  transition: transform 0.3s;
}
.editor-overlay.open .editor-box { transform: translateY(0); }

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.editor-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.editor-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.editor-close:hover { color: var(--text); border-color: var(--accent); }

.editor-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Settings change-password */
.change-pw-form { max-width: 420px; }

/* ── Crop Modal ────────────────────────────────────────── */
#crop-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
#crop-modal.open { display: flex; }

#crop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(4px);
}

.crop-modal-box {
  position: relative;
  z-index: 1;
  background: #0b1623;
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 14px;
  width: min(780px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
}
.crop-modal-header h3 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.crop-modal-header h3 i { color: #00d4ff; }

.crop-aspect-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.crop-aspect-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55);
  border-radius: 6px;
  padding: 4px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.18s;
}
.crop-aspect-btn:hover { border-color: rgba(0,212,255,0.45); color: #fff; }
.crop-aspect-btn.active {
  background: rgba(0,212,255,0.15);
  border-color: #00d4ff;
  color: #00d4ff;
}

.crop-workspace {
  position: relative;
  flex: 1;
  min-height: 320px;
  max-height: 480px;
  background: #060d16;
  overflow: hidden;
  user-select: none;
}

#crop-source-img {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

#crop-box {
  position: absolute;
  border: 2px solid #00d4ff;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.58);
  cursor: move;
  box-sizing: border-box;
}

.crop-grid { position: absolute; inset: 0; pointer-events: none; }
.crop-grid-line { position: absolute; background: rgba(255,255,255,0.18); }
.crop-grid-row { left: 0; right: 0; height: 1px; }
.crop-grid-col { top: 0; bottom: 0; width: 1px; }

.crop-handle {
  position: absolute;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 2px solid #00d4ff;
  border-radius: 2px;
  box-sizing: border-box;
}
.crop-nw { top:-6px; left:-6px;  cursor:nw-resize; }
.crop-n  { top:-6px; left:50%; transform:translateX(-50%); cursor:n-resize; }
.crop-ne { top:-6px; right:-6px; cursor:ne-resize; }
.crop-w  { top:50%; left:-6px;  transform:translateY(-50%); cursor:w-resize; }
.crop-e  { top:50%; right:-6px; transform:translateY(-50%); cursor:e-resize; }
.crop-sw { bottom:-6px; left:-6px;  cursor:sw-resize; }
.crop-s  { bottom:-6px; left:50%; transform:translateX(-50%); cursor:s-resize; }
.crop-se { bottom:-6px; right:-6px; cursor:se-resize; }

.crop-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.crop-dimensions {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  font-family: monospace;
  letter-spacing: 0.04em;
}

/* ── Source toggle buttons ─────────────────────────────── */
.toggle-btns {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}
.toggle-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 18px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.18s;
}
.toggle-btn:last-child { border-right: none; }
.toggle-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.toggle-btn.active { background: rgba(0,212,255,0.15); color: #00d4ff; font-weight: 600; }
