/* =================================================================
   mail_seite.css — eigene Bausteine der Seite mail.php (Mailversand)
   Akzent Orange: #c2410c (Kontrast auf Weiß 5,2:1), Text #9a3412 (7,3:1).
   Alles unter #container, nur logische Eigenschaften (RTL-tauglich).
   ================================================================= */
#container { --ml: #c2410c; --ml-t: #9a3412; --ml-l: #fff7ed; --ml-b: #fed7aa; }
#container .t-ml { --c: #c2410c; --ct: #9a3412; --cl: #fff7ed; --cb: #fed7aa; }
#container .ml-t { color: var(--ml-t); }
#container .ml-acc { color: var(--ml); }
#container .ml-ic { background: var(--ml-l) !important; color: var(--ml) !important; }
#container .ml-h4 { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 1.02rem; margin-bottom: 3px; line-height: 1.3; }
#container .hero h1 { overflow-wrap: break-word; hyphens: auto; }

/* ---------- Hero: Versandprotokoll ---------- */
#container .ml-hv { position: relative; padding-block: 30px 40px; }
#container .ml-log { max-width: 600px; margin-inline: auto; }
#container .ml-log-in { padding: 12px 14px 14px; display: grid; gap: 7px; font-size: 0.72rem; color: #1d1d1f; }
#container .ml-log-top { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
#container .ml-log-top .sr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; border: 1px solid #e3e5ea; border-radius: 9px; padding: 6px 9px; color: #86868b; font-size: 0.64rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#container .ml-log-top .kpi { display: flex; align-items: baseline; gap: 6px; font-size: 0.62rem; color: #86868b; white-space: nowrap; }
#container .ml-log-top .kpi b { font-family: 'Roboto Serif', serif; font-size: 1.2rem; color: var(--ml-t); font-weight: 600; }
#container .ml-lr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; border: 1px solid #ececf0; border-radius: 11px; padding: 8px 10px; }
#container .ml-lr .ic { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #f1f2f5; color: #515154; }
#container .ml-lr.s-ok .ic { background: var(--vk-pay-l, #ecfdf3); color: var(--vk-pay-t, #166534); }
#container .ml-lr.s-wait .ic { background: #fffbeb; color: #92400e; }
#container .ml-lr.s-fail .ic { background: #fdecec; color: #b42323; }
#container .ml-lr b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#container .ml-lr small { display: block; color: #86868b; font-size: 0.62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#container .ml-lr .st { font-size: 0.6rem; border-radius: 50px; padding: 2px 8px; background: #f1f2f5; color: #515154; white-space: nowrap; }
#container .ml-lr.s-ok .st { background: #dcfce7; color: #166534; }
#container .ml-lr.s-wait .st { background: #fef3c7; color: #92400e; }
#container .ml-lr.s-fail .st { background: #fee2e2; color: #991b1b; }
#container .ml-lr em { font-style: normal; font-size: 0.62rem; color: #86868b; }
#container .ml-toast-a { inset-inline-start: -3%; bottom: 0; }
#container .ml-toast-b { inset-inline-end: -2%; top: 0; animation-delay: -3s; }

/* ---------- Fenster „Mail-Konto einrichten“ ---------- */
#container .ml-dlg { max-width: 540px; margin-inline: auto; }
#container .ml-dlg-body { padding: 14px 16px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; font-size: 0.74rem; color: #1d1d1f; }
#container .ml-dlg-body .wide { grid-column: 1 / -1; }
#container .ml-f { display: grid; gap: 3px; min-width: 0; }
#container .ml-f label { font-size: 0.62rem; color: #86868b; font-weight: 500; margin: 0; padding: 0; display: block; line-height: 1.3; }
#container .ml-f .in { border: 1px solid #e3e5ea; border-radius: 8px; padding: 6px 9px; background: #fff; display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
#container .ml-f .in .rs-ico { color: var(--ml); flex-shrink: 0; }
#container .ml-chk { display: flex; align-items: center; gap: 8px; font-size: 0.68rem; line-height: 1.35; }
#container .ml-chk i { width: 15px; height: 15px; border-radius: 4px; background: var(--ml); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
#container .ml-ok { display: flex; gap: 7px; align-items: center; background: #ecfdf3; color: #166534; border-radius: 9px; padding: 8px 10px; font-size: 0.7rem; }
#container .ml-dlg-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#container .ml-dlg-foot span { display: inline-flex; align-items: center; gap: 5px; border-radius: 9px; padding: 7px 12px; font-weight: 500; font-size: 0.7rem; }
#container .ml-dlg-foot .pri { background: var(--ml); color: #fff; }
#container .ml-dlg-foot .ghost { box-shadow: 0 0 0 1px #e3e5ea; color: #515154; }

/* ---------- Zuordnung ---------- */
#container .ml-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
#container .ml-zu { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
#container .ml-zt { padding: 6px 18px 12px; font-size: 0.82rem; }
#container .ml-zt .h, #container .ml-zt .r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f2f2f5; }
#container .ml-zt .h { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .05em; color: #86868b; font-weight: 600; }
#container .ml-zt .r:last-child { border-bottom: 0; }
#container .ml-zt .r > span:first-child { color: #1d1d1f; font-weight: 500; }
#container .ml-zt .sel { display: flex; align-items: center; gap: 6px; border: 1px solid #e3e5ea; border-radius: 8px; padding: 6px 9px; font-size: 0.74rem; min-width: 0; overflow-wrap: anywhere; }
#container .ml-zt .sel .rs-ico { color: var(--ml); flex-shrink: 0; }
#container .ml-zt .sel.muted { color: #86868b; font-style: italic; }
#container .ml-top { border-top: 3px solid var(--ml); }
#container .ml-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
#container .ml-tags span { font-size: 0.74rem; background: #f5f5f7; color: #515154; border-radius: 50px; padding: 3px 10px; }
#container .ml-note { margin-top: 14px !important; font-size: 0.84rem !important; color: var(--ml-t) !important; }

/* ---------- Gestaltung ---------- */
#container .ml-vorl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
#container .ml-vorl span { font-size: 0.76rem; padding: 6px 12px; border-radius: 50px; border: 1px solid #e3e5ea; background: #fff; color: #515154; }
#container .ml-vorl span.on { background: var(--ml); border-color: var(--ml); color: #fff; font-weight: 500; }
#container .ml-mail { max-width: 520px; margin-inline: auto; }
#container .ml-mail-in { background: #f3f4f6; padding: 16px; font-size: 0.76rem; color: #1d1d1f; }
#container .ml-mail-in .logo { display: flex; align-items: center; gap: 8px; background: #fff; padding: 12px 16px; border-radius: 10px 10px 0 0; }
#container .ml-mail-in .mk { width: 28px; height: 28px; border-radius: 7px; background: var(--ml); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.66rem; }
#container .ml-mail-in .band { background: var(--ml); color: #fff; padding: 10px 16px; font-weight: 500; }
#container .ml-mail-in .txt { background: #fff; padding: 16px; display: grid; gap: 8px; line-height: 1.5; }
#container .ml-mail-in .txt p { font-size: 0.76rem; color: #1d1d1f; margin: 0; }
#container .ml-mail-in .sig { color: #515154 !important; font-style: italic; }
#container .ml-mail-in .att { justify-self: start; display: inline-flex; gap: 6px; align-items: center; border: 1px dashed #c9cdd6; border-radius: 8px; padding: 5px 9px; font-size: 0.68rem; color: #515154; }
#container .ml-mail-in .fuss { background: #e5e7eb; color: #515154; padding: 10px 16px; font-size: 0.64rem; line-height: 1.5; border-radius: 0 0 10px 10px; }

/* ---------- Protokoll (dunkel) ---------- */
#container .ml-dark { background: #2a1006; }
#container .ml-dark h2 { color: #fff; }
#container .ml-dark .section-intro p { color: rgba(255,255,255,0.68); }
#container .ml-t2 { color: #fdba74; }
#container .ml-steps { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0 0 36px; padding: 0; position: relative; }
#container .ml-steps::before { content: ""; position: absolute; inset-inline: 8%; top: 18px; height: 2px; background: repeating-linear-gradient(90deg, rgba(253,186,116,0.5) 0 6px, transparent 6px 11px); }
#container .ml-steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; }
#container .ml-steps .n { width: 38px; height: 38px; border-radius: 50%; background: #2a1006; box-shadow: 0 0 0 2px #fdba74; color: #fdba74; display: flex; align-items: center; justify-content: center; font-weight: 600; margin-bottom: 6px; }
#container .ml-steps .first .n { background: #fdba74; color: #2a1006; }
#container .ml-steps b { color: #fff; font-weight: 500; font-size: 0.95rem; }
#container .ml-steps small { color: rgba(255,255,255,0.6); font-size: 0.76rem; }
#container .ml-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#container .ml-feat { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); border-radius: 20px; padding: 22px; }
#container .ml-feat .fi { width: 42px; height: 42px; border-radius: 12px; background: rgba(253,186,116,0.13); color: #fdba74; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
#container .ml-feat h3 { color: #fff; font-size: 1.08rem; margin-bottom: 6px; }
#container .ml-feat p { color: rgba(255,255,255,0.64); font-size: 0.88rem; }
#container .ml-status { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; justify-content: center; }
#container .ml-status b { color: #fff; font-weight: 500; font-size: 0.9rem; margin-inline-end: 6px; }
#container .ml-status span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 50px; padding: 4px 11px; }
#container .ml-status i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
#container .ml-status .s-ok i { background: #4ade80; } #container .ml-status .s-wait i { background: #fbbf24; } #container .ml-status .s-fail i { background: #f87171; }
#container .ml-status small { flex-basis: 100%; text-align: center; color: rgba(255,255,255,0.55); font-size: 0.8rem; margin-top: 4px; }

/* ---------- Bereiche, Abschluss ---------- */
#container .ml-rel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#container .ml-cta { background: linear-gradient(135deg, #431407 0%, #9a3412 55%, #c2410c 100%); }
#container .ml-cta h2 span { color: #fed7aa; }

/* ---------- Breiten ---------- */
@media (max-width: 1100px) {
    #container .ml-feats, #container .ml-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #container .ml-zu { grid-template-columns: minmax(0, 1fr); }
    #container .ml-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
    #container .ml-steps::before { display: none; }
}
@media (max-width: 820px) {
    #container .ml-three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
    #container .ml-toast-a { inset-inline-start: 0; }
    #container .ml-toast-b { inset-inline-end: 0; }
}
@media (max-width: 520px) {
    #container .ml-feats, #container .ml-rel, #container .ml-dlg-body { grid-template-columns: minmax(0, 1fr); }
    #container .ml-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #container .ml-lr { grid-template-columns: 28px minmax(0, 1fr) auto; }
    #container .ml-lr em { display: none; }
    #container .ml-log-top .kpi { display: none; }
    #container .ml-zt .h, #container .ml-zt .r { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    #container .vk-toast { animation: none; }
}
