:root{
  --bg:#ebebeb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;

  --primary:#1a5075;
  --primary-dark:#0f3a57;
  --accent:#93000b;

  --border:rgba(15,23,42,.10);
  --shadow:0 18px 50px rgba(15,23,42,.10);

  --radius:22px;
}

*{box-sizing:border-box}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.container{max-width:1200px;margin:0 auto;padding:28px 18px 40px;}
.header{
  display:flex;align-items:center;justify-content:space-between;
  gap:14px;margin-bottom:18px;
}
.brand{display:flex;align-items:center;gap:14px}
.badge{
  width:54px;height:54px;border-radius:16px;
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  color:#fff;display:grid;place-items:center;
  font-family:"Space Mono",monospace;font-weight:700;
  box-shadow:var(--shadow);
}
.header h1{margin:0;font-size:22px;letter-spacing:.2px}
.subtitle{margin:4px 0 0;color:var(--muted)}

.header-actions{display:flex;gap:10px;align-items:center}
.pill{
  text-decoration:none;color:var(--primary);font-weight:800;
  background:rgba(26,80,117,.10);
  border:1px solid rgba(26,80,117,.22);
  padding:10px 12px;border-radius:999px;
}
.pill:hover{border-color:rgba(26,80,117,.35)}

.panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:18px;
}

.controls{
  display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;
  padding:6px 6px 14px;
  border-bottom:1px solid var(--border);
  margin-bottom:14px;
}
.control-group{display:flex;flex-direction:column;gap:6px;min-width:150px}
.control-group.grow{flex:1;min-width:220px}
.control-group.navbtns{min-width:auto}
label{
  font-size:12px;color:var(--muted);font-weight:800;
  letter-spacing:.06em;text-transform:uppercase
}
select,input{
  height:42px;border-radius:14px;border:1px solid var(--border);
  padding:0 12px;font-size:14px;outline:none;background:#fff;
}
select:focus,input:focus{border-color:rgba(26,80,117,.35); box-shadow:0 0 0 4px rgba(26,80,117,.10)}
input{width:100%}

.btn{
  height:42px;border-radius:14px;border:1px solid var(--border);
  padding:0 12px;font-weight:900;cursor:pointer;background:#fff;
}
.btn.ghost:hover{border-color:rgba(26,80,117,.35)}

.split{display:grid;grid-template-columns:1.55fr .95fr;gap:16px}
@media (max-width:980px){.split{grid-template-columns:1fr}}

.month-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 4px 10px}
.month-header h2{margin:0;font-size:18px}
.legend{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;flex-wrap:wrap}
.pill-mini{
  display:inline-flex;align-items:center;gap:8px;
  padding:7px 10px;border-radius:999px;
  border:1px solid var(--border);background:rgba(15,23,42,.03);
}
.dot{width:10px;height:10px;border-radius:50%}
.dot.confirm{background:var(--primary)}
.dot.pending{background:var(--accent)}

.calendar{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:8px;
  padding:6px;
}

.day, .dow{
  border-radius:18px;
  border:1px solid var(--border);
  background:#fff;
  padding:10px;
  min-height:104px;
  position:relative;
  overflow:hidden;
}
.dow{
  min-height:auto;
  padding:10px 12px;
  background:rgba(26,80,117,.06);
  border:1px solid rgba(26,80,117,.14);
  color:var(--primary);
  font-weight:900;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.day-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.day-num{font-weight:900}
.day-muted{opacity:.45}

.hint{color:var(--muted);font-size:12px;margin:8px 6px 0}

/* === PREMIUM EVENT BADGE === */
.ev{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px 10px;
  border-radius:14px;
  margin-top:7px;
  cursor:pointer;

  font-size:12px;
  font-weight:900;
  letter-spacing:.01em;

  color:#ffffff;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 8px 18px rgba(15,23,42,.12);
  transform:translateZ(0);
  transition:transform .12s ease, filter .12s ease;
}
.ev:hover{transform:translateY(-1px) scale(1.02); filter:saturate(1.05)}
.ev-title{line-height:1.1}
.ev-sub{
  font-size:11px;
  font-weight:700;
  opacity:.90;
}

/* Side */
.side{display:flex;flex-direction:column;gap:12px}
.card{
  border:1px solid var(--border);
  border-radius:20px;
  padding:14px;
  background:#fff;
}
.card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.title-wrap{display:flex;align-items:center;gap:10px}
.color-chip{
  width:14px;height:14px;border-radius:6px;
  box-shadow:0 10px 18px rgba(15,23,42,.18);
}
.card h3{margin:0;font-size:16px}
.meta{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.chip{
  font-size:12px;border-radius:999px;padding:6px 10px;
  border:1px solid var(--border);background:rgba(15,23,42,.03);
  white-space:nowrap;
}
.grid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:10px}
.grid strong{display:block;color:var(--muted);font-size:12px;margin-bottom:2px}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}

.action-link{
  display:inline-flex;align-items:center;gap:8px;
  text-decoration:none;
  padding:10px 12px;border-radius:14px;
  border:1px solid rgba(147,0,11,.25);
  background:rgba(147,0,11,.08);
  color:var(--accent);
  font-weight:900;
}
.action-link.primary{
  border-color:rgba(26,80,117,.25);
  background:rgba(26,80,117,.08);
  color:var(--primary);
}
.action-link:hover{filter:saturate(1.1)}

.list{
  border:1px solid var(--border);
  border-radius:20px;
  padding:12px;
  background:#fff;
}
.list-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.list-head h3{margin:0;font-size:14px}
.count{color:var(--muted);font-size:12px}

.item{
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:10px 12px;
  margin-bottom:10px;
  cursor:pointer;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.item:hover{border-color:rgba(26,80,117,.35)}
.swatch{
  width:10px;height:10px;border-radius:4px;flex:none;margin-top:4px;
}
.item-title{font-weight:900;font-size:13px}
.item-meta{color:var(--muted);font-size:12px;margin-top:4px;display:flex;gap:10px;flex-wrap:wrap}

.footer{display:flex;justify-content:space-between;gap:12px;margin-top:14px;color:var(--muted);font-size:12px}
code{font-family:"Space Mono",monospace}