/* ============================================================
   AYIRA ADMIN — Design System
   Palette: White / Near-Black / Orange
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --white:       #FFFFFF;
  --off-white:   #F8F8F6;
  --surface:     #F2F2EF;
  --border:      #E5E5E0;
  --border-soft: #EDEDEA;

  --black:       #111110;
  --ink:         #1C1C1A;
  --muted:       #6B6B66;
  --faint:       #A8A8A3;

  --orange:      #F26522;
  --orange-light:#FEF0E7;
  --orange-dark: #D4531A;
  --orange-glow: rgba(242, 101, 34, 0.12);

  --green:       #16A34A;
  --green-light: #DCFCE7;
  --red:         #DC2626;
  --red-light:   #FEE2E2;
  --blue:        #2563EB;
  --blue-light:  #DBEAFE;
  --amber:       #D97706;
  --amber-light: #FEF3C7;

  --sidebar-w:   256px;
  --header-h:    64px;
  --radius:      8px;
  --radius-lg:   12px;
  --radius-xl:   16px;

  --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:   0 10px 15px rgba(0,0,0,.06), 0 4px 6px rgba(0,0,0,.04);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --transition: 150ms cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 14px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

/* ============================================================
   LAYOUT
   ============================================================ */

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
}

.sidebar-logo-mark {
  width: 34px; height: 34px;
  background: var(--orange);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-mark svg { color: white; width: 18px; height: 18px; }

.sidebar-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--black);
  letter-spacing: -.02em;
  line-height: 1;
}

.sidebar-logo-sub {
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sidebar-section {
  padding: 20px 12px 4px;
}

.sidebar-section-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 8px;
  margin-bottom: 4px;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.sidebar-nav a:hover {
  background: var(--surface);
  color: var(--ink);
}

.sidebar-nav a.active {
  background: var(--orange-light);
  color: var(--orange);
}

.sidebar-nav a .nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: .7;
}

.sidebar-nav a.active .nav-icon { opacity: 1; }

.sidebar-nav a .nav-badge {
  margin-left: auto;
  background: var(--orange);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  line-height: 1.4;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--border-soft);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user:hover { background: var(--surface); }

.sidebar-avatar {
  width: 32px; height: 32px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: .7rem;
  color: var(--muted);
}

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

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

.topbar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
  letter-spacing: -.02em;
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  height: 36px;
  min-width: 220px;
  transition: all var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--orange);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.topbar-search input {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--ink);
  outline: none;
  width: 100%;
}

.topbar-search input::placeholder { color: var(--faint); }
.topbar-search svg { color: var(--faint); width: 15px; height: 15px; flex-shrink: 0; }

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

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header-left h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--black);
  letter-spacing: -.03em;
}

.page-header-left p {
  font-size: .875rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-sm { height: 32px; padding: 0 12px; font-size: .8rem; }
.btn-md { height: 38px; padding: 0 16px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: .95rem; }

.btn-primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface); border-color: var(--faint); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface); color: var(--ink); }

.btn-danger {
  background: white;
  color: var(--red);
  border-color: #FECACA;
}
.btn-danger:hover { background: var(--red-light); }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--radius);
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--black);
  letter-spacing: -.01em;
}

.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-card-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.stat-card-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-card-icon.green  { background: var(--green-light);  color: var(--green); }
.stat-card-icon.blue   { background: var(--blue-light);   color: var(--blue); }
.stat-card-icon.amber  { background: var(--amber-light);  color: var(--amber); }

.stat-card-icon svg { width: 18px; height: 18px; }

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--black);
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .75rem;
  font-weight: 600;
  margin-top: 8px;
  padding: 2px 6px;
  border-radius: 99px;
}

.stat-change.up   { color: var(--green); background: var(--green-light); }
.stat-change.down { color: var(--red);   background: var(--red-light); }
.stat-change svg  { width: 11px; height: 11px; }

/* ── Table ─────────────────────────────────────────────────── */
.table-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

thead {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 11px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

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

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover { background: var(--off-white); }

.table-actions { display: flex; gap: 4px; align-items: center; }

/* ── Badges / Chips ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-orange { background: var(--orange-light); color: var(--orange-dark); }
.badge-green  { background: var(--green-light);  color: #15803D; }
.badge-red    { background: var(--red-light);    color: #B91C1C; }
.badge-blue   { background: var(--blue-light);   color: #1D4ED8; }
.badge-amber  { background: var(--amber-light);  color: #B45309; }
.badge-gray   { background: var(--surface);      color: var(--muted); }

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

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

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: .01em;
}

.form-label .required { color: var(--orange); margin-left: 2px; }

.form-sublabel {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.form-control {
  width: 100%;
  height: 38px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--ink);
  outline: none;
  transition: all var(--transition);
  appearance: none;
}

.form-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.form-control::placeholder { color: var(--faint); }

.form-control.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.6;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B6B66'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 34px;
  cursor: pointer;
}

.form-error {
  font-size: .75rem;
  color: var(--red);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-hint {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 5px;
}

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

.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Checkbox & Switch */
.check-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.check-group input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--orange);
  cursor: pointer;
}

/* File Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--off-white);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--orange);
  background: var(--orange-light);
}

.upload-zone-icon {
  width: 44px; height: 44px;
  background: var(--surface);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  color: var(--muted);
}

.upload-zone-icon svg { width: 22px; height: 22px; }
.upload-zone p { font-size: .875rem; color: var(--muted); }
.upload-zone strong { color: var(--orange); }
.upload-zone small { font-size: .75rem; color: var(--faint); }

/* Progress bar */
.progress-bar {
  height: 5px;
  background: var(--surface);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 99px;
  transition: width .3s ease;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft);
}

.page-info {
  font-size: .8rem;
  color: var(--muted);
  margin-right: auto;
}

.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: .8rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover  { background: var(--surface); }
.page-btn.active { background: var(--orange); color: white; border-color: var(--orange); }
.page-btn svg    { width: 14px; height: 14px; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.98);
  transition: transform var(--transition);
}

.modal-overlay.open .modal { transform: none; }

.modal-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--black);
  letter-spacing: -.02em;
}

.modal-close {
  width: 28px; height: 28px;
  border-radius: var(--radius);
  border: none;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--ink); }
.modal-close svg { width: 14px; height: 14px; }

.modal-body { padding: 16px 24px 20px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Toast Notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  min-width: 280px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .25s ease forwards;
}

.toast.success .toast-icon { color: #4ADE80; }
.toast.error   .toast-icon { color: #F87171; }
.toast.info    .toast-icon { color: #60A5FA; }

.toast-icon svg { width: 16px; height: 16px; }
.toast-content { flex: 1; }
.toast-title   { font-weight: 600; font-size: .85rem; line-height: 1.3; }
.toast-message { font-size: .8rem; opacity: .75; margin-top: 2px; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

/* ── Loading / Skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--border-soft) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

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

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
}

.empty-state-icon {
  width: 56px; height: 56px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--faint);
}

.empty-state-icon svg { width: 26px; height: 26px; }
.empty-state h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 6px;
}
.empty-state p { font-size: .875rem; color: var(--muted); margin-bottom: 20px; }

/* ── Tabs ───────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--radius);
  width: fit-content;
}

.tab-btn {
  padding: 6px 14px;
  border-radius: calc(var(--radius) - 2px);
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

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

/* ── Artwork Thumbnail ──────────────────────────────────────── */
.artwork-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.artwork-info { display: flex; align-items: center; gap: 12px; }
.artwork-info-text { min-width: 0; }
.artwork-info-title {
  font-weight: 500;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.artwork-info-sub { font-size: .8rem; color: var(--muted); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb svg { width: 12px; height: 12px; color: var(--faint); }
.breadcrumb .current { color: var(--ink); font-weight: 500; }

/* ── Step Indicator ────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
}

.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--faint);
  background: white;
  flex-shrink: 0;
  transition: all var(--transition);
}

.step.active .step-circle {
  border-color: var(--orange);
  color: var(--orange);
}

.step.done .step-circle {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 8px;
}

.step-label {
  position: absolute;
  font-size: .7rem;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 32px;
}

/* ── Auth Page ──────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo-mark {
  width: 40px; height: 40px;
  background: var(--orange);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
}

.auth-logo-mark svg { color: white; width: 20px; height: 20px; }

.auth-logo h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--black);
  letter-spacing: -.03em;
  line-height: 1;
}

.auth-logo span {
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  display: block;
}

.auth-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--black);
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── Responsive ─────────────────────────────────────────────── */
.mobile-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: none;
    box-shadow: var(--shadow-lg);
  }
  .main-content { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .form-row.cols-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .page-body { padding: 16px; }
  .form-row.cols-2,
  .form-row.cols-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar-search { display: none; }
}

/* ============================================================
   AYIRA ADMIN — Extensions v2
   Upload progress, 3D preview, form sections, darker text
   ============================================================ */

/* ── Textes plus foncés globalement ────────────────────────── */
body { color: #111110; }
p, li, td, th, label, span { color: #1C1C1A; }
.form-label { color: #111110; font-weight: 600; }
.stat-label  { color: #3d3d3a; font-weight: 500; }
.table-wrap table td { color: #111110; }
.sidebar-nav a { color: #2a2a28; }
.sidebar-nav a:hover, .sidebar-nav a.active { color: #111110; }

/* ── Upload Zone améliorée ──────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--off-white);
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--orange);
  background: var(--orange-light);
}
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-zone-icon {
  width: 44px; height: 44px;
  background: var(--orange-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  color: var(--orange);
}
.upload-zone-title { font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: #111110; margin-bottom: 4px; }
.upload-zone-sub   { font-size: .78rem; color: #6B6B66; }

/* ── Progress Bar Upload ────────────────────────────────────── */
.upload-progress-wrap {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: none;
}
.upload-progress-wrap.visible { display: block; }

.upload-progress-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  font-size: .83rem; font-weight: 600; color: #111110;
}
.upload-progress-pct {
  font-family: var(--font-display);
  font-size: .95rem;
  color: var(--orange);
}
.progress-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  border-radius: 99px;
  transition: width .3s ease;
  width: 0%;
}
.upload-progress-status {
  font-size: .75rem; color: #6B6B66;
  margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
}
.upload-progress-status .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--orange);
  animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── Preview Media ──────────────────────────────────────────── */
.media-preview-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0a0a0a;
  aspect-ratio: 16/9;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  display: none;
}
.media-preview-box.visible { display: flex; }
.media-preview-box video,
.media-preview-box audio {
  width: 100%; max-height: 100%; outline: none;
}
.media-preview-box audio { margin: auto; width: 90%; }

/* ── 3D GLB Preview ─────────────────────────────────────────── */
.glb-preview-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  aspect-ratio: 16/9;
  position: relative;
  display: none;
}
.glb-preview-wrap.visible { display: block; }
.glb-preview-wrap model-viewer {
  width: 100%; height: 100%;
  --poster-color: transparent;
}
.glb-preview-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(242,101,34,.9);
  color: white; font-size: .72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
  font-family: var(--font-display);
  letter-spacing: .05em;
}

/* ── Thumbnail Gallery ──────────────────────────────────────── */
.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.gallery-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  position: relative;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition);
}
.gallery-thumb:hover { border-color: var(--orange); }
.gallery-thumb img { width:100%; height:100%; object-fit:cover; }
.gallery-thumb .remove-thumb {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: rgba(220,38,38,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity var(--transition);
}
.gallery-thumb:hover .remove-thumb { opacity: 1; }
.gallery-thumb.main-image { border-color: var(--orange); border-width: 2px; }
.gallery-thumb.main-image::after {
  content: '⭐'; position: absolute; bottom: 3px; left: 4px;
  font-size: .65rem; background: var(--orange); color: white;
  padding: 1px 4px; border-radius: 4px;
}

/* ── Form Section avec accordéon ───────────────────────────── */
.form-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.form-section-header {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background var(--transition);
}
.form-section-header:hover { background: var(--off-white); }
.form-section-header.open { border-bottom-color: var(--border); }
.form-section-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.form-section-icon.orange { background: var(--orange-light); color: var(--orange); }
.form-section-icon.blue   { background: var(--blue-light);   color: var(--blue); }
.form-section-icon.green  { background: var(--green-light);  color: var(--green); }
.form-section-icon.amber  { background: var(--amber-light);  color: var(--amber); }
.form-section-icon.gray   { background: var(--surface);      color: var(--faint); }

.form-section-title { font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: #111110; }
.form-section-sub   { font-size: .78rem; color: #6B6B66; margin-top: 1px; }
.form-section-chevron { margin-left: auto; color: var(--faint); transition: transform var(--transition); }
.form-section-header.open .form-section-chevron { transform: rotate(90deg); }
.form-section-body  { padding: 20px; display: none; }
.form-section-body.open { display: block; }

/* ── Badge Promo / Vedette ──────────────────────────────────── */
.badge-promo   { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-vedette { background: #F3E8FF; color: #6B21A8; border: 1px solid #E9D5FF; }
.badge-free    { background: var(--green-light); color: #14532D; border: 1px solid #BBF7D0; }
.badge-new     { background: var(--blue-light);  color: #1E3A8A; border: 1px solid #BFDBFE; }

/* ── Toggle Switch ──────────────────────────────────────────── */
.toggle-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.toggle-wrap:last-child { border-bottom: none; }
.toggle-info-title { font-size: .88rem; font-weight: 600; color: #111110; }
.toggle-info-sub   { font-size: .78rem; color: #6B6B66; margin-top: 2px; }
.toggle {
  position: relative; width: 42px; height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer;
  inset: 0; background: var(--border);
  border-radius: 99px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px;
  left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--orange); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Artist Search Select ───────────────────────────────────── */
.artist-search-wrap { position: relative; }
.artist-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 20;
  max-height: 220px; overflow-y: auto;
  display: none;
}
.artist-results.open { display: block; }
.artist-result-item {
  padding: 10px 14px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-soft);
}
.artist-result-item:last-child { border-bottom: none; }
.artist-result-item:hover { background: var(--off-white); }
.artist-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--orange-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: .8rem; color: var(--orange); flex-shrink: 0;
}
.artist-selected-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--orange-light);
  border: 1px solid rgba(242,101,34,.3);
  border-radius: var(--radius);
  margin-top: 6px;
  display: none;
}
.artist-selected-badge.visible { display: flex; }

/* ── Form Sticky Footer ─────────────────────────────────────── */
.form-sticky-footer {
  position: sticky; bottom: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px;
  z-index: 10;
  box-shadow: 0 -4px 12px rgba(0,0,0,.04);
}
.form-sticky-footer .save-status {
  font-size: .8rem; color: #6B6B66;
  display: flex; align-items: center; gap: 6px;
}

/* ── Lang Tabs ──────────────────────────────────────────────── */
.lang-tabs { display: flex; gap: 2px; margin-bottom: 14px; }
.lang-tab {
  padding: 5px 14px;
  font-size: .8rem; font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: white; color: #6B6B66;
  transition: all var(--transition);
}
.lang-tab.active {
  background: var(--orange); color: white; border-color: var(--orange);
}
.lang-panel { display: none; }
.lang-panel.active { display: block; }

/* ── Price Section ──────────────────────────────────────────── */
.price-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.price-input-wrap { position: relative; }
.price-input-wrap .currency {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: .82rem; font-weight: 600; color: #6B6B66;
  pointer-events: none;
}
.price-input-wrap .form-control { padding-left: 52px; }
.price-strikethrough {
  text-decoration: line-through; color: #6B6B66;
  font-size: .82rem;
}
