/* Minimal clean styles */
:root{
  --bg:#f4f5fb;
  --card:#ffffff;
  --text:#0b1020;
  --muted:#5b6476;
  --border:rgba(17,24,39,.08);
  --shadow: 0 10px 30px rgba(17,24,39,.08);
  --accent:#A78BFA;   /* PostPal purple (light) */
  --accent2:#86EFAC;  /* PostPal green (light) */
  --danger:#ef4444;
}
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1000px 600px at 20% -10%, rgba(124,58,237,.12), transparent 60%),
              radial-gradient(900px 600px at 80% 0%, rgba(34,197,94,.10), transparent 55%),
              var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
a{ color: #b8a7ff; text-decoration:none; }
a:hover{ text-decoration:underline; }
.container{ max-width: 980px; margin: 0 auto; padding: 28px 16px 60px; }
.nav{ display:flex; gap:12px; justify-content:space-between; align-items:center; margin-bottom: 18px; }
.brand{ font-weight:800; letter-spacing:.2px; }
.brand span{ color: var(--accent); }
.badge{ display:inline-flex; padding:6px 10px; border-radius:999px; background:#1a244a; color:var(--muted); font-size:12px; }
.grid{ display:grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 880px){ .grid{ grid-template-columns: 1.2fr .8fr; } }
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
h1{ font-size: 30px; margin: 8px 0 10px; }
h2{ font-size: 18px; margin: 0 0 10px; }
p{ margin: 10px 0; color: var(--muted); line-height: 1.55; }
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor:pointer;
  text-decoration:none;
  font-weight:700;
}
.btn:hover{ filter:brightness(.98); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.btn.primary{
  border:none;
  background: linear-gradient(135deg, var(--accent), #C4B5FD);
  color:white;
}
.btn.ghost{
  background: transparent;
  border:1px solid var(--border);
}

.btn.primary{ background: linear-gradient(90deg, var(--accent), var(--accent2)); border:0; color:white; }
.btn.ghost{ background: transparent; }
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.row{ display:flex; gap:10px; flex-wrap:wrap; }
.input{
  width:100%;
  box-sizing:border-box;
  padding: 12px 12px;
  margin-top:6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  outline:none;
}
.input:focus{ border-color: rgba(124,58,237,.45); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }

label{ font-size: 12px; color: var(--muted); display:block; margin: 10px 0 6px; }
.small{ font-size: 12px; color: var(--muted); }
.kpi{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.75);
  border-radius: 16px;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.kpi.linkbox{ align-items:stretch; }
.kpi.linkbox > div{ flex:1; min-width:0; }
.kpi.linkbox button{ white-space:nowrap; }
.tag{ font-size: 12px; font-weight: 900; color: var(--muted); letter-spacing:.02em; }

.kpi strong{ font-size: 22px; }
.kpi .tag{ font-size:12px; color: var(--muted); }
.hr{ height:1px; background: rgba(255,255,255,.08); margin: 14px 0; }
.table{
  width:100%;
  border-collapse: collapse;
}
.table th, .table td{
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align:left;
  font-size: 14px;
}
.table th{ color: var(--muted); font-weight: 900; }

.table th,.table td{ text-align:left; padding:10px 8px; border-bottom:1px solid rgba(255,255,255,.08); font-size: 13px; color: var(--muted); }
.table th{ color: var(--text); font-weight:700; }
.toast{
  display:none;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.10);
  color: var(--text);
  font-weight: 800;
}
.toast.err{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

.toast.err{ background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.25); }

/* Mobile improvements *//* Mobile improvements */
.btn{ min-height:44px; }
.table-wrap{ width:100%; overflow-x:auto; border-radius:14px; }
.table{ min-width: 720px; }
@media (max-width: 520px){
  h1{ font-size: 24px; }
  .container{ padding: 18px 12px 50px; }
  .card{ padding: 14px; border-radius: 16px; }
  .kpi strong{ font-size: 20px; }
  .kpi.linkbox{ flex-direction:column; align-items:stretch; }
  .kpi.linkbox button{ width:100%; }
}

@media (max-width: 880px){
  .grid{ grid-template-columns: 1fr; }
}

.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.btn:active{ transform: translateY(0px); }


/* Donut (Stats) */
.donut-wrap{ display:flex; flex-direction:column; align-items:center; gap:10px; }
.donut{
  width: 240px;
  height: 240px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: conic-gradient(var(--accent) 0 100%, rgba(17,24,39,.06) 0);
  position:relative;
}
.donut-inner{
  width: 178px;
  height: 178px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 14px;
}
.donut-title{ font-size: 13px; color: var(--muted); font-weight: 800; }
.donut-value{ font-size: 22px; font-weight: 900; margin-top: 4px; }
.small{ color: var(--muted); font-size: 13px; }



/* Donut sizes */
.donut.main{ width:240px; height:240px; }
.donut.mini{ width:170px; height:170px; }
.donut-inner.mini{ width:120px; height:120px; }
@media (max-width:520px){
  .donut.main{ width:220px; height:220px; }
  .donut.mini{ width:150px; height:150px; }
  .donut-inner.mini{ width:110px; height:110px; }
}

.donutRow{display:flex; gap:16px; flex-wrap:wrap; align-items:flex-start}
.donutStack{display:flex; flex-direction:column; gap:14px; min-width:170px}
.donut-wrap.mini{padding:12px}
.donut-wrap.mini .donut{width:170px; height:170px}
.donut-wrap.mini .donut-inner{width:120px; height:120px}
@media (max-width:720px){
  .donutStack{flex-direction:row; min-width:0; width:100%}
  .donut-wrap.mini{flex:1}
}

/* Backward compatible donut class names */
.donutInner{ width: 178px; height: 178px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:14px; }
.donutTitle{ font-size: 13px; color: var(--muted); font-weight: 800; }
.donutValue{ font-size: 22px; font-weight: 900; margin-top: 4px; }
