/* ==================================================================
   Vizeradar Admin — Marka temalı stil
   Renkler: primary #5B3DF5, accent #C2F24A, ink #15141A,
            bg #F1F0F4, danger #E5484D
   Fontlar: başlık "Bricolage Grotesque", gövde "Hanken Grotesk"
   ================================================================== */

:root {
  --primary: #5B3DF5;
  --primary-dark: #4a30d0;
  --primary-soft: #ece8ff;
  --accent: #C2F24A;
  --ink: #15141A;
  --ink-soft: #5c5a66;
  --bg: #F1F0F4;
  --surface: #ffffff;
  --border: #e3e1ea;
  --danger: #E5484D;
  --danger-soft: #fdecec;
  --success: #2e9e5b;
  --success-soft: #e6f6ec;
  --warn: #c98a00;
  --warn-soft: #fdf3dd;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 3px rgba(21, 20, 26, 0.06), 0 6px 24px rgba(21, 20, 26, 0.05);
  --shadow-lg: 0 10px 40px rgba(91, 61, 245, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-font {
  font-family: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

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

/* ---------- Yardımcılar ---------- */
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.row { display: flex; gap: 12px; align-items: center; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0; }
.mb-8 { margin-bottom: 8px; }
.text-sm { font-size: 13px; }

/* ---------- Butonlar ---------- */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, box-shadow .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { filter: brightness(0.96); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Formlar ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
textarea { resize: vertical; min-height: 90px; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5; }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 42px; height: 24px; border-radius: 99px;
  background: #cdcbd6; transition: background .15s ease; position: relative; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(91,61,245,.12), transparent 50%),
    radial-gradient(120% 120% at 100% 100%, rgba(194,242,74,.18), transparent 50%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.login-logo {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
}
.login-logo .dot { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); display: grid; place-items: center; color: var(--accent); font-weight: 800; font-family: "Bricolage Grotesque"; }

/* ---------- Uygulama kabuğu ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex: none;
  background: var(--ink);
  color: #cfcdd8;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px;
}
.sidebar .brand .dot { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); display: grid; place-items: center; color: var(--accent); font-weight: 800; font-family: "Bricolage Grotesque"; }
.sidebar .brand b { color: #fff; font-family: "Bricolage Grotesque"; font-size: 17px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: #b9b7c4; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .12s ease, color .12s ease; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; }

.sidebar .sb-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar .sb-user { font-size: 12px; color: #8d8b99; padding: 0 8px 10px; word-break: break-all; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 26px; gap: 14px; position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 19px; }
.content { padding: 26px; max-width: 1100px; width: 100%; }

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}
.card h3 { font-size: 16px; margin-bottom: 4px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

/* ---------- Liste / tablo ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer;
  transition: border .12s ease, box-shadow .12s ease;
}
.list-item:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.list-item .li-title { font-weight: 600; }
.list-item .li-sub { font-size: 13px; color: var(--ink-soft); }

/* ---------- Rozetler ---------- */
.badge {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.badge.open { background: var(--warn-soft); color: var(--warn); }
.badge.answered { background: var(--success-soft); color: var(--success); }
.badge.closed { background: #ecebf0; color: var(--ink-soft); }
.badge.on { background: var(--success-soft); color: var(--success); }
.badge.off { background: var(--danger-soft); color: var(--danger); }

/* ---------- Filtre çubuğu / chip ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--ink-soft);
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(21,20,26,.45);
  display: grid; place-items: center; z-index: 50; padding: 24px;
}
.modal {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 620px;
  max-height: 88vh; overflow: auto; padding: 24px;
}
.modal-lg { max-width: 820px; }
.modal-head { display: flex; align-items: center; margin-bottom: 18px; }
.modal-head h2 { font-size: 19px; }
.modal-close { margin-left: auto; cursor: pointer; font-size: 22px; line-height: 1; color: var(--ink-soft); background: none; border: none; }

/* ---------- Requirement satır editörü ---------- */
.req-row {
  display: grid; grid-template-columns: 70px 1fr 130px 1fr 60px 34px;
  gap: 8px; align-items: start; margin-bottom: 8px;
}
.req-row input, .req-row select, .req-row textarea { font-size: 13px; padding: 7px 9px; }
.req-row .req-del { background: var(--danger-soft); color: var(--danger); border: none; border-radius: 8px; cursor: pointer; font-size: 16px; }
.req-head { font-size: 12px; font-weight: 700; color: var(--ink-soft); }

/* ---------- Toast / durum ---------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 99px;
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 100;
  opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--success); }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.empty .big { font-size: 34px; margin-bottom: 8px; }

.loading { padding: 40px; text-align: center; color: var(--ink-soft); }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.alert.err { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--success-soft); color: var(--success); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .req-row { grid-template-columns: 1fr 1fr; }
}

/* Bildirim geçmişi tablosu */
.table{width:100%;border-collapse:collapse;font-size:13.5px}
.table th{text-align:left;padding:10px 12px;color:var(--muted,#8C8898);font-weight:700;
  border-bottom:1px solid var(--border,#E2E0E8);font-size:12px;white-space:nowrap}
.table td{padding:11px 12px;border-bottom:1px solid var(--border,#EEEDF1);vertical-align:top}
.table tr:last-child td{border-bottom:0}
.pill{display:inline-block;padding:4px 10px;border-radius:999px;background:#EDEBF8;
  color:#5B3DF5;font-weight:700;font-size:12px}
