/* Teleprompter Admin — extends public styles.css with admin-specific layout */

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.admin-sidebar .logo { margin: 4px 8px 24px; font-size: 17px; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--fg-muted); font-weight: 500; font-size: 14px;
  text-decoration: none;
}
.admin-sidebar nav a:hover { background: var(--bg-elev-2); color: var(--fg); }
.admin-sidebar nav a.active {
  background: rgba(10,132,255,.15); color: var(--accent);
}
.admin-sidebar .spacer { flex: 1; }
.admin-sidebar .user-chip {
  padding: 10px 12px; border-top: 1px solid var(--border); color: var(--fg-muted); font-size: 13px;
}
.admin-sidebar .user-chip .name { color: var(--fg); font-weight: 600; }

.admin-main { padding: 28px 32px 80px; min-width: 0; }
.admin-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.admin-header h1 { font-size: 24px; margin: 0; }

/* Stat tiles */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-tile { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.stat-tile .num { font-size: 30px; font-weight: 800; color: var(--fg); letter-spacing: -.02em; }
.stat-tile .label { font-size: 12px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .06em; }

.section { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.section-title { padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--fg); font-size: 15px; }

/* Data tables */
.dt {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.dt th, .dt td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis;
}
.dt th { color: var(--fg-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--bg-elev-2); }
.dt tr:last-child td { border-bottom: 0; }
.dt tr:hover td { background: var(--bg-elev-2); }
.dt .actions { display: flex; gap: 6px; }
.dt .actions .btn { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.dt .badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--bg-elev-2); color: var(--fg-muted);
}
.dt .badge.admin { background: rgba(10,132,255,.2); color: var(--accent); }
.dt .badge.unread { background: rgba(255,55,95,.22); color: var(--danger); }
.dt .badge.success { background: rgba(50,215,75,.22); color: var(--success); }

.empty-admin { padding: 60px 20px; text-align: center; color: var(--fg-muted); }

/* Login page */
.admin-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}

/* Mobile */
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static; height: auto; flex-direction: row; overflow-x: auto;
    padding: 10px; gap: 6px;
  }
  .admin-sidebar nav { flex-direction: row; }
  .admin-sidebar .logo, .admin-sidebar .user-chip { display: none; }
  .admin-main { padding: 18px; }
  .dt th, .dt td { padding: 10px; font-size: 13px; }
}
