/* MD Sigortacılık · Liquid Glass arayüz */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: #0B1324; --text2: rgba(11, 19, 36, .62); --text3: rgba(11, 19, 36, .40);
  --surface: rgba(255, 255, 255, .50); --surface2: rgba(255, 255, 255, .72); --surface3: rgba(255, 255, 255, .38);
  --edge: rgba(255, 255, 255, .78); --hair: rgba(11, 19, 36, .07); --hair2: rgba(11, 19, 36, .12);
  --field: rgba(255, 255, 255, .62);
  --sheen: linear-gradient(140deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 72%, rgba(255, 255, 255, .22));
  --blur: saturate(185%) blur(26px);
  --accent: #0A84FF; --accent2: #5E5CE6; --accent-soft: rgba(10, 132, 255, .12);
  --grad: linear-gradient(135deg, #30B0C7 0%, #0A84FF 45%, #5E5CE6 100%);
  --red: #FF3B30; --orange: #FF9500; --yellow: #E8B100; --green: #28B463; --teal: #20A4B8; --gray: #8E8E93;
  --r-xl: 30px; --r-lg: 24px; --r-md: 18px; --r-sm: 13px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --text: #F3F6FC; --text2: rgba(235, 240, 250, .66); --text3: rgba(235, 240, 250, .40);
  --surface: rgba(28, 33, 48, .48); --surface2: rgba(36, 42, 60, .74); --surface3: rgba(255, 255, 255, .06);
  --edge: rgba(255, 255, 255, .14); --hair: rgba(255, 255, 255, .07); --hair2: rgba(255, 255, 255, .13);
  --field: rgba(255, 255, 255, .07);
  --sheen: linear-gradient(140deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 75%, rgba(255, 255, 255, .05));
  --accent-soft: rgba(10, 132, 255, .2);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--text);
  background: #EEF2FB; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
[data-theme="dark"] body { background: #070B16; }
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 10px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Arka plan ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 800px at 10% -10%, #DCE8FF 0%, transparent 60%), radial-gradient(900px 700px at 110% 10%, #EFE3FF 0%, transparent 55%), linear-gradient(180deg, #F2F5FC, #E9EEF9); }
.bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 26s var(--ease) infinite alternate; }
.bg i:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: #8EC5FF; }
.bg i:nth-child(2) { width: 38vmax; height: 38vmax; right: -10vmax; top: 8vmax; background: #C7B8FF; animation-delay: -8s; }
.bg i:nth-child(3) { width: 34vmax; height: 34vmax; left: 20vmax; bottom: -14vmax; background: #9BE7E0; animation-delay: -15s; }
.bg i:nth-child(4) { width: 22vmax; height: 22vmax; right: 18vmax; bottom: 6vmax; background: #FFD3B8; opacity: .35; animation-delay: -4s; }
[data-theme="dark"] .bg { background: radial-gradient(1000px 700px at 0% 0%, #13224A 0%, transparent 60%), radial-gradient(900px 700px at 100% 20%, #2A1A4A 0%, transparent 55%), linear-gradient(180deg, #070B16, #0A0F1E); }
[data-theme="dark"] .bg i { opacity: .28; }
@keyframes drift { to { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bg i { animation: none; } * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* ---------- Cam yüzey ---------- */
.glass, .card {
  position: relative; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-lg); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.glass::before, .card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--sheen); pointer-events: none; }
.glass > *, .card > * { position: relative; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass, .card { background: var(--surface2); } }

/* ---------- Yerleşim ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 22px; padding: 22px 26px 22px 22px; max-width: 1640px; margin: 0 auto; }
.sidebar { position: sticky; top: 22px; height: calc(100dvh - 44px); display: flex; flex-direction: column; padding: 18px 14px; border-radius: var(--r-xl); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand img { border-radius: 11px; }
.brand b { display: block; font-size: 16.5px; letter-spacing: -.2px; }
.brand small { color: var(--text2); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--text2); font-weight: 560; transition: background .25s var(--ease), color .25s; }
.nav a:hover { background: var(--surface3); color: var(--text); }
.nav a.on { background: var(--surface2); color: var(--text); }
.nav a.on .i { color: var(--accent); }
.nav a .cnt { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--red); color: #fff; }
.side-foot { display: grid; gap: 8px; padding-top: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.topbar { position: sticky; top: 14px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 22px; border-radius: 22px; }
.topbar h1 { font-size: 22px; font-weight: 750; letter-spacing: -.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: auto; }
.search-trigger { display: flex; align-items: center; gap: 10px; width: min(380px, 40vw); height: 42px; padding: 0 12px 0 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--hair); color: var(--text3); transition: background .2s; }
.search-trigger:hover { background: var(--surface2); }
.search-trigger span { flex: 1; text-align: left; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger kbd { font: 600 11px var(--font); padding: 3px 6px; border-radius: 7px; border: 1px solid var(--hair2); }
.icon-btn { position: relative; width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--field); border: 1px solid var(--hair); transition: transform .2s var(--ease), background .2s; }
.icon-btn:hover { background: var(--surface2); }
.icon-btn:active, .btn:active, .row:active, .chip:active, .tile:active, .tab:active { transform: scale(.96); }
.icon-btn.primary { background: var(--grad); color: #fff; border: 0; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }
.m-only { display: none; }
.view { display: flex; flex-direction: column; gap: 18px; padding-bottom: 30px; outline: none; animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Tabbar (mobil) ---------- */
.tabbar { display: none; }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 14px; font-weight: 620; font-size: 14.5px; background: var(--surface2); border: 1px solid var(--edge); transition: transform .2s var(--ease), filter .2s, background .2s; white-space: nowrap; }
.btn:hover { filter: brightness(1.03); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.btn.danger { background: rgba(255, 59, 48, .12); color: var(--red); border-color: rgba(255, 59, 48, .2); }
.btn.ghost { background: transparent; border-color: var(--hair2); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn .i { width: 18px; height: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Kart / başlık ---------- */
.card { padding: 20px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h2, .card-h h3 { font-size: 17px; font-weight: 720; letter-spacing: -.25px; }
.card-h .sub { color: var(--text2); font-size: 13px; }
.card-h .end { margin-left: auto; }
.muted { color: var(--text2); }
.tiny { font-size: 12px; color: var(--text3); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: 1.35fr 1fr; }
.span2 { grid-column: span 2; }

/* Selamlama */
.hero { display: flex; align-items: center; gap: 18px; padding: 24px; overflow: hidden; }
.hero h2 { font-size: 28px; font-weight: 780; letter-spacing: -.7px; line-height: 1.15; }
.hero p { color: var(--text2); margin-top: 6px; }
.hero .btns { margin-left: auto; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--grad); opacity: .14; filter: blur(10px); }

/* KPI */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { padding: 18px; display: flex; flex-direction: column; gap: 10px; text-align: left; transition: transform .25s var(--ease); }
.tile .t-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c, var(--accent)); }
.tile .t-v { font-size: 26px; font-weight: 780; letter-spacing: -.8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .t-l { font-size: 13px; color: var(--text2); font-weight: 560; }
.tile .t-s { font-size: 12px; color: var(--text3); }

/* ---------- Liste ---------- */
.list { padding: 6px; }
.row { width: 100%; display: grid; grid-template-columns: 42px minmax(0, 2.2fr) minmax(0, 1fr) 104px 110px 128px 118px; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; text-align: left; transition: background .2s, transform .2s var(--ease); }
.row { position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 66px; right: 12px; height: 1px; background: var(--hair); pointer-events: none; }
.row.head + .row::before, .list > .row:first-child::before { display: none; }
.row:hover { background: var(--surface3); }
.row.head { font-size: 12px; color: var(--text3); font-weight: 650; text-transform: uppercase; letter-spacing: .3px; padding-top: 6px; padding-bottom: 6px; cursor: default; }
.row.head:hover { background: none; }
.row.head:active { transform: none; }
.row .main-c { min-width: 0; display: flex; flex-direction: column; }
.row b { font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small { color: var(--text2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .c { font-size: 13.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.row .r { text-align: right; justify-self: end; }
.row.simple { grid-template-columns: 42px minmax(0, 1fr) auto; }
.row .end-c { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.br-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.br-ic.sm { width: 28px; height: 28px; border-radius: 9px; }
.br-ic.sm .i { width: 15px; height: 15px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--grad); }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.mini-brs { display: inline-flex; gap: 4px; vertical-align: middle; }
.mini-brs i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.more { display: flex; justify-content: center; padding: 10px; }
.empty { padding: 44px 20px; text-align: center; color: var(--text2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .e-ic { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty .e-ic .i { width: 30px; height: 30px; }
.empty h3 { color: var(--text); font-size: 18px; }

/* Rozetler */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-late { background: rgba(255, 59, 48, .14); color: var(--red); }
.b-hot { background: rgba(255, 99, 30, .15); color: #F25A1A; }
.b-warm { background: rgba(255, 149, 0, .15); color: #E08600; }
.b-soon { background: rgba(232, 177, 0, .16); color: #B58A00; }
.b-ok { background: rgba(40, 180, 99, .14); color: var(--green); }
.b-none { background: var(--surface3); color: var(--text3); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; background: var(--surface3); color: var(--text2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-yur { color: var(--green); background: rgba(40, 180, 99, .12); }
.s-tak { color: var(--accent); background: var(--accent-soft); }
.s-yen { color: var(--teal); background: rgba(32, 164, 184, .13); }
.s-yok { color: var(--gray); background: rgba(142, 142, 147, .14); }
.s-ipt { color: var(--red); background: rgba(255, 59, 48, .11); }
.s-dol { color: #E08600; background: rgba(255, 149, 0, .13); }
[data-theme="dark"] .b-soon { color: #FFD43B; }

/* ---------- Araç çubuğu / filtreler ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 20px; flex-wrap: wrap; }
.search { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--hair); color: var(--text3); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--text3); }
.select { height: 44px; padding: 0 34px 0 14px; border-radius: 14px; border: 1px solid var(--hair); background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238E8E93' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 13px center; -webkit-appearance: none; appearance: none; font-size: 15px; font-weight: 560; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 18px; font-size: 13.5px; font-weight: 620; background: var(--surface); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--text2); scroll-snap-align: start; transition: all .25s var(--ease); }
.chip .n { font-size: 11.5px; opacity: .7; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--text); color: var(--surface2); border-color: transparent; }
[data-theme="dark"] .chip.on { background: #fff; color: #0B1324; }
.chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 13px; background: var(--field); border: 1px solid var(--hair); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 34px; padding: 0 13px; border-radius: 10px; font-size: 13.5px; font-weight: 620; color: var(--text2); white-space: nowrap; transition: all .25s var(--ease); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface2); color: var(--text); }
.seg .n { font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--hair2); }
.seg button.on .n.red { background: var(--red); color: #fff; }

/* ---------- Grafikler ---------- */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 168px; height: 168px; flex: none; }
.donut circle { fill: none; stroke-width: 4.2; }
.donut .trk { stroke: var(--hair); }
.donut text { fill: var(--text); font-family: var(--font); }
.legend { flex: 1; min-width: 180px; display: grid; gap: 8px; }
.legend div { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.legend i { width: 10px; height: 10px; border-radius: 4px; background: var(--c); }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar span { width: 100%; max-width: 34px; border-radius: 10px 10px 6px 6px; background: var(--grad); min-height: 4px; transition: height .6s var(--ease); }
.bars .bar.zero span { background: var(--hair2); }
.bars .bar small { font-size: 11px; color: var(--text3); white-space: nowrap; }
.bars .bar em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--text2); }
.hbar { display: grid; gap: 12px; }
.hbar .hb { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; align-items: center; gap: 12px; font-size: 13.5px; }
.hbar .hb > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text2); font-weight: 560; }
.hbar .track { height: 10px; border-radius: 5px; background: var(--hair); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 5px; background: var(--c, var(--grad)); }
.hbar b { font-variant-numeric: tabular-nums; font-size: 13px; }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 4px 0 14px; }
.stack i { display: block; background: var(--c); }

/* ---------- Sheet / modal ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.sheet-bg { position: absolute; inset: 0; background: rgba(8, 14, 30, .28); opacity: 0; transition: opacity .3s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet { width: min(640px, 100%); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; border-radius: var(--r-xl); background: var(--surface2); opacity: 0; transform: translateY(16px) scale(.98); transition: transform .38s var(--ease), opacity .3s; -webkit-overflow-scrolling: touch; }
.sheet.small { width: min(420px, 100%); }
.sheet.wide { width: min(760px, 100%); }
.sheet-wrap.open .sheet-bg { opacity: 1; }
.sheet-wrap.open .sheet { opacity: 1; transform: none; }
.grabber { display: none; }
.sheet-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px 22px; background: linear-gradient(var(--surface2) 70%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.sheet-head h3 { font-size: 19px; font-weight: 750; letter-spacing: -.3px; flex: 1; min-width: 0; }
.sheet-body { padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.sheet-foot { position: sticky; bottom: 0; z-index: 3; display: flex; gap: 10px; padding: 12px 22px calc(14px + var(--sab)); background: color-mix(in srgb, var(--surface2) 94%, transparent); border-top: 1px solid var(--hair); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.sheet-foot .btn { flex: 1; }
.dlg { padding: 26px 24px 20px; text-align: center; display: grid; gap: 10px; }
.dlg h3 { font-size: 18px; }
.dlg p { color: var(--text2); font-size: 14.5px; }
.dlg .btns { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; }

/* Detay */
.d-hero { display: flex; align-items: center; gap: 14px; }
.d-hero h2 { font-size: 22px; font-weight: 760; letter-spacing: -.4px; line-height: 1.2; }
.d-hero .br-ic { width: 52px; height: 52px; border-radius: 16px; }
.d-hero .br-ic .i { width: 26px; height: 26px; }
.d-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.prog { padding: 16px; border-radius: var(--r-md); background: var(--surface3); border: 1px solid var(--hair); }
.prog .pl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text2); margin-bottom: 10px; }
.prog .pt { height: 8px; border-radius: 4px; background: var(--hair2); overflow: hidden; }
.prog .pt i { display: block; height: 100%; border-radius: 4px; background: var(--grad); }
.prog .pt i.late { background: var(--red); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--r-md); overflow: hidden; background: var(--surface3); border: 1px solid var(--hair); }
.kv div { padding: 11px 14px; min-width: 0; }
.kv dt { font-size: 11.5px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.kv dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.kv .full { grid-column: span 2; }
.acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px; border-radius: 16px; background: var(--surface3); border: 1px solid var(--hair); font-size: 12.5px; font-weight: 620; color: var(--text2); transition: transform .2s var(--ease), background .2s; }
.act:hover { background: var(--surface); }
.act:active { transform: scale(.95); }
.act .i { width: 22px; height: 22px; color: var(--accent); }
.act.wa .i { color: #25D366; }
.act.red .i { color: var(--red); }

/* Form */
.form { display: flex; flex-direction: column; gap: 18px; }
.fs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fs-t { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text2); padding-left: 4px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--hair2); background: var(--field); font-size: 16px; outline: none; transition: border-color .2s; -webkit-appearance: none; appearance: none; }
.field select { background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238E8E93' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field input[type="date"] { min-width: 0; }
.field .err { border-color: var(--red); }
.hint { font-size: 12.5px; color: var(--text3); }

/* Ayarlar listesi */
.set-list { display: flex; flex-direction: column; padding: 4px 0; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; min-height: 56px; text-align: left; width: 100%; }
.set-row + .set-row { }
.set-row .s-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--c, var(--accent)); flex: none; }
.set-row .s-ic .i { width: 18px; height: 18px; }
.set-row .s-t { flex: 1; min-width: 0; }
.set-row .s-t b { display: block; font-weight: 620; }
.set-row .s-t small { color: var(--text2); font-size: 12.5px; }
.set-row > .i { color: var(--text3); }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--hair2); transition: background .25s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* Bildirim kartı */
.notice { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.notice .n-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.notice .n-t { flex: 1; min-width: 200px; }
.notice .n-t b { display: block; }
.notice .n-t small { color: var(--text2); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.q-btn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface3); border: 1px solid var(--hair); color: var(--accent); }
.q-btn.wa { color: #25D366; }
.q-btn .i { width: 18px; height: 18px; }
.rs-sel { height: 32px; border-radius: 10px; border: 1px solid var(--hair); background: var(--field); font-size: 12.5px; font-weight: 600; padding: 0 8px; }
.row.renew { grid-template-columns: 42px minmax(0, 1fr) auto auto; }
.opps { display: flex; gap: 8px; flex-wrap: wrap; }
.opp { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 620; background: linear-gradient(135deg, rgba(48, 176, 199, .14), rgba(94, 92, 230, .14)); border: 1px solid rgba(94, 92, 230, .18); }
.opp .i { width: 16px; height: 16px; color: var(--accent2); }

/* Arama */
.cmd-in { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--hair); }
.cmd-in input { flex: 1; border: 0; outline: 0; background: none; font-size: 18px; min-width: 0; }
.cmd-res { padding: 8px; max-height: 60dvh; overflow: auto; }
.cmd-res h4 { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px 6px; }

/* Kilit ekranı */
.lock { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: calc(24px + var(--sat)) 24px calc(24px + var(--sab)); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); background: color-mix(in srgb, var(--surface2) 75%, transparent); }
.lock img { width: 72px; height: 72px; border-radius: 18px; }
.lock h2 { font-size: 20px; }
.pins { display: flex; gap: 16px; height: 16px; }
.pins i { width: 14px; height: 14px; border-radius: 50%; border: 1.6px solid var(--text2); transition: background .2s; }
.pins i.on { background: var(--text); border-color: var(--text); }
.pins.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-10px); } 50% { transform: translateX(10px); } 75% { transform: translateX(-6px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px; }
.keypad button { width: 76px; height: 76px; border-radius: 50%; font-size: 28px; font-weight: 500; background: var(--surface); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: transform .15s, background .15s; }
.keypad button:active { transform: scale(.92); background: var(--surface2); }
.keypad button.txt { font-size: 15px; background: none; border: 0; }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; font-weight: 600; font-size: 14px; background: var(--surface2); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); animation: tIn .4s var(--ease); }
.toast .i { color: var(--green); }
.toast.err .i { color: var(--red); }
.toast button { color: var(--accent); font-weight: 700; margin-left: 6px; }
@keyframes tIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }


/* Ek yardımcılar */
.m-only-i { display: none; }
.opp-t { color: var(--accent2); font-weight: 650; }
.sheet-wrap.top { align-items: flex-start; padding-top: 10vh; }
.cmd-res .row { border-radius: 14px; }
.row .end-c small { font-size: 11.5px; color: var(--text3); }
.notice .btns { margin-left: auto; }
@media (max-width: 959px) {
  .row .m-only-i { display: inline-flex; }
  .row .end-c small.m-only-i { display: block; }
  .sheet-wrap.top { padding-top: 0; align-items: flex-end; }
  .sheet.full { height: calc(100dvh - var(--sat) - 18px); display: flex; flex-direction: column; }
  .sheet.full .cmd-res { flex: 1; max-height: none; }
  .cmd-in { padding-top: 22px; }
  .notice .btns { margin-left: 0; width: 100%; }
  .notice .btns .btn { flex: 1; }
}

/* Gölgesiz ayrım çizgileri */
.nav a, .seg button, .tab { border: 1px solid transparent; }
.nav a.on, .seg button.on, .tab.on { border-color: var(--hair2); }
.icon-btn .dot { border: 2px solid var(--surface2); top: 4px; right: 4px; min-width: 19px; height: 19px; }
.switch span::after { border: 1px solid rgba(0, 0, 0, .06); }
.br-ic { border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.kv div { border-bottom: 1px solid var(--hair); border-right: 1px solid var(--hair); }
.kv div:nth-child(2n), .kv .full { border-right: 0; }
.toast { border-color: var(--hair2); }
.row .main-c { text-align: left; }

/* Görevler */
.chk { width: 28px; height: 28px; justify-self: center; border-radius: 50%; border: 1.8px solid var(--hair2); display: grid; place-items: center; color: transparent; transition: all .2s var(--ease); }
.chk .i { width: 16px; height: 16px; stroke-width: 2.6; }
.chk.on { background: var(--green); border-color: var(--green); color: #fff; }
.row.task.done b { text-decoration: line-through; color: var(--text3); }

/* Takvim */
.cal-t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; font-size: 18px; font-weight: 750; }
.cal-t small { font-size: 12px; font-weight: 600; color: var(--text3); }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h span { text-align: center; font-size: 12px; font-weight: 700; color: var(--text3); padding-bottom: 8px; }
.cal-d { aspect-ratio: 1 / .86; border-radius: 14px; border: 1px solid var(--hair); background: var(--surface3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 650; font-variant-numeric: tabular-nums; transition: background .2s, border-color .2s; }
.cal-d:hover { border-color: var(--hair2); }
.cal-d.past { opacity: .55; }
.cal-d.today { border-color: var(--accent); color: var(--accent); }
.cal-d.sel { background: var(--accent); border-color: var(--accent); color: #fff; opacity: 1; }
.cal-d i { display: flex; gap: 3px; }
.cal-d em, .cal-l em { font-style: normal; color: #fff; }
.cal-d em { font-size: 10.5px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; }
.cal-d em.p, .cal-l em.p { background: var(--orange); }
.cal-d em.t, .cal-l em.t { background: var(--accent2); }
.cal-d.sel em { background: rgba(255, 255, 255, .3); }
.cal-l { display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: 12.5px; color: var(--text2); }
.cal-l span { display: inline-flex; align-items: center; gap: 6px; }
.cal-l em { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Detay bölümleri: teklif, belge, geçmiş */
.sec { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.sec-h { display: flex; align-items: center; gap: 10px; }
.sec-h h4 { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 720; }
.sec-h h4 .i { width: 18px; height: 18px; color: var(--accent); }
.quotes, .files { display: flex; flex-direction: column; gap: 8px; }
.quote, .file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface3); border: 1px solid var(--hair); }
.quote.best { border-color: rgba(40, 180, 99, .45); background: rgba(40, 180, 99, .07); }
.q-m, .f-m { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.q-m b, .f-m b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-m small, .f-m small { font-size: 12px; color: var(--text2); }
.q-a { white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-d { font-size: 11.5px; font-weight: 750; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.q-d.down { color: var(--green); background: rgba(40, 180, 99, .12); }
.q-d.up { color: var(--red); background: rgba(255, 59, 48, .1); }
.q-x { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--text3); }
.q-x:hover { background: var(--hair); color: var(--red); }
.q-x .i { width: 16px; height: 16px; }
.f-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.f-ic .i { width: 18px; height: 18px; }
.qform, .nform { display: flex; gap: 8px; flex-wrap: wrap; }
.qform input, .nform input { flex: 1 1 120px; min-width: 0; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hair2); background: var(--field); font-size: 16px; outline: none; }
.qform input:focus, .nform input:focus { border-color: var(--accent); }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.log li { display: flex; gap: 12px; padding: 9px 0; }
.log li + li { border-top: 1px solid var(--hair); }
.l-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface3); border: 1px solid var(--hair); color: var(--text2); }
.l-ic .i { width: 15px; height: 15px; }
.log b { display: block; font-size: 14px; font-weight: 600; }
.log small { font-size: 12px; color: var(--text3); }
.preview { width: 100%; border-radius: 16px; border: 1px solid var(--hair); }

/* Hedef / oran */
.goal { display: flex; flex-direction: column; gap: 10px; }
.goal-v { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.goal-v b { font-size: 26px; font-weight: 780; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.goal-v span { font-size: 13px; color: var(--text2); }
.goal .pt { height: 10px; border-radius: 5px; background: var(--hair2); overflow: hidden; }
.goal .pt i { display: block; height: 100%; border-radius: 5px; background: var(--grad); }
.goal small { font-size: 12px; color: var(--text3); }
@media (max-width: 959px) {
  .kv div { border-right: 0; }
  .quote { flex-wrap: wrap; }
  .quote .btn { order: 5; flex: 1 1 100%; }
  .cal-h, .cal-g { gap: 4px; }
  .cal-d { border-radius: 11px; aspect-ratio: 1 / 1.08; font-size: 14px; }
  .cal-d em { min-width: 15px; height: 15px; padding: 0 3px; font-size: 9.5px; }
  .cal-tb { flex-wrap: nowrap; gap: 6px; }
  .cal-tb .btn.sm { padding: 0 10px; }
  .cal-tb .lbl { display: none; }
  .cal-t { font-size: 16px; white-space: nowrap; }
}

/* Masaüstü geniş ekran */
@media (min-width: 1280px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .row { grid-template-columns: 42px minmax(0, 2fr) minmax(0, 1fr) 100px 120px 112px; }
  .row .c-amt { display: none; }
  .g3 { grid-template-columns: 1fr; }
}

/* ---------- Mobil / tablet ---------- */
@media (max-width: 959px) {
  body { font-size: 15.5px; }
  .app { display: block; padding: 0; }
  .sidebar { display: none; }
  .main { gap: 14px; padding: 0 14px calc(108px + var(--sab)); padding-left: max(14px, var(--sal)); padding-right: max(14px, var(--sar)); }
  .topbar { top: 0; margin: 0 -14px; padding: calc(10px + var(--sat)) 14px 10px 18px; border-radius: 0 0 24px 24px; border-top: 0; }
  .topbar h1 { font-size: 24px; }
  .search-trigger { display: none; }
  .m-only { display: grid; }
  .tabbar {
    display: flex; position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--sab));
    width: min(560px, calc(100% - 20px)); height: 68px; padding: 6px; border-radius: 34px; gap: 2px; background: color-mix(in srgb, var(--surface2) 82%, transparent);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 28px; font-size: 10.5px; font-weight: 650; color: var(--text2); position: relative; transition: color .25s, background .35s var(--ease), transform .2s var(--ease); }
  .tab .i { width: 23px; height: 23px; }
  .tab.on { color: var(--accent); background: var(--surface2); }
  .tab .cnt { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; font-size: 10px; font-weight: 800; display: grid; place-items: center; background: var(--red); color: #fff; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 15px; }
  .tile .t-v { font-size: 22px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .hero { flex-direction: column; align-items: flex-start; padding: 20px; }
  .hero h2 { font-size: 24px; }
  .hero .btns { margin-left: 0; width: 100%; }
  .hero .btns .btn { flex: 1; }
  .card { padding: 16px; border-radius: 22px; }
  .row, .row.renew { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; padding: 11px 10px; }
  .row .d-only, .row.head { display: none; }
  .row.renew .quick { grid-column: 2 / -1; justify-content: flex-start; }
  .toolbar { padding: 8px; }
  .toolbar .select { flex: 1 1 140px; }
  .sheet-wrap { padding: 0; align-items: flex-end; }
  .sheet, .sheet.small, .sheet.wide { width: 100%; max-height: calc(100dvh - var(--sat) - 18px); border-radius: 30px 30px 0 0; transform: translateY(100%); border-bottom: 0; }
  .sheet-wrap.open .sheet { transform: translateY(var(--drag, 0px)); }
  .sheet.dragging { transition: none; }
  .grabber { display: block; position: sticky; top: 0; z-index: 4; height: 0; }
  .grabber::after { content: ""; position: absolute; left: 50%; top: 7px; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--hair2); }
  .sheet-head { padding: 22px 16px 12px 20px; border-radius: 30px 30px 0 0; }
  .sheet-body { padding: 4px 18px 22px; }
  .dlg { padding-bottom: calc(20px + var(--sab)); }
  .kv { grid-template-columns: 1fr; }
  .kv .full { grid-column: auto; }
  .kv div { }
  .fs { grid-template-columns: 1fr; }
  .toasts { bottom: calc(92px + var(--sab)); }
  .hbar .hb { grid-template-columns: minmax(80px, 110px) 1fr auto; }
  .donut { width: 140px; height: 140px; }
  .bars { height: 140px; gap: 5px; }
  .bars .bar small { font-size: 10px; }
}
@media (max-width: 380px) {
  .acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tab { font-size: 9.5px; }
  .tile .t-v { font-size: 20px; }
}
@media (min-width: 960px) { .row.head { position: sticky; top: 0; } }
@media print {
  .sidebar, .topbar, .tabbar, .bg, .toasts { display: none !important; }
  .app { display: block; padding: 0; }
  .card, .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; border-color: #ddd; }
}
