/* =================================================================
   signatur.css — eigene Bausteine der Seite signatur.php
   Akzent Indigo: #4f46e5 (Kontrast auf Weiß 6,3:1), Text #4338ca (7,9:1).
   Alles unter #container, nur logische Eigenschaften (RTL-tauglich).
   ================================================================= */
#container { --sig: #4f46e5; --sig-t: #4338ca; --sig-l: #eef2ff; --sig-b: #c7d2fe;
             --kal: #0e7490; --kal-t: #155e75; --kal-l: #ecfeff; --kal-b: #a5f3fc; }
#container .t-sig { --c: var(--sig); --ct: var(--sig-t); --cl: var(--sig-l); --cb: var(--sig-b); }
#container .t-kal { --c: var(--kal); --ct: var(--kal-t); --cl: var(--kal-l); --cb: var(--kal-b); }
#container .sg-t { color: var(--sig-t); }
#container .sg-acc { color: var(--sig); }
#container .sg-ic { background: var(--sig-l) !important; color: var(--sig) !important; }
#container .sg-h4 { font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 1.02rem; margin-bottom: 3px; line-height: 1.3; }
#container .vk-st .sg-h4 { font-size: 0.95rem; margin: 3px 0 5px; }
#container .hero h1 { overflow-wrap: break-word; hyphens: auto; }
#container .hero h1 span { color: var(--sig); }
#container .sg-top { border-top: 3px solid var(--sig); }

/* ---------- Hero: Dokument mit Unterschriftsfeldern ---------- */
#container .sg-hv { position: relative; padding-block: 24px 34px; }
#container .sg-doc { max-width: 430px; margin-inline: auto; background: #fff; border-radius: 14px; padding: clamp(20px, 3vw, 30px); box-shadow: 0 30px 80px rgba(30,27,75,0.16), 0 0 0 1px rgba(0,0,0,0.05); position: relative; color: #1d1d1f; }
#container .sg-doc::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; border-start-start-radius: 14px; border-start-end-radius: 14px; background: var(--sig); }
#container .sg-doc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
#container .sg-doc-head .i-logo { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 600; color: #515154; }
#container .sg-doc-head .i-logo i { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, var(--sig), #818cf8); display: block; }
#container .sg-doc-title { font-family: 'Roboto Serif', serif; font-size: 1.15rem; font-weight: 600; margin: 0 0 2px; color: #1d1d1f; }
#container .sg-doc-sub { font-size: 0.68rem; color: #86868b; margin-bottom: 14px; }
#container .sg-par { display: block; font-size: 0.66rem; font-weight: 600; color: #515154; margin: 10px 0 5px; }
#container .sg-line { display: block; height: 6px; border-radius: 4px; background: #eef0f4; margin-bottom: 5px; }
#container .sg-line.s { width: 62%; }
#container .sg-check { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 0.66rem; color: #515154; }
#container .sg-check i { width: 15px; height: 15px; border-radius: 4px; background: var(--sig); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
#container .sg-sign { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
#container .sg-field { border-radius: 10px; padding: 8px 10px; min-height: 84px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; }
#container .sg-field small { font-size: 0.6rem; color: #6e6e73; border-top: 1px solid #d2d6de; padding-top: 4px; overflow-wrap: anywhere; }
#container .sg-field em { font-style: normal; font-size: 0.58rem; color: #86868b; }
#container .sg-field.done { background: #fafaff; }
#container .sg-field.done .sg-kritzel { color: #1e1b4b; width: 100%; max-width: 160px; height: auto; margin-bottom: 2px; }
#container .sg-field.todo { background: var(--sig-l); box-shadow: inset 0 0 0 1.5px var(--sig); border: 0; position: relative; }
#container .sg-field.todo .here { margin-bottom: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; background: var(--sig); color: #fff; border-radius: 6px; padding: 3px 8px; font-size: 0.62rem; font-weight: 600; animation: sg-puls 2.4s ease-in-out infinite; }
#container .sg-field.todo small { border-top-color: var(--sig-b); color: var(--sig-t); }
#container .sg-doc-foot { margin-top: 14px; padding-top: 8px; border-top: 1px dashed #e3e5ea; font-size: 0.56rem; color: #86868b; font-family: 'Courier New', monospace; overflow-wrap: anywhere; }
#container .sg-toast-a { inset-inline-start: -4%; top: 47%; }
#container .sg-toast-b { inset-inline-end: -2%; top: 4%; animation-delay: -3s; }
@keyframes sg-puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0.35); } 50% { box-shadow: 0 0 0 6px rgba(79,70,229,0); } }

/* ---------- Ablauf: fünf Schritte ---------- */
#container .vk-story.s5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: clamp(50px, 6vw, 80px); }

/* ---------- Fenster „Dokument senden“ ---------- */
#container .sg-send { max-width: 640px; margin-inline: auto; }
#container .sg-tabs button.on { border-bottom-color: var(--sig); }
#container .sg-num { width: 18px; height: 18px; border-radius: 50%; background: #f0f1f4; color: #6e6e73; font-size: 0.62rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
#container .sg-tabs button.on .sg-num { background: var(--sig); color: #fff; }
#container .sg-send-body { padding: 14px 16px 16px; display: grid; gap: 8px; font-size: 0.74rem; color: #1d1d1f; }
#container .sg-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-bottom: 10px; border-bottom: 1px solid #f2f2f5; }
#container .sg-order .lab { font-size: 0.66rem; color: #86868b; font-weight: 500; }
#container .sg-order .seg { display: inline-flex; border: 1px solid #e3e5ea; border-radius: 8px; overflow: hidden; font-size: 0.66rem; }
#container .sg-order .seg > * { padding: 5px 10px; color: #515154; }
#container .sg-order .seg b { background: var(--sig); color: #fff; font-weight: 500; }
#container .sg-order small { flex-basis: 100%; font-size: 0.64rem; color: #86868b; }
#container .sg-rcp { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid #ececf0; border-radius: 10px; padding: 7px 10px; background: #fff; }
#container .sg-rcp .nr { width: 22px; height: 22px; border-radius: 50%; background: var(--sig-l); color: var(--sig-t); font-size: 0.64rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
#container .sg-rcp .sg-who { min-width: 0; }
#container .sg-rcp .sg-who b { display: block; font-weight: 500; font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#container .sg-rcp .sg-who small { display: block; font-size: 0.62rem; color: #86868b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#container .sg-rcp .role { display: inline-flex; align-items: center; gap: 5px; border-radius: 50px; padding: 3px 9px; font-size: 0.64rem; font-weight: 500; white-space: nowrap; }
#container .sg-rcp .r-unterschreibt { background: var(--sig-l); color: var(--sig-t); border: 1px solid var(--sig-b); }
#container .sg-rcp .r-genehmigt { background: var(--vk-del-l); color: var(--vk-del-t); border: 1px solid var(--vk-del-b); }
#container .sg-rcp .r-kopie { background: #f5f5f7; color: #515154; border: 1px solid #e3e5ea; }
#container .sg-add { display: inline-flex; align-items: center; gap: 6px; color: var(--sig-t); font-weight: 500; font-size: 0.7rem; padding: 4px 2px; }
#container .sg-opts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid #f2f2f5; }
#container .sg-opts span { display: inline-flex; align-items: center; gap: 5px; background: #f7f7f9; color: #515154; border-radius: 8px; padding: 4px 9px; font-size: 0.66rem; }
#container .sg-opts span b { font-weight: 600; color: #1d1d1f; }
#container .sg-opts span.on { background: var(--sig-l); color: var(--sig-t); }
#container .sg-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
#container .sg-foot span { display: inline-flex; align-items: center; gap: 6px; border-radius: 9px; padding: 7px 14px; font-weight: 500; font-size: 0.72rem; }
#container .sg-foot .pri { background: var(--sig); color: #fff; }
#container .sg-foot .ghost { box-shadow: 0 0 0 1px #e3e5ea; color: #515154; }

/* ---------- Telefone: Unterschreiben ---------- */
#container .sg-ph-dok { display: flex; align-items: center; gap: 8px; color: var(--sig); }
#container .sg-ph-dok span { min-width: 0; flex: 1; }
#container .sg-ph-dok b { display: block; font-size: 0.68rem; color: #1d1d1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#container .sg-ph-dok small { display: block; font-size: 0.58rem; color: #86868b; }
#container .sg-ph-dok em { font-style: normal; font-size: 0.58rem; color: var(--sig-t); font-weight: 600; white-space: nowrap; }
#container .sg-ph-tabs { display: flex; border: 1px solid #e3e5ea; border-radius: 8px; overflow: hidden; font-size: 0.6rem; }
#container .sg-ph-tabs > * { flex: 1; text-align: center; padding: 5px 2px; color: #515154; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#container .sg-ph-tabs b { background: var(--sig); color: #fff; font-weight: 500; }
#container .sg-ph-pad { background: #fff; border: 1.5px dashed var(--sig-b); border-radius: 10px; padding: 8px 10px; color: #1e1b4b; position: relative; }
#container .sg-ph-pad .sg-kritzel { width: 100%; height: 46px; display: block; }
#container .sg-ph-note { font-size: 0.56rem; color: #6e6e73; line-height: 1.35; }
#container .sg-ph-code { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 14px 10px; }
#container .sg-ph-code .lock { width: 44px; height: 44px; border-radius: 50%; background: var(--sig-l); color: var(--sig); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
#container .sg-ph-code b { font-size: 0.76rem; }
#container .sg-ph-code span { font-size: 0.6rem; color: #6e6e73; line-height: 1.35; }
#container .sg-ph-code .digits { display: flex; gap: 4px; margin-top: 8px; direction: ltr; }
#container .sg-ph-code .digits i { font-style: normal; width: 22px; height: 28px; border-radius: 6px; border: 1px solid #d2d6de; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.78rem; color: #1d1d1f; }
#container .sg-ph-code .digits i:last-child { border-color: var(--sig); box-shadow: 0 0 0 2px var(--sig-l); }
#container .sg-ph-bet { display: grid; gap: 6px; }
#container .sg-ph-bet small { font-size: 0.56rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #86868b; }
#container .sg-ph-bet span { display: flex; align-items: center; gap: 7px; font-size: 0.64rem; color: #1d1d1f; min-width: 0; }
#container .sg-ph-bet i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #d2d6de; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
#container .sg-ph-bet i.ok { background: var(--vk-pay-t); border-color: var(--vk-pay-t); color: #fff; }
#container .sg-ph-bet i.me { border-color: var(--sig); box-shadow: inset 0 0 0 3px #fff; background: var(--sig); }
#container .sg-ph-bet em { font-style: normal; margin-inline-start: auto; font-size: 0.56rem; color: #86868b; white-space: nowrap; }

/* ---------- Vorgänge ---------- */
#container .sg-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 760px; margin: 0 auto 22px; }
#container .sg-kpis div { background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.05); border-top: 3px solid var(--sig); }
#container .sg-kpis small { display: block; font-size: 0.78rem; color: #6e6e73; }
#container .sg-kpis b { font-family: 'Roboto Serif', serif; font-size: 1.8rem; font-weight: 600; color: var(--sig-t); line-height: 1.2; }
#container .sg-kpis .warn { border-top-color: var(--vk-del); }
#container .sg-kpis .warn b { color: var(--vk-del-t); }
#container .sg-prog { display: inline-block; width: 46px; height: 6px; border-radius: 4px; background: #eceef3; overflow: hidden; vertical-align: middle; margin-inline-end: 4px; }
#container .sg-prog i { display: block; height: 100%; background: var(--sig); }
#container .sg-prog.done i { background: var(--vk-pay-t); }

/* ---------- Nachweis (dunkel) ---------- */
#container .sg-dark { background: #14123a; }
#container .sg-dark h2 { color: #fff; }
#container .sg-dark .lead { color: rgba(255,255,255,0.7); }
#container .sg-t2 { color: #a5b4fc; }
#container .sg-feat-dark .fi { background: rgba(165,180,252,0.14); color: #a5b4fc; }
#container .sg-feat-dark .sg-h4 { color: #fff; }
#container .sg-feat-dark p { color: rgba(255,255,255,0.66); }
#container .sg-stufe { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.85) !important; font-size: 0.86rem !important; line-height: 1.45; }
#container .sg-stufe .rs-ico { color: #a5b4fc; flex-shrink: 0; margin-top: 2px; }
#container .sg-proof { display: grid; gap: 14px; }
#container .sg-rep { background: #fff; border-radius: 16px; padding: clamp(16px, 2vw, 22px); color: #1d1d1f; box-shadow: 0 40px 80px rgba(0,0,0,0.35); font-size: 0.72rem; }
#container .sg-rep-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 10px; border-bottom: 2px solid var(--sig); margin-bottom: 10px; }
#container .sg-rep-head b { font-family: 'Roboto Serif', serif; font-size: 1rem; font-weight: 600; }
#container .sg-rep-head span { font-size: 0.64rem; color: #86868b; font-family: 'Courier New', monospace; }
#container .sg-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
#container .sg-kv dt { color: #86868b; font-size: 0.66rem; }
#container .sg-kv dd { margin: 0; font-size: 0.7rem; overflow-wrap: anywhere; }
#container .sg-kv dd.mono { font-family: 'Courier New', monospace; font-size: 0.64rem; color: var(--sig-t); direction: ltr; text-align: start; }
#container .sg-rep-sub { margin: 12px 0 6px; font-size: 0.58rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #86868b; }
#container .sg-signer { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid #f2f2f5; }
#container .sg-signer .ok { width: 20px; height: 20px; border-radius: 50%; background: var(--vk-pay-l); color: var(--vk-pay-t); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
#container .sg-signer .nm { min-width: 0; flex: 1; }
#container .sg-signer .nm b { display: block; font-weight: 500; font-size: 0.72rem; }
#container .sg-signer .nm small { display: block; font-size: 0.6rem; color: #86868b; }
#container .sg-signer em { font-style: normal; font-size: 0.6rem; color: #515154; white-space: nowrap; }
#container .sg-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
#container .sg-tl li { position: relative; padding-inline-start: 16px; font-size: 0.66rem; color: #515154; }
#container .sg-tl li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--sig-b); }
#container .sg-tl li:last-child::before { background: var(--sig); }
#container .sg-check-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 16px; padding: 14px 16px; color: #fff; }
#container .sg-check-card > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#container .sg-check-card b { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 0.86rem; flex-basis: 100%; }
#container .sg-check-card b .rs-ico { color: #a5b4fc; }
#container .sg-check-card .file { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08); border-radius: 8px; padding: 5px 10px; font-size: 0.72rem; font-family: 'Courier New', monospace; }
#container .sg-check-card small { font-size: 0.72rem; color: rgba(255,255,255,0.6); }
#container .sg-check-card .res { display: inline-flex; align-items: center; gap: 6px; color: #86efac; font-weight: 500; font-size: 0.78rem; }

/* ---------- Funktionen ---------- */
#container .sg-demo span { background: rgba(255,255,255,0.1); color: #fff; }
#container .sg-ki { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: start; gap: 18px; background: var(--sig-l); border-color: var(--sig-b); }
#container .sg-ki .card-icon { background: #fff !important; margin: 0; flex-shrink: 0; }
#container .sg-ki > div:nth-child(2) { flex: 1; min-width: 0; }
#container .sg-ki .go { width: 40px; height: 40px; border-radius: 50%; background: var(--sig); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s ease; }
#container .sg-ki:hover .go { transform: translateX(4px); }
[dir="rtl"] #container .sg-ki .go .rs-ico { transform: scaleX(-1); }
[dir="rtl"] #container .sg-ki:hover .go { transform: translateX(-4px); }
#container .sg-four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
#container .sg-four .card h3 { font-size: 1.15rem; }
#container .sg-rel { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Abschluss ---------- */
#container .sg-cta { background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 55%, #4f46e5 100%); }
#container .sg-cta h2 span { color: #c7d2fe; }

/* ---------- Breiten ---------- */
@media (max-width: 1100px) {
    #container .vk-story.s5 { grid-template-columns: minmax(0, 1fr); }
    #container .sg-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #container .sg-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    #container .sg-rel, #container .sg-four { grid-template-columns: minmax(0, 1fr); }
    #container .sg-kpis { gap: 8px; }
    #container .sg-kpis div { padding: 10px 12px; }
    #container .sg-kpis b { font-size: 1.4rem; }
    #container .sg-ki { flex-wrap: wrap; }
}
@media (max-width: 520px) {
    #container .sg-sign { grid-template-columns: minmax(0, 1fr); }
    #container .sg-rcp { grid-template-columns: 22px minmax(0, 1fr); }
    #container .sg-rcp .role { grid-column: 2; justify-self: start; }
    #container .sg-rcp .nr { grid-row: span 2; align-self: start; }
    #container .sg-kpis small { font-size: 0.68rem; }
    #container .sg-kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
    #container .sg-kv dd { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    #container .vk-toast, #container .sg-field.todo .here { animation: none; }
}
