:root{
  --bg:#F6F7FB;
  --surface:#FFFFFF;
  --text:#0F172A;
  --muted:#64748B;
  --primary:#4F46E5;
  --secondary:#0F766E;
  --accent:#F59E0B;
  --border: rgba(15, 23, 42, 0.10);
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(79,70,229,0.25);
}

[data-theme="dark"]{
  --bg:#0B1220;
  --surface:#111A2C;
  --text:#E5E7EB;
  --muted:#A3AAB8;
  --border: rgba(229, 231, 235, 0.12);
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

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

.skip-link{
  position:absolute;
  top:-40px;
  left:12px;
  background:var(--surface);
  border:1px solid var(--border);
  padding:8px 10px;
  border-radius:10px;
  box-shadow:var(--shadow);
}
.skip-link:focus{ top:12px; outline:none; box-shadow:var(--focus), var(--shadow); }

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background: color-mix(in srgb, var(--bg), transparent 15%);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar__inner{
  max-width:1100px;
  margin:0 auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.brand__dot{
  width:10px; height:10px; border-radius:999px;
  background:var(--primary);
  box-shadow:0 0 0 6px color-mix(in srgb, var(--primary), transparent 85%);
}
.brand__name{ font-weight:800; letter-spacing:-0.02em; }
.brand__tag{ color:var(--muted); font-size:12px; }

.container{
  max-width:1100px;
  margin:0 auto;
  padding:18px 16px 40px;
}

.panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

.panel__row{
  display:flex;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.panel__row--actions{ margin-top:12px; align-items:center; }
.panel__row--meta{ margin-top:10px; align-items:center; justify-content:space-between; }

.field{ display:flex; flex-direction:column; gap:6px; min-width:220px; }
.field--inline{ min-width:260px; }
label{ font-size:12px; color:var(--muted); }
input[type="search"], select, input[type="number"]{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
input:focus, select:focus, button:focus{
  outline:none;
  box-shadow: var(--focus);
}

.checkbox{ display:flex; align-items:center; gap:8px; user-select:none; }
.checkbox input{ width:16px; height:16px; }
.hint{ color:var(--muted); font-size:12px; margin-top:6px; }
.muted{ color:var(--muted); font-size:13px; }

.btn{
  border:none;
  border-radius:12px;
  padding:10px 14px;
  background:var(--primary);
  color:white;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{ opacity:0.95; }
.btn--secondary{ background:var(--secondary); }
.btn--ghost{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text);
}
.btn--ghost:hover{ background: color-mix(in srgb, var(--surface), transparent 20%); }
.danger{ border-color: color-mix(in srgb, #ef4444, transparent 40%); }

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.chip{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  cursor:pointer;
  font-size:12px;
}
.chip[aria-pressed="true"]{
  border-color: color-mix(in srgb, var(--primary), transparent 20%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary), transparent 85%);
}

.gridWrap{ margin-top:16px; }
.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
  .field{ min-width: 100%; }
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.card__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.card__title{ font-weight:800; letter-spacing:-0.01em; }
.card__desc{ color:var(--muted); font-size:13px; line-height:1.4; }
.badges{ display:flex; flex-wrap:wrap; gap:6px; }
.badge{
  font-size:11px;
  color:var(--muted);
  border:1px solid var(--border);
  border-radius:999px;
  padding:4px 8px;
}
.card__actions{ display:flex; gap:8px; margin-top:auto; flex-wrap:wrap; }

.autojump{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-left:auto;
}
.mini{ font-size:12px; color:var(--muted); }
.countdown{ font-size:12px; color:var(--muted); padding-left:6px; }

.empty{
  text-align:center;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:26px;
  box-shadow: var(--shadow);
}

.modalOverlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.modal{
  width:min(760px, 100%);
  max-height: 86vh;
  overflow:auto;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modal__header{
  position:sticky;
  top:0;
  background:var(--surface);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
}
.modal__body{ padding:16px; }
.modalSection{ padding:12px 0; border-bottom:1px dashed var(--border); }
.modalSection:last-child{ border-bottom:none; }
.row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  border:1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}


/* Ensure the HTML `hidden` attribute always hides elements, even when classes set display. */
[hidden] { display: none !important; }
