:root{
  --ink:#0b1324;
  --muted:#667085;
  --line:#e6e9ef;
  --bg:#ffffff;
  --pri:#4f46e5;            /* indigo */
  --pri-2:#06b6d4;          /* cyan */
  --accent:#10b981;         /* emerald */
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --radius: 18px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--ink); margin:0; background:var(--bg);
}
.container{ max-width:1120px; margin:40px auto; padding:0 18px; }
.header{
  display:flex; align-items:center; justify-content:space-between; margin-bottom:16px;
}
.h1{ font-size:28px; font-weight:800; letter-spacing:-0.02em; }
.sub{ color:var(--muted); font-size:14px; margin-top:2px; }
.card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:16px;
  box-shadow: var(--shadow);
}
.grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.group{ border:1px solid var(--line); border-radius:16px; padding:14px; background:#fff; }
.group h3{ margin:0 0 10px; font-size:16px; font-weight:700; letter-spacing:-0.01em; }
.task{ display:flex; align-items:flex-start; gap:10px; padding:8px 10px; border-radius:12px; cursor:grab; transition: background .2s ease; }
.task:hover{ background:#f8fafc; }
.task input{ margin-top:2px; }

/* Buttons */
.btn{ display:inline-flex; gap:8px; align-items:center; justify-content:center; padding:10px 14px;
  border-radius:12px; border:1px solid var(--line); background:#fff; color:var(--ink); cursor:pointer;
  text-decoration:none; box-shadow: var(--shadow); transition: transform .04s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-primary{
  background: linear-gradient(135deg, var(--pri), var(--pri-2));
  color:#fff; border-color: transparent;
}
.btn-ghost{
  background:#fff; color:var(--ink);
}
.btn-ghost:hover{ background:#f8fafc; }

/* Tabs as pills */
.tabs{ display:flex; gap:10px; margin-bottom:16px; }
.tabBtn{
  appearance:none; border:none; background:#f1f5f9; color:#0f172a; padding:10px 14px; border-radius:999px; cursor:pointer;
  box-shadow: inset 0 0 0 1px #e2e8f0; transition: background .2s ease, box-shadow .2s ease;
}
.tabBtn.active{ background:#fff; box-shadow: var(--shadow); }
.tabBtn:focus{ outline: 3px solid rgba(79,70,229,.25); outline-offset: 2px; }

/* KPI cards */
.kpis{ display:flex; gap:12px; margin:12px 0; flex-wrap:wrap; }
.kpi{
  flex:1; background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; text-align:center; min-width:180px;
  box-shadow: var(--shadow);
}
.kpi .label{ color:var(--muted); font-size:12px; }
.kpi .value{ font-size:22px; font-weight:800; letter-spacing:-0.02em; }

.footer{ margin-top:32px; color:var(--muted); font-size:12px; text-align:center; }

/* Progress bars */
.progressbar{ height:12px; background:#eef2f7; border-radius:999px; overflow:hidden; }
.progressbar > div{ height:100%; background:linear-gradient(90deg, var(--pri), var(--accent)); width:0%; transition:width .3s ease; }

/* Charts */
canvas{ width:100%; height:260px; display:block; }

/* Kanban columns */
.col{ min-height:240px; padding:10px; border:1px dashed var(--line); border-radius:14px; background:#fff; }
.col.dragover{ background:#f8fafc; border-color:#cbd5e1; }

/* Tooltips */
.help{ display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; margin-left:6px;
  border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:12px; cursor:help; position:relative; user-select:none; }
.help .tooltip{
  position:absolute; top:120%; left:0; background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 12px;
  box-shadow: var(--shadow); width:260px; z-index:50; display:none; line-height:1.35;
}
.help:hover .tooltip, .help:focus-within .tooltip{ display:block; }

@media (max-width:900px){ .grid{ grid-template-columns:1fr; } }
@media print{ .tabs, #btnRefresh, .tabBtn { display:none !important; } .card{ box-shadow:none; } }


/* --- Professional form controls --- */
label{ display:grid; grid-template-columns: 1fr auto; align-items:center; gap:6px 8px; font-size: 15px;
    font-weight: 400; color:var(--ink); }
label input{
  grid-column: 1 / -1;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  font-size:14px;
  color:var(--ink);
  box-shadow: var(--shadow);
}
label input:focus{ outline: 3px solid rgba(79,70,229,.18); border-color: var(--pri); }
#tab-marketing .group > div[style*="grid-template-columns"]{ gap:12px !important; } /* bump gap from inline style */
#tab-marketing .group h3{ margin-bottom:12px; }
.note{ color:var(--muted); font-size:12.5px; line-height:1.5; margin-top:10px; }
table input{ padding:8px 10px; border:1px solid var(--line); border-radius:10px; font-size:13px; box-shadow: var(--shadow); }
table th, table td{ padding:8px; font-size:13px; }
