/* IDO Ticket: Markenfarbe und was nur das Ticketsystem braucht. Laedt nach
   app.css (und im Helpdesk nach admin.css und konto-app.css), damit gilt
   derselbe Aufbau wie in den anderen IDO-Tools. */
:root {
    --blau: #1d4ed8;
    --blau-dunkel: #1e3a8a;
    --blau-hell: #eaf0fe;
}
.avatar, .admin-ich__zeichen { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.konto-neu { background: var(--blau); }
.konto-neu:hover { background: var(--blau-dunkel); }
.konto-neu[aria-current="page"] { outline-color: var(--blau); }
:focus-visible { outline-color: #60a5fa; }

/* Bestaetigen-Dialog statt confirm() (assets/js/dialog.js) */
.dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 60px -12px rgba(16, 24, 40, .35), 0 0 0 1px rgba(16, 24, 40, .06); color: var(--text); }
.dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.dialog[open] { animation: dialog-auf .16s ease-out; }
@keyframes dialog-auf { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog__inhalt { padding: 22px 22px 18px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.dialog__symbol { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blau-hell); color: var(--blau); }
.dialog--gefahr .dialog__symbol { background: var(--rot-hell); color: var(--rot); }
.dialog__titel { margin: 6px 0 0; font-size: 1.05rem; }
.dialog__text { margin: 0; color: var(--text-leise); font-size: .93rem; }
.dialog__fuss { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: #f7f9fb; border-top: 1px solid var(--linie); }
.dialog--gefahr .admin-knopf--primaer { background: var(--rot); border-color: var(--rot); }
.dialog--gefahr .admin-knopf--primaer:hover { background: #8f1b13; border-color: #8f1b13; }

/* Kleine Helfer */
.inline-form { display: inline; margin: 0; }
.punkt-app { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--farbe, var(--blau)); }
.knopf-zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.geheimnis { display: grid; gap: 8px; }
.geheimnis > code { display: block; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--linie); font-size: .95rem; word-break: break-all; user-select: all; }
.admin-tabelle__scroll .admin-liste td { vertical-align: middle; }

/* Ticketliste */
.ticketzeile__betreff { color: var(--text); font-weight: 600; text-decoration: none; }
.ticketzeile__betreff:hover { color: var(--blau); }
.ticketzeile--neu .ticketzeile__betreff::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--blau); vertical-align: 2px; }
.ticketnr { color: var(--admin-leise, #556574); font-variant-numeric: tabular-nums; font-weight: 600; margin-right: 6px; }
.status-chip { white-space: nowrap; }

/* Ticket */
.ticket-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container admin (min-width: 900px) { .ticket-raster { grid-template-columns: minmax(0, 1fr) 320px; } }
.verlauf { display: grid; gap: 12px; }
.nachricht { background: #fff; border: 1px solid var(--admin-linie, #dfe6eb); border-radius: 12px; padding: 14px 18px; }
.nachricht__kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 8px; font-size: .9rem; }
.nachricht__kopf .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: .8rem; }
.nachricht__kopf time { margin-left: auto; color: var(--admin-leise, #556574); font-size: .8rem; }
.nachricht__text { overflow-wrap: anywhere; line-height: 1.55; }
.nachricht--kunde .avatar { background: linear-gradient(135deg, #64748b, #334155); }
.nachricht--mitarbeiter { border-left: 3px solid var(--blau); }
.nachricht--intern { background: var(--gelb-hell); border-color: #f3d59e; }
.antwortbox textarea { min-height: 140px; resize: vertical; }
.antwortbox__fuss { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.antwortbox__fuss .feld { margin: 0; min-width: 220px; }
.seitenleiste { display: grid; gap: 16px; }
.kontext { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: .85rem; }
.kontext dt { color: var(--admin-leise, #556574); }
.kontext dd { margin: 0; overflow-wrap: anywhere; }
.miniliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .9rem; }
.miniliste a { font-weight: 600; text-decoration: none; }
.miniliste .admin-unter { display: block; }

/* Anmeldung */
.anmeldung-marke { display: flex; justify-content: center; margin-bottom: 14px; }

/* Team: Bearbeiten klappt in der Zeile auf */
.team-bearbeiten summary { list-style: none; }
.team-bearbeiten summary::-webkit-details-marker { display: none; }
.team-bearbeiten[open] summary { margin-bottom: 12px; }
.team-formular { min-width: 260px; }
.team-apps { border: 1px solid var(--admin-linie, #dfe6eb); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.team-apps legend { font-size: .85rem; font-weight: 600; padding: 0 4px; }
.feld input[type=color] { width: 64px; height: 42px; padding: 3px; border: 1.5px solid #b8c6cf; border-radius: 8px; background: #fff; }
.admin-segment label.admin-segment__knopf { cursor: pointer; }
.admin-segment label.admin-segment__knopf input { position: absolute; opacity: 0; pointer-events: none; }
.admin-segment label.admin-segment__knopf:has(input:checked) { background: #fff; color: var(--blau); box-shadow: 0 1px 2px rgba(16, 24, 40, .14), 0 0 0 1px rgba(16, 24, 40, .03); }
.admin-segment label.admin-segment__knopf:has(input:focus-visible) { outline: 3px solid #60a5fa; }
.admin-krumen a { color: inherit; }

/* Akzent der Kacheln und Avatare in IDO-Blau statt Mailarchiv-Gruen */
.admin-kachel--hervor { background: linear-gradient(145deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%); }
.admin-kachel--hervor .admin-kachel__name, .admin-kachel--hervor .admin-kachel__fuss, .admin-kachel--hervor .admin-kachel__neben { color: #dbe6fe; }
.admin-ich__zeichen { background: linear-gradient(135deg, #2563eb, #1e3a8a); }

/* Anhaenge in Nachrichten */
.anhaenge { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.anhang-bild { display: block; width: 168px; height: 118px; border: 1px solid var(--linie, #e2e8f0); border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.anhang-bild img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.anhang-bild:hover img { transform: scale(1.04); }
.anhang-video { margin: 0; flex: 1 1 100%; max-width: 560px; }
.anhang-video video { width: 100%; max-height: 360px; border-radius: 10px; background: #0f172a; display: block; }
.anhang-video figcaption { margin-top: 6px; font-size: .82rem; color: var(--leise, #64748b); }
.anhang-dateien { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
.anhang-dateien a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--linie, #e2e8f0); border-radius: 999px; background: #fff; color: inherit; text-decoration: none; font-size: .88rem; }
.anhang-dateien a:hover { border-color: var(--blau); color: var(--blau); }
.anhang-dateien small { color: var(--leise, #64748b); }

/* Dateien waehlen in der Antwortbox */
.anhang-wahl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 4px; }
.anhang-wahl__knopf { position: relative; cursor: pointer; }
.anhang-wahl__knopf input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.anhang-wahl__knopf:focus-within { outline: 2px solid var(--blau); outline-offset: 2px; }
.anhang-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
.anhang-liste:empty { display: none; }
.anhang-liste li { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 5px; border: 1px solid var(--linie, #e2e8f0); border-radius: 10px; background: #f8fafc; font-size: .85rem; max-width: 280px; }
.anhang-liste img, .anhang-liste .anhang-liste__typ { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--blau-hell); color: var(--blau); font-size: .7rem; font-weight: 700; font-style: normal; }
.anhang-liste span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anhang-liste small { color: var(--leise, #64748b); white-space: nowrap; }
.anhang-liste button { flex: none; border: 0; background: none; color: #94a3b8; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 4px; border-radius: 6px; }
.anhang-liste button:hover { color: #b91c1c; background: #fee2e2; }
.anhang-liste li.zu-gross { border-color: #fca5a5; background: #fef2f2; }
form[data-anhaenge].zieht textarea { border-color: var(--blau); background: var(--blau-hell); }
