:root{
  --bg:#ffffff;
  --bg2:#f7f8fb;
  --text:#0f172a;
  --muted:#475569;
  --muted2:#64748b;
  --border:#e2e8f0;
  --shadow: 0 14px 34px rgba(15,23,42,.08);
  --shadow2: 0 10px 26px rgba(15,23,42,.06);
  --accent:#2563eb;
  --accent2:#1d4ed8;
  --ok:#16a34a;
  --warn:#f59e0b;
  --danger:#ef4444;
  --card:#ffffff;
  --radius: 18px;
  --radius2: 14px;
  --max: 1100px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 40%, #ffffff 100%);
  line-height:1.45;
}
a{color:inherit}
.container{max-width:var(--max); margin:0 auto; padding:0 20px;}

/* TOPBAR / HEADER */
.topbar{
  position:sticky; top:0; z-index:50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  height:64px;
  gap: 14px;
}
.brand{
  display:flex; align-items:center; gap:10px; text-decoration:none;
  font-weight:800; letter-spacing:-0.02em;
  min-width: 220px;
}
.logo{
  display:inline-block;
  background: url("/static/logo.svg") center / contain no-repeat;
  flex:0 0 auto;
}
.logo--header{ width:44px; height:44px; }
.logo--footer{ width:28px; height:28px; }
.brand small{display:block; font-weight:650; color:var(--muted2); letter-spacing:0; margin-top:1px}
.nav{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end;
}

/* BUTTONS */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  box-shadow: 0 6px 16px rgba(15,23,42,.05);
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  white-space:nowrap;
  cursor:pointer;
  font-size:14px;
}
.btn:hover{transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,23,42,.08); border-color:#cbd5e1;}
.btn:active{transform: translateY(0px); box-shadow: 0 6px 16px rgba(15,23,42,.05);}
.btn-primary{
  border-color: rgba(37,99,235,.25);
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color:#fff;
  box-shadow: 0 14px 30px rgba(37,99,235,.22);
}
.btn-primary:hover{box-shadow: 0 18px 38px rgba(37,99,235,.26); border-color: rgba(37,99,235,.35); background: linear-gradient(180deg, #4f8ff8 0%, #1f57e7 100%);}
.btn-ghost{
  background:transparent;
  box-shadow:none;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover{
  background: rgba(15,23,42,.04);
  border-color: rgba(15,23,42,.04);
  box-shadow:none;
  transform:none;
}
.btn-secondary{
  background:transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover{
  background: rgba(15,23,42,.04);
  border-color: #cbd5e1;
}
.btn-small{
  height:32px;
  padding:0 10px;
  font-size:12px;
}
.btn-full{
  width:100%;
}

/* CARDS */
.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.app-card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding: 18px;
  margin-bottom: 16px;
}

/* TYPOGRAPHY */
h1{
  margin:0 0 12px;
  font-size: clamp(34px, 4.1vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight:800;
}
h2{margin:0; font-size: 24px; letter-spacing:-0.02em; font-weight:800;}
h3{margin:0 0 10px; font-size: 16px; letter-spacing:-0.01em; font-weight:700;}
h4{margin:0 0 6px; font-size: 15px; letter-spacing:-0.01em; font-weight:700;}
.subtitle{
  margin:0 0 14px;
  font-size: 18px;
  color: var(--muted);
  max-width: 62ch;
}
.lead{margin: 0; color: var(--muted); max-width: 74ch;}

/* FORMS */
.form-group{
  margin-bottom: 16px;
}
label{
  display:block;
  font-weight:650;
  color:var(--text);
  font-size:14px;
  margin-bottom:6px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select{
  width:100%;
  padding:10px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  font-size:14px;
  font-family:inherit;
  transition: border-color .15s ease;
}
input:focus,
textarea:focus,
select:focus{
  outline:none;
  border-color:var(--accent);
}
textarea{
  resize:vertical;
  min-height:80px;
}
.input-hint{
  font-size:12px;
  color:var(--muted2);
  margin-top:4px;
}

/* CHECKBOXES */
.checkbox-group{
  margin:16px 0;
}
.checkbox-label{
  display:flex;
  align-items:flex-start;
  gap:10px;
  cursor:pointer;
}
.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"]{
  width:18px;
  height:18px;
  margin-top:2px;
  cursor:pointer;
}
.checkbox-text{
  font-size:14px;
  color:var(--text);
}

/* ERRORS */
.errors,
.auth-errors,
.error-list{
  background: rgba(239,68,68,.1);
  border:1px solid var(--danger);
  border-radius:12px;
  padding:12px 14px;
  margin-bottom:16px;
  list-style:none;
}
.errors li,
.auth-errors li,
.error-list .error{
  color:var(--danger);
  font-size:13px;
  font-weight:650;
}

/* STATUS BOXES */
.status-box{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
}
.status-success{
  background: rgba(22,163,74,.08);
  border-color: rgba(22,163,74,.2);
}
.status-warning{
  background: rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.2);
}
.status-neutral{
  background: var(--bg2);
  border-color: var(--border);
}
.status-icon{
  width:22px;
  height:22px;
  border-radius:7px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-weight:900;
  font-size:12px;
  line-height:1;
}
.status-box .status-icon{
  margin-top:0;
  flex-shrink:0;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.status-content{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  margin:0;
  padding:0;
}
.status-box .status-content .status-label{
  margin:0 0 4px 0;
  padding:0;
  line-height:22px;
  font-weight:700;
  font-size:14px;
  display:block;
  min-height:22px;
}
.status-box .status-content .status-label:first-of-type{
  margin:0 0 4px 0;
  padding:0;
}
.status-success .status-icon{
  background: rgba(22,163,74,.12);
  border:1px solid rgba(22,163,74,.22);
  color:var(--ok);
}
.status-warning .status-icon{
  background: rgba(245,158,11,.12);
  border:1px solid rgba(245,158,11,.22);
  color:var(--warn);
}
.status-label{
  font-weight:700;
  margin-bottom:4px;
}
.status-detail{
  font-size:13px;
  color:var(--muted);
}

/* BADGES */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:800;
  color:var(--text);
  font-size:12px;
  white-space:nowrap;
}
.badge-active{
  background: rgba(37,99,235,.18);
  border-color: rgba(37,99,235,.35);
  color:var(--accent2);
}
.badge-completed{
  background: rgba(22,163,74,.18);
  border-color: rgba(22,163,74,.35);
  color:var(--ok);
}
.badge-failed{
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.35);
  color:var(--danger);
}
.badge-ignored{
  background: rgba(245,158,11,.18);
  border-color: rgba(245,158,11,.35);
  color:var(--warn);
}
.badge-danger{
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.35);
  color:var(--danger);
}
.badge-success{
  background: rgba(22,163,74,.18);
  border-color: rgba(22,163,74,.35);
  color:var(--ok);
}
.badge-warning{
  background: rgba(245,158,11,.18);
  border-color: rgba(245,158,11,.35);
  color:var(--warn);
}

/* SECTIONS */
section{padding: 34px 0;}
.section-head{display:flex; align-items:flex-end; justify-content:space-between; gap: 14px; margin-bottom: 16px;}

/* GRIDS */
.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* UTILITIES */
.check{
  width:22px;height:22px;border-radius: 7px;
  background: rgba(22,163,74,.12);
  border:1px solid rgba(22,163,74,.22);
  display:inline-flex; align-items:center; justify-content:center;
  color: var(--ok);
  flex: 0 0 auto;
  margin-top:2px;
  font-size:12px;
  font-weight:900;
}
.info{
  width:22px;height:22px;border-radius: 7px;
  background: rgba(245,158,11,.12);
  border:1px solid rgba(245,158,11,.22);
  display:inline-flex; align-items:center; justify-content:center;
  color: var(--warn);
  flex: 0 0 auto;
  margin-top:2px;
  font-weight:900;
  font-size:12px;
}
.divider{height:1px; background: var(--border); margin: 14px 0;}

/* FOOTER */
footer{padding: 26px 0 34px; color: var(--muted2); font-size: 14px;}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
  align-items:start;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.footer-links{display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end;}
.footer-links a{color: var(--muted2); text-decoration:none}
.footer-links a:hover{color: var(--text); text-decoration:underline}
.small{font-size: 12px; color: var(--muted2); margin-top: 6px}
.small--spaced{margin-top:10px;}

/* UTILITY CLASSES */
.text-right{text-align:right;}
.flex-center{display:flex; align-items:center; gap:10px;}
.brand-name{font-weight:900; color:var(--text);}
.section-alt{
  background:var(--bg2);
  border:1px solid var(--border);
  border-left:0;
  border-right:0;
}
.container-no-padding{padding:0;}

/* COOKIE BANNER */
.cookie-banner{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:var(--card);
  border-top:1px solid var(--border);
  box-shadow:0 -2px 10px rgba(0,0,0,0.1);
  z-index:1000;
  padding:20px;
}
.cookie-banner-content{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}
.cookie-banner-text{
  flex:1;
  min-width:250px;
}
.cookie-banner-text p{
  margin:0;
  font-size:14px;
  line-height:1.5;
  color:var(--text);
}
.cookie-banner-text a{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}
.cookie-banner-text a:hover{
  text-decoration:underline;
}
.cookie-banner-actions{
  display:flex;
  gap:12px;
  flex-shrink:0;
}
@media (max-width: 780px){
  .cookie-banner-content{
    flex-direction:column;
    align-items:stretch;
  }
  .cookie-banner-actions{
    width:100%;
  }
  .cookie-banner-actions .btn{
    flex:1;
  }
}

/* RESPONSIVE */
@media (max-width: 920px){
  .grid-3{grid-template-columns:1fr;}
  .split{grid-template-columns:1fr;}
}
@media (max-width: 780px){
  .topbar-inner{height:auto; padding:12px 0;}
  .footer-grid{grid-template-columns:1fr;}
  .footer-links{justify-content:flex-start;}
}
