:root {
  --bg: #0f1220;
  --bg2: #151a2e;
  --card: #1b2138;
  --card2: #232b47;
  --border: #2c3557;
  --text: #e8ecf7;
  --muted: #9aa3c0;
  --accent: #f5b301;
  --accent2: #ffd75e;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

:root[data-theme="light"] {
  --bg: #eef1f7;
  --bg2: #ffffff;
  --card: #ffffff;
  --card2: #f4f6fb;
  --border: #d9e0ee;
  --text: #1a2138;
  --muted: #5b6b85;
  --accent: #f0ad00;
  --accent2: #b88900;
  --green: #15803d;
  --red: #dc2626;
  --blue: #2563eb;
  --shadow: 0 10px 30px rgba(23, 32, 64, .12);
}

:root[data-theme="light"] .alert.error { color: #b91c1c; }
:root[data-theme="light"] .chat-msg.theirs .chat-bubble { background: #fff; border-color: var(--border); color: var(--text); }
:root[data-theme="light"] .alert.success { color: #15803d; }
:root[data-theme="light"] .alert.info { color: #1d4ed8; }
:root[data-theme="light"] .badge.blue { color: #2563eb; }
:root[data-theme="light"] .tbl td { border-bottom-color: rgba(0, 0, 0, .06); }
:root[data-theme="light"] .perm-row { border-bottom-color: rgba(0, 0, 0, .06); }
:root[data-theme="light"] .modal-backdrop { background: rgba(30, 41, 59, .45); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

a { color: var(--accent2); text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(245, 179, 1, .14), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(59, 130, 246, .16), transparent 60%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

.brand { text-align: center; margin-bottom: 26px; }

.brand .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--accent);
}

.brand .logo .logo-mark { height: 52px; width: auto; }

.brand .logo .badge {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a1200;
  border-radius: 12px;
  font-size: 22px;
}

.brand p { color: var(--muted); margin-top: 8px; font-size: 13px; }

.form-row { margin-bottom: 16px; }
  .turnstile-wrap { display: flex; justify-content: center; margin: 4px 0 16px; }

.form-row label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

.input:focus { border-color: var(--accent); }

.phone-wrap {
  display: flex; align-items: center; min-width: 0;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; transition: border-color .15s;
}
.phone-wrap:focus-within { border-color: var(--accent); }
.phone-wrap .prefix {
  padding: 12px 0 12px 14px; color: var(--text);
  font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.phone-wrap input {
  border: none !important; background: transparent !important;
  box-shadow: none; outline: none; padding-left: 4px;
  flex: 1 1 auto; min-width: 0; width: 100%;
}

input[type="date"].input::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .9;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f5b301"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.11-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z"/></svg>') center/contain no-repeat;
}
input[type="number"]::-webkit-inner-spin-button {
  opacity: 1;
  filter: invert(0.78) sepia(1) saturate(5) hue-rotate(0deg) brightness(0.92);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .05s;
  color: #1a1200;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn.block { width: 100%; }

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn.ghost:hover { color: var(--text); border-color: var(--muted); }

.btn.danger { background: var(--red); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.small { padding: 7px 12px; font-size: 12px; border-radius: 8px; }

.alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: block; }
.alert.error { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4); color: #ffb3b3; }
.alert.success { background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .4); color: #a9f0c2; }
.alert.info { background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .4); color: #bcd8ff; }

.link-btn {
  background: none; border: none; color: var(--accent2);
  cursor: pointer; font-size: 13px; padding: 0;
}
.link-btn:hover { text-decoration: underline; }

.auth-alt { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------- app shell ---------- */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 230px;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.sidebar .logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; color: var(--accent);
  padding: 4px 10px 18px;
}

.sidebar .logo .logo-mark { height: 32px; width: auto; }

.sidebar .logo .badge {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a1200; border-radius: 10px; font-size: 18px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: var(--bg2); color: var(--text); }

.nav-item.active {
  background: linear-gradient(135deg, rgba(245,179,1,.18), rgba(245,179,1,.08));
  color: var(--accent2);
}

.nav-item .ico { width: 20px; text-align: center; font-size: 16px; }

.sidebar .spacer { flex: 1; }

.sidebar .user-box {
  border-top: 1px solid var(--border);
  padding: 14px 10px 4px;
}

.sidebar .user-box-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar .user-avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: 0 0 38px;
  border: 2px solid var(--border); background: var(--bg2);
}
.sidebar .user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar .user-box-info { min-width: 0; }

.sidebar .user-box .name { font-weight: 700; font-size: 13.5px; }
.sidebar .user-box .mail {
  color: var(--muted); font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sidebar .user-box .role-badge {
  display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 700;
  background: var(--accent); color: #1a1200; border-radius: 6px; padding: 2px 8px;
  text-transform: uppercase; letter-spacing: .4px;
}
.sidebar .user-box .role-badge.user { background: var(--blue); color: #fff; }

.profile-avatar {
  display: flex; align-items: center; gap: 18px; padding: 18px 20px;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.profile-avatar-ring { position: relative; width: 96px; height: 96px; flex: 0 0 96px; }
.profile-avatar-img {
  display: block; width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--border); background: var(--bg2);
}
.profile-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-edit {
  position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--card); background: var(--accent); color: #1a1200; font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.profile-avatar-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }

.usr-av {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: inline-block;
  vertical-align: middle; border: 2px solid var(--border); background: var(--bg2);
}
.usr-pending { margin-top: 4px; line-height: 1.6; }

.pw { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.pw-toggle {
  border: 1px solid var(--border); background: var(--bg2); color: var(--text); border-radius: 6px;
  width: 24px; height: 24px; font-size: 12px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: background .15s ease;
}
.pw-toggle:hover { background: var(--accent); color: #1a1200; }

.main { flex: 1; padding: 26px 30px 60px; min-width: 0; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}

.page-head h1 { font-size: 22px; }

.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.grid { display: grid; gap: 16px; }
.grid.detail-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.stat .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stat .value { font-size: 24px; font-weight: 800; margin-top: 8px; word-break: break-word; }
.stat .value.green { color: var(--green); }
.stat .value.red { color: var(--red); }
.stat .value.gold { color: var(--accent2); }
.stat.derive { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.stat.derive .label { font-size: 11px; letter-spacing: .8px; margin-bottom: 2px; }
.derive-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; gap: 10px; }
.derive-row span { color: var(--muted); font-weight: 700; }
.derive-row b { color: var(--text); font-weight: 800; white-space: nowrap; }
.derive-row b.pos { color: var(--green); }
.derive-row b.neg { color: var(--red); }
.derive-gap { height: 5px; }
.derive-div { border-top: 1px dashed var(--border); margin: 2px 0 0; }
.derive-note { font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--border); color: var(--text); font-size: 10px; font-weight: 800; cursor: help; margin-left: 5px; vertical-align: 1px; user-select: none; }
.tip .tip-text { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); width: 250px; max-width: 60vw; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--text); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transition: opacity .15s ease; z-index: 60; text-align: left; pointer-events: none; white-space: normal; }
.tip:hover .tip-text, .tip:focus .tip-text { opacity: 1; visibility: visible; }
.tip .hl { color: #4dd0e1; font-weight: 600; }
:root[data-theme="light"] .tip .hl { color: #0e7490; }
.derive-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.derive-total span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.derive-total.green span { color: var(--green); }
.derive-total.red span { color: var(--red); }
.derive-total .v { font-size: 22px; font-weight: 800; white-space: nowrap; }

.section-title { font-size: 16px; font-weight: 700; margin: 26px 0 12px; }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 22px; }
.tbl-wrap:last-child { margin-bottom: 0; }
.grid.stats + .tbl-wrap { margin-top: 22px; }
.tbl-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td { padding: 12px; border-bottom: 1px solid rgba(44, 53, 87, .5); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.row-click { cursor: pointer; }
.tbl tr.row-click:hover { background: var(--bg2); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.bk-name { min-width: 0; }
.bk-name .badge { vertical-align: middle; margin-bottom: 3px; }
.bk-name b { word-break: break-all; font-weight: 600; }
.tbl tr.passive-row { opacity: .6; }
.tbl tr.passive-row .badge { opacity: 1; }
.badge.green { background: rgba(34,197,94,.15); color: var(--green); }
.badge.red { background: rgba(239,68,68,.15); color: var(--red); }
.badge.gray { background: rgba(154,163,192,.15); color: var(--muted); }
.badge.gold { background: rgba(245,179,1,.15); color: var(--accent2); }
.badge.blue { background: rgba(59,130,246,.15); color: #7eb0ff; }

.kasa-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.kasa-car { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kasa-car-name { display: inline-flex; align-items: center; gap: 5px; background: rgba(59,130,246,.12); color: #7eb0ff; border: 1px solid rgba(59,130,246,.25); border-radius: 20px; padding: 2px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.kasa-car-plate { display: inline-block; background: var(--accent); color: #fff; border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.kasa-desc { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.tbl td .kasa-car { justify-content: flex-start; }
.tbl td[data-label="Açıklama"] .kasa-cell { justify-content: flex-start; }

.money { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.money.pos { color: var(--green); }
.money.neg { color: var(--red); }
.btn-ico { background: none; border: none; color: var(--red); font-size: 16px; cursor: pointer; padding: 4px 6px; border-radius: 6px; opacity: .8; }
.btn-ico:hover { color: var(--red); background: rgba(255, 255, 255, .06); opacity: 1; }

/* forms / modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 7, 16, .7);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 50; overflow-y: auto; overflow-x: hidden;
}
.modal-backdrop.show { display: flex; }

.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 560px; max-height: 85vh;
  box-shadow: var(--shadow); padding: 24px; overflow-y: auto;
  animation: pop .18s ease;
}

@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal.wide { max-width: 780px; }

.modal h3 { font-size: 17px; margin-bottom: 18px; }

.modal .close-x {
  float: right; background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; line-height: 1;
}
.modal .close-x:hover { color: var(--text); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid > * { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.form-grid .input, .form-grid select.input { width: 100%; min-width: 0; }

select.input option { background: var(--bg2); color: var(--text); }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* settings tabs */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 4px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; width: fit-content; max-width: 100%;
}
.tab {
  border: none; background: none; cursor: pointer; color: var(--muted);
  font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 9px;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #1a1200; box-shadow: var(--shadow); }

/* share popover */
.share-popover {
  position: fixed; z-index: 60; width: 320px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 16px; animation: pop .15s ease;
}
.share-popover::before {
  content: ''; position: absolute; top: -6px; left: 28px; width: 11px; height: 11px;
  background: var(--card); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg); border-top-left-radius: 3px;
}
.share-popover .sp-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.share-popover .sp-desc { font-size: 12px; color: var(--muted); line-height: 1.55; margin-bottom: 12px; }
.share-popover .sp-body { display: flex; gap: 8px; }
.share-popover .sp-body .input { flex: 1; min-width: 0; }
.share-popover .sp-done { display: flex; align-items: center; gap: 10px; }
.share-popover .sp-tick { color: var(--green); font-size: 22px; font-weight: 800; line-height: 1; }
.share-popover .sp-copied { color: var(--green); font-size: 12px; font-weight: 600; }
.share-popover .sp-exp { font-size: 12px; color: var(--muted); margin-top: 8px; }
.share-popover .sp-closed { color: var(--red); font-size: 13px; font-weight: 600; }
.share-popover .sp-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.share-popover .sp-hint { flex: 1; font-size: 12px; min-height: 15px; }

/* car cards */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }

.car-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: transform .12s, border-color .12s;
  display: flex; flex-direction: column; gap: 8px;
}
.car-card:hover { transform: translateY(-2px); border-color: var(--accent); }

.car-card .thumb {
  position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background: var(--card2); border: 1px solid var(--border);
}
.car-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-card .thumb .cover-badge {
  position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0, 0, 0, .6); color: #ffd75e; font-size: 9px; font-weight: 800; letter-spacing: .06em;
}

.car-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.car-card .title { font-weight: 700; font-size: 15px; }
.plate {
  position: relative; display: inline-block; white-space: nowrap;
  background: #fff; color: #111; border: 1px solid #b9bfcc; border-radius: 5px;
  font-weight: 800; font-size: 12px; letter-spacing: 1.5px; padding: 2px 5px 2px 23px;
  font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.5; vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.plate::before {
  content: 'TR'; position: absolute; left: 0; top: 0; bottom: 0; width: 17px;
  background: linear-gradient(160deg, #2247a6, #142c66); color: #fff;
  font-size: 8px; font-weight: 800; letter-spacing: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 4px 0 0 4px;
}
.car-card .meta { color: var(--muted); font-size: 12.5px; }
.car-card .meta b { color: var(--text); }
.car-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.car-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }

/* detail */
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-head h2 { font-size: 20px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kv { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.kv .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.kv .v { font-size: 15px; font-weight: 700; margin-top: 4px; word-break: break-word; }

.file-box {
  border: 1px dashed var(--border); border-radius: 12px; padding: 16px;
  text-align: center; color: var(--muted); font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 110px;
  justify-content: center;
}
.file-box .fname { color: var(--text); font-size: 12px; word-break: break-all; }
.file-box input[type=file] { display: none; }

/* photo gallery */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.photo {
  position: relative; border-radius: 14px; overflow: hidden; cursor: zoom-in;
  background: var(--card2); aspect-ratio: 4 / 3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); border: 1px solid var(--border);
  transition: transform .18s ease, box-shadow .18s ease;
}
.photo:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .cover-badge {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, .62); color: #ffd75e; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.photo .del {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: none; border-radius: 9px;
  background: rgba(15, 18, 32, .55); color: #fff; font-weight: 800; cursor: pointer; font-size: 13px; line-height: 1;
  opacity: 0; transform: scale(.8); transition: opacity .15s ease, transform .15s ease, background .15s ease;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.photo:hover .del, .photo:focus-within .del { opacity: 1; transform: scale(1); }
.photo .del:hover { background: var(--red); }
.photo .cover-btn {
  position: absolute; right: 8px; bottom: 8px; border: none; border-radius: 9px;
  padding: 5px 10px; font-size: 11px; font-weight: 700; cursor: pointer;
  background: rgba(15, 18, 32, .62); color: #ffd75e; line-height: 1.2;
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s ease, transform .15s ease, background .15s ease;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
@media (hover: hover) {
  .photo:hover .cover-btn { opacity: 1; transform: translateY(0); pointer-events: auto; }
}
.photo .cover-btn:hover { background: var(--accent); color: #fff; }
@media (hover: none) {
  .photo .del { opacity: 1; transform: scale(1); }
  .photo .cover-btn { display: none; }
}
.photo-empty {
  border: 1px dashed var(--border); border-radius: 14px; padding: 26px; text-align: center;
  color: var(--muted); font-size: 13px;
}
.photo-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
  border: 1.5px dashed var(--border); background: linear-gradient(160deg, var(--card), var(--card2));
  color: var(--muted); text-align: center; transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.photo-upload:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-3px); }
.photo-upload .upload-icon { display: inline-flex; color: var(--muted); margin-bottom: 2px; }
.photo-upload b { font-size: 14px; color: var(--text); }
.photo-upload small { font-size: 11px; line-height: 1.45; opacity: .85; }
.photo-upload input[type=file] { display: none; }
.photo-grid.drag { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 14px; }
.sec-muted { color: var(--muted); font-weight: 400; font-size: 12px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(6, 8, 16, .94);
  display: flex; align-items: center; justify-content: center; animation: lbFade .18s ease;
  -webkit-user-select: none; user-select: none;
}
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox .lb-body { position: relative; z-index: 0; pointer-events: none; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 40px 56px; }
.lightbox .lb-stage { position: relative; z-index: 0; pointer-events: none; max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-stage img, .lightbox .lb-stage .lb-download, .lightbox .lb-stage .lb-loader, .lightbox .lb-stage iframe { pointer-events: auto; }
.lightbox img { pointer-events: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lightbox .lb-loader {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.18);
  border-top-color: var(--accent); border-radius: 50%; animation: lbSpin .55s linear infinite;
}
@keyframes lbSpin { to { transform: rotate(360deg); } }
.lightbox .lb-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 18px; cursor: pointer; transition: background .15s ease; z-index: 1;
}
.lightbox .lb-close:hover { background: var(--red); }
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 26px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease; z-index: 1;
}
.lightbox .lb-nav:hover { background: var(--accent); color: #1a1200; }
.lightbox .lb-nav.prev { left: 14px; }
.lightbox .lb-nav.next { right: 14px; }
.lightbox .lb-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; font-weight: 600; background: rgba(0, 0, 0, .5); z-index: 1;
  padding: 5px 14px; border-radius: 20px;
}
.lightbox .lb-cover-btn {
  position: absolute; bottom: 16px; right: 16px; z-index: 1;
  border: none; border-radius: 9px; padding: 6px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; background: rgba(15, 18, 32, .62); color: #ffd75e;
}
.lightbox .lb-cover-btn:active { background: var(--accent); color: #1a1200; }
.lightbox .lb-download {
  position: absolute; bottom: 12px; right: 12px; z-index: 1;
  border: none; border-radius: 9px; padding: 7px 14px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; background: var(--accent); color: #1a1200; transition: filter .15s ease;
}
.lightbox .lb-download:hover { filter: brightness(1.12); }
.lightbox .lb-download:active { filter: brightness(.95); }
@media (max-width: 640px) {
  .lightbox .lb-download { bottom: 8px; right: 8px; padding: 6px 11px; }
  .lightbox .lb-body { padding: 52px 10px 44px; }
  .lightbox .lb-nav { width: 38px; height: 38px; font-size: 20px; }
  .lightbox .lb-close { top: 10px; right: 10px; width: 36px; height: 36px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar > * { min-width: 0; }
.date-range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.date-range .input { max-width: 145px; }
.reports-filter { margin-top: 18px; align-items: center; }
.reports-filter #reportPeriod { max-width: 155px; }
.reports-filter #reportSearch { max-width: 200px; margin-left: auto; }
.backups-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.backups-layout > * { min-width: 0; }
.backups-filter { align-items: center; }
.chip {
  padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 13px;
  background: var(--card); color: var(--muted); border: 1px solid var(--border);
}
.chip.active { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.chip-cal {
  position: relative; display: inline-flex; align-items: center; gap: 8px; margin-left: 4px;
  padding: 6px 14px; border-radius: 20px; font-weight: 600; font-size: 13px;
  background: var(--card); color: var(--muted); border: 1px solid var(--border);
  cursor: pointer; overflow: hidden; user-select: none;
}
.chip-cal .cal-ico { color: #fff; flex: none; display: block; pointer-events: none; }
.chip-cal .cal-txt { pointer-events: none; white-space: nowrap; }
.chip-cal input[type="month"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: none; background: transparent; color: transparent;
}
.chip-cal input[type="month"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.chip-date {
  width: 140px; min-width: 0; font-family: inherit;
  padding: 8px 8px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 13px;
  background: var(--accent); color: #1a1200; border: 1px solid var(--accent);
  text-align: left;
}
.chip-date::-webkit-inner-spin-button,
.chip-date::-webkit-clear-button { display: none; }
.chip-date::-webkit-date-and-time-value { padding: 0; margin: 0; text-align: left; width: auto; min-width: 0; }
.chip-date::-webkit-datetime-edit { color: #1a1200; padding: 0; margin: 0; min-width: 0; width: auto; }
.chip-date::-webkit-datetime-edit-fields-wrapper { padding: 0; margin: 0; min-width: 0; }
.chip-date::-webkit-datetime-edit-text { padding: 0 1px; }
.chip-date::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .9; width: 16px; height: 16px; padding: 0; margin: 0 0 0 2px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231a1200"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.11-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z"/></svg>') center/contain no-repeat; }
.chip-date:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-label { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.chip-label span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.backup-date-picker { position: relative; display: inline-flex; flex: 0 0 auto; }
.backup-date-picker .chip { pointer-events: auto; cursor: pointer; }
.backup-date-picker input[type="date"] {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0;
  opacity: 0; pointer-events: none; cursor: pointer;
}

.empty {
  text-align: center; color: var(--muted); padding: 48px 20px;
  border: 1px dashed var(--border); border-radius: var(--radius); font-size: 14px;
}

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  background: var(--card2); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: 10px; box-shadow: var(--shadow);
  font-size: 13.5px; font-weight: 600; display: none; max-width: 360px;
}
.toast.show { display: block; animation: toastIn .18s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }

.field-err {
  color: var(--red); font-size: 12px; margin-top: 5px; font-weight: 600;
  animation: toastIn .18s ease;
}
.field-err.ok { color: var(--green); }
#profileForm .input.invalid { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
#profileForm .input.ok { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }

.pw-field { position: relative; }
.pw-field .input { padding-right: 42px; }
.pw-field .pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; color: var(--accent);
  font-size: 15px; padding: 6px; line-height: 1; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.pw-field .pw-toggle:hover { color: var(--accent2); background: rgba(245,179,1,.15); }
:root[data-theme="light"] .pw-field .pw-toggle { color: var(--accent2); }

.summary-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-top: 14px;
}
.summary-row { display: flex; justify-content: space-between; flex-wrap: wrap; row-gap: 3px; padding: 6px 0; font-size: 13.5px; }
.summary-row > :last-child { min-width: 0; text-align: right; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 15px; }
#salePreview .summary-row { flex-wrap: nowrap !important; font-size: 13px; }
#salePreview .summary-row + .summary-row { border-top: 1px solid var(--border); padding-top: 7px; margin-top: 2px; }
#salePreview .summary-row .badge { font-size: 10px; padding: 1px 5px; white-space: nowrap; }
#salePreview .summary-row .money { white-space: nowrap; }
#salePreview .summary-row small { white-space: nowrap; }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--border);
  border-radius: 22px; transition: .2s;
}
.switch .slider:before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(18px); }

.perm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(44,53,87,.5);
}
.perm-row:last-child { border-bottom: none; }
.perm-row .desc { font-size: 13.5px; }
.perm-row .desc small { display: block; color: var(--muted); font-size: 11.5px; }

.checkbox {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px;
}
.checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }

.menu-btn {
  display: none; align-items: center; justify-content: center; background: var(--card);
  border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px;
  border-radius: 10px; font-size: 18px;
}

.menu-backdrop {
  position: fixed; inset: 0; background: rgba(8, 11, 22, .55); z-index: 39;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 40;
    height: 100dvh; max-height: 100dvh; overflow-y: auto;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open { transform: none; }
  .sidebar .spacer { flex: 0 0 16px; min-height: 16px; }
  .menu-backdrop.show { opacity: 1; visibility: visible; }
  .main { padding: 14px 16px 60px; }
  .menu-btn {
    display: inline-flex !important; position: sticky; top: 10px; z-index: 30;
    margin-bottom: 14px; box-shadow: var(--shadow);
  }
  .menu-btn:active { transform: scale(.94); }
  .form-grid { grid-template-columns: 1fr; }
  .backups-layout { grid-template-columns: 1fr; }
  html, body { overflow-x: hidden; }
  input[type="date"].input, input[type="month"].input, input[type="time"].input {
    -webkit-appearance: none; appearance: none; min-width: 0; width: 100%;
  }
  .date-fake {
    position: relative; display: flex; align-items: center; width: 100%; min-width: 0;
    background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; cursor: pointer;
  }
  .date-fake:focus-within { border-color: var(--accent); }
  .date-fake .date-fake-txt {
    flex: 1; min-width: 0; padding: 12px 14px; padding-right: 36px;
    font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .date-fake .date-fake-txt.placeholder { color: var(--muted); }
  .date-fake::after {
    content: ""; position: absolute; right: 12px; width: 16px; height: 16px; pointer-events: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239aa3c0"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.11-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z"/></svg>') center/contain no-repeat;
  }
  :root[data-theme="light"] .date-fake::after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%235b6b85"><path d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.11-.9-2-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5z"/></svg>');
  }
  .date-fake input[type="date"] {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; pointer-events: none; -webkit-appearance: none; appearance: none;
  }
  .date-range .date-fake { flex: 1 1 0; }
  .date-pop-backdrop { position: fixed; inset: 0; z-index: 98; }
  .date-pop {
    position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    z-index: 100; width: 300px; max-width: calc(100vw - 32px);
    background: var(--card); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow); padding: 14px;
  }
  .date-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .date-pop-head button {
    background: var(--bg2); border: 1px solid var(--border); color: var(--text);
    width: 32px; height: 32px; border-radius: 8px; font-size: 18px; cursor: pointer; line-height: 1;
  }
  .date-pop-head button:disabled { opacity: .35; cursor: default; }
  .date-pop-title { font-weight: 700; font-size: 14px; }
  .date-pop-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .date-pop-dow { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; font-weight: 600; }
  .date-pop-day {
    aspect-ratio: 1; border: none; background: none; color: var(--text);
    border-radius: 8px; font-size: 13px; cursor: pointer;
  }
  .date-pop-day:hover:not(:disabled) { background: var(--bg2); }
  .date-pop-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
  .date-pop-day.sel { background: var(--accent); color: #1a1200; font-weight: 700; }
  .date-pop-day:disabled { color: var(--muted); opacity: .3; cursor: default; }
}

@media (max-width: 640px) {
  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 19px; }
  .page-head .sub { font-size: 12px; }
  .page-head > div:last-child { flex-wrap: nowrap; gap: 6px; }
  .page-head .btn { white-space: nowrap; padding: 8px 10px; font-size: 12px; }
  .date-range { width: 100%; }
  .date-range .input { max-width: none; flex: 1 1 0; }
  .reports-filter { flex-direction: column; align-items: center; gap: 8px; }
  .reports-filter > * { width: 100%; max-width: 320px; }
  .reports-filter #reportPeriod, .reports-filter #reportSearch { max-width: 320px; margin-left: 0; }
  .reports-filter .date-range > span:first-child { display: none; }
  .backups-filter { flex-wrap: wrap; gap: 6px; justify-content: center; }
  .backups-filter > * { flex: 0 0 auto; }
  td[data-label="İşlem"]::before { display: none; }
  .grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 19px; }
  .card { padding: 14px; }
  .tbl th, .tbl td { padding: 10px 8px; }
  .btn { font-size: 13px; padding: 9px 14px; }
  .tabs { gap: 4px; }
  .tab { padding: 8px 12px; font-size: 12px; }
  .share-popover { width: calc(100vw - 32px); left: 16px !important; right: 16px !important; max-width: none; }
  .share-popover::before { display: none; }
  .grid.detail-grid { grid-template-columns: 1fr; gap: 18px; }
  .derive-total .v { font-size: 19px; white-space: normal; }
  .derive-row b { white-space: normal; }
}

@media (max-width: 480px) {
  .grid.stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; }
  .stat .value { font-size: 18px; }
  .stat .label { font-size: 11px; }
  .derive-total .v { font-size: 17px; }
  .derive-row { font-size: 13px; }
  .car-grid { grid-template-columns: 1fr; }
  .car-card { padding: 14px; }
  .car-card .top { flex-wrap: wrap; }
  #carStats .stat:last-child { grid-column: 1 / -1; }
  [data-fulllast] .stat:last-child { grid-column: 1 / -1; }
  .filter-bar { gap: 6px; }
  .filter-bar .input { max-width: none !important; width: 100%; margin-left: 0; font-size: 13px; }
  .tbl thead { display: none; }
  .tbl tbody tr {
    display: block; margin-bottom: 10px;
    border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 12px; background: var(--card);
  }
  .tbl tbody td {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 0; border-bottom: 1px solid var(--bg2);
    font-size: 13px; min-width: 0; overflow-wrap: break-word;
  }
  .tbl tbody td:last-child { border-bottom: none; }
  .tbl tbody td::before {
    content: attr(data-label); font-weight: 600;
    color: var(--muted); margin-right: 10px; flex-shrink: 0;
  }
  .tbl tbody .tbl-actions { justify-content: flex-end; gap: 4px; }
  .main { padding: 10px 12px 60px; }
  .modal { padding: 16px; border-radius: 12px; }
  .modal h3 { font-size: 15px; }
  .btn { font-size: 13px; padding: 10px 16px; }
  .btn.small { padding: 6px 10px; font-size: 12px; }
  .tabs { gap: 3px; }
  .tab { padding: 8px 10px; font-size: 11px; }
  .share-popover { width: calc(100vw - 24px); left: 12px !important; right: 12px !important; max-width: none; }
  .share-popover::before { display: none; }
  .chip-label { width: 100%; margin-left: 0; margin-top: 8px; flex-direction: column; align-items: flex-start; }
  .chip-date {
    width: auto; font-size: 14px; padding: 10px 12px;
  }
  .backup-date-picker { max-width: 100%; }
  .backup-date-picker .chip { pointer-events: none; }
  .backup-date-picker input[type="date"] { pointer-events: auto; opacity: .01; }
  .tbl tbody td[data-label="Yetkiler"] {
    max-width: 140px;
  }
  .tbl tbody td[data-label="Yetkiler"] span {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word; white-space: normal;
  }
  .tbl tbody td[data-label="E-Posta"],
  .tbl tbody td[data-label="Ad Soyad"] {
    flex-direction: column; align-items: flex-start; gap: 2px;
  }
  .tbl tbody td[data-label="E-Posta"]::before,
  .tbl tbody td[data-label="Ad Soyad"]::before { margin-right: 0; }
  .tbl tbody td[data-label="E-Posta"],
  .tbl tbody td[data-label="Ad Soyad"] { word-break: break-word; overflow-wrap: break-word; }
  .tbl tbody td[data-label="Açıklama"] {
    flex-direction: column; align-items: flex-start; gap: 4px;
  }
  .tbl tbody td[data-label="Açıklama"]::before { margin-right: 0; }
  .tbl tbody td[data-label="Araç"] picture { display: none; }
}

@media (max-width: 380px) {
  .grid.stats { grid-template-columns: 1fr; }
  .stat .value { font-size: 17px; }
  .page-head { gap: 8px; }
  .page-head .btn { font-size: 12px; padding: 7px 8px; }
  .car-grid { grid-template-columns: 1fr; }
  .chip { padding: 6px 12px; font-size: 12px; }
}

/* Jodit editörü site temasına uyarlama */
.jodit-container,
.jodit_container {
  --jd-color-panel: var(--bg2);
  --jd-color-background-default: var(--bg2);
  --jd-color-background-gray: var(--bg);
  --jd-color-background-gray-hover: var(--border);
  --jd-color-background-light-gray: var(--bg);
  --jd-color-background-button-hover: var(--border);
  --jd-color-background-selection: var(--accent);
  --jd-color-text: var(--text);
  --jd-color-text-icons: var(--text);
  --jd-color-icon: var(--text);
  --jd-color-label: var(--muted);
  --jd-color-default: var(--text);
  --jd-color-dark: var(--text);
  --jd-color-gray: var(--border);
  --jd-color-gray-dark: var(--muted);
  --jd-color-border: var(--border);
  --jd-color-border-dark: var(--muted);
  --jd-color-border-selected: var(--accent);
  --jd-color-separator: var(--border);
  --jd-color-white: var(--text);
  --jd-color-placeholder: var(--muted);
  --jd-color-selection: var(--accent);
  --jd-color-blue: var(--blue);
  --jd-color-light-blue: var(--blue);
  --jd-color-error: var(--red);
  --jd-color-red: var(--red);
  --jd-border-radius-default: var(--radius);
}
.jodit-container .jodit-wysiwyg,
.jodit_container .jodit-wysiwyg { color: var(--text); }
.jodit-container .jodit-toolbar__button:hover:not([disabled]),
.jodit_container .jodit-toolbar__button:hover:not([disabled]) { background: var(--border); }
.jodit-container .jodit-toolbar__button.jodit-toolbar__button_active,
.jodit_container .jodit-toolbar__button.jodit-toolbar__button_active { background: var(--accent); color: #1a2138; }
.jodit-container .jodit-toolbar__button.jodit-toolbar__button_active svg,
.jodit_container .jodit-toolbar__button.jodit-toolbar__button_active svg { fill: #1a2138; }
.jodit-container .jodit-source__textarea,
.jodit_container .jodit-source__textarea { background: var(--bg2); color: var(--text); }
#tplEditorLoading { background: var(--bg2) !important; color: var(--muted) !important; }

/* ---------- sohbet ---------- */

.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--accent); color: #1a1200;
  font-size: 11px; font-weight: 800; line-height: 1;
}

.chat-wrap {
  display: flex; gap: 14px; align-items: stretch;
  height: calc(100vh - 210px); min-height: 440px;
}
.chat-side {
  width: 310px; flex-shrink: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-side-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg2); font-size: 14px; flex-wrap: nowrap;
}
.chat-side-head b { flex-shrink: 0; white-space: nowrap; }
.chat-side-btns { display: flex; gap: 4px; flex-shrink: 0; }
.chat-side-btns .btn { white-space: nowrap; }
.chat-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.chat-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: none; border-radius: 10px; background: none;
  color: var(--text); cursor: pointer; text-align: left;
  transition: background .12s ease;
}
.chat-item:hover { background: var(--bg2); }
.chat-item.active { background: var(--card2); box-shadow: inset 0 0 0 1px var(--border); }
.chat-av {
  flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--card2);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 700;
}
.chat-av img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.chat-av span { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1; }
.chat-av-lobby { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1200; border: none; }
.chat-av-lobby span { color: #1a1200; font-size: 15px; }
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name {
  display: block; font-weight: 700; font-size: 13px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.chat-item-prev {
  display: block; color: var(--muted); font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}
.chat-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-item-time { color: var(--muted); font-size: 10px; }
.chat-item-unread {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: #1a1200; font-size: 11px; font-weight: 800;
}
.chat-item-muted { font-size: 12px; opacity: .6; }
.chat-item-menu { opacity: 0; cursor: pointer; font-size: 16px; color: var(--muted); padding: 3px 7px; border-radius: 6px; transition: opacity .12s ease; line-height: 1; }
.chat-item:hover .chat-item-menu { opacity: .7; }
.chat-item-menu:hover { opacity: 1 !important; background: var(--card2); color: var(--accent); }
.chat-online { color: var(--green); font-size: 10px; }

.chat-main {
  flex: 1; min-width: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head {
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg2);
  display: flex; align-items: center; gap: 10px;
}
.chat-head .chat-back { display: none; }
.chat-main .chat-edit-bar,
.chat-main .chat-input { display: none; }
.chat-main.open .chat-edit-bar,
.chat-main.open .chat-input { display: flex; }
.chat-main.open .chat-empty { display: none; }
.chat-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; text-align: center; padding: 40px 20px; color: var(--muted);
}
.chat-empty-icon { font-size: 56px; margin-bottom: 16px; opacity: .5; }
.chat-empty h3 { font-size: 16px; margin-bottom: 6px; color: var(--text); }
.chat-empty p { font-size: 13px; max-width: 260px; line-height: 1.5; }
.chat-head-title { font-weight: 800; font-size: 15px; }
.chat-head-info { display: flex; flex-direction: column; min-width: 0; }
.chat-head-info.lobby { cursor: pointer; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; transition: background .15s; align-self: flex-start; -webkit-appearance: none; appearance: none; border: none; background: none; color: inherit; font: inherit; text-align: inherit; display: flex; flex-direction: column; min-width: 0; }
.chat-head-info.lobby:hover { background: rgba(59,130,246,.08); }
.chat-head-info.lobby:hover .chat-head-title { color: var(--accent); }
.chat-head-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column;
  gap: 10px; background: var(--bg);
}
.chat-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.chat-msg.mine { align-self: flex-end; }
.chat-msg.theirs { align-self: flex-start; }
.chat-bubble {
  padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5;
  word-break: break-word; overflow-wrap: break-word; position: relative;
}
.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1200;
  border-bottom-right-radius: 4px;
}
.chat-msg.theirs .chat-bubble {
  background: #2a3356; border: 1px solid var(--border); color: #fff;
  border-bottom-left-radius: 4px;
}
.chat-msg-body { white-space: pre-wrap; }
.chat-msg-who { font-size: 11.5px; font-weight: 700; color: var(--accent2); margin-bottom: 4px; cursor: pointer; }
.chat-msg-who:hover { text-decoration: underline; }
.chat-msg-av { cursor: pointer; border-radius: 50%; display: inline-flex; flex-shrink: 0; }
.chat-msg-av:hover { filter: brightness(1.15); }
.chat-msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 5px; }
.chat-msg-time { font-size: 10.5px; color: var(--muted); }
.chat-msg-edited { font-size: 9.5px; opacity: .7; font-style: italic; }
.chat-msg-deleted { color: var(--muted); font-style: italic; }
.chat-tick { position: relative; display: inline-flex; align-items: flex-end; width: 12px; height: 9px; color: rgba(0,0,0,.45); opacity: 1; }
.chat-tick .tick { display: block; width: 12px; height: 9px; }
.chat-tick-double { width: 21px; gap: 1px; }
.chat-tick-double .tick { width: 10px; height: 8px; }
.chat-tick.read { color: #4fc3f7; opacity: 1; }
.chat-msg-actions { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; background: var(--card2); border: 1px solid var(--border); font-size: 16px; line-height: 1; opacity: 0; transition: opacity .12s ease; }
.chat-msg-actions:hover { border-color: var(--accent); background: var(--card2); }
@media (hover: hover) {
  .chat-msg:hover .chat-msg-actions, .chat-msg:focus-within .chat-msg-actions { opacity: 1; }
}
.chat-file-img {
  display: block; max-width: 260px; max-height: 240px; border-radius: 10px;
  cursor: pointer; border: 1px solid var(--border);
}
.chat-file-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 9px; background: rgba(59, 130, 246, .14);
  color: var(--blue); font-weight: 600; font-size: 12.5px;
}
.chat-file-link small { opacity: .8; }
.chat-file-card {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 10px; cursor: pointer;
  background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .25);
  transition: border-color .12s ease;
}
.chat-file-card:hover { border-color: var(--accent); }
.chat-file-ico { font-size: 22px; line-height: 1; flex: none; }
.chat-file-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-file-name {
  font-weight: 700; font-size: 12.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}
.chat-file-size { font-size: 11px; opacity: .75; }
.chat-file-acts { display: flex; gap: 6px; flex: none; }
.chat-file-btn {
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg2);
  color: var(--text); font-size: 11.5px; font-weight: 600; padding: 5px 10px; cursor: pointer;
}
.chat-file-btn:hover { border-color: var(--accent); color: var(--accent); }
.lightbox .lb-stage .lb-pdf {
  width: min(92vw, 1000px); height: min(86vh, 750px);
  border: none; border-radius: 8px; background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.lightbox .lb-body.lb-pdf-body { padding: 50px 40px 40px; }

.chat-edit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 12px; border-top: 1px solid var(--border); background: rgba(59, 130, 246, .12);
}
.chat-edit-info { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.chat-edit-hint { color: var(--muted); font-size: 11px; }

.chat-input {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border); background: var(--bg2);
}
.chat-input .input { flex: 1; font-size: 16px; }
.chat-attach { position: relative; cursor: pointer; }
.chat-attach.busy { opacity: .6; pointer-events: none; }
.chat-emoji-btn { font-size: 18px; padding: 0 6px; cursor: pointer; }
.chat-emoji-picker {
  position: fixed; z-index: 999; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.4); width: 330px; max-height: 420px;
  display: flex; flex-direction: column; overflow: hidden; color: var(--text);
}
.ep-header { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px; }
.ep-search-wrap { flex: 1; }
.ep-search {
  width: 100%; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg2); color: var(--text); font-size: 13px; outline: none;
}
.ep-search:focus { border-color: var(--accent); }
.ep-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 6px 8px;
  overflow-y: auto; flex: 1; min-height: 260px; max-height: 300px;
}
.ep-grid button {
  border: none; background: none; font-size: 22px; line-height: 1; padding: 6px 4px;
  cursor: pointer; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: inherit;
}
.ep-grid button:hover { background: var(--card2); }
.ep-tabs {
  display: flex; border-top: 1px solid var(--border); padding: 4px; gap: 0;
  overflow-x: auto;
}
.ep-tab {
  border: none; background: none; font-size: 18px; padding: 6px; cursor: pointer;
  border-radius: 8px; flex-shrink: 0; opacity: .5; transition: opacity .12s;
}
.ep-tab:hover, .ep-tab.active { opacity: 1; background: var(--card2); }
.chat-send-btn {
  flex-shrink: 0; width: 42px; height: 42px; border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1200;
  font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: transform .12s ease, filter .12s ease;
}
.chat-send-btn:hover { transform: scale(1.06); filter: brightness(1.08); }
.chat-send-btn:active { transform: scale(.95); }
.chat-new-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; }
.chat-new-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: none; border-radius: 10px; background: var(--bg2); color: var(--text);
  cursor: pointer; text-align: left; font-size: 14px; font-weight: 600;
}
.chat-new-item:hover { background: var(--card2); }
.chat-mobile-bar { margin-top: 10px; }

.chat-search-wrap { padding: 8px 12px 6px; border-bottom: 1px solid var(--border); }
.chat-search-input {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg2); color: var(--text); font-size: 12.5px; outline: none;
}
.chat-search-input:focus { border-color: var(--accent); }
.chat-search-results { max-height: 50vh; overflow-y: auto; }
.chat-search-item {
  display: flex; flex-direction: column; gap: 2px; padding: 9px 12px;
  border-bottom: 1px solid var(--border); cursor: pointer; text-align: left; background: none;
  border-left: none; border-right: none; border-top: none; width: 100%; color: var(--text);
}
.chat-search-item:hover { background: var(--card2); }
.chat-search-conv { font-size: 11px; color: var(--accent); font-weight: 600; }
.chat-search-body { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chat-search-meta { font-size: 10px; color: var(--muted); }
.chat-msg-highlight { animation: chatHighlight 1.6s ease; }
@keyframes chatHighlight { 0% { background: rgba(255,215,0,.35); } 100% { background: transparent; } }

.chat-pins { border-bottom: 1px solid var(--border); }
.chat-pin-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border); font-size: 12px;
}
.chat-pin-item:hover { background: rgba(255,215,0,.08); }
.chat-pin-icon { font-size: 14px; flex: none; }
.chat-pin-body { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-pin-meta { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chat-pin-unpin {
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; font-size: 10px;
  background: none; color: var(--muted); cursor: pointer;
}
.chat-pin-unpin:hover { border-color: var(--red); color: var(--red); }
.chat-pinned-badge { font-size: 13px; margin-right: 4px; }

.chat-mention-wrap { position: relative; flex: 1; }
.chat-mention-drop {
  position: absolute; bottom: 100%; left: 0; right: 0; z-index: 50;
  background: var(--card); border: 1px solid var(--border); border-radius: 9px;
  max-height: 180px; overflow-y: auto; display: none;
}
.chat-mention-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  color: var(--text); font-size: 13px;
}
.chat-mention-item:hover, .chat-mention-item.active { background: var(--card2); }
.chat-mention-name { font-weight: 600; }
.chat-mention-highlight {
  color: var(--accent); font-weight: 700;
  padding: 0 2px; border-radius: 4px;
}
.chat-msg.mine .chat-mention-highlight {
  color: #1a1200;
  background: rgba(26, 18, 0, .14);
}
.chat-msg.theirs .chat-mention-highlight {
  color: var(--accent2);
  background: rgba(255, 215, 94, .16);
}
:root[data-theme="light"] .chat-msg.mine .chat-mention-highlight {
  color: #1a1200;
  background: rgba(26, 18, 0, .12);
}
:root[data-theme="light"] .chat-msg.theirs .chat-mention-highlight {
  color: var(--accent2);
  background: rgba(184, 137, 0, .14);
}
.chat-mention-highlight:hover { text-decoration: underline; }

.chat-profile { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 0 2px; }
.chat-profile-av .chat-av { border: 3px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.chat-profile-name { font-size: 18px; font-weight: 800; color: var(--text); }
.chat-profile-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.chat-prof-off { color: var(--muted); font-size: 10px; }
.chat-profile-bubble {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 11px 22px; border: none; border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1200;
  font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(245,179,1,.3); transition: transform .15s ease, box-shadow .15s ease;
}
.chat-profile-bubble:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(245,179,1,.4); }
.chat-bubble-ico { font-size: 17px; }

.chat-head-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.chat-mute-btn {
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; font-size: 15px;
  background: none; cursor: pointer; color: var(--muted);
}
.chat-mute-btn.muted { color: var(--red); border-color: rgba(239,68,68,.4); }
.chat-mute-btn:hover { border-color: var(--accent); color: var(--accent); }
.chat-mute-btn.muted:hover { border-color: var(--red); color: var(--red); }

@media (max-width: 640px) {
  .chat-mention-drop { max-height: 140px; }
}

@media (max-width: 900px) {
  .chat-wrap { height: calc(100vh - 180px); }
  .chat-side { width: 260px; }
}
@media (max-width: 640px) {
  .chat-wrap { height: calc(100vh - 165px); min-height: 380px; position: relative; }
  .chat-side { width: 100%; }
  .chat-main { display: none; position: absolute; inset: 0; z-index: 5; background: var(--card); }
  .chat-main.open { display: flex; }
  .chat-head .chat-back { display: inline-flex; }
  .chat-head-info.lobby { padding: 6px 10px; margin: -6px -10px; min-height: 44px; justify-content: center; align-self: center; touch-action: manipulation; }
  .chat-msg { max-width: 90%; }
  .chat-mobile-bar { display: none; }
  .chat-emoji-picker { width: 100vw; left: 0 !important; right: 0; bottom: 0 !important; border-radius: 16px 16px 0 0; max-height: 50vh; }
  .ep-grid { grid-template-columns: repeat(8, 1fr); }
  .input, input.input, textarea.input, select.input { font-size: 16px; }
  .chat-item-menu { opacity: 1; font-size: 18px; padding: 4px 8px; }
  .chat-msg-actions { opacity: .55 !important; }
  .chat-msg:hover .chat-msg-actions { opacity: 1; }
}


.chat-gi-wrap { padding: 8px 0; }
.chat-gi-wrap h3 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.chat-gi-wrap h3 .close-x { width: 28px; height: 28px; }
.chat-gi-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; }
.chat-gi-avatar {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden; cursor: pointer;
  background: var(--card2); border: 2px solid var(--border); display: flex; align-items: center;
  justify-content: center; position: relative; transition: border-color .15s;
}
.chat-gi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-gi-avatar span { font-size: 26px; font-weight: 800; color: var(--text); }
.chat-gi-avatar:hover { border-color: var(--accent); }
.chat-gi-av-btns { display: flex; gap: 8px; }
.chat-gi-field { margin-bottom: 12px; }
.chat-gi-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.chat-gi-readonly { padding: 8px 12px; border-radius: 8px; background: var(--bg2); font-weight: 600; font-size: 13.5px; }
.chat-gi-members-title { font-size: 13px; font-weight: 700; margin: 6px 0 8px; display: flex; align-items: center; justify-content: space-between; }
.chat-gi-members { display: flex; flex-direction: column; gap: 3px; max-height: 220px; overflow-y: auto; padding: 4px 0; }
.chat-gi-member {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px;
  background: var(--card2); border: 1px solid var(--border); transition: border-color .12s;
}
.chat-gi-member:hover { border-color: var(--accent); }
.chat-gi-add { border-style: dashed; color: var(--text); }
.chat-gi-add:hover { border-color: var(--accent); background: rgba(59,130,246,.1); }
.chat-gi-add-av { width: 30px; height: 30px; background: var(--accent); color: #1a1200; font-size: 18px; font-weight: 800; flex-shrink: 0; }
.chat-gi-member .chat-av { flex-shrink: 0; }
.chat-gi-mem-acts { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; }
.chat-gi-mem-acts .chat-pin-unpin { border-radius: 6px; padding: 3px 8px; font-size: 10.5px; cursor: pointer; border: 1px solid var(--border); background: var(--bg2); color: var(--muted); transition: all .12s; }
.chat-gi-mem-acts .chat-pin-unpin:hover { border-color: var(--red); color: var(--red); }
.chat-gi-mem-acts .chat-pin-unpin:last-child:hover { border-color: var(--accent); color: var(--accent); }
.chat-gi-wrap .btn { border-radius: 9px; font-weight: 700; transition: all .12s; }
.chat-gi-wrap .input, .chat-gi-wrap textarea.input {
  border-radius: 9px; padding: 9px 12px; border: 1px solid var(--border); background: var(--bg2);
  color: var(--text); font-size: 13px; width: 100%; box-sizing: border-box; outline: none; transition: border-color .15s;
}
.chat-gi-wrap .input:focus, .chat-gi-wrap textarea.input:focus { border-color: var(--accent); }
.chat-gi-wrap select.input { cursor: pointer; }
.chat-gi-label-btn { border: none; background: none; color: var(--green); font-size:11px; cursor: pointer; padding: 0; text-decoration: none; }
.chat-gi-label-btn:hover { color: var(--accent); }
.chat-av-menu {
  position: fixed; z-index: 999; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); padding: 4px; min-width: 180px;
}
.chat-av-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px;
  font-size: 13px; cursor: pointer; color: var(--text); border: none; background: none; width: 100%;
}
.chat-av-menu-item:hover { background: var(--card2); }
.chat-av-menu-item.danger { color: var(--red); }