/* ============================================================================
 * GES · Günlük Arıza Listesi — Panel-Styles (Stufe 1)
 * ----------------------------------------------------------------------------
 * Präfix `ar-` (kollisionsfrei: `pj-` = Projeler, `pv-` = Portal-Flotte,
 * `ges-ov-` = Genel Bakış). Farben AUSSCHLIESSLICH über die geteilten Tokens
 * --surface/--surface2/--line/--text/--muted/--gold/--green/--blue/--red/
 * --orange → hell und dunkel stimmen dadurch automatisch.
 * ==========================================================================*/

/* ── Wurzel: eigener Innenabstand, interner Scroll, kein Section-Padding ── */
#pvFleetTab-ariza { flex-direction: column !important; }
#pvFleetTab-ariza.section-shell,
#gesArizaPage.section-shell { padding: 0 !important; min-height: 0 !important; }
#gesAriza {
  align-self: stretch; width: 100%; min-width: 0;
  height: 100dvh; max-height: 100dvh; min-height: 0;
  box-sizing: border-box; padding: 16px 18px;
  display: flex; overflow: hidden;
}
.ges-ariza {
  display: flex; flex-direction: column; gap: 12px;
  flex: 1 1 auto; min-height: 0; min-width: 0; width: 100%;
  color: var(--text);
}
/* NICHT auf .ges-ariza einschraenken: die Dialoge haengen an document.body
   (modal() -> document.body.appendChild) und lagen damit ausserhalb dieser Regel.
   Ohne Groessenangabe dehnt sich ein SVG auf die volle Containerbreite — im
   Bağlantı-Dialog wurde das Listen-Icon dadurch riesig und sah aus wie ein
   kaputter Platzhalter. Die spezifischeren Regeln weiter unten (Ladezustand,
   Kopfzeile, Chips) ueberschreiben diese hier weiterhin. */
.ar-ic { width: 16px; height: 16px; flex: 0 0 auto; }

/* ── Zustände ── */
.ar-loading, .ar-error, .ar-empty {
  display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 48px 16px; color: var(--muted); text-align: center;
}
.ar-loading .ar-ic, .ar-empty .ar-ic { width: 30px; height: 30px; opacity: .6; }
.ar-empty b { color: var(--text); font-size: 14px; }
.ar-empty span { font-size: 12.5px; }
.ar-error { color: var(--red); }
.ar-error .ar-ic { width: 26px; height: 26px; }
.ar-muted { color: var(--muted); }
.ar-hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.ar-mt { margin-top: 12px; }

/* ── Kopfzeile ── */
.ar-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 0 2px 12px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.ar-head-l { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ar-head-l h2 {
  margin: 0; display: inline-flex; align-items: center; gap: 8px;
  font-size: 19px; font-weight: 800; color: var(--text);
}
.ar-head-l h2 .ar-ic { width: 18px; height: 18px; color: var(--gold); }
.ar-head-sayim { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ar-head-sayim b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.ar-head-sayim b.ar-acil-n { color: var(--red); }
.ar-dot { opacity: .5; }
.ar-gun { font-variant-numeric: tabular-nums; }
.ar-head-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-search {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
}
.ar-search .ar-ic { width: 14px; height: 14px; color: var(--muted); }
.ar-search input {
  width: 190px; min-width: 0; border: 0; background: transparent; color: var(--text);
  font-size: 12.5px; font-family: inherit; outline: none;
}

/* ── Knöpfe ── */
.ar-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 13px; font-family: inherit; cursor: pointer; text-decoration: none;
}
.ar-btn:hover { background: var(--surface2); }
.ar-btn:disabled { opacity: .5; cursor: default; }
.ar-btn-primary { background: var(--gold); border-color: var(--gold); color: #201800; font-weight: 800; }
.ar-btn-primary:hover { filter: brightness(1.06); background: var(--gold); }
.ar-btn-ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.ar-btn-ok:hover { background: color-mix(in srgb, var(--green) 12%, transparent); }
.ar-btn-wa { color: #25d366; border-color: color-mix(in srgb, #25d366 45%, var(--line)); }
.ar-btn-wa:hover { background: color-mix(in srgb, #25d366 12%, transparent); }
.ar-btn-call { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); flex: 0 0 auto; }
.ar-btn-call:hover { background: color-mix(in srgb, var(--blue) 12%, transparent); }
.ar-btn.ar-danger, .ar-iconbtn.ar-danger { color: var(--red); }
.ar-btn.ar-danger { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: transparent; }
.ar-btn.ar-danger:hover { background: color-mix(in srgb, var(--red) 12%, transparent); }
.ar-btn-has { border-color: var(--gold); }
.ar-badge {
  display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--gold); color: #201800; font-size: 10.5px; font-weight: 800; line-height: 16px; text-align: center;
}
.ar-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.ar-iconbtn:hover { background: var(--surface2); color: var(--text); }
.ar-iconbtn.ar-danger:hover { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }

/* ── Liste ── */
.ar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 2px 24px; }
.ar-liste {
  display: grid; gap: 12px; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
}

/* ── Karte ──
   Der linke Rand trägt die Öncelik. Sie ist die einzige Information, die man aus
   drei Metern Entfernung braucht: was heute zuerst dran ist. */
.ar-kart {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 14px 10px; border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 12px; background: var(--surface); min-width: 0;
}
.ar-kart.ar-o-acil { border-left-color: var(--red); }
.ar-kart.ar-o-orta { border-left-color: var(--orange); }
.ar-kart.ar-o-dusuk { border-left-color: var(--muted); }
.ar-kart.ar-o-yok { border-left-color: var(--line); }
/* „Yerinde müdahale gerek var mı?" — Evet setzt jemanden ins Auto, Hayır nicht.
   Die Farbe sagt das auf einen Blick; der Hinweis darunter erklaert „Hayır". */
.ar-tgl.ar-gid-evet { background: var(--red); border-color: var(--red); color: #fff; }
.ar-tgl.ar-gid-hayir { background: var(--green); border-color: var(--green); color: #fff; }
.ar-gid-not { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.4; }
.ar-kart.ar-busy { opacity: .65; }
.ar-kart-kapali { background: var(--surface2); opacity: .82; }
/* Abwechselnder Hintergrund (Nutzerwunsch 19.08.2026): stehen zwei gleich breite,
   gleich aufgebaute Karten nebeneinander, verrutscht das Auge zwischen ihnen. Der
   Ton ist bewusst sehr flach — er soll trennen, nicht die Prioritaetsfarbe am linken
   Rand ueberschreien. Geschlossene Karten behalten ihren eigenen Ton, deshalb das
   :not() — diese Regel steht danach und gewaenne sonst.
   color-mix statt fester Farbe, damit hell UND dunkel ohne zweiten Satz stimmen. */
.ar-kart:nth-child(even):not(.ar-kart-kapali) {
  background: color-mix(in srgb, var(--text) 3.5%, var(--surface));
}
.ar-kart-kapali .ar-tesis { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent); }

.ar-kart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ar-kart-tesis { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ar-tesis { font-size: 14.5px; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.ar-kart-head-act { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.ar-kapali-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green);
  font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.ar-kapali-tag .ar-ic { width: 12px; height: 12px; }

/* ── Quellenpille ──
   Sie steht auf JEDER Karte und ist nicht ausblendbar: die Liste geht an Kunden,
   und „Portal tahmini" ist eine Schlussfolgerung aus Messdaten, keine Gerätemeldung. */
.ar-pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface2); color: var(--muted); cursor: help;
}
.ar-pill-uretici { border-color: color-mix(in srgb, var(--text) 25%, var(--line)); color: var(--text); }
.ar-pill-portal { border-color: color-mix(in srgb, var(--blue) 55%, var(--line)); color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.ar-pill-ekip { border-color: var(--line); color: var(--muted); }

/* ── Alarm-Überschrift (Kopie, kein Verweis) ── */
.ar-alarm {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
  border-radius: 9px; background: var(--surface2); border: 1px solid var(--line);
}
.ar-alarm-ic { flex: 0 0 auto; color: var(--gold); display: inline-flex; padding-top: 1px; }
.ar-alarm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ar-alarm-txt b { font-size: 13px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.ar-alarm-txt small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ar-sev {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800;
  white-space: nowrap; border: 1px solid transparent;
}
.ar-sev-1 { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.ar-sev-2 { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); border-color: color-mix(in srgb, var(--orange) 40%, transparent); }
.ar-sev-3 { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.ar-sev-4 { background: var(--surface); color: var(--muted); border-color: var(--line); }

/* ── Felder ── */
.ar-alan { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ar-alan-satir { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-alan-satir .ar-lbl { flex: 0 0 auto; }
.ar-alan-satir .ar-input { flex: 1 1 140px; min-width: 0; }
.ar-lbl { font-size: 10.5px; font-weight: 800; letter-spacing: .35px; text-transform: uppercase; color: var(--muted); }
.ar-input {
  width: 100%; box-sizing: border-box; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: 13px; font-family: inherit;
}
.ar-input:focus { outline: none; border-color: var(--gold); }
.ar-input:disabled { opacity: .6; }
.ar-input-sm { font-size: 12px; padding: 5px 9px; }
.ar-input-err { border-color: var(--red); }
textarea.ar-input, .ar-ta { resize: vertical; line-height: 1.4; }

/* ── Umschalter (Kim gidecek? / Öncelik) ──
   Drei Antworten, kein Freitext: die Frage hat morgens genau drei Ausgänge. */
.ar-tglrow { display: flex; gap: 6px; flex-wrap: wrap; }
.ar-tgl {
  flex: 1 1 auto; min-height: 32px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.ar-tgl:hover { color: var(--text); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.ar-tgl:disabled { opacity: .5; cursor: default; }
.ar-tgl.ar-on { background: var(--gold); border-color: var(--gold); color: #201800; }
.ar-tgl.ar-on.ar-o-acil { background: var(--red); border-color: var(--red); color: #fff; }
.ar-tgl.ar-on.ar-o-orta { background: var(--orange); border-color: var(--orange); color: #241300; }
.ar-tgl.ar-on.ar-o-dusuk { background: var(--surface2); border-color: var(--muted); color: var(--text); }

/* ── Belirti-Chips ── */
.ar-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.ar-chip {
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted);
  font-size: 11.5px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.ar-chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.ar-chip:disabled { opacity: .5; cursor: default; }
.ar-chip.ar-on { background: var(--gold); border-color: var(--gold); color: #201800; font-weight: 800; }
.ar-chips-big { gap: 8px; margin: 4px 0 10px; }
.ar-chip-big { padding: 10px 16px; font-size: 13px; border-radius: 10px; }

/* ── Kartenfuß ── */
.ar-kart-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.ar-meta { font-size: 10.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ar-src-saha {
  padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 16%, transparent);
  color: var(--blue); font-weight: 800; font-size: 9.5px; text-transform: uppercase; letter-spacing: .3px;
}
.ar-kapanis {
  display: flex; align-items: flex-start; gap: 7px; padding: 8px 10px; border-radius: 9px;
  background: color-mix(in srgb, var(--green) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  font-size: 12.5px; color: var(--text);
}
.ar-kapanis .ar-ic { width: 14px; height: 14px; color: var(--green); }

/* ── „Bugün kapatılanlar" (eingeklappt) ── */
.ar-bolum { margin-top: 18px; }
.ar-bolum-head {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface2);
  color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px;
  font-family: inherit; cursor: pointer; text-align: left;
}
.ar-bolum-head:hover { color: var(--text); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.ar-bolum-head span { flex: 1; }
.ar-bolum-n {
  padding: 1px 9px; border-radius: 999px; background: var(--surface); color: var(--muted);
  font-size: 11px; font-weight: 800;
}
.ar-bolum .ar-liste { margin-top: 10px; }
.ar-bolum .ar-tablo-kaydir { margin-top: 10px; }
.ar-bolum-kapali .ar-bolum-head .ar-ic { color: var(--muted); }

/* ── Görünüm-Umschalter (Kart ↔ Liste) ── */
.ar-gorunum {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.ar-gorunum-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 26px;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer;
}
.ar-gorunum-btn:hover { color: var(--text); background: var(--surface2); }
.ar-gorunum-btn.ar-on { background: var(--gold); color: #201800; }
.ar-gorunum-btn .ar-ic { width: 15px; height: 15px; }

/* ── Listenansicht ──
   Eine Zeile je Kayıt, reine Anzeige — bearbeitet wird in der Karte, die ein Klick
   auf die Zeile als Overlay öffnet. Der linke Rand trägt wie bei der Karte die
   Öncelik. Schmaler als ~980px scrollt die Tabelle horizontal im eigenen Rahmen. */
.ar-tablo-kaydir { overflow-x: auto; }
.ar-tablo {
  min-width: 980px; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden;
}
.ar-satir {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: minmax(180px, 1.3fr) minmax(200px, 1.6fr) minmax(110px, 1fr) minmax(90px, .7fr) 122px 78px minmax(150px, .95fr) 26px;
  padding: 9px 12px 9px 10px; min-width: 0;
  border-bottom: 1px solid var(--line); border-left: 4px solid var(--line); cursor: pointer;
}
.ar-satir:last-child { border-bottom: 0; }
.ar-satir.ar-o-acil { border-left-color: var(--red); }
.ar-satir.ar-o-orta { border-left-color: var(--orange); }
.ar-satir.ar-o-dusuk { border-left-color: var(--muted); }
.ar-satir.ar-o-yok { border-left-color: var(--line); }
.ar-satir:not(.ar-satir-bas):hover { background: color-mix(in srgb, var(--gold) 7%, var(--surface)); }
.ar-satir:not(.ar-satir-bas):focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.ar-satir-bas { cursor: default; border-left-color: transparent; background: var(--surface2); padding-top: 7px; padding-bottom: 7px; }
.ar-satir-bas span {
  font-size: 10px; font-weight: 800; letter-spacing: .35px; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ar-satir-kapali { background: var(--surface2); opacity: .78; }
.ar-satir-kapali .ar-s-tesis b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent); }
.ar-s-tesis { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ar-s-tesis b { font-size: 13px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ar-s-tesis .ar-pill, .ar-s-tesis .ar-kapali-tag { flex: 0 0 auto; }
.ar-s-alarm { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ar-s-alarm-ust { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ar-s-alarm-ust b { font-size: 12.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ar-s-alarm-ust .ar-sev { flex: 0 0 auto; }
.ar-s-alarm small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-s-metin { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ar-s-cell { min-width: 0; }
.ar-s-gid { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.ar-s-evet { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.ar-s-hayir { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.ar-s-onc { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; }
.ar-s-onc.ar-o-acil { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.ar-s-onc.ar-o-orta { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.ar-s-onc.ar-o-dusuk { background: var(--surface2); color: var(--muted); border-color: var(--line); }
.ar-s-son { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-s-chev { display: inline-flex; color: var(--muted); }
.ar-satir:hover .ar-s-chev { color: var(--gold); }

/* ── Karten-Overlay (Listenansicht: Klick auf Zeile) ──
   Liegt UNTER den ar-modal-Dialogen (9700): „Kapat"/Geçmiş öffnen über der Karte. */
.ar-kart-ov {
  position: fixed; inset: 0; z-index: 9600; background: rgba(4, 8, 16, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow: auto;
}
.ar-kart-ov-icer { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 540px; }
.ar-kart-ov-x { align-self: flex-end; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.ar-kart-ov-x:hover { background: var(--surface2); }
.ar-kart-ov-icer .ar-kart { box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
/* Der flache Wechselton der Kachelansicht (nth-child) darf im Overlay nicht greifen. */
.ar-kart-ov-icer .ar-kart:not(.ar-kart-kapali) { background: var(--surface); }

/* ── Modal ── */
.ar-modal-bg {
  position: fixed; inset: 0; z-index: 9700; background: rgba(4, 8, 16, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow: auto;
}
.ar-modal {
  width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); overflow: hidden;
}
.ar-modal-w { max-width: 720px; }
.ar-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.ar-modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--text); }
.ar-modal-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: 68vh; overflow-y: auto; }
.ar-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface2);
}
.ar-foot-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ar-modal-sub { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.45; }
.ar-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.ar-field > span { color: var(--muted); font-weight: 700; }
.ar-soru { font-size: 15px; font-weight: 800; color: var(--text); }
.ar-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.ar-check input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.ar-ok {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line)); font-size: 13px; color: var(--text);
}
.ar-ok .ar-ic { color: var(--green); }
.ar-linkrow { display: flex; gap: 6px; }
.ar-linkrow .ar-input { flex: 1; min-width: 0; font-size: 12px; }

/* ── Ekle-Dialog ── */
.ar-ek-list { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; padding-right: 2px; }
.ar-ek-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface2);
}
.ar-ek-chk { flex: 0 0 auto; display: inline-flex; align-items: center; padding-top: 2px; cursor: pointer; }
.ar-ek-chk input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.ar-ek-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ar-ek-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.ar-ek-top b { font-size: 13px; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.ar-ek-alarm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text); }
.ar-ek-alarm .ar-ic { width: 13px; height: 13px; color: var(--gold); }
.ar-ek-alarm small { color: var(--muted); font-size: 11px; }
.ar-ek-ortak { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ── Bağlantı-Dialog ── */
/* Frueher eine graue Kachel mit Icon. Sie trug keine Information, die der Satz
   daneben nicht schon sagt, und wirkte wie ein leerer Platzhalter (Nutzerhinweis
   19.08.). Jetzt eine schlichte Zeile — die Zahl bleibt, der Rahmen faellt weg. */
.ar-tok-count {
  display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted);
}
.ar-tok-count b { font-weight: 800; color: var(--text); }
.ar-tok-list { display: flex; flex-direction: column; gap: 6px; }
.ar-tok-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface2);
}
.ar-tok-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ar-tok-main b { font-size: 12.5px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-tok-main small { font-size: 11px; color: var(--muted); }
.ar-tok-act { flex: 0 0 auto; display: flex; gap: 2px; }
.ar-tok-act .ar-iconbtn { width: 28px; height: 28px; }

/* ── Telefonliste ── */
.ar-tellist { display: flex; flex-direction: column; gap: 6px; }
.ar-telrow {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface2);
  color: var(--text); text-decoration: none; min-height: 44px; box-sizing: border-box;
}
.ar-telrow:hover { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.ar-telrow .ar-ic { color: var(--blue); }
.ar-telnm { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ar-telno { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Değişiklik geçmişi ── */
.ar-histlist { display: flex; flex-direction: column; }
.ar-hist-row {
  display: grid; grid-template-columns: 128px 1fr auto; gap: 10px; align-items: start;
  padding: 9px 6px; border-bottom: 1px solid var(--line);
}
.ar-hist-row:last-child { border-bottom: 0; }
.ar-hist-when { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-hist-main { min-width: 0; }
.ar-hist-line { font-size: 12.5px; overflow-wrap: anywhere; }
.ar-hist-arrow { color: var(--muted); margin: 0 2px; }
.ar-hist-who { font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: right; white-space: nowrap; }
.ar-hist-who small { display: block; font-weight: 600; opacity: .8; }
.ar-hist-first { background: color-mix(in srgb, var(--green) 8%, transparent); }


/* ── Toast ── */
.ar-toastwrap {
  position: fixed; right: 18px; bottom: 18px; z-index: 100001;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.ar-toast {
  display: flex; align-items: center; gap: 9px; max-width: 360px; padding: 11px 15px;
  border-radius: 11px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-left: 3px solid var(--green);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22); font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .3s ease;
}
.ar-toast.ar-toast-in { opacity: 1; transform: none; }
.ar-toast-err { border-left-color: var(--red); }
.ar-toast-ic { flex: 0 0 auto; color: var(--green); display: inline-flex; }
.ar-toast-err .ar-toast-ic { color: var(--red); }
.ar-toast-ic svg { width: 17px; height: 17px; }

/* ── Schmale Fenster (Portal im geteilten Bildschirm) ──
   Keine Mobil-Anpassung: das Web-Portal bleibt Desktop. Das hier fängt nur ein
   schmal gezogenes Fenster ab, damit die Karten nicht überlaufen. */
@media (max-width: 900px) {
  .ar-liste { grid-template-columns: 1fr; }
  .ar-head { flex-direction: column; align-items: stretch; }
  .ar-search input { width: 100%; }
  .ar-hist-row { grid-template-columns: 1fr; gap: 3px; }
  .ar-hist-who { text-align: left; }
}
