/* ================================================================
   ADMIN — Console styles (login + dashboard)
   Isolated from public site styles.
   ================================================================ */

:root {
  --adm-bg:       #0D0D0D;
  --adm-surface:  #1A1A1A;
  --adm-surface2: #242424;
  --adm-border:   #2E2E2E;
  --adm-gold:     #D4A853;
  --adm-terra:    #C8622A;
  --adm-text:     #E8E8E8;
  --adm-muted:    #888;
  --adm-success:  #4CAF50;
  --adm-danger:   #E53935;
  --adm-sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body.admin-page {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  background: var(--adm-bg);
  color: var(--adm-text);
  line-height: 1.6;
}

/* ── Login page ── */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at 30% 30%, rgba(200,98,42,.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 70%, rgba(212,168,83,.1) 0%, transparent 60%),
              var(--adm-bg);
}
.admin-login-box {
  width: 100%;
  max-width: 420px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.admin-login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.admin-login-logo .brand {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--adm-gold);
  display: block;
  margin-bottom: .25rem;
}
.admin-login-logo .sub {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--adm-muted);
}
.admin-login-box h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: .5rem;
  font-family: 'Raleway', sans-serif;
}
.admin-login-box .subtitle {
  font-size: 13px;
  color: var(--adm-muted);
  margin-bottom: 1.8rem;
}
.adm-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin-bottom: .4rem;
}
.adm-input {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--adm-surface2);
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  color: var(--adm-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.adm-input:focus { border-color: var(--adm-gold); box-shadow: 0 0 0 3px rgba(212,168,83,.15); }
.adm-form-group { margin-bottom: 1.2rem; }
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  user-select: none;
  text-decoration: none;
}
.adm-btn:hover { transform: translateY(-1px); }
.adm-btn:active { transform: translateY(0); }
.adm-btn--primary { background: var(--adm-terra); color: #fff; width: 100%; }
.adm-btn--primary:hover { background: #a04b1e; }
.adm-btn--gold { background: var(--adm-gold); color: #0a0502; }
.adm-btn--gold:hover { background: #e8c070; }
.adm-btn--outline { background: transparent; color: var(--adm-text); border: 1px solid var(--adm-border); }
.adm-btn--outline:hover { border-color: var(--adm-gold); color: var(--adm-gold); }
.adm-btn--danger { background: var(--adm-danger); color: #fff; }
.adm-btn--sm { padding: .5rem 1rem; font-size: 12px; }
.adm-error {
  background: rgba(229,57,53,.12);
  border: 1px solid rgba(229,57,53,.3);
  border-radius: 8px;
  padding: .75rem 1rem;
  color: #ef9a9a;
  font-size: 13px;
  margin-bottom: 1rem;
  display: none;
}
.adm-error.show { display: block; }

/* ── Dashboard shell ── */
.adm-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.adm-sidebar {
  width: var(--adm-sidebar-w);
  flex-shrink: 0;
  background: var(--adm-surface);
  border-right: 1px solid var(--adm-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}
.adm-sidebar__header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--adm-border);
}
.adm-sidebar__logo {
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  color: var(--adm-gold);
  display: block;
  margin-bottom: .2rem;
}
.adm-sidebar__sub {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--adm-muted);
}
.adm-nav { padding: 1rem 0; flex: 1; }
.adm-nav-section {
  padding: .5rem 1rem .25rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin-top: .5rem;
}
.adm-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  margin: .1rem .5rem;
  border-radius: 8px;
  color: var(--adm-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: calc(100% - 1rem);
  text-align: left;
}
.adm-nav-link:hover { background: rgba(255,255,255,.06); color: var(--adm-text); text-decoration: none; }
.adm-nav-link.active { background: rgba(212,168,83,.1); color: var(--adm-gold); }
.adm-nav-link .icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.adm-sidebar__footer {
  padding: 1rem;
  border-top: 1px solid var(--adm-border);
  font-size: 12px;
  color: var(--adm-muted);
}
.adm-sidebar__user { display: flex; align-items: center; gap: .75rem; }
.adm-sidebar__avatar {
  width: 32px; height: 32px;
  background: var(--adm-terra);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 13px;
  flex-shrink: 0;
}

/* Main area */
.adm-main {
  margin-left: var(--adm-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.adm-topbar {
  height: 60px;
  background: var(--adm-surface);
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.adm-topbar__title { font-size: 15px; font-weight: 700; color: var(--adm-text); }
.adm-topbar__actions { display: flex; gap: .75rem; align-items: center; }
.adm-content { padding: 1.5rem; flex: 1; }

/* Panel */
.adm-panel {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.adm-panel__header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.adm-panel__title { font-size: 14px; font-weight: 700; color: var(--adm-text); }
.adm-panel__body { padding: 1.5rem; }

/* Grid */
.adm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.adm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* Stat card */
.adm-stat {
  background: var(--adm-surface2);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  padding: 1.25rem;
}
.adm-stat__value { font-size: 1.8rem; font-weight: 900; color: var(--adm-gold); line-height: 1; margin-bottom: .25rem; }
.adm-stat__label { font-size: 11px; color: var(--adm-muted); letter-spacing: .08em; text-transform: uppercase; }

/* Inline edit field */
.adm-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.2rem;
}
.adm-field:last-child { margin-bottom: 0; }
.adm-field textarea.adm-input { resize: vertical; min-height: 80px; }
.adm-field-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: start; }

/* List editor */
.adm-list { list-style: none; }
.adm-list-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem;
  background: var(--adm-surface2);
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  margin-bottom: .5rem;
}
.adm-list-item__content { flex: 1; }
.adm-list-item__actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* Tabs */
.adm-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--adm-border); margin-bottom: 1.5rem; }
.adm-tab {
  padding: .6rem 1.2rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--adm-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.adm-tab:hover { color: var(--adm-text); }
.adm-tab.active { color: var(--adm-gold); border-bottom-color: var(--adm-gold); }

/* Badge */
.adm-badge {
  display: inline-block;
  padding: .15em .6em;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(212,168,83,.15);
  color: var(--adm-gold);
  letter-spacing: .04em;
}
.adm-badge--green { background: rgba(76,175,80,.15); color: #81c784; }
.adm-badge--red   { background: rgba(229,57,53,.15);  color: #ef9a9a; }

/* Divider */
.adm-divider { height: 1px; background: var(--adm-border); margin: 1.5rem 0; }

/* Toast */
.adm-toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  background: var(--adm-surface);
  border: 1px solid var(--adm-gold);
  border-radius: 10px;
  padding: .9rem 1.4rem;
  color: var(--adm-text);
  font-size: 13px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  z-index: 9999;
  transform: translateX(120%);
  transition: transform .3s ease;
}
.adm-toast.show { transform: translateX(0); }

/* Password change modal */
.adm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.adm-modal-overlay.open { display: flex; }
.adm-modal {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
.adm-modal h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.5rem; }

/* Responsive sidebar */
@media (max-width: 768px) {
  .adm-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .adm-sidebar.open { transform: translateX(0); }
  .adm-main { margin-left: 0; }
  .adm-grid-4 { grid-template-columns: 1fr 1fr; }
  .adm-grid-2 { grid-template-columns: 1fr; }
}
