/* admin/assets/css/admin.css */
:root{
  --text:#1f2636;
  --muted:#6b7280;

  --bg:
    radial-gradient(900px 500px at 20% 0%, rgba(125, 211, 252, .35), transparent 70%),
    radial-gradient(900px 600px at 80% 10%, rgba(196, 181, 253, .35), transparent 70%),
    #fff;

  --card: rgba(255,255,255,.72);
  --stroke: rgba(155, 170, 200, .35);

  --p1:#6d7cff;
  --p2:#7c4dff;

  --shadow: 0 20px 60px rgba(18, 28, 45, .12);
  --shadow2: 0 12px 30px rgba(18, 28, 45, .10);

  --r-xl: 26px;
  --r-lg: 18px;
  --r-md: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: var(--bg);
}

a{ color:inherit; text-decoration:none; }

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

.sidebar{
  padding: 18px;
  border-right: 1px solid rgba(165,180,252,.22);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
}

.sb-brand{
  display:flex; gap:12px; align-items:center;
  padding: 12px;
  border-radius: var(--r-xl);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(165,180,252,.28);
  box-shadow: var(--shadow2);
}
.sb-logo{
  width:42px; height:42px;
  border-radius: 16px;
  display:grid; place-items:center;
  font-weight:900;
  background: linear-gradient(135deg, rgba(109,124,255,.18), rgba(124,77,255,.18));
  border: 1px solid rgba(109,124,255,.25);
}
.sb-title{ font-weight:900; }
.sb-sub{ font-size: 12px; color: rgba(31,38,54,.6); margin-top:2px; }

.sb-nav{ margin-top: 14px; display:flex; flex-direction:column; gap: 8px; }
.sb-link{
  display:flex; align-items:center; gap:12px;
  padding: 12px 12px;
  border-radius: 16px;
  font-weight:800;
  color: rgba(31,38,54,.70);
  border: 1px solid transparent;
}
.sb-link:hover{
  background: rgba(109,124,255,.10);
  border-color: rgba(109,124,255,.15);
  color: rgba(31,38,54,.92);
}
.sb-link.active{
  background: linear-gradient(135deg, rgba(109,124,255,.14), rgba(124,77,255,.10));
  border-color: rgba(109,124,255,.18);
  color: rgba(31,38,54,.92);
}
.sb-link .aicon{
  width:34px; height:34px;
  display:grid; place-items:center;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(165,180,252,.28);
}

.sb-user{
  margin-top:auto;
  padding: 14px 12px;
  border-radius: var(--r-xl);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(165,180,252,.28);
  box-shadow: var(--shadow2);
  display:grid;
  gap: 10px;
}
.avatar{
  width:44px; height:44px;
  border-radius: 16px;
  display:grid; place-items:center;
  font-weight:900;
  color:#fff;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  box-shadow: 0 14px 28px rgba(109,124,255,.22);
}
.avatar.small{ width:34px; height:34px; border-radius: 14px; }
.sb-user__meta{ margin-top:-46px; padding-left: 56px; }
.sb-user__name{ font-weight:900; }
.sb-user__mail{ font-size: 12px; color: rgba(31,38,54,.55); margin-top:2px; }
.sb-logout{
  display:inline-flex;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(109,124,255,.10);
  border: 1px solid rgba(109,124,255,.18);
  font-weight:900;
}

.content{ padding: 18px 18px 28px; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 10px 6px 16px;
}
.topbar h1{ margin:0; font-size: 26px; }
.top-actions{ display:flex; align-items:center; gap: 10px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight:900;
  border: 1px solid transparent;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn--primary{
  color:#fff;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  box-shadow: 0 14px 30px rgba(109,124,255,.25);
}
.iconbtn{
  width:42px; height:42px;
  border-radius: 16px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(165,180,252,.28);
  box-shadow: var(--shadow2);
  cursor:pointer;
}
.profile{
  display:flex; align-items:center; gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(165,180,252,.28);
  box-shadow: var(--shadow2);
  font-weight:900;
}
.caret{ opacity:.6; }

.card{
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid rgba(165,180,252,.35);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(14px);
}

.stats{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.stat{
  padding: 14px;
  display:flex;
  align-items:center;
  gap: 12px;
}
.stat__icon{
  width:52px; height:52px;
  border-radius: 18px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(125,211,252,.25), rgba(196,181,253,.25));
  border: 1px solid rgba(165,180,252,.30);
}
.stat__label{ color: rgba(31,38,54,.62); font-weight:800; font-size: 13px; }
.stat__value{ font-weight:950; font-size: 22px; margin-top: 2px; }
.aicon svg{
  width:22px; height:22px;
  stroke: rgba(55, 65, 81, .88);
  fill:none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.grid-2{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.panel{ padding: 14px; }
.panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.panel__head h2{ margin:0; font-size: 16px; font-weight:950; }
.pill{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(109,124,255,.10);
  border: 1px solid rgba(109,124,255,.18);
  color: rgba(31,38,54,.75);
  font-weight:900;
}

.chart{
  position:relative;
  height: 210px;
  border-radius: 22px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(165,180,252,.26);
  box-shadow: 0 18px 44px rgba(17,24,39,.08);
  overflow:hidden;
}
.chart__bars{
  position:absolute; inset: 16px 16px 16px 16px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  align-items:end;
}
.chart__bars span{
  display:block;
  border-radius: 999px 999px 14px 14px;
  background: linear-gradient(180deg, rgba(109,124,255,.20), rgba(109,124,255,.05));
  border: 1px solid rgba(109,124,255,.12);
}
.chart__line{
  position:absolute; inset:0;
  background:
    radial-gradient(800px 220px at 60% 10%, rgba(196,181,253,.40), transparent 60%);
  pointer-events:none;
}
.kpis{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.kpi{
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(165,180,252,.26);
}
.kpi__n{ font-weight:950; font-size: 18px; }
.kpi__t{ color: rgba(31,38,54,.60); font-weight:800; margin-top: 2px; font-size: 12px; }

.stack{ display:grid; gap: 14px; }

.list{ display:grid; gap: 10px; }
.row{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(165,180,252,.26);
}
.row__left{ display:flex; gap:10px; align-items:center; }
.badge{
  width:38px; height:38px;
  border-radius: 16px;
  display:grid; place-items:center;
  background: rgba(109,124,255,.10);
  border: 1px solid rgba(109,124,255,.18);
}
.row__title{ font-weight:950; }
.row__sub{ font-size: 12px; color: rgba(31,38,54,.60); font-weight:800; margin-top: 2px; }
.row__dot{ width:10px; height:10px; border-radius: 50%; background: rgba(109,124,255,.45); }

.earnings{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items:center;
}
.donut{
  width: 140px; height: 140px;
  border-radius: 50%;
  background:
    conic-gradient(
      rgba(109,124,255,.75) 0 55%,
      rgba(196,181,253,.85) 55% 87%,
      rgba(125,211,252,.75) 87% 100%
    );
  position:relative;
  box-shadow: 0 18px 44px rgba(17,24,39,.10);
}
.donut::after{
  content:"";
  position:absolute; inset: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(165,180,252,.25);
}
.legend{ display:grid; gap: 10px; }
.leg{ display:flex; align-items:center; gap: 10px; font-weight:900; color: rgba(31,38,54,.75); }
.sw{ width:14px; height:14px; border-radius: 6px; display:inline-block; }
.sw.s1{ background: rgba(109,124,255,.80); }
.sw.s2{ background: rgba(196,181,253,.90); }
.sw.s3{ background: rgba(125,211,252,.80); }
.numbers{ display:grid; gap: 8px; margin-top: 6px; }
.numbers div{ display:flex; justify-content:space-between; padding: 10px 10px; border-radius: 16px; background: rgba(255,255,255,.70); border: 1px solid rgba(165,180,252,.26); }
.numbers span{ color: rgba(31,38,54,.62); font-weight:900; }
.numbers b{ font-weight:950; }

.table{ display:grid; gap: 8px; }
.trow{
  display:grid;
  grid-template-columns: 1.2fr 1.6fr .8fr;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(165,180,252,.26);
  align-items:center;
}
.thead{ background: rgba(109,124,255,.10); border-color: rgba(109,124,255,.14); font-weight:950; color: rgba(31,38,54,.78); }
.usercell{ display:flex; gap: 10px; align-items:center; font-weight:950; }
.muted{ color: var(--muted); font-weight:800; }

@media (max-width: 1100px){
  .admin{ grid-template-columns: 1fr; }
  .sidebar{ position:relative; }
  .stats{ grid-template-columns: repeat(2, 1fr); }
  .grid-2{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
  .stats{ grid-template-columns: 1fr; }
  .earnings{ grid-template-columns: 1fr; justify-items:start; }
}

/* ------------------------------------------------------------------
   Form and button overrides
   ------------------------------------------------------------------ */
/* Many admin pages still use Bootstrap classes for forms (`form-control`,
   `btn`, `btn-primary`, etc.). To ensure visual consistency with the
   dashboard design, override these classes here instead of rewriting
   every page. */

label {
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-block;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea,
select,
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(165, 180, 252, .35);
  background: rgba(255,255,255,.80);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-shadow: 0 4px 10px rgba(17,24,39,.05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(109,124,255,.65);
  box-shadow: 0 0 0 4px rgba(109,124,255,.15);
}

.btn,
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
  text-decoration: none;
}
.btn:hover,
.btn-primary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover {
  transform: translateY(-1px);
}

.btn-primary,
.btn-success {
  color: #fff;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  box-shadow: 0 14px 30px rgba(109,124,255,.28);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 14px 30px rgba(239,68,68,.28);
}

.btn-warning {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 14px 30px rgba(245,158,11,.28);
}

.btn-info {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 14px 30px rgba(14,165,233,.28);
}

.alert {
  padding: 14px 18px;
  margin-top: 10px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}
.alert-info {
  background: rgba(125,211,252,.20);
  color: var(--text);
  border-color: rgba(125,211,252,.30);
}
.alert-success {
  background: rgba(34,197,94,.20);
  color: var(--text);
  border-color: rgba(34,197,94,.30);
}
.alert-warning {
  background: rgba(245,158,11,.20);
  color: var(--text);
  border-color: rgba(245,158,11,.30);
}
.alert-danger {
  background: rgba(239,68,68,.20);
  color: var(--text);
  border-color: rgba(239,68,68,.30);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14px;
}
table th,
table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(165, 180, 252, .25);
}
table thead th {
  background: rgba(109,124,255,.10);
  font-weight: 700;
  color: var(--text);
}
table tbody tr:nth-child(even) {
  background: rgba(125,211,252,.06);
}