/* ============================================================
   Elite Packaging — Admin Panel Styles
   ============================================================ */

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

:root {
  --bg:        #0a0a0a;
  --surface:   #111;
  --card:      #161616;
  --border:    #222;
  --gold:      #c9a84c;
  --gold-dk:   #9d7e31;
  --text:      #f0ece4;
  --muted:     #888;
  --danger:    #c0392b;
  --success:   #27ae60;
  --sidebar-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}
.sidebar-logo .logo span { color: var(--gold); }
.sidebar-logo .sub {
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.sidebar-logo .badge {
  display: inline-block;
  font-size: .65rem;
  background: rgba(201,168,76,.1);
  border: 1px solid var(--gold-dk);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-section-title {
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 20px 8px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: .2s ease;
  border-left: 2px solid transparent;
}
.nav-item i { width: 16px; text-align: center; font-size: .9rem; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-item.active { color: var(--gold); background: rgba(201,168,76,.06); border-left-color: var(--gold); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: var(--bg);
  flex-shrink: 0;
}
.sidebar-user-name { font-size: .85rem; font-weight: 600; }
.sidebar-user-role { font-size: .72rem; color: var(--muted); }
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: rgba(192,57,43,.1);
  border: 1px solid rgba(192,57,43,.25);
  color: #e08080;
  border-radius: 6px;
  font-size: .82rem;
  cursor: pointer;
  text-decoration: none;
  transition: .2s;
}
.btn-logout:hover { background: rgba(192,57,43,.2); color: #f5aaaa; }

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

.topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title { font-family: 'Cormorant Garamond',serif; font-size: 1.2rem; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: .2s;
  border: none;
}
.topbar-btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  color: var(--bg);
}
.topbar-btn.primary:hover { opacity: .9; }
.topbar-btn.ghost {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text);
}
.topbar-btn.ghost:hover { background: rgba(255,255,255,.09); }

.page-content { padding: 28px; }

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card-icon {
  width: 44px; height: 44px;
  background: rgba(201,168,76,.1);
  border: 1px solid var(--gold-dk);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stat-card-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-card-label { font-size: .78rem; color: var(--muted); margin-top: 2px; }

/* ── Data Table ───────────────────────────────────────────── */
.data-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}
.data-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.data-card-title { font-family: 'Cormorant Garamond',serif; font-size: 1.1rem; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 12px 16px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 16px;
  font-size: .88rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-new     { background:rgba(201,168,76,.12);color:var(--gold);border:1px solid var(--gold-dk); }
.badge-read    { background:rgba(39,174,96,.1);color:#7ecba5;border:1px solid rgba(39,174,96,.3); }
.badge-unread  { background:rgba(201,168,76,.12);color:var(--gold);border:1px solid var(--gold-dk); }
.badge-danger  { background:rgba(192,57,43,.1);color:#e08080;border:1px solid rgba(192,57,43,.3); }
.badge-success { background:rgba(39,174,96,.1);color:#7ecba5;border:1px solid rgba(39,174,96,.3); }
.badge-featured{ background:rgba(201,168,76,.12);color:var(--gold);border:1px solid var(--gold-dk); }

/* ── Forms ────────────────────────────────────────────────── */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
}
.form-title {
  font-family: 'Cormorant Garamond',serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.fg { margin-bottom: 16px; }
.fg label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.fg input, .fg select, .fg textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: 'DM Sans',sans-serif;
  font-size: .88rem;
  color: var(--text);
  outline: none;
  transition: .2s;
}
.fg input:focus, .fg select:focus, .fg textarea:focus {
  border-color: var(--gold-dk);
  box-shadow: 0 0 0 3px rgba(201,168,76,.06);
}
.fg textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Action Buttons ───────────────────────────────────────── */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 5px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: .2s;
}
.btn-edit    { background:rgba(201,168,76,.1);color:var(--gold);border:1px solid var(--gold-dk); }
.btn-edit:hover { background:rgba(201,168,76,.2); }
.btn-delete  { background:rgba(192,57,43,.1);color:#e08080;border:1px solid rgba(192,57,43,.25); }
.btn-delete:hover { background:rgba(192,57,43,.2); }
.btn-view    { background:rgba(255,255,255,.06);color:var(--text);border:1px solid var(--border); }
.btn-view:hover { background:rgba(255,255,255,.1); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: .88rem;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background:rgba(39,174,96,.1);border-color:rgba(39,174,96,.3);color:#7ecba5; }
.alert-error   { background:rgba(192,57,43,.1);border-color:rgba(192,57,43,.3);color:#e08080; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family:'Cormorant Garamond',serif;font-size:1.2rem;font-weight:700;margin-bottom:8px;color:var(--text); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination { display:flex;gap:6px;justify-content:center;padding:20px; }
.pagination a, .pagination span {
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:5px;font-size:.82rem;
  text-decoration:none;transition:.2s;
  border:1px solid var(--border);
  color:var(--muted);background:var(--card);
}
.pagination a:hover { color:var(--gold);border-color:var(--gold-dk); }
.pagination .current { background:var(--gold);color:var(--bg);border-color:var(--gold);font-weight:700; }

/* ═══════════════════════════════════════════════════
   ADDITIONAL STYLES FOR QUOTES, GALLERY, TESTIMONIALS, SETTINGS
   ═══════════════════════════════════════════════════ */

/* ── Page Header ─────────────────────────────────── */
.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-page-title { font-size: 1.6rem; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.admin-page-sub   { color: var(--text-muted); font-size: .9rem; margin: 0; }

/* ── Status Tabs ─────────────────────────────────── */
.status-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: .75rem; }
.status-tab  { padding: 6px 14px; border-radius: 6px; font-size: .85rem; text-decoration: none; color: var(--text-muted); transition: all .2s; display: flex; align-items: center; gap: 6px; }
.status-tab:hover { background: var(--surface-2); color: var(--text); }
.status-tab.active { background: var(--gold-dim); color: var(--gold); font-weight: 600; }
.tab-count { background: var(--surface-2); border-radius: 999px; padding: 1px 7px; font-size: .75rem; }

/* ── Table Search Form ───────────────────────────── */
.table-search-form { display: flex; gap: 8px; margin-bottom: 1.25rem; align-items: center; }
.table-search-form .form-control { flex: 1; max-width: 380px; }

/* ── Quote Detail ────────────────────────────────── */
.quote-detail-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.quote-meta { display: flex; align-items: center; gap: 12px; }
.quote-date { color: var(--text-muted); font-size: .88rem; }
.status-update-form { display: flex; align-items: center; gap: 8px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-section h3 { font-size: 1rem; font-weight: 600; color: var(--gold); margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; margin: 0; font-size: .9rem; }
.detail-list dt { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.detail-list dd { color: var(--text); margin: 0; }
.message-body { background: var(--surface-2); border-radius: 8px; padding: 1rem 1.25rem; font-size: .9rem; line-height: 1.7; color: var(--text-light); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ── Status Badges ───────────────────────────────── */
.status-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .77rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.status-new      { background: rgba(201,168,76,.15); color: var(--gold); }
.status-reviewing{ background: rgba(74,144,217,.15); color: #4a90d9; }
.status-quoted   { background: rgba(155,89,182,.15); color: #9b59b6; }
.status-accepted { background: rgba(92,184,92,.15);  color: #5cb85c; }
.status-rejected { background: rgba(217,83,79,.15);  color: #d9534f; }

/* ── Status Pills ────────────────────────────────── */
.status-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .77rem; font-weight: 600; }
.pill-green  { background: rgba(92,184,92,.15); color: #5cb85c; }
.pill-grey   { background: var(--surface-2); color: var(--text-muted); }

/* ── Client info in table ────────────────────────── */
.client-info strong { display: block; font-size: .9rem; }
.client-info small  { color: var(--text-muted); font-size: .8rem; }

/* ── Row unread ──────────────────────────────────── */
.row-unread td:first-child::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: middle; }

/* ── Stars ───────────────────────────────────────── */
.stars { font-size: 1rem; letter-spacing: 1px; }

/* ── Gallery Admin Grid ──────────────────────────── */
.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.gallery-admin-card { background: var(--surface-2); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: transform .2s; }
.gallery-admin-card:hover { transform: translateY(-3px); }
.gallery-admin-card.inactive { opacity: .55; }
.gallery-thumb { position: relative; height: 150px; overflow: hidden; background: var(--surface-3, #111); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-thumb { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.5rem; opacity: .3; }
.inactive-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 4px; }
.gallery-card-body { padding: .9rem; }
.gallery-card-body h4 { margin: 0 0 6px; font-size: .95rem; color: var(--text); }
.gallery-card-body p  { margin: 6px 0; font-size: .82rem; color: var(--text-muted); }
.gallery-card-actions { display: flex; gap: 6px; margin-top: .75rem; }
.category-pill { display: inline-block; font-size: .74rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold); }

/* ── Settings Layout ─────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 700px) { .settings-layout { grid-template-columns: 1fr; } }
.settings-nav { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .75rem; position: sticky; top: 80px; }
.settings-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--text-muted); font-size: .9rem; transition: all .2s; }
.settings-nav-item:hover { background: var(--surface-2); color: var(--text); }
.settings-nav-item.active { background: var(--gold-dim); color: var(--gold); font-weight: 600; }
.settings-content { min-width: 0; }
.card-section-title { font-size: 1.05rem; font-weight: 600; color: var(--text); margin: 0 0 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }

/* ── Toggle label ────────────────────────────────── */
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-light); font-size: .9rem; }
.toggle-label input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }

/* ── form-control-sm ─────────────────────────────── */
.form-control-sm { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: .85rem; padding: 6px 10px; }

/* ── Empty state ─────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-icon  { font-size: 3rem; margin-bottom: 1rem; opacity: .5; }
.empty-state h3 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--text); }
.empty-state p  { margin: 0; font-size: .9rem; }
