/* ============================================================
   BoxAds Online — Admin Panel Stylesheet (Light theme)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg:        #f5f6f8;
  --bg-2:      #ffffff;
  --bg-3:      #eef0f4;
  --bg-4:      #e5e8ef;
  --cyan:      #0099b8;
  --cyan-dim:  #007a94;
  --cyan-lt:   #e0f7fb;
  --text:      #1a1f2e;
  --text-2:    #3d4558;
  --grey:      #6b7280;
  --grey-lt:   #9ca3af;
  --border:    #dde1e9;
  --red:       #e03452;
  --green:     #0a9e72;
  --yellow:    #c47d00;
  --sidebar-w: 240px;
  --topbar-h:  64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--cyan); text-decoration: none; }
h1, h2, h3, h4 { font-family: 'Syne', sans-serif; font-weight: 700; color: var(--text); }
img { max-width: 100%; }

/* ---- Layout ---- */
.admin-layout { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0;
  height: 100vh; overflow-y: auto; z-index: 50;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-logo .logo-box { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--cyan); }
.sidebar-logo .logo-ads { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.sidebar-logo .logo-dot { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--cyan); }
.sidebar-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan-dim); background: var(--cyan-lt); padding: 2px 7px; border-radius: 100px; margin-left: auto;
}

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-group-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--grey-lt); padding: 14px 20px 6px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: 0.88rem; font-weight: 500;
  color: var(--text-2); transition: all 0.18s; border-left: 2px solid transparent;
}
.sidebar-nav a:hover { color: var(--cyan); background: var(--cyan-lt); }
.sidebar-nav a.active { color: var(--cyan); background: var(--cyan-lt); border-left-color: var(--cyan); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--grey);
}
.sidebar-footer a { color: var(--red); font-weight: 600; }

/* ---- Main content ---- */
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }

/* ---- Topbar ---- */
.admin-topbar {
  height: var(--topbar-h); background: var(--bg-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 28px; gap: 16px;
  position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; color: var(--text); }
.topbar-spacer { flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-2); }
.topbar-avatar {
  width: 32px; height: 32px; background: var(--cyan); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 0.75rem; color: #fff;
}

/* ---- Page content ---- */
.admin-content { padding: 28px; flex: 1; }

/* ---- Stat cards ---- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 22px;
}
.stat-card-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey); margin-bottom: 8px; }
.stat-card-value { font-family: 'Syne', sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--text); }
.stat-card-sub { font-size: 0.78rem; color: var(--grey); margin-top: 4px; }
.stat-card.cyan .stat-card-value { color: var(--cyan); }
.stat-card.green .stat-card-value { color: var(--green); }
.stat-card.yellow .stat-card-value { color: var(--yellow); }
.stat-card.red .stat-card-value { color: var(--red); }

/* ---- Cards ---- */
.admin-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 24px; overflow: hidden;
}
.admin-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.admin-card-header h3 { font-size: 1rem; color: var(--text); }
.admin-card-body { padding: 22px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
thead th {
  background: var(--bg-3); color: var(--grey); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 12px 14px; text-align: left; white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); background: var(--bg-2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-3); }
.td-actions { display: flex; gap: 8px; }
.btn-xs {
  font-size: 0.72rem; font-family: 'Syne', sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border);
  color: var(--text-2); background: none; cursor: pointer; transition: all 0.18s; text-decoration: none; display: inline-block;
}
.btn-xs:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-lt); }
.btn-xs.danger:hover { border-color: var(--red); color: var(--red); background: #fee2e2; }

/* ---- Forms ---- */
.admin-form { max-width: 680px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.form-control {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.92rem; padding: 10px 13px;
  transition: border-color 0.18s; outline: none;
}
.form-control:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,153,184,0.1); }
.form-control::placeholder { color: var(--grey-lt); }
select.form-control { appearance: none; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.78rem; color: var(--grey); margin-top: 5px; }

/* ---- Buttons ---- */
.btn-admin-primary {
  display: inline-block; background: var(--cyan); color: #fff;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 11px 24px;
  border-radius: 6px; border: none; cursor: pointer; transition: all 0.18s; text-decoration: none;
}
.btn-admin-primary:hover { background: var(--cyan-dim); color: #fff; }
.btn-admin-secondary {
  display: inline-block; background: var(--bg-3); color: var(--text-2);
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 11px 24px;
  border-radius: 6px; border: 1px solid var(--border); cursor: pointer; transition: all 0.18s; text-decoration: none;
}
.btn-admin-secondary:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: 6px; font-size: 0.88rem; margin-bottom: 18px; border-left: 3px solid; }
.alert-success { background: #d1fae5; border-color: #059669; color: #065f46; }
.alert-danger   { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.alert-info     { background: var(--cyan-lt); border-color: var(--cyan); color: var(--cyan-dim); }

/* ---- Badges ---- */
.badge { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 100px; }
.badge-success  { background: #d1fae5; color: #065f46; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-info     { background: var(--cyan-lt); color: var(--cyan-dim); }
.badge-secondary{ background: var(--bg-3); color: var(--grey); }

/* ---- Group Banner ---- */
.admin-group-banner { line-height: 0; }
.admin-group-banner a { display: block; }
.admin-group-banner img { width: 100%; height: auto; display: block; }

/* ---- Responsive ---- */
@media (max-width: 800px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
}
