:root{
  --primary:#0098DA;
  --secondary:#C9A85E;
  --dark:#0f172a;
  --light:#f7f9fc;
  --border:#e6e8eb;
  --text:#0f172a;
}

.banner-row{margin:14px 0}
.banner-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px 16px;
  box-shadow:0 6px 18px rgba(0,0,0,.04);
}
.banner-inline{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.banner-title{margin:0;font-size:16px}
.banner-desc{margin:4px 0 0;color:#475569;font-size:13px;max-width:720px}
.btn-mini{
  background:var(--primary);
  color:#fff;
  border:none;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  display:inline-block;
}

.carousel-wrap{display:flex;align-items:center;gap:10px}
.carousel{
  display:flex;
  gap:10px;
  overflow:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  padding-bottom:6px;
}
.carousel::-webkit-scrollbar{height:8px}
.carousel-item{
  min-width:220px;
  scroll-snap-align:start;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#fff;
}
.carousel-item strong{display:block;margin-bottom:4px}
.carousel-item .muted{margin:0}
.carousel-nav{
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
}
.sidebar-sticky{position:sticky;top:16px}
@media (max-width:900px){
  .carousel-item{min-width:240px}
}

/* HERO */
.hero{
  background:linear-gradient(135deg,#0098DA,#C9A85E);
  color:#fff;
  border-radius:18px;
  padding:50px;
}
.hero-content{max-width:700px}
.hero h1{font-size:36px;margin:0 0 12px}
.hero p{font-size:18px;opacity:.95}
.hero-actions{margin-top:20px}
.btn-ghost{background:rgba(255,255,255,.15);color:#fff}

.hero-link{display:block;text-decoration:none;cursor:pointer}
.hero-link:hover{text-decoration:none}

/* TOOLS GRID */
.tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:22px;
}
.tool-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:22px;
  box-shadow:0 8px 24px rgba(0,0,0,.05);
  transition:.25s ease;
}
.tool-card:hover{
  transform:translateY(-6px);
  box-shadow:0 14px 32px rgba(0,0,0,.08);
}
.tool-icon{
  font-size:42px;
  margin-bottom:10px;
}
.tool-card h3{margin:6px 0}
.tool-card p{color:#555;font-size:14px;line-height:1.5}
.tool-card a{
  display:inline-block;
  margin-top:14px;
  font-weight:600;
}


/* reset */
*,*::before,*::after{box-sizing:border-box}

body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,Cantarell,"Noto Sans",Arial,"Apple Color Emoji","Segoe UI Emoji";
  margin:0;
  background:var(--light);
  color:var(--text);
}

a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}

/* ===== HEADER ===== */
header{
  background:#fff;
  border-bottom:1px solid var(--border);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand{
  display:flex;
  flex-direction:column;
}

.brand strong{
  font-size:20px;
  color:var(--primary);
}

.brand span{
  font-size:13px;
  color:#666;
}

.nav{
  display:flex;
  gap:18px;
}

.nav a{
  color:#334155;
  font-weight:500;
  padding:8px 12px;
  border-radius:8px;
}

.nav a:hover{
  background:#f1f5f9;
}

.nav a.nav-cta{
  background:var(--primary);
  color:#fff;
  font-weight:600;
}

.nav a.nav-cta:hover{
  background:var(--primary);
  text-decoration:none;
}

/* ===== LAYOUT ===== */
.wrap{max-width:1200px;margin:0 auto;padding:20px}

.grid{display:grid;gap:24px;align-items:stretch}
.grid-2{grid-template-columns:2fr 1fr;align-items:stretch}
@media (max-width:900px){
  .grid-2{grid-template-columns:1fr}
  .nav{display:none}
}

/* Dashboard specific tweaks to ensure cards align nicely */
.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));gap:24px;align-items:stretch}
.dashboard-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:20px;box-shadow:0 6px 18px rgba(0,0,0,.04);display:flex;flex-direction:column}
.dashboard-card .chart-wrap{flex:1;min-height:160px}

/* Make admin topbar sticky so navigation is always visible */
.admin-topbar{position:sticky;top:0;z-index:9999;background:#0b1220;color:#fff;padding:10px 16px;display:flex;gap:12px;border-bottom:1px solid rgba(255,255,255,0.04);align-items:center}
.admin-topbar a{color:#fff;text-decoration:none;font-weight:600}
.admin-topbar a:hover{opacity:0.9}
.admin-topbar a + a{margin-left:8px}
.admin-topbar{box-shadow:0 4px 10px rgba(2,6,23,0.6)}

/* ===== UI ===== */
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:20px;
  box-shadow:0 6px 18px rgba(0,0,0,.04);
  margin-bottom:20px;
}

.btn{
  background:var(--primary);
  color:#fff;
  border:none;
  padding:12px 18px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
}

.btn-primary{background:var(--primary)}

.form-group{margin:0 0 12px}
.form-group label{display:block;margin:0 0 6px}

input,select,textarea{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid var(--border);
  font-size:15px;
}

.muted{color:#666;font-size:14px;line-height:1.5}
.badge{
  display:inline-block;
  background:#eef2ff;
  color:#3730a3;
  padding:4px 10px;
  border-radius:20px;
  font-size:12px;
  margin-bottom:10px;
}

/* Primary variant for badges inside results */
.badge-primary{
  background:var(--primary);
  color:#fff;
  padding:8px 12px;
  border-radius:8px;
}

/* Grid used by tool forms to keep consistent input sizes */
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}

/* Small modifier to add vertical spacing between stacked cards */
.card--section{margin-top:14px}

/* Action buttons */
.btn-secondary{background:#334155;color:#fff}

/* Spacing for groups of form actions */
.form-actions{margin-top:12px}
.form-actions .btn + .btn{margin-left:8px}

/* Result container and visibility helper */
.result{margin-top:20px;display:none}
.result.is-visible{display:block}

/* Small utilities used by partials */
.tool-title{margin-top:16px;font-size:24px;color:var(--dark)}
.tool-desc{margin-bottom:20px;font-size:16px;line-height:1.5}
.stat{font-size:22px}
.stat-large{font-size:20px}
.stat-medium{font-size:18px}
.pomo-time{font-size:44px;font-weight:800}
.text-center{text-align:center}

/* Small margin and font helpers */
.mb-0{margin-bottom:0}
.mt-0{margin-top:0}
.fs-20{font-size:20px}

/* Layout helpers */
.mb-30{margin-bottom:30px}
.g-30{gap:30px}
.stack-col{display:flex;flex-direction:column;gap:20px}

/* Link / CTA helpers */
.link-cta{color:var(--primary);font-weight:700}

/* Spacing helpers */
.mt-30{margin-top:30px}
.mt-10{margin-top:10px}.mb-10{margin:10px 0 6px}
/* Visibility helpers */
.is-hidden{display:none}

/* Button variants */
.btn-warning{background:#f59e0b;color:#fff}

/* Card highlights */
.card--warning{border:1px solid #fde68a;background:#fffbeb}

/* Header helpers */
.brand-img{max-height:40px;max-width:200px;margin-bottom:4px}
.brand-sub{font-size:10px;color:#666}

/* Small spacing helpers */
.mb-8{margin-bottom:8px}
.ml-10{margin-left:10px}
.g-12{gap:12px}

/* Form & typography helpers */
.label-bold{font-weight:700}
.textarea-large{height:120px}
.ml-auto{margin-left:auto}

/* Table utilities used in admin pages */
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px 6px}
.table tr{border-bottom:1px solid #f1f5f9}
.table th{border-bottom:1px solid #e6e8eb;text-align:left}

/* Form wrapper used in admin pages */
.form-wrap{display:grid;gap:10px;max-width:720px}
.form-wrap-760{display:grid;gap:10px;max-width:760px}

/* Small flex helpers */
.flex-row{display:flex;gap:10px;flex-wrap:wrap}
.flex-align-center{display:flex;align-items:center;gap:8px}

/* Chart helpers */
.chart-canvas{width:100%;height:100%}
.chart-wrap{position:relative;height:220px;max-height:220px;overflow:hidden}

/* Ad slot placeholder */
.ad-slot{min-height:90px;border:1px dashed #c7c7c7;border-radius:12px;display:flex;align-items:center;justify-content:center;padding:12px}

/* Footer / consent */
.muted-sub{color:#64748b}
.consent-card{position:fixed;left:20px;right:20px;bottom:16px;max-width:900px;margin:0 auto;display:none;z-index:999}

/* Product / partner logos */
.product-logo{max-width:180px;max-height:56px;object-fit:contain;display:block;margin-bottom:6px}
.partner-logo{max-width:160px;max-height:44px;object-fit:contain}

.err{
  background:#fff1f2;
  border:1px solid #fecdd3;
  color:#9f1239;
  padding:10px 12px;
  border-radius:10px;
  margin:10px 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: start;
}

.dashboard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

/* Compact card variant: remove outer margin, slightly smaller padding */
.card--compact{margin-bottom:0;padding:12px}

/* Admin top bar for easier navigation inside /admin pages */
.admin-topbar{background:#0b1220;color:#fff;padding:10px 16px;display:flex;gap:12px;border-bottom:1px solid rgba(255,255,255,0.04);align-items:center}
.admin-topbar a{color:#fff;text-decoration:none;font-weight:600}
.admin-topbar a:hover{opacity:0.9}
.admin-topbar a + a{margin-left:8px}
