/* ================================
   AquariumInsider Tool – Clean CSS
   Mobile-first, PHP Views kompatibel
   ================================ */

/* ---------- Design Tokens ---------- */
:root{
  /* Farben (CI: aquariuminsider.de angelehnt) */
  --ci-blue:#0c3c60;
  --ci-blue-700:#0e4978;
  --ci-teal:#0fb9b1;
  --text:#222;
  --muted:#667;
  --bg:#fff;

  /* UI-Neutral */
  --border:#e5e7eb;
  --border-2:#d6e3ea;
  --panel:#fff;
  --panel-soft:#f7f9fc;

  /* Status */
  --ok-bg:#e8f5e9;   --ok-text:#1b5e20;   --ok-bd:#c8e6c9;
  --warn-bg:#fff6d8; --warn-text:#7a5b00; --warn-bd:#f3e3a9;
  --err-bg:#ffe0e0;  --err-text:#7a1a1a;  --err-bd:#f1b8b8;

  /* Layout */
  --radius:12px;
  --radius-lg:16px;
  --shadow:0 1px 3px rgba(0,0,0,.06);
  --shadow-md:0 6px 18px rgba(12,60,96,.06);

  /* Breakpoints */
  --bp-s:640px;
  --bp-m:768px;
  --bp-l:900px;
  --bp-xl:1024px;
}

/* ---------- Base / Reset ---------- */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  padding-top:env(safe-area-inset-top);
}
img{max-width:100%;height:auto;display:block}

/* ---------- Layout ---------- */
.container{max-width:1100px;margin:0 auto;padding:16px}
.content{padding:18px}

/* ---------- Header & Navigation ---------- */
.site-header{
  display:grid;
  grid-template-columns:1fr auto;
  grid-template-areas:"logo burger" "nav nav";
  gap:8px;
  align-items:center;
  background:var(--ci-blue);
  color:#fff;
  padding:8px 12px;
  position:sticky;top:0;z-index:1000;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
}
.site-header .logo{grid-area:logo;display:inline-flex;align-items:center;gap:10px}
.site-header .logo img{height:32px}
.site-title{font-weight:700}

.nav-toggle{display:none}
.nav-btn{
  grid-area:burger;justify-self:end;
  display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:34px;border:1px solid rgba(255,255,255,.6);border-radius:8px;
  cursor:pointer;padding:0 6px;
}
.nav-btn span{display:block;width:22px;height:2px;background:#fff;margin:4px 0}

.main-nav{grid-area:nav;display:none}
.main-nav ul{list-style:none;display:flex;gap:14px;margin:0;padding:0;align-items:center}
.main-nav a{color:#fff;text-decoration:none;font-weight:600}
.main-nav a:hover{text-decoration:underline}
.nav-toggle:checked ~ .main-nav{display:block}

/* Desktop Nav */
@media (min-width: 768px){
  .site-header{grid-template-areas:"logo nav";grid-template-columns:1fr auto}
  .nav-btn{display:none}
  .main-nav{display:block}
}

/* ---------- Footer ---------- */
.site-footer{
  text-align:center;padding:15px;background:#f7fafc;margin-top:28px;
  font-size:.9em;color:#666;border-top:1px solid #e7eef3;
}

/* ---------- Cards ---------- */
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  box-shadow:var(--shadow);
  margin:12px 0;
}

/* ---------- Buttons ---------- */
.btn{
  --bg:var(--ci-blue); --bd:var(--ci-blue); --fg:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  gap:.4rem; padding:.55rem 1rem; border:1px solid var(--bd);
  border-radius:10px; background:var(--bg); color:var(--fg);
  font-weight:700; text-decoration:none; cursor:pointer; line-height:1.2; min-width:120px;
}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
.btn-primary{--bg:var(--ci-blue);--bd:var(--ci-blue);--fg:#fff}
.btn-secondary{--bg:#e6f0f4;--bd:#b6c9d3;--fg:var(--ci-blue)}
.btn-outline{--bg:#fff;--bd:#c9d6e2;--fg:var(--ci-blue)}
.btn-ghost{--bg:transparent;--bd:#c9d6e2;--fg:var(--ci-blue)}
.btn-danger{--bg:#dc2626;--bd:#dc2626;--fg:#fff}
.btn-sm{padding:.35rem .6rem;border-radius:8px;min-width:auto}
.btn-lg{padding:.8rem 1.1rem;border-radius:12px}


/* Gleichstellung <a> / <button> */
button.btn, a.btn{appearance:none;-webkit-appearance:none;border:1px solid var(--bd)}

/* ---------- Actions (Buttonzeilen) ---------- */
.actions{
  display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;align-items:center;
  justify-content:flex-end;
}

/* ---------- Forms ---------- */
form{display:grid;gap:14px}
form label{display:grid;gap:6px;margin:0}
input[type="hidden"]{display:none !important}
form .label{font-size:13px;font-weight:600;color:#5b7180}
form .help{color:#6a7f8e;font-size:12px}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="file"],
input[type="number"],
select, textarea{
  width:100%;max-width:100%;
  font-size:16px;padding:12px;
  border:1px solid var(--border-2);
  border-radius:12px;background:#fff;color:var(--text);
  outline:none;transition:border-color .15s, box-shadow .15s, background .15s;
  min-width:0;

 }
textarea:focus{
  border-color:#12a4a0;
  box-shadow:0 0 0 4px rgba(18,164,160,.14);
}
input:hover, select:hover, textarea:hover{border-color:#c3d6df}
input:focus, select:focus, textarea:focus{
  border-color:#12a4a0; box-shadow:0 0 0 4px rgba(18,164,160,.14);
}
select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, #5b7180 50%),
    linear-gradient(135deg, #5b7180 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px),
    100% 0;
  background-size:6px 6px,6px 6px,2.7em 100%;
  background-repeat:no-repeat;
  padding-right:48px;
}
input[type="number"]{-moz-appearance:textfield}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* Form-Grid: mobil 1-spaltig, ab 900px 2-spaltig */
@media (min-width: 900px){
  form{grid-template-columns:1fr 1fr;gap:16px 18px}
  form .field--full,
  form label:has(textarea),
  form label:has(input[type="file"]){grid-column:1 / -1}
  form > .actions{grid-column:2;justify-self:end}
}

/* ---------- Feature-Ankündigungen ---------- */
.feature-announcements-box{
  border-left:4px solid #22c55e;
  background:linear-gradient(135deg,#f0fdf4 0%,#ffffff 100%);
  margin-bottom:.75rem;padding:12px 16px;
}
.feature-announcements-header{
  display:flex;align-items:center;gap:.5rem;margin-bottom:8px;
  font-size:.85rem;color:#15803d;
}
.feature-announcements-icon{font-size:1rem}
.feature-announcements-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.feature-announcement-item{
  display:flex;align-items:baseline;gap:.6rem;
  padding:6px 0;border-top:1px solid #dcfce7;
}
.feature-announcement-item:first-child{border-top:none}
.feature-ann-badge{font-size:.65rem;padding:1px 6px;border-radius:999px;flex-shrink:0;position:relative;top:-1px}
.feature-ann-text{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .4rem;font-size:.85rem}
.feature-ann-text .muted{font-size:.82rem}

/* ---------- Tables ---------- */
.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}
.table{
  width:100%;border-collapse:collapse;margin:.5rem 0 1.25rem;font-size:.95rem
}
.table th,.table td{
  padding:.6rem .5rem;border-bottom:1px solid #e6eef3;vertical-align:middle;white-space:nowrap
}
.table th:first-child,.table td:first-child{white-space:normal}
.table .cell-photo{width:60px}

/* ---------- Badges & Chips ---------- */
.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:2px 10px;border-radius:999px;font-size:12px;line-height:1;
  border:1px solid transparent
}
.badge-ok{background:var(--ok-bg);color:var(--ok-text);border-color:var(--ok-bd)}
.badge-warn{background:var(--warn-bg);color:var(--warn-text);border-color:var(--warn-bd)}
.badge-danger{background:var(--err-bg);color:var(--err-text);border-color:var(--err-bd)}
.badge-muted{background:#eef1f4;color:#4a5568;border-color:#d6dce3}
.badge .dot{width:8px;height:8px;border-radius:50%}

.chips{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:.4rem;padding:.25rem .6rem;border-radius:999px;font-size:12px;line-height:1;border:1px solid #d6dce3;background:#eef1f4;color:#4a5568}
.chip-ok{background:var(--ok-bg);color:var(--ok-text);border-color:var(--ok-bd)}
.chip-warn{background:var(--warn-bg);color:var(--warn-text);border-color:var(--warn-bd)}
.chip-danger{background:var(--err-bg);color:var(--err-text);border-color:var(--err-bd)}

/* === Pills vereinheitlichen: gleiche Größe für Messung & Wasserwechsel === */
.chips { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }

.chip,
.badge {                         /* beide Systeme gleichziehen */
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.25rem .6rem;          /* -> identische Pill-Höhe/-Breite */
  border-radius:999px;
  font-weight:600;
  font-size:.90rem;
  line-height:1.6;
  border:1px solid transparent;
  white-space:nowrap;
}

/* Farben (beide Welten gemappt) */
.chip-ok, .badge-ok         { background:#e8f5e9; color:#1b5e20; border-color:#c8e6c9; }
.chip-warn, .badge-warn     { background:#fff6d8; color:#7a5b00; border-color:#f3e3a9; }
.chip-danger, .badge-danger { background:#ffe0e0; color:#7a1a1a; border-color:#f1b8b8; }
.chip-muted, .badge-muted   { background:#eef1f4; color:#4a5568; border-color:#d6dce3; }

/* Icon-Größe vereinheitlichen */
.icon-drop { width:16px; height:16px; vertical-align:middle; flex:0 0 16px; }




/* ---------- Accordions ---------- */
.aq-accordion summary{
  display:flex;align-items:center;justify-content:space-between;gap:.6rem;
  cursor:pointer;padding:.6rem .8rem;border:1px solid #e6ebf0;border-radius:.75rem;
  background:#fafcff;font-weight:600;list-style:none
}
.aq-accordion[open] summary{border-color:#c9d6e2;background:#f6f9ff}
.aq-accordion .content{padding:.8rem .8rem .9rem}
.aq-accordion .row{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
@media (max-width:680px){.aq-accordion .row{grid-template-columns:1fr}}

/* ---------- Aquarium Cards / Dashboard ---------- */
.aquarium-grid{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width: 640px){.aquarium-grid{grid-template-columns:1fr 1fr}}
@media (min-width:1024px){.aquarium-grid{grid-template-columns:1fr 1fr 1fr}}

.tools-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px;padding-top:16px;border-top:2px solid var(--border,#e4e7ec)}
.tools-card{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tools-card-body{min-width:0}
.tools-card-body .h6{margin:0 0 2px;font-weight:600}
@media(max-width:480px){.tools-row{grid-template-columns:1fr}}

.aq-card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  background:#fff;box-shadow:var(--shadow);
  padding:0
}

/* Cover-Bereich (mit oder ohne Bild) */
.aq-cover{
  position:relative;
  padding:14px 14px 10px;
  background:#f8fafc;
  border-bottom:1px solid var(--border,#e4e7ec);
  color:inherit;text-decoration:none;display:block
}
.aq-cover--img{
  background-size:cover;
  background-position:center;
  min-height:130px;
  display:flex;flex-direction:column;justify-content:flex-end;
  padding:10px 12px 10px
}
.aq-cover--img::before{
  content:'';
  position:absolute;inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.18) 60%, transparent 100%);
  border-radius:0
}
.aq-cover--img .aq-title,
.aq-cover--img .aq-meas-chips{position:relative;z-index:1}
.aq-cover--img .aq-title{color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.5)}

.aq-title{margin:0 0 6px;font-size:1.05rem;font-weight:700;color:#0f2942}
.aq-cover:hover .aq-title{text-decoration:underline}

/* Messwert-Chips auf dem Cover */
.aq-meas-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.aq-mchip{
  display:inline-block;padding:2px 7px;
  background:rgba(255,255,255,.18);backdrop-filter:blur(4px);
  border:1px solid rgba(255,255,255,.35);
  border-radius:999px;font-size:.75rem;font-weight:600;
  color:#fff;white-space:nowrap
}
.aq-cover:not(.aq-cover--img) .aq-mchip{
  background:#eef2f7;border-color:#d0d7e2;color:#374151
}

/* Status-Badge oben rechts im Cover */
.aq-status-badge{
  position:absolute;top:10px;right:10px;z-index:2;
  padding:3px 9px;border-radius:999px;
  font-size:.72rem;font-weight:700;white-space:nowrap;
  backdrop-filter:blur(6px)
}
.aq-status-badge--danger{background:rgba(220,38,38,.82);color:#fff;border:1px solid rgba(255,255,255,.25)}
.aq-status-badge--ok{background:rgba(22,163,74,.78);color:#fff;border:1px solid rgba(255,255,255,.25)}
.aq-status-badge--muted{background:rgba(100,116,139,.7);color:#fff;border:1px solid rgba(255,255,255,.2)}
/* ohne Bild: solide Farben */
.aq-cover:not(.aq-cover--img) .aq-status-badge--danger{background:#fee2e2;color:#991b1b;border-color:#fca5a5}
.aq-cover:not(.aq-cover--img) .aq-status-badge--ok{background:#dcfce7;color:#166534;border-color:#86efac}
.aq-cover:not(.aq-cover--img) .aq-status-badge--muted{background:#f1f5f9;color:#475569;border-color:#cbd5e1}

/* ── Aufgaben-Chips auf Becken-Karten ─── */
.aq-tasks{
  display:block;line-height:0;
  padding:8px 12px 3px;
  border-bottom:1px solid var(--border,#f0f2f5)
}
.aq-task-chip{
  display:inline-flex;align-items:center;gap:4px;
  margin:0 5px 5px 0;
  padding:3px 4px 3px 8px;
  border-radius:999px;font-size:.75rem;font-weight:600;
  border:1px solid;line-height:1.3;
  white-space:nowrap;vertical-align:top;
  /* override form defaults */
  background:transparent;cursor:default
}
.aq-task-chip--overdue{background:#fef2f2;border-color:#fca5a5;color:#991b1b}
.aq-task-chip--soon{background:#fffbeb;border-color:#fcd34d;color:#92400e}
.aq-task-icon{font-size:.8rem;line-height:1}
.aq-task-label{font-size:.73rem}
.aq-task-done{
  display:inline-flex;align-items:center;justify-content:center;
  width:17px;height:17px;flex-shrink:0;
  border-radius:50%;border:1.5px solid currentColor;
  background:transparent;color:inherit;cursor:pointer;
  padding:0;opacity:.6;transition:opacity .12s,background .12s
}
.aq-task-done:hover{opacity:1;background:rgba(0,0,0,.07)}

/* ── Action-Panels (Messwerte / Wasserwechsel / Pflege) ─── */
.aq-panel{border:none;border-top:1px solid var(--border,#f0f2f5)}
.aq-panel summary{
  display:flex;align-items:center;gap:9px;
  padding:11px 14px;cursor:pointer;list-style:none;
  font-size:.88rem;font-weight:600;color:#374151;
  user-select:none;-webkit-user-select:none
}
.aq-panel summary::-webkit-details-marker{display:none}
.aq-panel summary:hover{background:#f8fafc}
.aq-panel[open] summary{background:#f0f7ff;color:#1e4d8c}
.aq-panel-icon{display:flex;align-items:center;color:#6b7280;flex-shrink:0}
.aq-panel[open] .aq-panel-icon{color:#3b82f6}
.aq-panel-label{flex:1}
.aq-panel-chevron{color:#9ca3af;transition:transform .18s;flex-shrink:0}
.aq-panel[open] .aq-panel-chevron{transform:rotate(180deg);color:#3b82f6}

.aq-panel-body{padding:4px 14px 14px}

/* Messwerte-Grid */
.aq-meas-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px 10px}
@media(max-width:400px){.aq-meas-grid{grid-template-columns:1fr 1fr}}
.aq-field{display:flex;flex-direction:column;gap:2px}
.aq-field span{font-size:.72rem;font-weight:600;color:#6b7280;text-transform:uppercase;letter-spacing:.03em}
.aq-field input,.aq-field select{
  padding:5px 7px;border:1px solid #d1d5db;border-radius:7px;
  font-size:.88rem;background:#fff;width:100%;box-sizing:border-box
}
.aq-field input:focus,.aq-field select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,.15)}
.aq-field--full{grid-column:1/-1}

/* Wasserwechsel Quick-Buttons */
.aq-wc-btns{display:flex;gap:6px;flex-wrap:wrap}
.aq-wc-btn{
  flex:1 1 0;min-width:44px;max-width:72px;
  padding:8px 4px;border:1px solid #d1d5db;border-radius:8px;
  background:#fff;font-size:.88rem;font-weight:700;color:#374151;cursor:pointer;
  transition:background .12s,border-color .12s,color .12s;
  text-align:center
}
.aq-wc-btn:hover{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
.aq-wc-btn:active{background:#dbeafe}

/* Pflege Tag-Buttons */
.aq-pflege-grid{display:block;line-height:0}
.aq-pflege-btn{
  display:inline-block;
  margin:0 5px 6px 0;
  padding:5px 12px;border:1px solid #d1d5db;border-radius:999px;
  background:#fff;font-size:.8rem;line-height:1.4;font-weight:500;
  color:#374151;cursor:pointer;
  transition:background .12s,border-color .12s,color .12s;
  white-space:nowrap;vertical-align:top
}
.aq-pflege-btn:hover{background:#f0fdf4;border-color:#86efac;color:#166534}
.aq-pflege-btn:active{background:#dcfce7}

.aq-panel-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}

.aq-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem}

.aq-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.aq-actions .btn{flex:1 1 auto;text-align:center}
@media (min-width:480px){.aq-actions .btn{flex:0 0 auto}}

.aq-list{display:grid;gap:10px}
.aq-card.compact{display:grid;grid-template-columns:96px 1fr;gap:12px}
.aq-thumb img{width:96px;height:72px;object-fit:cover;border-radius:8px;border:1px solid #e3e9ee;background:#f7fafc}
.aq-meta{margin:.25rem 0 .5rem;color:#445;font-size:.9rem}
.aq-row{display:grid;grid-template-columns:84px minmax(0,1fr);gap:6px;align-items:baseline}
.aq-row dt{margin:0;color:#64748b;font-weight:600}
.aq-row dd{margin:0;color:#111827;word-break:break-word}

/* ---------- Media ---------- */
.aquarium-cover{
  display:block;width:100%;max-height:280px;object-fit:cover;
  border-radius:8px;box-shadow:0 2px 6px rgba(0,0,0,.15);margin-bottom:1rem
}
@media (max-width:600px){.aquarium-cover{max-height:150px}}
.review-photo{
  display:block;width:100%;height:auto;max-height:420px;object-fit:cover;
  border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,.08)
}

/* ---------- Legend (aufklappbar) ---------- */
.legend-card{margin-top:16px;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.legend-details{display:block}
.legend-details > summary{
  list-style:none;cursor:pointer;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px;
  border-bottom:1px solid var(--border)
}
.legend-details > summary::-webkit-details-marker{display:none}
.legend-details > summary::before{
  content:'▸';margin-right:8px;transition:transform .15s ease;font-size:1rem;line-height:1;color:var(--ci-blue)
}
.legend-details[open] > summary::before{transform:rotate(90deg)}
.legend-content{padding:12px 16px 16px}
.legend-grid{display:grid;grid-template-columns:1fr;gap:8px 12px}
@media (min-width:640px){.legend-grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1024px){.legend-grid{grid-template-columns:repeat(3,1fr)}}
.legend-item{display:flex;gap:8px;align-items:baseline}
.legend-key{width:56px;font-weight:600;color:#123}
.legend-hint{margin-top:12px;color:#556;font-size:.9rem}

/* ---------- Hints / Notes ---------- */
.muted{color:var(--muted)}
.hint.info{background:#eef6ff;border-left:3px solid #3c6382;padding:8px 10px;border-radius:6px}

/* ---------- AI Config / Admin Panels (kompakt) ---------- */
.ai-form{max-width:1100px;margin:16px auto}
.ai-grid{display:grid;gap:14px}
@media (min-width:960px){.ai-grid{grid-template-columns:1.15fr 1fr}}
.ai-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:12px}
.ai-fields{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:10px 12px}
@media (min-width:1200px){.ai-fields{grid-template-columns:repeat(3, minmax(0,1fr))}}
.ai-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.ai-label{font-size:.82rem;color:#334155;font-weight:600;line-height:1.2}
.ai-input{height:34px;padding:6px 10px;font-size:.92rem;background:#f8fafc;border:1px solid #d1d5db;border-radius:10px}
.ai-input:focus{outline:none;border-color:#2563eb;background:#fff}
.ai-textarea{min-height:120px;resize:vertical}
.ai-sticky{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 18px);padding-top:10px}
.ai-actions{display:flex;gap:10px;justify-content:flex-end;align-items:center;border:1px solid var(--border);border-radius:12px;padding:10px 12px;background:var(--ci-blue)}
.ai-actions .btn-primary{background:var(--ci-blue);color:#fff;border-color:rgba(255,255,255,.25)}
.ai-actions .btn-secondary{background:#fff;color:var(--ci-blue);border:1px solid #cbd5e1}

/* ---------- Utilities ---------- */
.w-100{width:100%}
.hidden{display:none !important}


/* ==== iOS / iPhone targeted fixes (add at file end) ==== */

/* 0) Viewport/Safe Area (setzt die Basis) */
/* Stelle sicher, dass im <head> steht: 
   <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> */
html { -webkit-text-size-adjust: 100%; }   /* Safari: kein Auto-Zoom/Resizing */
body { overflow-x: hidden; }               /* seitliches Scrollen verhindern */
.site-header {
  padding-top: calc(8px + env(safe-area-inset-top));  /* Notch-Reserve */
}

/* 1) Container & Cards: mehr Luft am Rand, kleinere Außenabstände mobil */
@media (max-width: 420px){
  .container { padding: 12px 10px; }
  .card,
  .aq-card { margin: 10px 6px; border-radius: 14px; }
}

/* 2) Headline skalieren statt umbrechen in 2 Zeilen mit riesigen Boxen */
h1, .h1, .page-title {
  font-size: clamp(1.25rem, 5.5vw, 2.25rem);
  line-height: 1.15;
  margin: 10px 6px 12px;
}

/* 3) Chips/Pills: sauber umbrechen, keine Überbreite */
.chips { flex-wrap: wrap; min-width: 0; gap: 6px; }
.chip, .badge {
  padding: .25rem .6rem;
  max-width: 100%;
  min-width: 0;
}
/* längere Texte innerhalb der Pill sauber kürzen */
.chip, .badge { overflow: hidden; text-overflow: ellipsis; }

/* 4) Kartenkopf: Titel + Chips auf kleinem Screen nicht quetschen */
.aq-head { align-items: flex-start; gap: 8px; }
.aq-title { font-size: 1.05rem; line-height: 1.2; }
@media (max-width: 420px){
  .aq-head { flex-direction: column; align-items: stretch; }
  .aq-title { margin-bottom: 4px; }
}

/* 5) Grid robust machen: Safari mag minmax(0,1fr) lieber */
.aquarium-grid { gap: 12px; }
@media (min-width: 640px){ .aquarium-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
@media (min-width:1024px){ .aquarium-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

/* 6) Accordions: bessere Tap-Trefferfläche, kein Layoutspringen */
.aq-accordion summary { padding: .65rem .8rem; min-height: 44px; }

/* 7) Buttons in den Karten: nebeneinander wenn Platz, sonst volle Breite */
.aq-actions { gap: 8px; }
.aq-actions .btn { flex: 1 1 auto; min-width: 44%; }
@media (min-width: 480px){ .aq-actions .btn { flex: 0 0 auto; } }

/* 8) Inputs: iOS Zoom vermeiden (>=16px), dennoch kompakt halten */
input, select, textarea { font-size: 16px; }  /* Sicherheitshalber fix */



/* Karten-Abstand und Layout */
.container .card {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

/* Buttons: volle Breite auf Mobile */
/* neu – überschreibt NICHT .btn, nur „normale“ Links/Buttons in Cards */
.card :where(a,button):not(.btn){
  display: block;
  width: 100%;
  margin: 0.3rem 0;
  padding: 0.8rem;
  text-align: center;
  border-radius: 6px;
  background: #f5f7fa;
  border: 1px solid #ccc;
  font-size: 1rem;
}



/* Labels oben in den Cards schöner */
.card h2, 
.card h3 {
  margin-bottom: 0.5rem;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }
  .card {
    margin: 0.5rem 0;
    padding: 0.8rem;
  }
  .card a,
  .card button {
    font-size: 0.95rem;
    padding: 0.7rem;
  }
}
/* --- Dashboard: Headline + Pills untereinander --- */
.aq-head {
  flex-direction: column;         /* statt nebeneinander */
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;             /* Luft zum ersten Accordion */
}

/* Chips zwingend Zeile-für-Zeile */
.chips--stack {
  display: grid;
  grid-template-columns: 1fr;     /* immer eine Spalte */
  gap: 6px;
}

/* Pills etwas kompakter (breitenneutral) */
.chip,
.badge {
  font-size: .88rem;
  line-height: 1.4;
  padding: .22rem .55rem;
}

/* Cards: weniger Innenabstand auf Mobile, damit sie nicht riesig werden */
@media (max-width: 480px){
  .aq-card { padding: 10px 12px; border-radius: 12px; }
  .aq-title { font-size: 1rem; }  /* Überschrift leichter schrumpfen */
}

/* Buttons: auf Mobile volle Breite, ab ~480px wieder nebeneinander */
.aq-actions { gap: 8px; }
.aq-actions .btn { flex: 1 1 100%; min-width: 0; }
@media (min-width: 480px){
  .aq-actions .btn { flex: 0 0 auto; }
}


/* --- Aquarium-Index: Mobile Stack --- */
@media (max-width: 600px){
  /* 1. Karte 1-spaltig statt Thumb + Text nebeneinander */
  .aq-card.compact { grid-template-columns: 1fr; }

  /* 2. Thumbnail full width oben */
  .aq-thumb { order: 0; }
  .aq-thumb img{
    width: 100%;
    height: 200px;        /* ggf. 180–220px nach Geschmack */
    object-fit: cover;
    border-radius: 10px;
  }

  /* 3. Titel mittig unter dem Foto */
  .aq-head { align-items: center; }
  .aq-title { text-align: center; width: 100%; }

  /* 4. Beckendaten mittig, dt/ddd untereinander */
  .aq-meta { text-align: center; }
  .aq-row { grid-template-columns: 1fr; }
  .aq-row dt{
    font-size: .82rem;
    color: #64748b;
  }
  .aq-row dd{
    font-weight: 600;
    color: #111827;
  }

  /* 5. Buttons mittig, vollbreit wenn wenig Platz */
  .aq-actions { justify-content: center; }
  .aq-actions .btn { flex: 1 1 100%; }
}

/* ===== Aquarium – Show (Desktop-Polish) ===== */

/* 1) Toolbar als Tabs/Segmented Control, linksbündig */
.card .actions:first-child { justify-content:flex-start; }
.card .actions:first-child .btn {
  border-radius: 999px;
  min-width: 0;
  padding: .5rem .9rem;
}
@media (min-width: 900px){
  .card .actions:first-child .btn {
    font-weight: 700;
    box-shadow: inset 0 -1px 0 rgba(12,60,96,.08);
  }
}

/* 2) Cover etwas größer, mit klaren Rändern */
@media (min-width: 900px){
  .aquarium-cover{
    max-height: 340px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(12,60,96,.08);
  }
}

/* 3) Detailtabelle (dl) – auf Desktop zweispaltig, saubere Ausrichtung */
@media (min-width: 980px){
  .aq-meta{
    display: grid;
    grid-template-columns: 1fr 1fr;   /* zwei Spalten */
    gap: 14px 28px;
    align-items: start;
  }
  .aq-meta .aq-row{
    display: grid;
    grid-template-columns: 140px minmax(0,1fr); /* breiteres dt-Feld */
    gap: 1px;
    padding: 2px 0;
  }
  .aq-meta .aq-row dt{ color:#3f4d5a; }
  .aq-meta .aq-row dd{ color:#0f172a; }
}

/* 4) Karten-Spacing & Buttons unten */
@media (min-width: 980px){
  .card { padding: 16px 18px; }
}
.card .actions:last-child{
  justify-content: space-between;
}
.card .actions:last-child > .actions{
  justify-content: flex-start;
}

/* 5) Notizen-Block besser lesbar */
.aq-meta .aq-row:last-child dd {
  white-space: pre-wrap;
  line-height: 1.35;
}


/* --- Besatz: Checkbox-Gitter (Desktop sauber, mobil stacked) --- */
.checkgroup{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px 16px;
  align-items:center;
}
@media (max-width: 900px){
  .checkgroup{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .checkgroup{ grid-template-columns: 1fr; }
}
.checkgroup .check{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border:1px solid var(--border-2);
  border-radius:10px; background:#f8fafc;
  font-weight:600; color:#0f172a;
}
.checkgroup .check input[type="checkbox"]{ transform: translateY(1px); }

/* --- iPhone: Date-Input darf nicht überstehen --- */
/* ==== iOS Date-Input Fixes ==== */
input[type="date"]{
  width:100%;
  max-width:100%;
  min-width:0;
  font-size:16px;                 /* verhindert iOS-Zoom */
  line-height:1.2;
  padding: 10px 12px;             /* kompakter */
  border-radius:12px;
  text-align:left;                /* kein Mittig-„Pill“-Look */
  appearance: none;
  -webkit-appearance: none;
}

/* Innenleben des iOS-Date-Controls straffen */
input[type="date"]::-webkit-date-and-time-value { min-height: 1.2em; }
input[type="date"]::-webkit-datetime-edit { padding: 0; }
input[type="date"]::-webkit-calendar-picker-indicator{
  margin: 0;
  padding: 0;
}

/* Kleine Screens: Felder generell kompakter, kein Überlaufen */
@media (max-width: 420px){
  form label{ min-width:0; }      /* Grid-Safari: kein Expand */
  input, select, textarea{ padding:10px 12px; border-radius:10px; }
}

/* === Accessible Skiplink: nur auf Focus sichtbar === */
.skip-link{
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(-200%);           /* aus dem sichtbaren Bereich */
  padding: .5rem .75rem;
  background: #fff;
  color: #000;
  border: 2px solid var(--ci-teal);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 10000;                          /* über Header/Nav */
  text-decoration: none;
}
.skip-link:focus{
  transform: none;                         /* sichtbar machen */
  outline: none;                           /* visuelle Markierung übernimmt der Rahmen */
}
/* 1) Diese Seite: globales 2-Spalten-Formular abschalten */
form:has(.ai-form){
  display: block;
}
@media (min-width: 900px){
  form:has(.ai-form){
    grid-template-columns: none;  /* 2-Spalten-Layout deaktivieren */
    gap: 0;
  }
  form:has(.ai-form) > .actions{
    grid-column: auto;
    justify-self: auto;
  }
}

/* 2) Desktop: Sticky- und Balken-Optik neutralisieren */
@media (min-width: 960px){
  .ai-sticky{ position: static; background: none; padding-top: 0; }
  .ai-actions{
    background: transparent;
    border: 0;
    padding: 0;
    justify-content: flex-start;  /* oder center/rechts nach Wunsch */
    gap: 12px;
  }
  .ai-actions .btn{ min-width: 0; }
}

/* 3) Kleines Detail: Karten in der Grid-Reihe oben ausrichten */
.ai-grid{ align-items: start; }
.alert { padding: .75rem 1rem; border-radius: .5rem; margin: .75rem 0; border:1px solid var(--warn-bd,#f3e3a9); background:var(--warn-bg,#fff6d8); color:var(--warn-text,#7a5b00); }
.alert-error   { border-color: var(--err-bd,#ffc9c9); background: var(--err-bg,#ffe0e0); color: var(--err-text,#7a1a1a); }
.alert-success { border-color: #a3d9a5; background: #f0faf0; color: #1a5c1a; }
.alert-info    { border-color: #93c5fd; background: #eff6ff; color: #1e3a5f; }
.alert-warning { border-color: var(--warn-bd,#f3e3a9); background: var(--warn-bg,#fff6d8); color: var(--warn-text,#7a5b00); }

/* AI usage widget */
.ai-usage-row{
  display:grid; grid-template-columns:1fr 1fr; gap:.75rem; margin:.5rem 0 1rem;
}
.progress{
  width:100%; height:10px; border-radius:999px; background:var(--border,#e5e7eb); overflow:hidden;
}
.progress-bar{
  height:100%; width:0%; background:var(--ci-teal,#0fb9b1);
  transition:width .3s ease;
}
.note-warn{
  margin-top:.5rem; padding:.5rem .75rem; border-radius:.5rem;
  background:var(--warn-bg,#fff6d8); color:var(--warn-text,#7a5b00); border:1px solid var(--warn-bd,#f3e3a9);
  font-size:.9rem;
}
.btn--disabled{
  opacity:.55;
  pointer-events:none;           /* verhindert Klicks */
  cursor:not-allowed;
}
.note-error{
  margin: 1rem 0;
  padding:.75rem 1rem;
  border:1px solid #f3c0c0;
  background:#ffe0e0;
  color:#7a1a1a;
  border-radius:.5rem;
}
pre.ai-analysis{
  white-space: pre-wrap;   /* wichtig! */
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: 24rem;
  overflow: auto;
  padding: .75rem 1rem;
  background: var(--panel-soft,#f7f9fc);
  border: 1px solid var(--border,#e5e7eb);
  border-radius: .5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.5;
}
/* --- AI-Hinweisbox --- */
.ai-hint {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--warn-bd, #f3e3a9);
  background: var(--warn-bg, #fff6d8);
  color: var(--warn-text, #7a5b00);
}

/* leicht softer Hintergrund (zusätzliche Klasse) */
.card-soft {
  background: var(--panel-soft, #f7f9fc);
  border: 1px solid var(--border-2, #d6e3ea);
}

/* --- Liste der Hinweise --- */
.ai-hint-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  list-style-type: disc;
  font-size: 0.95rem;
  line-height: 1.4;
}

.ai-hint-list li + li {
  margin-top: 0.25rem;
}

.btn--disabled{ opacity:.55; pointer-events:none; cursor:not-allowed; }
.btn.btn-pill{ border-radius:999px; padding:.4rem .8rem; }
.note-error{ padding:.6rem .8rem; border:1px solid #f3c0c0; background:#ffe0e0; color:#7a1a1a; border-radius:.5rem; }

/* Container für AI-Quota Hinweise */
.ai-quota-box {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.ai-quota-box.error {
  background: #fdecea; /* hellrot */
  border: 1px solid #f5c2c7;
  color: #842029;
}

.ai-quota-box a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  color: #0c3c60;
  text-decoration: none;
}
.ai-quota-box a:hover {
  background: #f7f9fc;
  border-color: #999;
}

/* Tabs flexibler machen */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.tab-bar .btn {
  flex: 0 0 auto;
}

/* Mobile Optimierung */
@media (max-width: 600px) {
  .ai-quota-box {
    font-size: 0.85rem;
    padding: 0.6rem;
  }
  .tab-bar {
    gap: 0.3rem;
  }
  .tab-bar .btn {
    flex: 1 1 auto; /* Tabs füllen ganze Zeile */
    text-align: center;
  }
}
/* Abstand unterhalb der Cards/Sections */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;        /* horizontaler Abstand */
  margin-top: 1rem;   /* vertikaler Abstand zur Box darüber */
}

/* Buttons immer gleichmäßig auf Handy */
.actions .btn {
  flex: 1 1 auto;          /* damit sie sich in einer Zeile teilen */
  min-width: 120px;        /* Mindestbreite */
  text-align: center;
}
@media (max-width: 600px) {
  .actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .actions .btn {
    width: 100%;
  }
}




/* (optional) nur mobil etwas mehr Luft */
@media (max-width: 600px){
  .tabs{ gap: .6rem; }
  .tabs + .quota-alert,
  .tabs + .ai-quota-box{ margin-top: .9rem; }

/* TAB-LEISTE: vertikal mit Abstand zwischen den Pills */
.tabs{
  display: grid;            /* robust, auch wenn Buttons block-level sind */
  gap: .5rem;               /* Abstand zwischen den Tab-Pills */
}
}
.actions,
.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem; /* sorgt für gleichmäßigen Abstand */
  margin-top: 1rem;
}

.actions .btn,
.ai-actions .btn {
  flex: 1 1 auto; /* auf Mobile: Buttons füllen ganze Breite */
  text-align: center;
}

/* === Autocomplete-Dropdown exakt unter dem Input === */
.autocomplete { position: relative; }

/* Dropdown: exakt bündig, volle Input-Breite, überlagert andere Inhalte */
.autocomplete .suggest-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;

  background: #fff;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.12);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

/* Einzelne Items */
.autocomplete .suggest-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  margin: 4px 0;
  background: #fff;
  display: flex; justify-content: space-between; gap: 10px;
  cursor: pointer;
}
.autocomplete .suggest-item:hover { background: #f7f9fc; border-color: #e6eef7; }
.autocomplete .suggest-best { border-color: #b7e3e1; background: #f1fbfb; }

/* Kleine Subline */
.autocomplete .suggest-sub { color: var(--muted, #667085); font-size: 12px; }

/* Wichtig: Container darf nicht abschneiden */
.card { overflow: visible; } /* falls bisher overflow:hidden gesetzt war */
.autocomplete { position: relative; }
.autocomplete .suggest-box{
  position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:1000;
  background:#fff; border:1px solid var(--border, #e4e7ec); border-radius:10px;
  box-shadow:0 8px 28px rgba(16,24,40,.12); max-height:280px; overflow-y:auto; padding:6px;
}
.autocomplete .suggest-item{ padding:10px 12px; border-radius:8px; margin:4px 0;
  border:1px solid transparent; display:flex; justify-content:space-between; gap:10px; cursor:pointer; }
.autocomplete .suggest-item:hover{ background:#f7f9fc; border-color:#e6eef7; }
.autocomplete .suggest-best{ border-color:#b7e3e1; background:#f1fbfb; }
.autocomplete .suggest-sub{ color:var(--muted, #667085); font-size:12px; }
.card{ overflow:visible; } /* falls Dropdown abgeschnitten wurde */
/* Autocomplete-Anker */
.autocomplete { position: relative; }

/* Standard: versteckt */
.autocomplete .suggest-box {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(16,24,40,.12);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

/* Nur sichtbar, wenn offen */
.autocomplete .suggest-box.is-open { display: block; }

/* Wenn leer: keine Linie / kein Schatten */
.autocomplete .suggest-box:empty {
  border: 0;
  box-shadow: none;
  padding: 0;
  max-height: 0;
}
.suggest-box{ border:1px solid var(--border,#e4e7ec); border-radius:10px; background:#fff; box-shadow:0 6px 18px rgba(0,0,0,.08); margin-top:.35rem; }
.suggest-box:not(.is-open){ display:none; }
.suggest-item{ display:flex; justify-content:space-between; gap:.5rem; padding:.6rem .7rem; cursor:pointer; }
.suggest-item:hover{ background:#f6f8fb; }
.suggest-sub{ font-size:.85em; color:#6b7280; }
.suggest-best{ background:#eef7ff; border-left:3px solid #cfe5ff; }
.suggest-empty{ opacity:.9; font-style:italic; }


.analysis-header .analysis-top{display:flex;justify-content:space-between;gap:12px;align-items:center}
.score-badge{display:flex;align-items:baseline;gap:4px;padding:8px 10px;border-radius:10px;font-size:18px}
.ampel-green{background:#e8f5e9;color:#1b5e20}.ampel-yellow{background:#fff6d8;color:#7a5b00}.ampel-red{background:#ffe0e0;color:#7a1a1a}
.premium-teaser{display:flex;align-items:center;gap:10px}
.premium-teaser .blurred{flex:1;max-width:180px}
.premium-teaser .blurred .line{height:10px;background:linear-gradient(90deg,#ddd,#eee);filter:blur(2px);border-radius:8px;margin:6px 0}
.species-card .row{display:flex;justify-content:space-between;gap:12px}
.col{flex:1}.col-right{text-align:right}
.count{font-weight:600}
.btn-block{display:block;width:100%}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;               /* gleichmäßiger Abstand zwischen den Chips */
  margin-top: 4px;        /* etwas Luft nach oben */
}

.chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 12px;
  line-height: 1.4;
  white-space: nowrap;     /* kein Zeilenumbruch im Chip selbst */
}

.chip-neutral {background:#f4f6f8;color:#334155;border:1px solid #e5e7eb}
.chip-ok      {background:#e8f5e9;color:#1b5e20;border:1px solid #c8e6c9}
.chip-warn    {background:#fff6d8;color:#7a5b00;border:1px solid #ffe083}
.chip-danger  {background:#ffe0e0;color:#7a1a1a;border:1px solid #ffb3b3}
.chip-locked  {opacity:.75;border-style:dashed}
/* === Compact Species Cards === */
.species-card {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
}
.species-card .row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.species-card .col { flex: 1 1 240px; min-width: 0; }
.species-card .col-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Titel + Untertitel */
.species-card .title { margin: 0 0 2px 0; line-height: 1.2; }
.species-card .link-title {
  font-size: 1.05rem;      /* kleiner als zuvor */
  font-weight: 600;
  color: #0b3a5d;
  text-decoration: underline;
  padding: 2px 6px;
  border-radius: 8px;
  background: #f4f6f8;
}
.species-card .link-title:hover { background: #e8edf2; text-decoration: none; }
.species-card .muted.small { font-size: .86rem; opacity: .8; }

/* Chips kompakt */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center;
  font-size: .78rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e6e9ed;
  background: #f7f8fa;
  line-height: 1.2;
}
.chip-neutral { background: #f5f7fb; }
.chip-ok     { background: #ecf8f1; border-color: #d7efdf; color: #235c39; }
.chip-warn   { background: #fff7e6; border-color: #ffe6b3; color: #7a4b00; }
.chip-danger { background: #fdeeee; border-color: #f7cfcf; color: #7d1f1f; }
.chip-locked { background: #f1f3f6; border-style: dashed; opacity: .85; }

/* Menge / Badges rechts */
.species-card .count { font-weight: 700; font-size: .95rem; margin-right: 6px; }

/* Buttons noch kleiner */
.btn.btn-sm { padding: 6px 10px; font-size: .83rem; border-radius: 10px; }
.btn-outline.btn-sm { padding: 5px 9px; }

/* Karten-Header (Analyse) kompakter */
.analysis-header { padding: 12px 14px; border-radius: 12px; }
.analysis-header .score-badge strong { font-size: 1rem; }
.analysis-header .chips .chip { font-size: .78rem; }

/* Mobile Feintuning */
@media (max-width: 640px) {
  .species-card { padding: 10px 12px; }
  .species-card .link-title { font-size: 1rem; padding: 2px 6px; }
  .btn.btn-sm { padding: 6px 8px; font-size: .8rem; }
  .row-actions { width: 100%; display: flex; gap: 8px; margin-top: 8px; }
}

/* Desktop: Aktionen enger platzieren */
@media (min-width: 900px) {
  .species-card .row-actions { margin-left: auto; display: flex; gap: 8px; }
}
/* Titel-Link: nur Textbreite, kein Kasten */
.species-card .link-title{
  display:inline;           /* statt block/inline-block */
  padding:0;                /* Kasten weg */
  background:transparent;   /* kein graues Feld */
  border:0;
  border-radius:0;
  line-height:1.25;
  font-weight:600;
  color:#0b3a5d;
  text-decoration:underline;
}
.species-card .link-title:hover,
.species-card .link-title:focus{
  text-decoration:none;   /* nur Unterstreichung beim Hover/Focus */
  background:transparent;
  outline:none;
}

/* optional: einzeilig + Auslassungspunkte */
.species-card .title{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
/* Platz nach unten, damit letzter Karteninhalt nicht unter der Leiste verschwindet */
.has-sticky-actions {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

/* Sticky-Leiste am unteren Rand des Scroll-Containers */
.sticky-actions-bar {
  position: sticky;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  border-top: 1px solid rgba(0,0,0,0.06);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 18px rgba(0,0,0,0.06);
  /* Wenn deine .container eine max-width hat, vererbt sich die Breite automatisch */
}

/* Buttons in der Leiste vollbreit */
.sticky-actions-bar .btn-block {
  width: 100%;
}

/* Mobile: Buttons untereinander */
@media (max-width: 520px) {
  .sticky-actions-bar {
    grid-template-columns: 1fr;
  }
}
/* ---------- MOBILE TUNING (<=520px) ---------- */
@media (max-width: 520px) {

  /* Cards kompakter */
  .card { padding: 12px 12px; border-radius: 12px; }

  /* Header-Block: Buttons umbrechen statt zu quetschen */
  .analysis-top { display: grid; gap: 8px; align-items: start; }
  .analysis-top .btn { margin-right: 6px; margin-bottom: 6px; }
  .analysis-top .muted.small { margin-top: 4px; display: block; }

  /* Score-Badge kleiner */
  .score-badge { transform: scale(.92); transform-origin: right top; }

  /* Aktionen bei den Arten untereinander statt in einer Zeile */
  .row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }
  .row-actions .btn { width: 100%; }
  .row-actions .btn.btn-outline { order: 3; grid-column: 1 / -1; }

  /* Rechts-Spalte mit Stückzahl als kompakter Block oberhalb */
  .col-right { text-align: left; margin: 8px 0 0; }
  .col-right .count { font-weight: 700; }

  /* ---------- CHIPS: Mehrzeilig & lesbar ---------- */

  /* Container: Zeilenumbruch und konsistente Lücken */
  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 8px;  /* etwas mehr Zeilenabstand */
  }

  /* Chips selbst: Zeilenumbruch erlauben, Worttrennung aktivieren */
  .chip {
    white-space: normal;             /* WICHTIG: Umbrechen */
    max-width: 100%;                 /* nie außerhalb des Screens */
    line-height: 1.25;
    padding: 6px 10px;
    font-size: 13px;                 /* minimal kleiner mobil */
    word-break: break-word;          /* bricht lange Begriffe */
    overflow-wrap: anywhere;         /* bricht Notfälle (z. B. „Foto-Erkennung“) */
    hyphens: auto;                   /* Browser darf trennen */
    border-radius: 999px;            /* Pill-Form bleibt */
  }

  /* Farbliche Chips nicht zu laut */
  .chip-ok, .chip-warn, .chip-danger, .chip-neutral, .chip-locked {
    padding: 6px 10px;
  }

  /* Lange Predations-Strings etwas entschärfen */
  .chips .chip[class*="danger"],
  .chips .chip[class*="warn"] {
    font-weight: 600;
  }

  /* Premium-Teaser: Textblock nicht zwischen Buttons klemmen */
  .premium-teaser { display: grid; gap: 8px; }

  /* Sticky-Bar: Buttons untereinander */
  .sticky-actions-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* Platz nach unten, damit nichts überdeckt wird */
  .has-sticky-actions {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---------- GENERELL: Chips etwas robuster, auch Desktop ---------- */

/* Standard-Chips-Layout (falls noch nicht gesetzt) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Chip-Basis */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;    /* Desktop: einzeilig, wird mobil überschrieben */
}

/* Kleine Abkürzungen (pH, GH etc.) etwas kompakter */
.chips .chip:has(> :where(.abbr)) { padding: 6px 10px; }

/* Buttons in Sticky-Bar vollbreit */
.sticky-actions-bar .btn-block { width: 100%; }

/* Falls du sehr lange Wörter in Chips hast (z. B. Alternativarten & Foto-Erkennung) */
.chip b, .chip strong { font-weight: 600; }
/* ---------- CHIP FIX ---------- */
.chip {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  max-width: 100%;
  border-radius: 8px;        /* statt 999px -> rechteckiger */
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.3;
  background-clip: padding-box;
}

/* Längere Chips zweizeilig, mehr Platz */
.chip {
  display: inline-block;
  min-height: 32px;
}

/* ---------- ACTION BUTTONS ---------- */
.row-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  background: #fafafa;
}

/* Buttons immer vollbreit */
.row-actions .btn {
  width: 100%;
  text-align: center;
}
@media (max-width: 520px) {

  /* Card Layout: alles untereinander */
  .species-card .row {
    display: block;
  }

  /* Rechts-Spalte (z. B. Stückzahl) nach oben rechts ist mobil unnötig */
  .species-card .col-right {
    text-align: left;
    margin: 6px 0;
    font-weight: 600;
  }

  /* Chips alle in einem Block untereinander */
  .species-card .chips {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Action-Buttons ans Ende */
  .species-card .row-actions {
    order: 99;                /* immer ganz unten */
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: #fafafa;
  }

  .species-card .row-actions .btn {
    width: 100%;
    text-align: center;
  }
}
/* Statusfarben zentral */
:root{
  --ok-bg:    #e7f5ec;
  --ok-fg:    #1c7c54;
  --warn-bg:  #fff3d6;
  --warn-fg:  #8a5a00;
  --danger-bg:#fde8e8;
  --danger-fg:#a61e1e;
  --muted:    #6b7280;
}

/* Header-Layout */
.analysis-header .analysis-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

/* Score-Badge (links/mittig) */
.score-badge{
  display:inline-flex;
  align-items:baseline;
  gap:6px;
  padding:10px 14px;
  border-radius:12px;
  background:var(--warn-bg);
  color:var(--warn-fg);
  font-weight:600;
  line-height:1;
}
.score-badge strong{ font-size:1.6rem; }

/* Ampelvarianten für Score */
.ampel-green{ background:var(--ok-bg); color:var(--ok-fg); }
.ampel-yellow{ background:var(--warn-bg); color:var(--warn-fg); }
.ampel-red{ background:var(--danger-bg); color:var(--danger-fg); }

/* Besatzlast-Badge (rechts) */
.load-badge{
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:12px;
  font-weight:600;
  line-height:1;
  background:var(--ok-bg);
  color:var(--ok-fg);
  white-space:nowrap;
}

/* Färbung je Schwelle (<=100 ok, <=120 warn, >120 danger) */
.load-ok{    background:var(--ok-bg);    color:var(--ok-fg); }
.load-warn{  background:var(--warn-bg);  color:var(--warn-fg); }
.load-danger{background:var(--danger-bg);color:var(--danger-fg); }

/* Chips-Zeile */
.analysis-header .chips{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

/* Kleine Kosmetik an Chips */
.chip{
  padding:8px 12px;
  border-radius:999px;
  font-weight:600;
  font-size:0.95rem;
}

/* Responsiv: Badges unter den Titel schieben */
@media (max-width: 720px){
  .analysis-header .analysis-top{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
  .score-badge, .load-badge{
    font-size:0.95rem;
  }
}
/* Titelzeile mit Stückzahl rechts */
.species-card .title-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

/* Stückzahl als kompakte Badge */
.count-badge{
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0f3550;     /* dein dunkles Blau vom Header */
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

/* optional: dezenter auf hellen Karten */
.species-card .count-badge{
  background: #123b5d;
}

/* Mobile Feinschliff */
@media (max-width: 520px){
  .species-card .title-row{ gap: 10px; }
  .count-badge{ font-size: 12px; padding: 6px 10px; }
}

/* Falls irgendwo noch die alte Rechts-Spalte existiert, mobil ausblenden */
@media (max-width: 520px){
  .species-card .col-right{ display: none !important; }
}
/* ================================
   AquariumInsider Tool – Clean CSS
   Mobile-first, PHP Views kompatibel
   ================================ */

/* ... (bestehender Inhalt bleibt unverändert) ... */

/* ---------- Wizard Progress ---------- */
.wizard-progress{
  position: sticky; top: 0; z-index: 900;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
  padding: 10px 12px; margin: -16px -16px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.88));
  backdrop-filter: saturate(120%) blur(2px);
  border-bottom: 1px solid var(--border,#e5e7eb);
}
.wizard-track{height:8px; background:#e6edf2; border-radius:999px; overflow:hidden}
.wizard-fill{height:100%; width:var(--progress,0%); background:var(--ci-teal,#0fb9b1)}
.wizard-step{font-weight:700; color:#0c3c60}

/* ---------- Form Grid Helpers ---------- */
.form-grid{ display:grid; gap:14px }
.field{ display:grid; gap:6px }
.field--full{ grid-column:1 / -1 }
@media (min-width: 900px){
  .form-grid{ grid-template-columns: 1fr 1fr; gap:16px 18px }
}

/* ---------- Key/Value Definition List ---------- */
.kv { display:grid; grid-template-columns: 140px minmax(0,1fr); gap:6px 12px; }
.kv dt{ margin:0; font-weight:600; color:#5b7180 }
.kv dd{ margin:0; color:#0f172a; word-break:break-word }
/* ===== Admin: Species-Liste (kompakt & responsiv) ===== */
.admin-species .tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
@media (max-width:720px){
  .admin-species .tabs{ grid-template-columns:1fr; }
}
.admin-species .tab{
  display:block;
  text-align:center;
  padding:.45rem .8rem;
  border:1px solid var(--border,#e4e7ec);
  border-radius:999px;
  text-decoration:none;
  background:#f7f9fc;
  color:#0b3a5d;
  font-weight:600;
}
.admin-species .tab.active{
  background:#eef7ff;
  border-color:#cfe5ff;
}

/* Tabelle enger, Spaltenbreiten sinnvoll */
.admin-species .table th,
.admin-species .table td{
  padding:.55rem .5rem;
  vertical-align:top;
}
.admin-species .table .col-id{ width:72px; }
.admin-species .table .col-name{
  min-width:220px;
  white-space:normal;   /* Name darf umbrechen */
}
.admin-species .table .col-links{ width:160px; }

/* Mobile: Kartenlayout statt breiter Tabelle */
@media (max-width:900px){
  .admin-species .table thead{ display:none; }
  .admin-species .table,
  .admin-species .table tbody,
  .admin-species .table tr,
  .admin-species .table td{
    display:block; width:100%;
  }
  .admin-species .table tr{
    border:1px solid var(--border,#e5e7eb);
    border-radius:12px;
    margin-bottom:10px;
    padding:.4rem .6rem;
    background:#fff;
  }
  .admin-species .table td{
    border:none;
    padding:.35rem 0;
  }
}

/* Chips: kompakter & robuster bei langen Texten */
.admin-species .chip{
  font-size:.78rem;
  padding:.2rem .55rem;
  border-radius:9999px;
  line-height:1.25;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  border:1px solid #d6dce3;
  background:#f5f7fb;
  color:#334155;
}
.admin-species .chip.muted{
  background:#f1f5f9; border-color:#e2e8f0; color:#64748b;
}
.admin-species .chip.ok{
  background:#ecfdf5; border-color:#a7f3d0; color:#065f46;
}
.admin-species .chip.warn{
  background:#fffbeb; border-color:#fde68a; color:#92400e;
}

/* Links-Zelle: Chips in Reihe, sauber umbrechen */
.admin-species td.col-links{ white-space:normal; }
.admin-species td.col-links .chips{ gap:6px; flex-wrap:wrap; }

/* Details-Block dezenter gerahmt */
.admin-species .details-row details{
  border:1px dashed #e6eef3;
  border-radius:10px;
  background:#fafcff;
}
.admin-species .details-row summary{
  padding:.45rem .6rem;
  list-style:none;
  cursor:pointer;
  color:#64748b;
}
/* === Admin-Seiten volle Breite === */
.admin-species.container {
  max-width: none;   /* Begrenzung aufheben */
  width: 100%;       /* 100% Breite */
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 768px) {
  .admin-species.container {
    padding-left: 10px;
    padding-right: 10px;
  }
}
/* Admin Species: Status-Tabs kompakter */
.admin-species .tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-species .tabs .tab {
  flex: 0 0 auto;             /* nicht auf volle Breite */
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.admin-species .tabs .tab.active {
  background: #eef7ff;
  border-color: #cfe5ff;
  color: #0b3a5d;
}

@media (max-width: 640px) {
  .admin-species .tabs {
    flex-direction: column;   /* untereinander auf Mobile */
  }
  .admin-species .tabs .tab {
    width: 100%;
  }
}
.status-dot{display:inline-block;width:.75rem;height:.75rem;border-radius:999px;vertical-align:middle;margin-right:.4rem}
.status-green{background:#1aa567}
.status-yellow{background:#f2c94c}
.status-red{background:#e53935}

/* ==== Datetime-Input (Pflege) – optisch wie normale Inputs ==== */
input[type="datetime-local"]{
  width:100%; max-width:100%; min-width:0;
  font-size:16px;                               /* iOS: kein Zoom */
  line-height:1.2;
  padding:12px;                                 /* wie Text/Number */
  border:1px solid var(--border-2,#d6e3ea);
  border-radius:12px;
  background:#fff; color:var(--text,#222);
  outline:none; transition:border-color .15s, box-shadow .15s;
}
input[type="datetime-local"]:hover{ border-color:#c3d6df; }
input[type="datetime-local"]:focus{
  border-color:#12a4a0;
  box-shadow:0 0 0 4px rgba(18,164,160,.14);
}
/* Safari/WebKit Feinschliff */
input[type="datetime-local"]::-webkit-datetime-edit{ padding:0; }
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper{ padding:0; }
input[type="datetime-local"]::-webkit-datetime-edit-text{ padding:0 2px; }
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field{
  padding:0 2px;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator{
  margin:0; padding:0; opacity:.8; cursor:pointer;
}
/* dezenter Placeholder */
input[type="datetime-local"]::placeholder{ color:#9aa3af; }

/* Datum-Label im Pflege-Formular über volle Breite */
#maintDateWrap{ display:block; grid-column:1 / -1; }


/* Pflege-Form: kompakte, konsistente Reihen */
.aq-accordion .row{ display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; }
@media (max-width:680px){ .aq-accordion .row{ grid-template-columns:1fr; } }

/* Volle Breite für „Notiz“ */
.field--full{ grid-column:1 / -1; }
textarea{ min-height: 96px; } /* etwas größer als vorher */

/* Checkbox inline schöner ausrichten */
.check-inline{
  display:flex; align-items:center; gap:.5rem;
  padding-top: 28px;               /* optische Ausrichtung zur Select-Höhe */
}
.check-inline input{ transform: translateY(1px); }

/* Datumseingabe wie andere Inputs  volle Breite in Spalte */
.date-wrap{ display:block; }
#maintDateWrap{ grid-column:auto; }     /* bleibt in Spalte 2 */
@media (max-width:680px){ #maintDateWrap{ grid-column:1 / -1; } } /* mobil volle Breite */


/* ==== Dashboard – gezieltes, konfliktarmes CSS ==== */

/* Kopf & Chips kompakt, ohne globale Auswirkungen */
.aq-card .aq-head{flex-direction:column;align-items:stretch;gap:6px;margin-bottom:8px}
.aq-card .chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.aq-card .chip{padding:.24rem .55rem;font-size:.88rem;line-height:1.3;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.aq-card .chip-muted{background:#eef1f4;border:1px solid #d6dce3;color:#4a5568}

/* Accordions */
.aq-accordion summary{padding:.6rem .8rem;min-height:40px;border-radius:.75rem;background:#fafcff;border:1px solid #e6ebf0;cursor:pointer}
.aq-accordion[open] summary{background:#f6f9ff;border-color:#c9d6e2}
.aq-accordion .content{padding:.75rem .8rem .9rem}
.aq-accordion .row{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
@media (max-width:680px){.aq-accordion .row{grid-template-columns:1fr}}

/* Inputs nur im Accordion anfassen */
.aq-accordion input[type="text"],
.aq-accordion input[type="number"],
.aq-accordion input[type="datetime-local"],
.aq-accordion select,
.aq-accordion textarea{
  font-size:16px;padding:10px 12px;border:1px solid var(--border-2,#d6e3ea);
  border-radius:12px;background:#fff;outline:none;min-width:0
}
.aq-accordion textarea{min-height:90px}
.aq-accordion :is(input,select,textarea):hover{border-color:#c3d6df}
.aq-accordion :is(input,select,textarea):focus{border-color:#12a4a0;box-shadow:0 0 0 4px rgba(18,164,160,.14)}

/* Buttonreihen nur in Karten – mobil vollbreit, Desktop auto */
.aq-card .actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;justify-content:flex-end}
.aq-card .actions .btn{flex:1 1 auto;min-width:44%}
@media (min-width:480px){.aq-card .actions .btn{flex:0 0 auto;min-width:auto}}

/* Quickbuttons kompakter */
.aq-card .actions .btn-outline{padding:.38rem .6rem;border-radius:10px}

/* iOS: kein Zoom, aber keine globalen Änderungen */
.aq-card .btn-ghost{
  display:inline-flex;align-items:center;justify-content:center;
  gap:.4rem; padding:.55rem 1rem; border:1px solid var(--bd);
  border-radius:10px; background:var(--bg); color:var(--fg);
  font-weight:700; text-decoration:none; cursor:pointer; line-height:1.2; min-width:120px;
}

.more-actions{ position:relative; }
.card-popover{
  position:absolute; right:0; top:100%;
  background:#fff; border:1px solid #e2e8f0; border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  min-width:180px; padding:6px; z-index:20;
}
.card-popover .menu-item{
  display:block; padding:8px 10px; border-radius:6px; text-decoration:none; color:#0a2540;
}
.card-popover .menu-item:hover{ background:#f1f5f9; }

.has-sticky-actions{ padding-bottom: 96px; } /* Höhe = Leistenhöhe + etwas Puffer */

.cohort-list{margin-top:8px;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.cohort-row{display:grid;grid-template-columns:auto auto 1fr auto;gap:8px;align-items:center;
  padding:8px;border:1px solid #eef2f7;border-radius:10px;background:#fff}
.co-date{font-variant-numeric:tabular-nums}
.co-count{font-weight:600}
.co-note{color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.more-actions{position:relative}
.card-popover{position:absolute;right:0;top:calc(100% + 6px);min-width:200px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;
  padding:6px;box-shadow:0 10px 24px rgba(0,0,0,.10);z-index:40}
.card-popover .menu-item{display:block;padding:8px 10px;border-radius:8px;color:#0a2540;text-decoration:none}
.card-popover .menu-item:hover{background:#f1f5f9}
.card-popover .menu-item.danger{color:#b42318}
.card-popover .menu-item.danger:hover{background:#fee4e2}

/* === Besatz (scoped): kompakte Chips === */
.chips--compact { gap: 6px; row-gap: 6px; }
.chips--compact .chip {
  display: flex;
  font-size: .78rem;      /* ~15–20 % kleiner */
  line-height: 1.2;
  padding: 2px 7px;       /* schmaler */
  border-radius: 9999px;  /* Pill-Form beibehalten */
  justify-content: center;   /* Inhalt zentrieren */
  text-align: center;
  align-items: center;       /* vertikal */
}
/* optional für besonders volle Reihen */
.chips--compact .chip--sm { font-size: .74rem; padding: 2px 6px; }

/* === Species-Card Titel & Buttons mobil umbrechen === */
.species-card .title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.species-card .title-row > .title {
  flex: 1 1 100%;   /* Titel immer volle Breite */
}

.species-card .title-row .title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;  /* Abstand zum Namen */
}

/* Buttons mobil volle Breite unter dem Titel */
@media (max-width: 640px) {
  .species-card .title-row {
    flex-direction: column;
    align-items: stretch;
  }
  .species-card .title-row .title-actions {
    justify-content: flex-start;
  }
  .species-card .title-row .btn {
    flex: 1 1 auto;
  }
}
.chip.blurred{
  position: relative;
  color: transparent;
  filter: blur(2px);              /* wie .premium-teaser .blurred */
  pointer-events: none;
  user-select: none;
}
.chip.blurred::after{
  content: "🔒 Premium";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #667085;
  filter: none;                   /* Overlay selbst nicht blurren */
  font-size: .75rem;
}

/* Aufgaben-Block */
.tasks-group { margin: .35rem 0 1rem; }
.tasks-heading { color: var(--muted,#64748b); font-weight: 600; margin: .25rem 0 .5rem; }

/* Liste */
.tasks-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }

/* Zeile */
.task {
  --bg: #fff; --bd: var(--border,#e5e7eb); --ink: #0f172a;
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center;
  gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--bd);
  background: var(--bg); border-radius: 12px;
}

/* States */
.task--danger { --bg: #fff6f6; --bd: #f3caca; --ink:#7f1d1d; }
.task--warn   { --bg: #fffdf4; --bd: #f6e7b5; --ink:#7a5b00; }
.task--ok     { --bg: #f4fdf6; --bd: #bde6c8; --ink:#064e3b; }

.task__icon { color: var(--ink); opacity: .85; display:flex; align-items:center; justify-content:center; }
.task__content { min-width: 0; }
.task__title { color: var(--ink); font-weight: 600; line-height: 1.2; }
.task__meta  { color: #475569; display: flex; align-items: center; gap: .35rem; margin-top: .15rem; }
.task__meta .tag { display:inline-block; padding:.35rem .6rem; border-radius:10px; background:#eef2ff; color:#312e81; text-decoration:none; }
.task__meta .date { font-variant-numeric: tabular-nums; }
.task__action { margin: 0; }
.btn-quiet { background:#eef2ff; color:#0b3b5e; border:0; }
.btn-quiet:hover { filter: brightness(0.97); }
.dot { opacity:.4; }

/* Mobile Feinschliff */
@media (max-width: 640px){
  .task { grid-template-columns: 24px 1fr; grid-template-rows:auto auto; }
  .task__action { grid-column: 1 / -1; justify-self: end; margin-top: .35rem; }
}
.pill { display:inline-block; padding:.25rem .6rem; border-radius:999px; font-weight:600; font-size:.9rem; }
.pill--danger { background:#fee2e2; color:#991b1b; }
.pill--warn   { background:#fef3c7; color:#92400e; }
.pill--ok     { background:#dcfce7; color:#065f46; }

/* ==== Quickcheck scope ==== */
.qc .card { overflow: visible; }

/* ---------- Messwerte: Desktop = Tabelle, Mobil = stacked ---------- */
.qc .measure {
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0 1rem;
  font-size: .95rem;
}
.qc .measure th,
.qc .measure td {
  padding: .55rem .6rem;
  border-bottom: 1px solid #e6edf3;
  vertical-align: middle;
  white-space: nowrap;
}
.qc .measure th:first-child,
.qc .measure td:first-child { white-space: normal; }

/* Mobil: Head ausblenden, Zeilen als Karten anzeigen */
@media (max-width: 640px) {
  .qc .measure thead { display: none; }
  .qc .measure,
  .qc .measure tbody,
  .qc .measure tr,
  .qc .measure td { display: block; width: 100%; }
  .qc .measure tr {
    border: 1px solid #e6edf3;
    border-radius: 10px;
    background: #fafcff;
    padding: .5rem .6rem;
    margin-bottom: .5rem;
  }
  .qc .measure td {
    border: 0;
    padding: .35rem 0;
    white-space: normal;
  }
  /* Labels vor die Werte setzen (entspricht Spalten: Parameter | Letzte | Soll | Status) */
  .qc .measure td:nth-child(1)::before { content: "Parameter"; font-weight: 600; color: #334155; display: block; }
  .qc .measure td:nth-child(2)::before { content: "Letzte";    font-weight: 600; color: #334155; display: block; }
  .qc .measure td:nth-child(3)::before { content: "Soll";      font-weight: 600; color: #334155; display: block; }
  .qc .measure td:nth-child(4)::before { content: "Status";    font-weight: 600; color: #334155; display: block; }
}

/* Status-Pills kompakt & ruhig */
.qc .badge-ok{background:#e8f5e9;color:#1b5e20;border:1px solid #c8e6c9}
.qc .badge-warn{background:#fff6d8;color:#7a5b00;border:1px solid #f3e3a9}
.qc .badge-muted{background:#eef1f4;color:#4a5568;border:1px solid #d6dce3}
.qc .badge{padding:3px 10px;border-radius:999px;font-size:.82rem;line-height:1}

/* ---------- Konfliktliste: dezent & „kärtig“ ---------- */
.qc .conflicts { margin-top: 10px; }
.qc .conflicts .head { color:#64748b; font-size:.9rem; margin-bottom:.35rem; }
.qc .conflict-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qc .conflict-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: .5rem .6rem;
  border: 1px solid #e6ebf0;
  border-radius: 10px;
  background: #fafcff;
}
.qc .conflict-item .lvl {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.qc .lvl--warn  { background:#fff6d8; color:#7a5b00; border-color:#f3e3a9; }
.qc .lvl--bad   { background:#ffe0e0; color:#7a1a1a; border-color:#f1b8b8; }
.qc .lvl--info  { background:#eef1f4; color:#4a5568; border-color:#d6dce3; }

.qc .conflict-item .who {
  min-width: 0;
  color:#0b3a5d;
  text-decoration: underline;
}
.qc .conflict-item .who:hover { text-decoration: none; }

/* Grund(e) unter dem Link klein & leise */
.qc .conflict-item .reasons {
  grid-column: 1 / -1;
  margin: .25rem 0 0;
  padding-left: 1.15rem;
  color:#46566b;
  font-size: .92rem;
}
.qc .conflict-item .reasons li + li { margin-top: .15rem; }

/* ==== Quickcheck – responsive Parametertabelle ==== */
.qc .table-like{
  display:grid;
  grid-template-columns:minmax(90px,1fr) minmax(80px,1fr) minmax(120px,1fr) auto;
  gap:6px; align-items:center;
}
.qc .table-like .qc-head{ /* Kopfzeile */
  font-weight:600; color:#64748b;
}
.qc .table-like .qc-row{ /* Desktop: Zellen direkt in Grid einfügen */
  display:contents;
}

/* Status-Chip nie abschneiden */
.qc .qc-status .chip{
  white-space:normal;
  overflow:visible;
  text-overflow:unset;
}

/* ≤480px: Kartenlayout pro Parameterzeile */
@media (max-width:480px){
  .qc .table-like{ display:block; }              /* Grid aus */
  .qc .table-like .qc-head{ display:none; }      /* Kopf ausblenden */
  .qc .table-like .qc-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px 10px;
    padding:.5rem .6rem;
    margin-bottom:.5rem;
    border:1px solid #e6ebf0;
    border-radius:10px;
    background:#fafcff;
  }
  .qc .qc-param{ grid-column:1 / -1; }
  .qc .qc-last::before,
  .qc .qc-target::before{
    display:block; font-weight:600; color:#334155; margin-bottom:2px;
  }
  .qc .qc-last::before{ content:"Letzte"; }
  .qc .qc-target::before{ content:"Soll"; }
  .qc .qc-status{ grid-column:1 / -1; }         /* Chip volle Breite unten */
  .qc .qc-status .chip{
    display:inline-flex;
    max-width:100%;
    line-height:1.2;
    padding:.35rem .6rem;
    border-radius:999px;
  }
}
/* === CO₂-Blasenrechner scoped Layout === */
.co2-tool .co2-form {
  display: block !important;
  max-width: 700px;
  margin: 0 auto;
}

.co2-tool .row {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}
@media (min-width: 700px) {
  .co2-tool .row { grid-template-columns: 1fr 1fr; }
}

.co2-tool label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.co2-tool .input-with-unit {
  position: relative;
}
.co2-tool .input-with-unit input {
  padding-right: 72px;
}
.co2-tool .input-with-unit .unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9em;
  pointer-events: none;
}

.co2-tool small {
  color: #6a7f8e;
  font-size: 12px;
  line-height: 1.3;
}

.co2-tool h2 {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #445;
}

.co2-tool .actions {
  margin-top: 1rem;
}
/* CO2-Tool scoped overrides */
.co2-tool .co2-form{
  display:block !important;          /* bricht das globale form-Grid */
  grid-template-columns: unset !important;
}

.co2-tool .co2-form h2{
  margin:12px 0 6px;
  font-weight:600;
  font-size:1rem;
  color:#334155;
}

.co2-tool .row{
  display:grid;
  gap:16px;
}
@media (min-width:700px){
  .co2-tool .row{ grid-template-columns:1fr 1fr; }
}

/* Buttons-Reihe nicht in irgendeine Grid-Spalte zwingen */
.co2-tool .co2-form > .actions{
  grid-column:auto !important;
}
.co2-tool .co2-form{ display:grid; } /* falls das Grid bleiben MUSS */
.co2-tool .co2-form h2{
  grid-column:1 / -1;                /* Headline über beide Spalten */
  margin:12px 0 6px;
  font-weight:600;
  font-size:1rem;
  color:#334155;
}

/* Popover-Positionierung für Kohorten-Mehr-Menü */
.species-card { overflow: visible; } /* nur falls .card global hidden hat */
.more-actions { position: relative; }
.card-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5000; /* über Sticky-Bar (typ. 1100) */
  min-width: 240px;
}
.card-popover.is-up {
  top: auto;
  bottom: calc(100% + 6px);
}
.sticky-actions-bar { z-index: 1100; } /* Falls höher, Popover entsprechend anheben */

/* Quickcheck: farbige Zeilen statt Chips */
.qc .table-like .qc-row {
  border-radius: 8px;
  padding: 6px 8px;
  align-items: center;
}
.qc .table-like .qc-row + .qc-row { margin-top: 4px; }

/* Farben an aquariuminsider.de angelehnt, gute Lesbarkeit */
.qc .table-like .qc-row.qc-ok {
  background: #dff4d8; /* grünlich */
}
.qc .table-like .qc-row.qc-warn {
  background: #fff4cc; /* gelblich */
}
.qc .table-like .qc-row.qc-unknown {
  background: #eceff3; /* neutral/grau */
}

/* Spalten bleiben Grid-basiert (bestehendes Layout wird wiederverwendet) */
.qc .table-like {
  display: grid;
  grid-template-columns: 1fr 120px 140px; /* Parameter | Letzte | Soll */
  gap: 6px 10px;
}
.qc .table-like .qc-head { font-weight: 600; }
.qc .table-like .qc-param { }
.qc .table-like .qc-last,
.qc .table-like .qc-target { text-align: right; }
/* Quickcheck – Zeilen farbig + responsives Grid */
.qc .table-like { display: block; }

/* Desktop/Tablet: 3 Spalten */
.qc:not(.qc--cards) .table-like .qc-head-row,
.qc:not(.qc--cards) .table-like .qc-row {
  display: grid;
  grid-template-columns: 1fr 120px 140px; /* Parameter | Letzte | Soll */
  gap: 6px 10px;
  align-items: center;
}

.qc .table-like .qc-row {
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 4px;
}
.qc .table-like .qc-row.qc-ok      { background: #dff4d8; }  /* grünlich */
.qc .table-like .qc-row.qc-warn    { background: #fff4cc; }  /* gelblich */
.qc .table-like .qc-row.qc-unknown { background: #eceff3; }  /* neutral */

/* Zahlen rechtsbündig auf breiten Screens */
.qc .table-like .qc-last,
.qc .table-like .qc-target { text-align: right; }
/* --- Quickcheck: Card-Layout auf ALLEN Breakpoints, wenn .qc--cards gesetzt --- */
.qc.qc--cards .table-like { display: block !important; }
.qc.qc--cards .qc-head-row { display: none !important; }  /* Tabellenkopf aus */
.qc.qc--cards .qc-head { display: none !important; }

/* Zeilen als Card mit 2 Spalten: [Letzte] [Soll] unter Parameterzeile */
.qc.qc--cards .qc-row{
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  padding: .6rem .7rem;
  margin: .5rem 0;
  border: 1px solid #e6ebf0;
  border-radius: 10px;
  background: #fafcff;
}
.qc.qc--cards .qc-param { grid-column: 1 / -1; }

/* Labels wie mobil */
.qc.qc--cards .qc-last::before,
.qc.qc--cards .qc-target::before{
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
  font-size: 12px;
  line-height: 1.2;
}
.qc.qc--cards .qc-last::before   { content: "Letzte"; }
.qc.qc--cards .qc-target::before { content: "Soll"; }

/* Text linksbündig in den beiden Wert-Spalten */
.qc.qc--cards .qc-last,
.qc.qc--cards .qc-target { text-align: left !important; }

/* Farbcodierung pro Zeile (statt Chips) */
.qc.qc--cards .qc-row.qc-ok      { background: #dff4d8; }
.qc.qc--cards .qc-row.qc-warn    { background: #fff4cc; }
.qc.qc--cards .qc-row.qc-unknown { background: #eceff3; }

/* Status-Chip (falls vorhanden) nie abgeschnitten */
.qc.qc--cards .qc-status .chip{
  display: inline-flex;
  max-width: 100%;
  line-height: 1.2;
  padding: .35rem .6rem;
  border-radius: 999px;
}
/* === Quickcheck – Desktop-Override für Kartenlayout (scoped & sicher) === */
/* Erzwingt auf allen Breakpoints die mobile Box-Darstellung, wenn .qc--cards gesetzt ist */
.qc.qc--cards .table-like{ 
  display:block !important;           /* bricht evtl. frühere grid-Regeln */
}

/* Tabellenkopf komplett verstecken */
.qc.qc--cards .qc-head-row,
.qc.qc--cards .qc-head{
  display:none !important;
}

/* Zeilen als Card-Box */
.qc.qc--cards .qc-row{
  display:grid !important;
  grid-template-columns: 1fr 1fr;     /* [Letzte] [Soll] unter Parameter */
  gap: 6px 10px;
  padding: .6rem .7rem;
  margin: .5rem 0;
  border: 1px solid #e6ebf0;
  border-radius: 10px;
  background: #fafcff;
}

/* Erste Zelle (Parameter) über volle Breite */
.qc.qc--cards .qc-param{ grid-column: 1 / -1; }

/* Labels wie mobil */
.qc.qc--cards .qc-last::before,
.qc.qc--cards .qc-target::before{
  content: attr(data-label);
  display:block;
  font-weight:600;
  color:#334155;
  margin-bottom:2px;
  font-size:12px;
  line-height:1.2;
}
/* Fallback ohne data-label – feste Texte */
.qc.qc--cards .qc-last::before   { content: "Letzte"; }
.qc.qc--cards .qc-target::before { content: "Soll";   }

/* Werte linksbündig wie mobil */
.qc.qc--cards .qc-last,
.qc.qc--cards .qc-target{
  text-align: left !important;
}

/* Dezent farbige Hintergründe beibehalten */
.qc.qc--cards .qc-row.qc-ok      { background:#dff4d8; }
.qc.qc--cards .qc-row.qc-warn    { background:#fff4cc; }
.qc.qc--cards .qc-row.qc-unknown { background:#eceff3; }
/* === Quickcheck – Desktop-Override erzwingen (scoped) === */
.qc.qc--cards .table-like{ display:block !important; }

/* Tablehead sicher ausblenden (überstimmt frühere Regeln) */
.qc.qc--cards .qc-head-row,
.qc.qc--cards .qc-head { display:none !important; }

/* Zeilen als Card-Boxen */
.qc.qc--cards .qc-row{
  display:grid !important;
  grid-template-columns: 1fr 1fr;  /* [Letzte] [Soll] */
  gap:6px 10px;
  padding:.6rem .7rem;
  margin:.5rem 0;
  border:1px solid #e6ebf0;
  border-radius:10px;
  background:#fafcff;
}
.qc.qc--cards .qc-param{ grid-column:1 / -1; }

/* Labels über den Werten */
.qc.qc--cards .qc-last::before,
.qc.qc--cards .qc-target::before{
  display:block; font-weight:600; color:#334155; margin-bottom:2px; font-size:12px; line-height:1.2;
}
.qc.qc--cards .qc-last::before   { content:"Letzte"; }
.qc.qc--cards .qc-target::before { content:"Soll"; }

/* Werte linksbündig wie mobil */
.qc.qc--cards .qc-last,
.qc.qc--cards .qc-target{ text-align:left !important; }

/* optionale Farbhintergründe je Status */
.qc.qc--cards .qc-row.qc-ok      { background:#dff4d8; }
.qc.qc--cards .qc-row.qc-warn    { background:#fff4cc; }
.qc.qc--cards .qc-row.qc-unknown { background:#eceff3; }
 .qc.qc--cards .table-like{
   display:grid !important;
   grid-template-columns: 1fr;        /* Standard: mobil 1 Spalte */
   gap: 10px;                          /* Abstand zwischen den Boxen */
 }
 @media (min-width: 900px){
   .qc.qc--cards .table-like{
     grid-template-columns: repeat(2, minmax(280px, 1fr));  /* 2 Spalten */
   }
}
 @media (min-width: 1280px){
  .qc.qc--cards .table-like{
     grid-template-columns: repeat(3, minmax(260px, 1fr));  /* 3 Spalten */
   }
 }
 
/* ---------- Aufgaben / Reminder (mobil-first) ---------- */
.tasks-card { padding:14px; }
.task-list{ display:grid; gap:.5rem; margin:.25rem 0 0; padding:0; list-style:none; }
.task{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid var(--border,#e5e7eb);
  border-radius:12px;
  background:var(--panel,#fff);
}
.task-main{ display:grid; grid-template-columns:28px minmax(0,1fr); gap:10px; align-items:start; }
.task-icon{ width:28px; height:28px; display:grid; place-items:center; line-height:0; opacity:.9; }
.task-text{ min-width:0; }
.task-title{ font-weight:700; color:var(--text,#111827); line-height:1.25; }
.task-meta{ margin-top:2px; color:var(--muted,#667); font-size:.92rem; }
/* Desktop/Tablet: Aktionen rechts nebeneinander (Flex), keine Vollbreite */
.task-actions{ display:flex; align-items:center; gap:8px; justify-content:flex-end; }
.task-actions .btn{ min-height:38px; padding:.5rem .9rem; width:auto; min-width:120px; }
.task-actions form{ display:inline; }              /* Grid aus Formularen löschen */
.task-actions form .btn{ width:auto; }             /* Sicherheit */
@media (max-width: 640px){
  .task{ grid-template-columns:1fr; align-items:start; }
  .task-actions{ display:grid; grid-template-columns: 1fr 1fr; gap:8px; justify-content:unset; }
}
/* Tablet: Aktionen rechts nebeneinander, kompakt */
@media (min-width: 640px){
}
/* Desktop: Liste optional zweispaltig */
@media (min-width: 1024px){
  .task-list.cols-2{ grid-template-columns: 1fr 1fr; }
}
.task-actions form {
  all: unset;              /* entfernt alle globalen Form-Styles */
  display: inline-block;   /* verhindert grid- oder block-Verhalten */
}
.task-actions form button,
.task-actions form .btn {
  width: auto !important;  /* überstimmt width:100% */
  display: inline-block !important;
  min-width: 120px;
}
.task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 640px) {
  .task {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .task-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ==== TASKS – DESKTOP OVERRIDE (last wins) ==== */
@media (min-width: 641px){
  /* Aktionen rechts, keine Vollbreite */
  .task .task-actions{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
  }
  /* Formular nicht vom globalen form{display:grid} erben */
  .task .task-actions form{
    all: unset !important;
    display:inline-block !important;
    margin:0 !important;
  }
  /* Buttons kompakt */
  .task .task-actions .btn,
  .task .task-actions form .btn{
    width:auto !important;
    min-width:120px !important;
    padding:.5rem .9rem !important;
  }
  /* Zeile selbst: Text links, Aktionen rechts */
  .task{
    display:grid !important;
    grid-template-columns: 1fr auto !important;
    align-items:center !important;
    gap:10px !important;
  }
}
/* ==== DASHBOARD TASKS – DESKTOP FIX (scoped, highest specificity) ==== */
@media (min-width: 900px){
  /* 2 Spalten Liste */
  .tasks-card ul.task-list.cols-2{
    display:grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap:.75rem !important;
    list-style:none !important;
    padding-left:0 !important;
  }

  /* Item als Grid: [Icon+Text] [Actions] */
  .tasks-card ul.task-list.cols-2 > li.task{
    display:grid !important;
    grid-template-columns: 1fr auto !important;
    align-items:center !important;
    gap:.75rem !important;
    padding:.6rem .75rem !important;
    border:1px solid var(--border,#e5e7eb) !important;
    border-radius:12px !important;
    background:#fff !important;
  }

  /* Linke Seite (Icon+Text) immer zusammenhalten */
  .tasks-card ul.task-list.cols-2 > li.task .task-main{
    display:flex !important;
    gap:.6rem !important;
    align-items:center !important;
    min-width:0 !important;
  }
  .tasks-card ul.task-list.cols-2 > li.task .task-text{ min-width:0 !important; }
  .tasks-card ul.task-list.cols-2 > li.task .task-title{ font-weight:600 !important; }
  .tasks-card ul.task-list.cols-2 > li.task .task-meta{ color:#475569 !important; }

  /* Rechte Seite: Buttons nebeneinander, nicht vollbreit */
  .tasks-card ul.task-list.cols-2 > li.task .task-actions{
    display:flex !important;
    gap:.5rem !important;
    justify-content:flex-end !important;
  }
  .tasks-card ul.task-list.cols-2 > li.task .task-actions .btn{
    width:auto !important;
    min-width:120px !important;
  }
  .tasks-card ul.task-list.cols-2 > li.task .task-actions form{
    display:inline-block !important;
  }
}
/* ==== Aquarium-Index: Tasks (BEM-Variante) ==== */
.tasks-list { list-style:none; margin:.25rem 0 0; padding:0; display:grid; gap:.5rem; }
.tasks-list .task{
  display:grid; grid-template-columns: 1fr auto; align-items:center;
  gap:.75rem; padding:.6rem .75rem;
  border:1px solid var(--border,#e5e7eb); border-radius:12px; background:#fff;
}
.tasks-list .task__icon{ opacity:.85; }
.tasks-list .task__content{ min-width:0; }
.tasks-list .task__title{ font-weight:600; }
.tasks-list .task__meta{ color:#475569; display:flex; align-items:center; gap:.35rem; }

/* Actions rechts, Button nicht vollbreit */
.tasks-list .task__action{ display:inline-block; }
.tasks-list .task__action .btn{ width:auto; min-width:120px; padding:.5rem .9rem; }

/* Desktop: Liste in zwei Spalten */
@media (min-width: 900px){
  .tasks-list.cols-2{ display:grid; grid-template-columns:1fr 1fr; gap:.75rem; }
}




/* === Quickcheck: Free-Tier Teaser === */
.qc-teaser-wrap{
  position:relative;
}
/* Ergebnis-Lock-Hinweis */
.qc-teaser-result-locked{
  color:#64748b;
  padding:4px 0 2px;
}
/* Soll-Spalte: Wert geblurrt, nicht selektierbar */
.qc-soll-blur{
  filter:blur(4px);
  user-select:none;
  pointer-events:none;
  color:#374151;
}
/* CTA direkt unter dem Card */
.qc-teaser-cta{
  display:flex;
  justify-content:center;
  margin-top:10px;
}
.qc-teaser-cta-inner{
  text-align:center;
  background:#fff;
  border:1px solid var(--border,#e5e7eb);
  border-radius:14px;
  padding:16px 22px;
  box-shadow:0 4px 20px rgba(16,24,40,.09);
  max-width:420px;
  width:100%;
}

/* === Besatzplaner: Free-Tier Teaser === */
.sp-chip-blur{
  filter:blur(4px);
  user-select:none;
  pointer-events:none;
}
.sp-teaser-cta{
  display:flex;
  align-items:center;
  gap:.75rem;
  flex-wrap:wrap;
}
