/* İkramdaş tasarım sistemi — Premium Panel V2 (şirket yönetim paneli + Super Admin ortak). Marka renkleri DEĞİŞMEZ (mobil
   uygulama mobile/lib/theme.dart ile aynı: lacivert --ink, petrol mavisi --teal, pastel durum tonları); açık tema.
   Bu dosya belirteçleri, temel öğeleri ve yeniden kullanılabilir bileşenleri içerir; ekran özel kurallar styles.css'tedir. */
@font-face { font-family: Inter; src: url(fonts/Inter-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* Marka ve yüzeyler */
  --ink: #16224a; --teal: #1f5c69; --teal-dark: #174a55; --muted: #6b7383; --line: #e4e8ee; --card-line: #edf0f4;
  --cream: #f4f6f9; --soft: #eef2f6; --white: #fff; --secondary: #e6f0f8; --surface: rgba(255, 255, 255, .72);
  /* Durum tonları (mobil ile aynı) */
  --peach: #fdefdc; --peach-ink: #b4691c; --sky: #e3eef7; --sky-ink: #23628f; --mint: #e2f3ea; --mint-ink: #2b7a55;
  --rose: #fbe8e6; --rose-ink: #b3423a; --lilac: #eceaf6; --lilac-ink: #4b4a8a;
  /* Tipografi, ölçü, gölge */
  --sans: Inter, "Segoe UI", system-ui, sans-serif; --serif: var(--sans);
  --radius: 18px; --radius-lg: 26px; --radius-sm: 12px;
  --shadow: 0 6px 18px rgba(22, 34, 74, .06); --shadow-lg: 0 18px 50px rgba(22, 34, 74, .10);
  --ring: 0 0 0 3px rgba(31, 92, 105, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink); font: 400 15px/1.45 var(--sans);
  background: radial-gradient(1100px 520px at 85% -8%, #e4eef8 0%, rgba(228, 238, 248, 0) 70%), radial-gradient(900px 480px at -10% 110%, #e9f2f6 0%, rgba(233, 242, 246, 0) 65%), var(--cream);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; margin: 0; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.noscript { padding: 40px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* Giriş ve hesap kartı */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); background: var(--white); border: 1px solid var(--card-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 36px 32px 28px; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand img { width: 74px; height: 74px; }
.login-brand h1 { font-size: 30px; margin-top: 8px; }
.login-brand p { margin: 4px 0 0; color: var(--muted); }
.login-card .field { margin-bottom: 14px; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.login-divider { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 10px; }

/* Form */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.field small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], input[type=search], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); padding: 0 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 90px; padding: 10px 14px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #d3dae3; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--teal); box-shadow: var(--ring); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
input:disabled, select:disabled { background: var(--soft); color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
.form-grid { display: grid; gap: 14px; }
.form-error { background: var(--rose); color: var(--rose-ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }

/* Düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--white); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 6px 14px rgba(31, 92, 105, .22); }
.btn.primary:hover { background: var(--teal-dark); }
.btn.secondary { background: var(--secondary); border-color: var(--secondary); color: var(--sky-ink); }
.btn.secondary:hover { background: #d8e7f3; }
.btn.danger { color: var(--rose-ink); }
.btn.danger.solid { background: var(--rose-ink); border-color: var(--rose-ink); color: #fff; }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; height: 50px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn.small svg { width: 16px; height: 16px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.link-btn { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--teal); font-weight: 600; cursor: pointer; text-decoration: underline; padding: 4px; }

/* Kabuk: yan menü + içerik yüzeyi */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, rgba(255, 255, 255, .86) 252px, transparent 252px); }
.side { background: rgba(255, 255, 255, .86); backdrop-filter: blur(6px); box-shadow: 1px 0 0 var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.brand img { width: 38px; height: 38px; }
.brand strong { font: 700 22px/1 var(--sans); letter-spacing: -.03em; }
.brand-sub { font-size: 12px; color: var(--muted); padding: 0 8px; margin-top: -14px; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: var(--radius-sm); background: none; text-align: left; cursor: pointer; font-weight: 500; font-size: 14px; color: var(--ink); }
.nav button svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.nav button:hover { background: var(--soft); }
.nav button[aria-current=page] { background: var(--secondary); color: var(--teal); font-weight: 600; box-shadow: inset 3px 0 0 var(--teal); }
.nav button[aria-current=page] svg { fill: var(--teal); }
.side-note { margin-top: auto; font-size: 12px; color: var(--muted); background: var(--secondary); border-radius: 16px; padding: 14px; display: grid; gap: 6px; }
.side-note b { color: var(--ink); font-weight: 600; }
.side-note .note-icon { width: 30px; height: 30px; border-radius: 10px; background: var(--white); display: grid; place-items: center; color: var(--sky-ink); }
.side-note .note-icon svg { width: 18px; height: 18px; fill: currentColor; }
.content { margin: 18px 18px 18px 22px; padding: 30px 34px 44px; min-width: 0; max-width: 1520px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .9); border-radius: 30px; box-shadow: var(--shadow-lg); }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar > div:first-child { flex: 1 1 380px; min-width: 0; }
.topbar h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.who { flex: none; display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--card-line); border-radius: 999px; padding: 4px 6px 4px 4px; box-shadow: var(--shadow); }
.who span { font-size: 14px; }
.who .btn.small { border-radius: 999px; }

/* Kart, bölüm başlığı, tablo */
.card { background: var(--white); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.card-head h2 .head-icon, .head-icon { width: 34px; height: 34px; border-radius: 11px; background: var(--secondary); color: var(--teal); display: inline-grid; place-items: center; flex: none; }
.head-icon svg { width: 19px; height: 19px; fill: currentColor; }
.card-head .head-sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.card-body { padding: 18px 20px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.toolbar input[type=text], .toolbar input[type=search] { height: 42px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: var(--muted); pointer-events: none; }
.search input { padding-left: 40px; height: 42px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer; }
.chip:hover { background: var(--soft); }
.chip[aria-pressed=true] { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 4px 10px rgba(31, 92, 105, .2); }
.table-wrap { overflow-x: auto; }
.card > .table-wrap { margin: 14px; border: 1px solid var(--line); border-radius: 14px; }
.card > .card-head + .table-wrap { margin-top: 14px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 11px 16px; background: #f7f9fb; white-space: nowrap; }
td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover td { background: #fafbfd; }
tr.inactive td { color: var(--muted); }
.person { display: flex; align-items: center; gap: 12px; }
.person b { display: block; font-weight: 600; }
.person small { color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--card-line); }
.tone-0 { background: var(--sky); color: var(--sky-ink); } .tone-1 { background: var(--peach); color: var(--peach-ink); }
.tone-2 { background: var(--mint); color: var(--mint-ink); } .tone-3 { background: var(--lilac); color: var(--lilac-ink); }

/* Rozetler */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.ok { background: var(--mint); color: var(--mint-ink); } .pill.off { background: var(--soft); color: var(--muted); }
.pill.role { background: var(--sky); color: var(--sky-ink); } .pill.role::before { display: none; }
.pill.warn { background: var(--peach); color: var(--peach-ink); }
.pill.rose { background: var(--rose); color: var(--rose-ink); }
.pill.lilac { background: var(--lilac); color: var(--lilac-ink); }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions.start { justify-content: flex-start; }
.actions.nowrap { flex-wrap: nowrap; }
.actions .btn:not(.primary):not(.danger) { background: var(--secondary); border-color: var(--secondary); color: var(--sky-ink); }
.actions .btn:not(.primary):not(.danger):hover { background: #d8e7f3; }
.actions .btn.danger { background: #fff6f5; border-color: #f3d2ce; }
.actions .btn.danger:hover { background: var(--rose); }

/* Boş / yükleniyor / hata durumları */
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty-mark { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; background: var(--soft); color: var(--muted); }
.empty-mark svg { width: 22px; height: 22px; fill: currentColor; }
.state { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; text-align: center; color: var(--muted); }
.state h2 { color: var(--ink); font-size: 18px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.notice { background: var(--sky); color: var(--sky-ink); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin: 0 0 12px; }
.notice.warn { background: var(--peach); color: var(--peach-ink); }
.notice.danger { background: var(--rose); color: var(--rose-ink); }

/* KPI kutuları */
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 16px; }
.stat-card { position: relative; overflow: hidden; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 4px; align-content: center; border-top: 3px solid var(--line); }
.stat-card.has-icon { grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; }
.stat-icon { grid-row: span 2; align-self: center; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.stat-icon svg { width: 22px; height: 22px; fill: currentColor; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.05; letter-spacing: -.02em; }
.stat-label { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card.tone-warn { border-top-color: var(--peach-ink); background: linear-gradient(160deg, #fff 55%, var(--peach) 160%); } .stat-card.tone-warn .stat-icon { background: var(--peach); color: var(--peach-ink); }
.stat-card.tone-ok { border-top-color: var(--sky-ink); background: linear-gradient(160deg, #fff 55%, var(--sky) 160%); } .stat-card.tone-ok .stat-icon { background: var(--sky); color: var(--sky-ink); }
.stat-card.tone-mint { border-top-color: var(--mint-ink); background: linear-gradient(160deg, #fff 55%, var(--mint) 160%); } .stat-card.tone-mint .stat-icon { background: var(--mint); color: var(--mint-ink); }
.stat-card.tone-rose { border-top-color: var(--rose-ink); background: linear-gradient(160deg, #fff 55%, var(--rose) 160%); } .stat-card.tone-rose .stat-icon { background: var(--rose); color: var(--rose-ink); }
.stat-card.tone-off { border-top-color: var(--lilac-ink); background: linear-gradient(160deg, #fff 55%, var(--lilac) 160%); } .stat-card.tone-off .stat-icon { background: var(--lilac); color: var(--lilac-ink); }
.stat-card.tone-teal { border-top-color: var(--teal); } .stat-card.tone-teal .stat-icon { background: var(--secondary); color: var(--teal); } .stat-card.tone-teal .stat-value { color: var(--teal-dark); }
.stat-card.tone-ink { border-top-color: var(--ink); } .stat-card.tone-ink .stat-icon { background: var(--secondary); color: var(--ink); }

/* Diyalog */
dialog { border: 0; border-radius: 24px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(20, 35, 75, .28); color: var(--ink); }
dialog::backdrop { background: rgba(20, 35, 75, .32); backdrop-filter: blur(2px); }
.dlg-head { padding: 22px 24px 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.dlg-head > div { min-width: 0; }
.dlg-head h2 { font-size: 21px; }
.dlg-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.dlg-icon { width: 48px; height: 48px; border-radius: 15px; background: var(--secondary); color: var(--teal); display: grid; place-items: center; }
.dlg-icon svg { width: 24px; height: 24px; fill: currentColor; }
.dlg-close { margin-top: -2px; }
.dlg-body { padding: 18px 24px; display: grid; gap: 14px; max-height: 66vh; overflow-y: auto; }
.dlg-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--card-line); }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
legend { font-size: 13px; font-weight: 600; padding: 0 6px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 10; max-width: calc(100vw - 32px); }
.toast.error { background: var(--rose-ink); }

/* Anahtar/değer ve yardımcılar */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid > .card { margin-top: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv-list { display: grid; gap: 10px; }
.kv { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.kv b { font-weight: 600; word-break: break-word; }
.small { font-size: 12px; }
.block { display: block; }
.section-title { font-size: 19px; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }

/* V2 ortak: süzgeç çubuğu, sayaç etiketi, tablo notu, seçilebilir rozet onay kutusu, göz düğmesi */
.filter-card.bar { padding: 12px 14px; }
.filter-card.bar .toolbar { margin: 0; }
.toolbar .search { max-width: 460px; }
.table-note { margin: 12px 6px 0; line-height: 1.5; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--ink); white-space: nowrap; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 5px 12px 5px 10px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c3ccd8; background: var(--white); flex: none; }
.chip-check:hover { background: var(--soft); }
.chip-check:has(input:checked) { background: var(--sky); border-color: #c9dced; color: var(--sky-ink); }
.chip-check:has(input:checked)::before { border-color: var(--sky-ink); background: radial-gradient(circle, var(--sky-ink) 0 3.5px, var(--white) 4px); }
.chip-check:has(input:focus-visible) { box-shadow: var(--ring); }
.secret-row { position: relative; display: block; }
.input-icon { position: relative; display: block; }
.input-icon > svg { position: absolute; left: 14px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; fill: var(--muted); pointer-events: none; }
.input-icon > input { padding-left: 44px; }
.secret-row input { padding-right: 46px; }
.eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.eye:hover, .eye[aria-pressed=true] { background: var(--soft); color: var(--ink); }
.eye svg { width: 20px; height: 20px; fill: currentColor; }
.head-sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.card-head h2 { flex-wrap: wrap; }
.card-head:has(.head-sub) { flex-wrap: nowrap; align-items: flex-start; }
.card-head:has(.head-sub) h2 { flex: 1; min-width: 0; }
th.act { text-align: right; }
.card-head h2 > .head-sub { flex-basis: 100%; margin-top: -6px; }
.card-head h2:has(> .head-icon) > .head-sub { margin-left: 44px; }

@media (max-width: 1480px) { .content { padding: 26px 26px 40px; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; min-width: 0; box-shadow: 0 1px 0 var(--line); overflow: visible; }
  .nav { min-width: 0; padding-bottom: 4px; scrollbar-width: thin; grid-auto-flow: column; overflow-x: auto; width: 100%; }
  .nav button { white-space: nowrap; }
  .brand-sub, .side-note { display: none; }
  .content { margin: 0; padding: 18px 16px 40px; border-radius: 0; border: 0; box-shadow: none; background: transparent; }
  .topbar h1 { font-size: 24px; }
  .who { flex: 1 1 100%; width: 100%; flex-wrap: wrap; border-radius: 16px; }
  .who > span:not(.avatar):not(.media-slot) { flex: 1; min-width: 0; }
}
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } .dlg-head { grid-template-columns: minmax(0, 1fr) auto; } .dlg-icon { display: none; } }
