/* ReviewsNote.com - Admin panel styles */
:root {
  --blue: #1a73e8;
  --blue-dark: #174ea6;
  --gold: #fbbc04;
  --green: #188038;
  --red: #c5221f;
  --text: #202124;
  --text-secondary: #5f6368;
  --border: #e3e5e8;
  --bg: #f7f8fa;
  --sidebar-bg: #1f2430;
  --sidebar-text: #c9ccd6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.08), 0 1px 6px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--blue); text-decoration: none; }
h1,h2,h3 { margin: 0 0 10px; }
img { max-width: 100%; }

.admin-wrap { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.admin-sidebar {
  width: 230px; background: var(--sidebar-bg); color: var(--sidebar-text);
  flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  transition: transform .2s ease; z-index: 100;
}
.admin-logo { padding: 20px 18px; color: #fff; font-weight: 700; font-size: 16px; }
.admin-logo span { color: var(--gold); }
.admin-sidebar nav { flex: 1; overflow-y: auto; }
.admin-sidebar nav a, .sidebar-footer a {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px;
  color: var(--sidebar-text); font-size: 14px; position: relative;
}
.admin-sidebar nav a:hover, .sidebar-footer a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.admin-sidebar nav a.active { background: var(--blue); color: #fff; }
.nav-icon { width: 18px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
  border-radius: 10px; padding: 1px 7px;
}
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.1); padding: 8px 0; }

/* ---- Main area ---- */
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 20px; position: sticky; top: 0; z-index: 10;
}
.admin-topbar h1 { font-size: 18px; flex: 1; }
.sidebar-toggle { display: none; border: none; background: none; font-size: 20px; }
.admin-user { font-size: 13.5px; color: var(--text-secondary); }
.admin-content { padding: 20px; max-width: 1200px; }

@media (max-width: 880px) {
  .admin-sidebar { position: fixed; left: 0; transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
}

/* ---- Cards / panels ---- */
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 20px; }
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.stat-card .num { font-size: 26px; font-weight: 700; }
.stat-card .label { color: var(--text-secondary); font-size: 13px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 13.5px;
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-danger { background: #fce8e6; border-color: #fce8e6; color: var(--red); }
.btn-danger:hover { background: #f6c9c6; }
.btn-success { background: #e6f4ea; border-color: #e6f4ea; color: var(--green); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.form-control:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
textarea.form-control { resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.current-image { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--border); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th, table.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.admin-table th { color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
table.admin-table tr:hover td { background: var(--bg); }
.table-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }

/* ---- Badges ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11.5px; font-weight: 600; }
.badge-pending { background: #fef7e0; color: #b06000; }
.badge-approved { background: #e6f4ea; color: var(--green); }
.badge-rejected { background: #fce8e6; color: var(--red); }
.badge-active { background: #e6f4ea; color: var(--green); }
.badge-inactive { background: #f1f3f4; color: var(--text-secondary); }

/* ---- Alerts ---- */
.alert { padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.alert-success { background: #e6f4ea; color: var(--green); }
.alert-error { background: #fce8e6; color: var(--red); }
.alert-info { background: #e8f0fe; color: var(--blue-dark); }

/* ---- Stars in admin tables ---- */
.stars-sm { color: var(--gold); letter-spacing: -1px; }

/* ---- Login / setup page ---- */
.centered-card { max-width: 380px; margin: 60px auto; background: #fff; padding: 28px; border-radius: 14px; box-shadow: var(--shadow); }
.centered-logo { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.centered-logo span { color: var(--gold); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-secondary); }
.empty-state .big { font-size: 36px; margin-bottom: 8px; }

.muted { color: var(--text-secondary); }
.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
