/* ═══════════════════════════════════════════════════════════════
   Karol García — Admin Panel Styles
   ═══════════════════════════════════════════════════════════════ */
:root {
  --adm-bg:      #F5F5F4;
  --adm-sidebar: #1C1B18;
  --adm-text:    #1C1B18;
  --adm-muted:   #6B6B6B;
  --adm-border:  #E2E0D9;
  --adm-white:   #FFFFFF;
  --adm-accent:  #B5601F;
  --adm-danger:  #DC2626;
  --adm-ok:      #059669;
  --adm-warn:    #D97706;
  --adm-sans:    'Inter', system-ui, sans-serif;
  --adm-sidebar-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body   { font-family: var(--adm-sans); background: var(--adm-bg); color: var(--adm-text); line-height: 1.6; }
img    { display: block; max-width: 100%; }
a      { color: var(--adm-accent); text-decoration: none; }
a:hover{ text-decoration: underline; }
ul     { list-style: none; }

/* ── Layout ──────────────────────────────────────────────────── */
.adm-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--adm-sidebar-w);
  background: var(--adm-sidebar); color: rgba(255,255,255,.75);
  display: flex; flex-direction: column; overflow-y: auto; z-index: 100;
}
.adm-sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.adm-sidebar-brand strong { display: block; color: #fff; font-size: 1rem; font-weight: 600; }
.adm-sidebar-brand small  { font-size: .72rem; color: rgba(255,255,255,.4); letter-spacing: .08em; text-transform: uppercase; }

.adm-nav { padding: .75rem 0; flex: 1; }
.adm-nav-link {
  display: block; padding: .65rem 1.25rem; font-size: .875rem; color: rgba(255,255,255,.65);
  border-left: 3px solid transparent; transition: all .15s;
}
.adm-nav-link:hover { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }
.adm-nav-link.active { color: #fff; border-left-color: var(--adm-accent); background: rgba(181,96,31,.15); }

.adm-sidebar-footer {
  padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; gap: 1rem;
}
.adm-sidebar-footer a { font-size: .82rem; color: rgba(255,255,255,.45); transition: color .15s; }
.adm-sidebar-footer a:hover { color: #fff; text-decoration: none; }

.adm-main {
  margin-left: var(--adm-sidebar-w); min-height: 100vh;
  padding: 0 0 3rem;
}

.adm-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 2rem; background: var(--adm-white);
  border-bottom: 1px solid var(--adm-border); margin-bottom: 1.75rem;
  position: sticky; top: 0; z-index: 10;
}
.adm-topbar h1 { font-size: 1.2rem; font-weight: 600; font-family: var(--adm-sans); }
.adm-topbar-right { display: flex; gap: .5rem; }

.adm-main > * { padding-left: 2rem; padding-right: 2rem; }
.adm-main .adm-topbar { padding-left: 2rem; padding-right: 2rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.adm-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem; font-size: .875rem; font-weight: 500; font-family: var(--adm-sans);
  border-radius: 6px; border: 1.5px solid var(--adm-border);
  background: var(--adm-white); color: var(--adm-text);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.adm-btn:hover     { border-color: #aaa; text-decoration: none; }
.adm-btn-primary   { background: var(--adm-accent); color: #fff; border-color: var(--adm-accent); }
.adm-btn-primary:hover { background: #8C4210; border-color: #8C4210; }
.adm-btn-danger    { background: var(--adm-danger); color: #fff; border-color: var(--adm-danger); }
.adm-btn-danger:hover  { background: #B91C1C; }
.adm-btn-ok        { background: var(--adm-ok); color: #fff; border-color: var(--adm-ok); }
.adm-btn-ok:hover  { background: #047857; }
.adm-btn-featured  { background: #FEF3C7; border-color: #FCD34D; color: #92400E; }
.adm-btn-sm  { padding: .38rem .8rem; font-size: .8rem; }
.adm-btn-xs  { padding: .28rem .65rem; font-size: .78rem; }
.w-full      { width: 100%; justify-content: center; }

/* ── Alerts ──────────────────────────────────────────────────── */
.adm-alert     { padding: .875rem 1.1rem; border-radius: 8px; font-size: .9rem; margin-bottom: 1.25rem; }
.adm-alert-ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.adm-alert-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Stats ───────────────────────────────────────────────────── */
.adm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--adm-white); border: 1px solid var(--adm-border);
  border-radius: 10px; padding: 1.25rem 1.5rem;
}
.stat-card--warn { border-color: #FCD34D; background: #FFFBEB; }
.stat-num { font-size: 2rem; font-weight: 700; line-height: 1; margin-bottom: .25rem; }
.stat-lbl { font-size: .8rem; color: var(--adm-muted); }

/* ── Sections ────────────────────────────────────────────────── */
.adm-section { margin-bottom: 2rem; }
.adm-section h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; font-family: var(--adm-sans); }

.adm-quick-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.adm-card { background: var(--adm-white); border: 1px solid var(--adm-border); border-radius: 10px; padding: 1.5rem; }

/* ── Tables ──────────────────────────────────────────────────── */
.adm-img-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .875rem; background: var(--adm-white); border-radius: 10px; overflow: hidden; }
.adm-table thead th { background: var(--adm-bg); padding: .75rem 1rem; text-align: left; font-weight: 600; font-size: .8rem; color: var(--adm-muted); border-bottom: 1px solid var(--adm-border); }
.adm-table tbody tr { border-bottom: 1px solid var(--adm-border); }
.adm-table tbody tr:last-child { border-bottom: none; }
.adm-table tbody td { padding: .75rem 1rem; vertical-align: middle; }
.adm-table-thumb { width: 52px; height: 40px; object-fit: cover; border-radius: 4px; }
.adm-actions { display: flex; gap: .4rem; align-items: center; }

/* ── Thumb grid (dashboard) ──────────────────────────────────── */
.adm-thumb-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .75rem; }
.adm-thumb      { border-radius: 8px; overflow: hidden; background: var(--adm-bg); border: 1px solid var(--adm-border); }
.adm-thumb img  { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.adm-thumb-info { padding: .4rem .5rem; }
.adm-thumb-info span { display: block; font-size: .78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-thumb-info small { font-size: .72rem; color: var(--adm-muted); }
.adm-thumb-actions { display: flex; gap: .3rem; margin-top: .35rem; }

/* ── Forms ───────────────────────────────────────────────────── */
.adm-form        { max-width: 720px; }
.adm-form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: .875rem; }
.adm-form-group  { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .875rem; }
.adm-form-group label { font-size: .84rem; font-weight: 500; }
.adm-form-group small { font-size: .78rem; color: var(--adm-muted); }
.adm-form-group input,
.adm-form-group textarea,
.adm-form-group select {
  padding: .65rem .9rem; font-family: var(--adm-sans); font-size: .9375rem; color: var(--adm-text);
  background: var(--adm-white); border: 1.5px solid var(--adm-border); border-radius: 6px;
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.adm-form-group input:focus,
.adm-form-group textarea:focus,
.adm-form-group select:focus { border-color: var(--adm-accent); box-shadow: 0 0 0 3px rgba(181,96,31,.12); }
.adm-form-group textarea { resize: vertical; min-height: 90px; }
.adm-form-check  { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem; font-size: .9rem; }
.adm-form-check input { width: 16px; height: 16px; cursor: pointer; }

/* ── Upload preview ──────────────────────────────────────────── */
.upload-preview { margin-top: .75rem; }
.upload-preview img { max-height: 200px; border-radius: 8px; border: 1px solid var(--adm-border); }

/* ── Filter tabs ─────────────────────────────────────────────── */
.adm-filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.adm-filter-bar .ftab {
  padding: .38rem 1rem; font-size: .82rem; font-weight: 500;
  color: var(--adm-muted); background: var(--adm-white);
  border: 1.5px solid var(--adm-border); border-radius: 100px; cursor: pointer; transition: all .15s;
}
.adm-filter-bar .ftab:hover { color: var(--adm-accent); border-color: var(--adm-accent); text-decoration: none; }
.adm-filter-bar .ftab.active { background: var(--adm-accent); color: #fff; border-color: var(--adm-accent); }

/* ── Messages ────────────────────────────────────────────────── */
.msg-list { display: flex; flex-direction: column; gap: 1rem; }
.msg-card {
  background: var(--adm-white); border: 1px solid var(--adm-border);
  border-radius: 10px; padding: 1.25rem;
}
.msg-unread { border-left: 4px solid var(--adm-accent); }
.msg-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .75rem; }
.msg-header strong { display: block; font-weight: 600; margin-bottom: .15rem; }
.msg-header a      { font-size: .875rem; color: var(--adm-muted); }
.msg-date          { font-size: .8rem; color: var(--adm-muted); white-space: nowrap; }
.msg-body          { font-size: .9rem; line-height: 1.7; margin-bottom: 1rem; white-space: pre-wrap; }
.msg-actions       { display: flex; gap: .5rem; }

/* ── Empty state ─────────────────────────────────────────────── */
.adm-empty { color: var(--adm-muted); font-size: .9rem; padding: 1rem 0; }

/* ── Login page ──────────────────────────────────────────────── */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--adm-bg); }
.login-card {
  background: var(--adm-white); border: 1px solid var(--adm-border);
  border-radius: 14px; padding: 2.5rem 2rem; width: 100%; max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.login-logo        { text-align: center; margin-bottom: 2rem; }
.login-logo strong { display: block; font-size: 1.4rem; font-weight: 700; font-family: 'Inter', sans-serif; }
.login-logo small  { font-size: .78rem; color: var(--adm-muted); letter-spacing: .08em; text-transform: uppercase; }

/* ── Extra button variants ───────────────────────────────────── */
.adm-btn-secondary       { background: var(--adm-bg); color: var(--adm-text); border-color: var(--adm-border); }
.adm-btn-secondary:hover { border-color: var(--adm-accent); color: var(--adm-accent); }

/* ── Badge (type label) ──────────────────────────────────────── */
.adm-badge {
  display: inline-block; padding: .15rem .55rem; font-size: .72rem; font-weight: 600;
  background: var(--adm-bg); border: 1px solid var(--adm-border);
  border-radius: 100px; white-space: nowrap;
}

/* ── Video thumb placeholder ─────────────────────────────────── */
.adm-thumb-video {
  width: 52px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--adm-bg); border-radius: 4px; border: 1px solid var(--adm-border);
  font-size: 1.1rem; color: var(--adm-muted);
}
