/* Dateipfad: assets/css/bi-tools.css
   Tools (Runde 19): Leiste «Speichern» (tls-…), Übersicht /tools und Karten (tl-…), «Meine Tools» (mt-…).
   Grundbausteine der Tool-Seiten (rgt-hero, rgt-panel, rgt-btn …) stehen in assets/css/bi-ratgeber.css.
   Farben über die Variablen der Seite (hell & dunkel). */

/* =========================================================================
   1. LEISTE «SPEICHERN» (includes/tools/tools.php › bi_tl_save_bar, assets/js/bi-tools.js)
   ========================================================================= */
.tls-bar {
    display: none;
    align-items: center;
    gap: 14px;
    margin: 18px 0 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--bg-card, #ffffff);
    border: 1.5px dashed color-mix(in srgb, var(--c, #2771c8) 40%, var(--border-color, #e2e8f0));
}
.tls-bar.is-ready { display: flex; }
.tls-ic {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c, #2771c8);
    background: color-mix(in srgb, var(--c, #2771c8) 12%, transparent);
}
.tls-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.tls-tx b { font-size: 0.95rem; font-weight: 800; color: var(--text-main, #0f172a); }
.tls-tx small { font-size: 0.82rem; line-height: 1.45; color: var(--text-muted, #64748b); overflow-wrap: anywhere; }
.tls-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; }
.tls-acts .rgt-btn { padding: 10px 16px; font-size: 0.9rem; box-shadow: none; }
.tls-acts .rgt-btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }
/* «Als neu speichern» / «Meine Tools»: kleine Knöpfe mit Rahmen in der Farbe des Tools (Runde 25, vorher reine Text-Links) */
.tls-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    border: 1.5px solid color-mix(in srgb, var(--c, #2771c8) 38%, var(--border-color, #e2e8f0));
    border-radius: 999px;
    padding: 8px 14px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--c, var(--primary-color, #2771c8));
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.tls-link:hover, .tls-link:focus-visible {
    background: color-mix(in srgb, var(--c, #2771c8) 9%, transparent);
    border-color: color-mix(in srgb, var(--c, #2771c8) 60%, var(--border-color, #e2e8f0));
    text-decoration: none;
}
.tls-link i { font-size: 0.85em; }
.tls-link[hidden] { display: none; }
@media (max-width: 620px) {
    .tls-bar.is-ready { flex-wrap: wrap; }
    .tls-acts { width: 100%; justify-content: flex-start; gap: 8px; }
    .tls-acts .rgt-btn { flex: 1 1 100%; }
    .tls-acts .tls-link { flex: 1 1 0; min-width: 0; padding: 10px 12px; }
}

/* Fenster «Ergebnis speichern» / «Speichern mit Konto» (BZ.sheet) */
.tls-form { display: grid; gap: 8px; margin-bottom: 6px; }
.tls-lbl { font-size: 0.8rem; font-weight: 800; color: var(--text-main, #0f172a); }
.tls-in {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
}
.tls-in:focus { outline: none; border-color: var(--primary-color, #2771c8); }
.tls-sum { margin: 2px 0 0; font-size: 0.84rem; color: var(--text-muted, #64748b); line-height: 1.45; }
.tls-sum i { color: var(--primary-color, #2771c8); }
.tls-p { margin: 0 0 10px; font-size: 0.92rem; line-height: 1.55; color: var(--text-main, #0f172a); }
.tls-muted { color: var(--text-muted, #64748b); font-size: 0.84rem; }

/* =========================================================================
   2. TOOL-KARTEN (Übersicht /tools, Ratgeber-Leiste)
   ========================================================================= */
.tl-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}
@media (min-width: 640px) { .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .tl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tl-card { position: relative; }
.tl-new {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--c, #2771c8);
}
.tl-hero .rg-badge i { color: var(--c, #2771c8); }

/* Druck: alles mit .rg-no-print / .tls-bar ausblenden */
@media print {
    .tls-bar, .tl-strip { display: none !important; }
}

/* =========================================================================
   3. ÜBERSICHT /tools (tools.php): Einstieg, Gruppen, «Speichern mit Konto», Ratgeber-Text (tlo-…)
   Karten: .rgw-card.tl-card (Abschnitt 2 und bi-ratgeber.css)
   ========================================================================= */
.tlo-intro { max-width: 760px; margin: 0 auto 46px; padding: 0 16px; text-align: center; }
.tlo-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 16px; }
.tlo-intro p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--text-muted, #64748b); }
.tlo-group { margin-bottom: 52px; }
.tlo-head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.tlo-head-ic {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--c, #2771c8);
    background: color-mix(in srgb, var(--c, #2771c8) 12%, transparent);
}
.tlo-head-tx { min-width: 0; flex: 1; }
.tlo-head h2 {
    margin: 0 0 3px;
    font-size: var(--fs-abschnitt, clamp(1.3rem, 3.6vw, 1.7rem)); font-family: var(--font-titel, inherit);
    font-weight: var(--fw-titel, 900);
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--text-main, #0f172a);
}
.tlo-head p { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--text-muted, #64748b); }
.tlo-head-n {
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--c, #2771c8);
    background: color-mix(in srgb, var(--c, #2771c8) 10%, transparent);
}
/* Schild «Neu» oben rechts nicht über dem Titel (Karte quer; ab 1100px steht das Symbol oben) */
.tl-card.is-new .rgw-tx { padding-right: 40px; }
@media (min-width: 1100px) { .tl-card.is-new .rgw-tx { padding-right: 0; } }
@media (max-width: 560px) {
    .tlo-head { align-items: flex-start; }
    .tlo-head-n { display: none; }
}

/* Speichern mit Konto (#speichern) */
.tlo-save { margin-bottom: 60px; }
.tlo-save-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 26px 20px 22px;
    position: relative;
    overflow: hidden;
}
.tlo-save-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed, #2771c8, #0d9488);
}
.tlo-save-badge { --c: #7c3aed; color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); border-color: color-mix(in srgb, var(--c) 25%, transparent); }
.tlo-save h2 {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 3.8vw, 1.8rem);
    font-weight: 900;
    letter-spacing: -0.4px;
    line-height: 1.2;
    color: var(--text-main, #0f172a);
}
.tlo-save-lead { margin: 0 0 18px; font-size: 0.95rem; line-height: 1.6; color: var(--text-muted, #64748b); }
.tlo-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tlo-steps li { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.tlo-step-ic {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
}
.tlo-steps li > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 0.86rem; line-height: 1.45; color: var(--text-muted, #64748b); }
.tlo-steps b { font-size: 0.92rem; color: var(--text-main, #0f172a); }
.tlo-save-note { display: flex; gap: 8px; margin: 16px 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--text-muted, #64748b); }
.tlo-save-note i { color: #0891b2; margin-top: 3px; }
.tlo-save-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    min-width: 0;
}
.tlo-save-side .btn { width: 100%; }
.tlo-slots { margin: 0; font-size: 0.9rem; color: var(--text-muted, #64748b); }
.tlo-slots strong { display: block; font-size: 1.6rem; font-weight: 900; letter-spacing: -0.5px; line-height: 1.2; color: var(--text-main, #0f172a); }
.tlo-meter { display: block; height: 8px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--text-muted, #64748b) 18%, transparent); }
.tlo-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c3aed, #2771c8); }
.tlo-meter.is-full span { background: #f59e0b; }
.tlo-slots-note { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--text-muted, #64748b); }
.tlo-slots-note.is-warn { padding: 10px 12px; border-radius: 12px; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); color: var(--text-main, #0f172a); }
@media (min-width: 820px) {
    .tlo-save-card { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 30px; padding: 32px 30px 30px; }
    .tlo-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tlo-steps li { flex-direction: column; gap: 8px; }
}

/* Ratgeber-Text */
.tlo-art { padding: 24px 20px; }
.tlo-art h2 { text-align: left; margin: 0 0 10px; color: var(--text-main, #0f172a); }
.tlo-art h3 { font-size: 1.08rem; font-weight: 900; margin: 22px 0 6px; color: var(--text-main, #0f172a); }
.tlo-art p { margin: 0 0 10px; font-size: 0.95rem; line-height: 1.7; color: var(--text-main, #0f172a); }
.tlo-art .tlo-art-more { margin: 18px 0 0; }
@media (min-width: 720px) { .tlo-art { padding: 32px 36px; } }

/* =========================================================================
   4. MEINE TOOLS (meine_tools.php, mt-…) – gespeicherte Ergebnisse: öffnen, umbenennen, löschen
   ========================================================================= */
.mt-wrap { max-width: var(--container-wide-width, 1140px); width: 100%; margin: 0 auto; padding: 40px 4% 85px; box-sizing: border-box; }
.mt-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.mt-head > div { min-width: 0; }
.mt-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; color: var(--text-main, #0f172a); }
.mt-title i { color: #7c3aed; }
.mt-sub { margin: 8px 0 0; max-width: 640px; font-size: 0.95rem; line-height: 1.5; color: var(--text-muted, #64748b); }
.mt-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-main, #0f172a);
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
}
.mt-back:hover { border-color: var(--primary-color, #2771c8); }
.mt-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 28px;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--bg-card, #ffffff);
    border: 1px dashed var(--border-color, #e2e8f0);
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted, #64748b);
}
.mt-note i { color: #7c3aed; margin-top: 3px; }
.mt-note b { color: var(--text-main, #0f172a); }
.mt-note.is-warn { border-style: solid; border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); color: var(--text-main, #0f172a); }
.mt-note.is-warn i { color: #d97706; }
.mt-h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.15rem; font-weight: 900; color: var(--text-main, #0f172a); }
.mt-count { font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--bg-body, #f1f5f9); border: 1px solid var(--border-color, #e2e8f0); color: var(--text-muted, #64748b); }
.mt-more { margin: -4px 0 14px; font-size: 0.86rem; color: var(--text-muted, #64748b); }
.mt-more i { color: #7c3aed; margin-right: 4px; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-bottom: 34px; }
.mt-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 18px;
    border-radius: 22px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.mt-card.is-busy { opacity: 0.55; pointer-events: none; }
.mt-card.is-gone { opacity: 0; transform: scale(0.97); }
.mt-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mt-top > div { min-width: 0; }
.mt-ic {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--mt-c, #2771c8);
    background: color-mix(in srgb, var(--mt-c, #2771c8) 12%, transparent);
}
.mt-kind { display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--mt-c, #2771c8); }
.mt-card-title { margin: 2px 0 0; font-size: 1.05rem; font-weight: 800; line-height: 1.3; color: var(--text-main, #0f172a); overflow-wrap: anywhere; }
.mt-sum { margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--text-muted, #64748b); overflow-wrap: anywhere; }
.mt-date { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.78rem; color: var(--text-muted, #64748b); }
.mt-gone-note { margin: 0; font-size: 0.8rem; line-height: 1.45; color: var(--text-muted, #64748b); font-style: italic; }
.mt-acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: auto; padding-top: 4px; }
.mt-acts .btn { min-width: 0; padding: 10px 12px; }
.mt-acts .mt-open { grid-column: 1 / -1; }
.mt-acts .mt-del:hover { color: #e11d48; border-color: #e11d48; }
.mt-empty {
    margin-bottom: 34px;
    padding: 34px 20px;
    text-align: center;
    border-radius: 22px;
    background: var(--bg-card, #ffffff);
    border: 1px dashed var(--border-color, #e2e8f0);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted, #64748b);
}
.mt-empty i { display: block; margin-bottom: 10px; font-size: 2rem; color: #7c3aed; }
.mt-empty b { display: block; margin-bottom: 4px; font-size: 1.05rem; color: var(--text-main, #0f172a); }
.mt-empty .btn { margin-top: 14px; }
.mt-empty[hidden] { display: none; }
.mt-start { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; margin-bottom: 30px; }
.mt-start-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-main, #0f172a);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.mt-start-card:hover { transform: translateY(-2px); border-color: var(--mt-c, #2771c8); }
.mt-start-card .mt-ic { width: 40px; height: 40px; border-radius: 12px; font-size: 1rem; }
.mt-start-card b { flex: 1; min-width: 0; font-size: 0.92rem; line-height: 1.3; }
.mt-start-card > i { color: var(--mt-c, #2771c8); font-size: 0.85rem; }
.mt-form { display: grid; gap: 8px; margin-bottom: 6px; }
@media (max-width: 600px) {
    .mt-wrap { padding: 24px 16px 60px; }
    .mt-back { width: 100%; justify-content: center; }
}
