/* ============ ADELLO SEO Panel — nowy UI ============ */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #94a3b8;
  --line: #eef1f6;
  --side: #1e2433;
  --side-ink: #aab3c5;
  --accent: #4f7cff;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f59e0b;
}
* { box-sizing: border-box; margin: 0; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
       background: var(--bg); color: var(--ink); font-size: 14px; }

/* --- sidebar --- */
.shell { display: flex; min-height: 100vh; }
.side { width: 200px; background: var(--side); color: var(--side-ink);
        display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #4f7cff, #22d3ee);
        color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.side-brand .side-label { color: #fff; font-weight: 700; letter-spacing: .08em; font-size: 13px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav a, .side-bottom a { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
        border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.side-nav a:hover, .side-bottom a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.on { background: linear-gradient(90deg, rgba(79,124,255,.25), rgba(79,124,255,.08)); color: #fff; }
.ico { width: 20px; text-align: center; opacity: .9; }
.side-bottom { display: flex; flex-direction: column; gap: 4px; }

/* --- main --- */
.main { flex: 1; padding: 26px 32px 60px; max-width: 1280px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.head-actions { display: flex; gap: 8px; }

/* --- flash --- */
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; font-size: 13.5px; }
.flash.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* --- KPI cards --- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { background: var(--card); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: inherit;
            display: block; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15,23,42,.04);
            transition: transform .12s ease, box-shadow .12s ease; position: relative; overflow: hidden; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.08); }
.kpi-card.grad-0 { background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 55%); }
.kpi-card.grad-1 { background: linear-gradient(135deg, #eef2ff 0%, #ffffff 55%); }
.kpi-card.grad-2 { background: linear-gradient(135deg, #fffbeb 0%, #ffffff 55%); }
.kpi-card.grad-3 { background: linear-gradient(135deg, #fdf2f8 0%, #ffffff 55%); }
.kpi-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.kpi-name { font-weight: 700; font-size: 13.5px; }
.kpi-fresh { font-size: 11px; color: var(--muted); }
.kpi-fresh.dim { color: #d1d5db; }
.kpi-big { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi-unit { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi-delta { font-size: 12px; font-weight: 600; margin: 3px 0 10px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-subgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-top: 1px dashed var(--line); padding-top: 9px; }
.kpi-subgrid b { font-size: 13.5px; display: block; }
.kpi-subgrid span { font-size: 10.5px; color: var(--muted); display: block; }
.kpi-subgrid em { font-size: 10.5px; font-style: normal; font-weight: 700; }
.kpi-subgrid em.up { color: var(--green); }
.kpi-subgrid em.down { color: var(--red); }
.spark { margin-top: 8px; height: 44px; }

/* --- cards --- */
.card { background: var(--card); border-radius: 16px; padding: 18px 20px; border: 1px solid var(--line);
        box-shadow: 0 1px 2px rgba(15,23,42,.04); margin-bottom: 16px; }
.card h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; letter-spacing: -.01em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* --- progress --- */
.prog-row { margin-bottom: 12px; }
.prog-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.prog-head a { color: inherit; text-decoration: none; font-weight: 600; }
.prog-head a:hover { color: var(--accent); }
.pbar { height: 8px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.pfill { height: 100%; background: linear-gradient(90deg, var(--accent), #22d3ee); border-radius: 99px; }
.pfill.full { background: linear-gradient(90deg, var(--green), #34d399); }

/* --- todo --- */
.todo-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.todo-row:last-child { border-bottom: 0; }
.todo-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; flex: none; }
.todo-dot.done { background: var(--green); }
.todo-row a { color: inherit; text-decoration: none; }
.todo-row a:hover { color: var(--accent); }
.tag { background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* --- buttons & forms --- */
.btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e8f0;
       color: var(--ink); padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
       cursor: pointer; text-decoration: none; transition: all .12s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #3d66e8; color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--red); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }
input, select, textarea { font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid #e2e8f0;
       border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(79,124,255,.25); border-color: var(--accent); }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-right: 12px; }

/* --- tables --- */
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
       color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:hover td { background: #fafbfe; }

/* --- client page --- */
.page-cols { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .page-cols { grid-template-columns: 1fr; } }
.item-row { display: grid; grid-template-columns: 26px 1fr 1.4fr auto; gap: 8px; align-items: center; padding: 6px 0;
       border-bottom: 1px dashed var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); }
.item-row .num { color: var(--muted); font-size: 12px; }
.cat-editor { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cat-edit-row { display: flex; gap: 8px; align-items: center; }
.cat-edit-row input { margin: 0; }
.cat-edit-row .w-lbl { flex: 1 1 240px; }
.cat-edit-row .w-num { width: 70px; }
.del-cat { color: var(--red); text-decoration: none; font-weight: 700; padding: 0 6px; }

/* --- KPI delta chips in card lists --- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; }
.chip.up { background: #ecfdf5; color: #059669; }
.chip.down { background: #fef2f2; color: #dc2626; }
.chip.flat { background: #f1f5f9; color: #64748b; }

/* --- auth --- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
       background: radial-gradient(1200px 600px at 20% -10%, #dbe4ff 0%, transparent 60%),
                   radial-gradient(1000px 500px at 110% 110%, #d1fae5 0%, transparent 50%), var(--bg); }
.auth-wrap .card { width: 380px; padding: 28px; }
.auth-wrap .auth-card { background: var(--card); border-radius: 16px; padding: 28px; width: 380px;
       border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(15,23,42,.08); }
.auth-card h1 { font-size: 20px; margin-bottom: 16px; letter-spacing: -.02em; }
.auth-card small { color: var(--muted); font-weight: 500; }
.auth-card label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 10px; }
.auth-card label input { width: 100%; margin-top: 4px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 10px; }
.auth-card .alt { text-align: center; margin-top: 12px; font-size: 13px; }
.auth-wrap h1 { font-size: 20px; margin-bottom: 14px; }
.auth-wrap form { display: flex; flex-direction: column; gap: 10px; }

/* --- login sidebar hint --- */
.side-collapse { position: fixed; left: 186px; top: 20px; }

/* old compat */
.topnav { display: none; }
.container { padding: 0; }
a { color: var(--accent); }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 6px; font-size: 12px; }
.sa-status { margin: 10px 0; padding: 0; list-style: none; }
.sa-status li { padding: 7px 10px; border-radius: 8px; font-size: 13px; margin: 4px 0; }
.sa-status li.ok { background: #ecfdf5; color: #065f46; }
.sa-status li.err { background: #fef2f2; color: #991b1b; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
