/* data/styles.css */

:root{
  --bg:#0b0f19;
  --card:rgba(255,255,255,.08);
  --card2:rgba(255,255,255,.12);
  --txt:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.70);
  --stroke:rgba(255,255,255,.16);
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:18px;

  --okbg:rgba(0,200,160,.12);
  --warnbg:rgba(255,200,0,.12);
  --link:rgba(140,190,255,.95);
}

@media (prefers-color-scheme: light){
  :root{
    --bg:#f6f7fb;
    --card:rgba(0,0,0,.04);
    --card2:rgba(0,0,0,.06);
    --txt:rgba(0,0,0,.88);
    --muted:rgba(0,0,0,.62);
    --stroke:rgba(0,0,0,.12);
    --shadow:0 10px 30px rgba(0,0,0,.08);

    --okbg:rgba(0,160,120,.10);
    --warnbg:rgba(200,160,0,.10);
    --link:#0b66c3;
  }
}

*{ box-sizing:border-box; }
html, body { height:100%; }

/* Background: einmalig, sauber, ohne "Repeating"-Look */
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--txt);

  /* Trick: Gradients fix + nicht mitscrollen => wirkt wie ein ruhiger Hintergrund */
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 800px at 20% 10%, rgba(70,120,255,.18), transparent 60%),
    radial-gradient(900px 700px at 85% 0%, rgba(0,200,160,.14), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: top left, top right;
  background-size: 1400px 900px, 1100px 800px;

  -webkit-tap-highlight-color: transparent;
}

a{ color:var(--link); text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{
  max-width:980px;
  margin:0 auto;
  padding:18px 14px 28px;
}

/* Header / Topbar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 2px 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg, rgba(70,120,255,.35), rgba(0,200,160,.25));
  border:1px solid var(--stroke);
  box-shadow:var(--shadow);
  display:grid;
  place-items:center;
  font-size:22px;
}

h1{
  font-size:18px;
  margin:0;
  line-height:1.1;
}

.subtitle{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}

.back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:inherit;
  text-decoration:none;
  white-space:nowrap;
}

.panel{
  padding:14px 14px;
  border-radius:var(--radius);
  background:linear-gradient(180deg,var(--card2),var(--card));
  border:1px solid var(--stroke);
  box-shadow:var(--shadow);
  margin: 6px 2px 14px;
}

.err{
  padding:12px 12px;
  border-radius:var(--radius);
  border:1px solid rgba(255,0,0,.25);
  background:rgba(255,0,0,.08);
  color:var(--txt);
  margin:10px 2px 14px;
  font-size:13px;
  line-height:1.35;
  overflow:auto;
}

.ok{
  padding:12px 12px;
  border-radius:var(--radius);
  border:1px solid rgba(0,200,160,.25);
  background:rgba(0,200,160,.08);
  color:var(--txt);
  margin:10px 2px 14px;
  font-size:13px;
  line-height:1.35;
}

.empty{
  padding:18px 14px;
  border-radius:var(--radius);
  border:1px dashed var(--stroke);
  color:var(--muted);
  text-align:center;
  margin:10px 2px;
}

/* Flat list row cards */
.list{ display:grid; gap:10px; }

.row{
  padding:12px 12px;
  border-radius:var(--radius);
  background:linear-gradient(180deg,var(--card2),var(--card));
  border:1px solid var(--stroke);
  box-shadow:var(--shadow);
}

.rowtop{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.title{
  margin:0;
  font-weight:900;
  font-size:15px;
  line-height:1.2;
}

.meta{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  text-align:right;
  margin-top:2px;
}

.sub{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
  white-space:pre-wrap;
}

.tags{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tag{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:800;
}

/* Month header */
.monthhead{
  margin: 16px 2px 8px;
  color: var(--muted);
  font-weight: 900;
  letter-spacing:.2px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.count{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight: 800;
}

/* Details accordion (Infos) */
details.acc{
  border-radius: var(--radius);
  background: linear-gradient(180deg,var(--card2),var(--card));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow:hidden;
}
details.acc summary{
  list-style:none;
  cursor:pointer;
  padding: 12px 12px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
details.acc summary::-webkit-details-marker{ display:none; }

.acc-title{
  margin:0;
  font-weight:900;
  font-size:15px;
  line-height:1.2;
}
.acc-pin{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  margin-top:8px;
  width:fit-content;
  font-weight:800;
}
.acc-divider{
  height:1px;
  background:var(--stroke);
  margin: 0 12px 10px;
  opacity:.8;
}
.acc-body{
  padding: 0 12px 12px;
  color: var(--txt);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Forms (Mitbringliste) */
select, input, textarea, button{
  font: inherit;
}
select, input, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:inherit;
}
textarea{
  min-height:42px;
  resize:vertical;
}
button{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.10);
  color:inherit;
  font-weight:900;
  cursor:pointer;
}
button:active{ transform:scale(.99); }

.formgrid{
  display:grid;
  grid-template-columns: 1fr 110px;
  gap:8px;
}

.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.06);
  color:var(--muted);
  font-weight:900;
}
.pill.ok{ background: var(--okbg); }
.pill.warn{ background: var(--warnbg); }

details.past{
  margin-top:16px;
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  background:rgba(255,255,255,.04);
  padding:10px 12px;
}
details.past summary{
  cursor:pointer;
  color:var(--muted);
  font-weight:900;
}

/* Termine: Abreißkalender-Badge (kompakt) */
.trow{
  display:flex;
  gap:10px;              /* weniger Abstand zum Inhalt */
  align-items:flex-start;
}

.cal{
  width:56px;            /* schmaler */
  flex: 0 0 56px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.cal .dow{
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.5px;
  text-align:center;
  padding:5px 4px;       /* kompakter */
  background:#5b0f18;    /* dunkelrot */
  color:rgba(255,255,255,.92);
  line-height:1;
}

.cal .day{
  font-size:20px;
  font-weight:900;
  text-align:center;
  padding:0px 4px 4px;     /* fast kein Abstand zum Monat */
  line-height:1;
}

.cal .mon{
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.5px;
  text-align:center;
  padding:0 4px 6px;     /* eng */
  color:var(--muted);
  line-height:1;
}

.tcontent{
  flex: 1 1 auto;
  min-width:0;
}

/* Index: Newsletter-Links */
.linklist{ margin:0; padding-left:18px; color:var(--muted); }
.linklist li{ margin:8px 0; }
.linklist a{ color:var(--link); font-weight:800; }

/* Batches/Grids wie Klassen – wiederverwendbar */
.tilegrid{ margin-top:14px; display:grid; grid-template-columns:1fr; gap:12px; }
@media (min-width:560px){ .tilegrid{ grid-template-columns:1fr 1fr; } }

.tile{
  display:flex; gap:12px; align-items:flex-start;
  padding:14px 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  text-decoration:none;
  color: inherit;
}
.tile:active{ transform: scale(.99); }

.tile .ico{
  width:44px; height:44px; border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  display:grid; place-items:center;
  font-size:22px;
  flex: 0 0 auto;
}

.tile .ttitle{ font-weight:900; font-size:15px; margin:1px 0 3px; }
.tile .tdesc{ margin:0; font-size:13px; color:var(--muted); line-height:1.25; }

/* Trennlinie/Überschrift für Sektionen */
.sectionhead{
  margin-top:18px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding: 0 2px;
}
.sectionhead .stitle{
  font-weight:900;
  color: var(--txt);
  font-size:15px;
  margin:0;
}
.sectionhead .smeta{
  font-size:13px;
  color: var(--muted);
}