/* =================================================================
   SCOPEVIX — admin.css
   Admin-backend-only styles. Every color below is one of the CSS
   variables already defined in styles.css :root — nothing new is
   introduced here, this file only adds layout (tables, forms, tabs)
   that the public-facing pages don't need.
   ================================================================= */

.admin-navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; border-bottom: 1px solid var(--border-subtle);
  background: var(--background-deep);
}
.admin-navbar .admin-badge {
  color: var(--text-muted); font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; margin-left: 10px;
}

.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--border-subtle); }
.admin-tab {
  padding: 10px 18px; color: var(--text-secondary); font-size: 14px; font-weight: 600;
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-tab:hover { color: var(--text-white); }
.admin-tab.active { color: var(--text-white); border-bottom-color: var(--red); }

.admin-flash {
  padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px;
  border: 1px solid var(--border);
}
.admin-flash.success { border-color: rgba(80, 220, 130, 0.35); color: #7CE8A0; background: rgba(80, 220, 130, 0.06); }
.admin-flash.error   { border-color: var(--border-active); color: var(--red-bright); background: rgba(255, 31, 45, 0.06); }
.admin-flash.warning { border-color: rgba(255, 200, 80, 0.35); color: #FFD27A; background: rgba(255, 200, 80, 0.06); }

.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form-grid .full { grid-column: 1 / -1; }

.admin-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.admin-field label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.admin-field .hint { font-size: 12px; color: var(--text-muted); }
.admin-field .field-error { font-size: 12px; color: var(--red-bright); }

.admin-field input[type="text"],
.admin-field input[type="url"],
.admin-field input[type="number"],
.admin-field select,
.admin-field textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--text-primary); font-family: inherit; font-size: 14px;
  width: 100%;
}
.admin-field textarea { resize: vertical; min-height: 70px; }
.admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus {
  outline: none; border-color: var(--border-active); box-shadow: var(--red-glow);
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left; color: var(--text-muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; color: var(--text-primary); }
.admin-table tr:hover td { background: var(--surface-hover); }
.admin-table .muted-cell { color: var(--text-muted); font-size: 13px; }
.admin-table .row-actions { display: flex; gap: 10px; white-space: nowrap; }
.admin-table .row-actions a, .admin-table .row-actions button {
  background: none; border: none; color: var(--text-secondary); font-size: 13px; cursor: pointer;
  font-family: inherit; padding: 0;
}
.admin-table .row-actions a:hover { color: var(--text-white); }
.admin-table .row-actions .danger { color: var(--red); }
.admin-table .row-actions .danger:hover { color: var(--red-bright); }

.admin-video-pill {
  display: inline-block; font-size: 12px; color: var(--text-secondary);
  border: 1px solid var(--border-subtle); border-radius: 999px; padding: 3px 10px;
}

.login-card { max-width: 380px; margin: 80px auto; }

/* =================================================================
   2-column admin shell — left sidebar + main content.
   Top .admin-navbar stays exactly as it was.
   ================================================================= */
.admin-shell { display: flex; align-items: flex-start; gap: 0; min-height: calc(100vh - 65px); }

.admin-sidebar {
  width: 240px; flex-shrink: 0; border-right: 1px solid var(--border-subtle);
  padding: 24px 14px; position: sticky; top: 65px; height: calc(100vh - 65px); overflow-y: auto;
}
.admin-sidebar .sidebar-group-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); padding: 10px 12px 8px;
}
.admin-sidebar a.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
  color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.admin-sidebar a.sidebar-link:hover { background: var(--surface-hover); color: var(--text-white); }
.admin-sidebar a.sidebar-link.active { background: var(--surface-elevated); color: var(--text-white); border: 1px solid var(--border-active); }
.admin-sidebar a.sidebar-link .icon { font-size: 16px; width: 20px; text-align: center; }

.admin-main { flex: 1; min-width: 0; padding: 28px 32px; }

@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border-subtle); padding: 14px; }
  .admin-sidebar .sidebar-nav { display: flex; gap: 6px; overflow-x: auto; }
  .admin-sidebar .sidebar-group-label { display: none; }
  .admin-sidebar a.sidebar-link { white-space: nowrap; }
  .admin-main { padding: 20px; }
}
