/* Larabay — prototip tasarim dili (Business/Admin/Web/assets/styles.css baz alindi).
   Cream zemin + noise doku, navy sidebar, gradient accent, Fraunces basliklar, KPI kartlari. */
:root {
  --bg: #F6F4EE; --surface: #FFFFFF; --surface-2: #FBFAF5; --surface-3: #F0EEE6;
  --ink: #14253A; --ink-soft: #3D4F66; --ink-mute: #7A8499; --ink-faint: #B0B6C2;
  --line: #E5E3DA; --line-soft: #EFEDE5;
  --cyan: #4DD4ED; --cyan-deep: #2BB5D4; --cyan-soft: #DDF5FA;
  --magenta: #E91E8A; --magenta-deep: #B5126A; --magenta-soft: #FBDDED;
  --purple: #8C3BC4;
  --grad: linear-gradient(135deg, #4DD4ED 0%, #8C3BC4 50%, #E91E8A 100%);
  --grad-soft: linear-gradient(135deg, #DDF5FA 0%, #F1E1F5 50%, #FBDDED 100%);
  --grad-vivid: linear-gradient(135deg, #4DD4ED 0%, #E91E8A 100%);
  --success: #2E9577; --success-soft: #D9EDE5; --warning: #E8A317; --warning-soft: #FCEFD0;
  --danger: #E94646; --danger-soft: #FBDADA;
  --shadow-sm: 0 1px 2px rgba(20,37,58,.04), 0 4px 12px rgba(20,37,58,.04);
  --shadow-md: 0 2px 4px rgba(20,37,58,.06), 0 12px 28px rgba(20,37,58,.08);
  --radius: 16px; --radius-sm: 10px; --radius-lg: 24px;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Geist', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1000; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.gradient-text, .grad-text { background: var(--grad-vivid); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- LOGIN ---------- */
#view-login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(900px 500px at 75% -10%, #1d3350, var(--ink)); }
.login-card { width: 372px; background: var(--surface); border-radius: 22px; padding: 36px; box-shadow: 0 40px 90px rgba(8,16,32,.5); position: relative; z-index: 2; }
.login-card .brand-logo { height: 40px; width: auto; display: block; }
.login-card p.sub { color: var(--ink-mute); margin: 4px 0 22px; font-size: 13px; }
label { display: block; font-size: 11px; color: var(--ink-mute); margin: 14px 0 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); outline: none; transition: .18s; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: var(--shadow-sm); }
input:disabled { background: var(--surface-3); color: var(--ink-mute); }
.err-msg { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ---------- BUTTONS (pill) ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; justify-content: center; padding: 9px 18px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: .2s; }
.btn:hover { border-color: var(--ink); }
.btn-grad { background: var(--grad-vivid); color: #fff; border: none; }
.btn-grad:hover { box-shadow: 0 8px 20px rgba(233,30,138,.28); transform: translateY(-1px); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------- APP SHELL ---------- */
#view-app { min-height: 100vh; }
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: rgba(255,255,255,.85); padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand-logo-sb { height: 26px; width: auto; display: block; }
.brand-text { font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -.03em; line-height: 1; color: #fff; }
.brand-tag { font-size: 9px; text-transform: uppercase; letter-spacing: .2em; color: rgba(255,255,255,.45); margin-top: 5px; }

/* ---------- COMMAND PALETTE (⌘/Ctrl+K) ---------- */
.cmdk-bd { position: fixed; inset: 0; background: rgba(8,16,32,.45); backdrop-filter: blur(2px); z-index: 200; display: grid; place-items: start center; padding-top: 12vh; }
.cmdk { width: 540px; max-width: 92vw; background: var(--surface); border-radius: 16px; box-shadow: 0 40px 90px rgba(8,16,32,.4); overflow: hidden; }
.cmdk-input { width: 100%; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 15px; }
.cmdk-input:focus { box-shadow: none; border-color: var(--line); }
.cmdk-list { max-height: 360px; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.cmdk-item .ic { width: 20px; opacity: .7; display: inline-flex; }
.cmdk-item small { color: var(--ink-mute); margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.cmdk-item.active, .cmdk-item:hover { background: var(--surface-3); }
.cmdk-empty { padding: 22px; text-align: center; color: var(--ink-mute); }
.nav-section { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 9px; text-transform: uppercase; letter-spacing: .2em; color: rgba(255,255,255,.32); padding: 0 12px 7px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: rgba(255,255,255,.65); font-size: 13px; font-weight: 500; cursor: pointer; transition: .18s; position: relative; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; background: var(--grad-vivid); border-radius: 0 3px 3px 0; }
.nav-item .ic { width: 18px; text-align: center; flex-shrink: 0; font-size: 14px; }
.sidebar-foot { margin-top: auto; padding: 11px; background: rgba(255,255,255,.05); border-radius: 14px; display: flex; gap: 10px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-vivid); display: grid; place-items: center; font-weight: 600; color: #fff; flex-shrink: 0; font-size: 12px; }
.sidebar-foot-info { line-height: 1.2; min-width: 0; flex: 1; }
.sidebar-foot-name { font-weight: 600; font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot-role { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 2px; }

main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; border-bottom: 1px solid var(--line); background: rgba(246,244,238,.85); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.breadcrumb { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .18em; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.search-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); width: 240px; }
.search-bar svg { color: var(--ink-mute); flex-shrink: 0; }
.search-bar input { border: none; background: transparent; outline: none; font: inherit; font-size: 13px; flex: 1; min-width: 0; padding: 0; }
.search-bar input:focus { box-shadow: none; }
.search-bar kbd { font-family: var(--mono); font-size: 10px; padding: 2px 6px; background: var(--surface-3); border-radius: 4px; color: var(--ink-mute); }
.org-chip { font-size: 12px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 500; }
.content { padding: 30px 32px 60px; max-width: 1480px; }

/* ---------- PAGE HEADER ---------- */
.page-header { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .22em; background: var(--grad-vivid); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; margin-bottom: 9px; }
.page-title { font-family: var(--serif); font-size: 32px; font-weight: 400; letter-spacing: -.025em; line-height: 1.06; color: var(--ink); }
.page-title em { font-style: italic; background: var(--grad-vivid); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-sub { color: var(--ink-mute); margin-top: 8px; font-size: 13.5px; max-width: 560px; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ---------- CARDS / LAYOUT ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 18px; letter-spacing: -.01em; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 130px; }
.flex { display: flex; gap: 8px; align-items: center; }
.spacer { flex: 1; }
.muted { color: var(--ink-mute); }
.right { text-align: right; }

/* ---------- KPI / STATS ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.stat .l { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-mute); font-weight: 600; }
.stat .n { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1; letter-spacing: -.025em; margin-top: 12px; color: var(--ink); }
.stat .bar { height: 3px; border-radius: 3px; background: var(--grad-vivid); margin-top: 14px; width: 38px; }

/* ---------- TABLE ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
th { color: var(--ink-mute); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
.empty { color: var(--ink-mute); padding: 30px; text-align: center; }

/* ---------- BADGES ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--ink-mute); }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: #8A6300; }
.badge.err { background: var(--danger-soft); color: var(--danger-deep, #B5126A); }
.badge.info { background: var(--cyan-soft); color: var(--cyan-deep); }

/* ---------- TIMELINE ---------- */
.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--grad-vivid); }
.timeline .t { font-weight: 600; }
.timeline .m { color: var(--ink-mute); font-size: 12px; margin-top: 2px; }

/* ---------- KANBAN ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kcol { background: var(--surface-3); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.kcol h4 { margin-bottom: 10px; font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .1em; }
.ktask { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.ktask .tt { font-weight: 600; font-size: 13px; }
.ktask .tm { color: var(--ink-mute); font-size: 11px; margin-top: 3px; }
.ktask .ka { margin-top: 8px; display: flex; gap: 6px; }

/* ---------- WALLET HERO (son kullanici) ---------- */
.wallet-hero { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 26px 28px; position: relative; overflow: hidden; margin-bottom: 22px; }
.wallet-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 220px at -10% 100%, rgba(77,212,237,.25), transparent 50%), radial-gradient(400px 200px at 110% -10%, rgba(233,30,138,.25), transparent 60%); pointer-events: none; }
.wallet-hero::after { content: ''; position: absolute; right: -50px; bottom: -50px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); }
.wallet-top { display: flex; align-items: start; justify-content: space-between; position: relative; z-index: 1; }
.wallet-label { font-size: 10px; text-transform: uppercase; letter-spacing: .22em; color: rgba(255,255,255,.55); font-weight: 500; }
.wallet-chip { font-size: 10px; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; display: inline-flex; align-items: center; gap: 6px; }
.wallet-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.wallet-balance { font-family: var(--serif); font-size: 52px; font-weight: 400; line-height: 1; letter-spacing: -.03em; margin-top: 20px; position: relative; z-index: 1; }
.wallet-balance .currency { font-size: 20px; color: rgba(255,255,255,.5); margin-left: 6px; }
.wallet-actions { display: flex; gap: 8px; margin-top: 20px; position: relative; z-index: 1; }
.wallet-btn { flex: 1; padding: 11px 12px; border-radius: 11px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #fff; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: .2s; }
.wallet-btn:hover { background: rgba(255,255,255,.12); }
.wallet-btn.primary { background: var(--grad-vivid); border: none; }

/* ---------- KPI (ikonlu) ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.kpi.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.dark::after { content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(77,212,237,.2), transparent 65%); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; position: relative; z-index: 1; }
.kpi-label { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-mute); font-weight: 600; }
.kpi.dark .kpi-label { color: rgba(255,255,255,.55); }
.kpi-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-soft); font-size: 16px; }
.kpi.dark .kpi-ico { background: rgba(255,255,255,.08); color: #fff; }
.kpi-ico.grad { background: var(--grad-vivid); color: #fff; }
.kpi-ico.cyan { background: var(--cyan-soft); color: var(--cyan-deep); }
.kpi-ico.magenta { background: var(--magenta-soft); color: var(--magenta-deep); }
.kpi-ico.warning { background: var(--warning-soft); color: #8A6300; }
.kpi-num { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1; letter-spacing: -.025em; position: relative; z-index: 1; }
.kpi-num.grad { background: var(--grad-vivid); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi-foot { margin-top: 11px; font-size: 11px; color: var(--ink-mute); position: relative; z-index: 1; }
.kpi.dark .kpi-foot { color: rgba(255,255,255,.5); }
.kpi-foot.up { color: var(--success); } .kpi-foot.alert { color: var(--warning); }

/* ---------- PERK / MARKA KARTLARI (magaza) ---------- */
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.perk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .3s cubic-bezier(.4,0,.2,1); }
.perk-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.perk-visual { aspect-ratio: 16/10; display: grid; place-items: center; position: relative; overflow: hidden; font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #fff; background: var(--grad-vivid); }
.perk-visual::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 50%); }
.perk-tag { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.95); color: var(--ink); font-size: 9px; font-weight: 600; padding: 4px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .12em; z-index: 2; }
.perk-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.perk-name { font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--ink); }
.perk-row { display: flex; gap: 8px; align-items: center; }
.perk-row select { flex: 1; }

/* ---------- GREETING ---------- */
.greeting { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 34px; position: relative; overflow: hidden; margin-bottom: 22px; }
.greeting::before { content: ''; position: absolute; right: -100px; top: -100px; width: 320px; height: 320px; border-radius: 50%; background: var(--grad-soft); opacity: .7; filter: blur(20px); }
.greeting .eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .22em; color: var(--ink-mute); margin-bottom: 12px; position: relative; z-index: 1; }
.greeting h1 { font-family: var(--serif); font-size: 36px; line-height: 1.06; font-weight: 400; letter-spacing: -.025em; position: relative; z-index: 1; }
.greeting h1 em { font-style: italic; background: var(--grad-vivid); -webkit-background-clip: text; background-clip: text; color: transparent; }
.greeting p { color: var(--ink-mute); max-width: 460px; margin-top: 12px; position: relative; z-index: 1; }

/* ---------- MODAL (yeni kayit formlari) ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,37,58,.45); backdrop-filter: blur(3px); z-index: 200; animation: lbFade .15s ease; }
.card.as-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 201; width: 560px; max-width: 94vw; max-height: 88vh; overflow-y: auto; margin: 0; box-shadow: 0 40px 90px rgba(8,16,32,.4); animation: lbModalIn .18s ease; }
.card.as-modal.hidden { display: block !important; }
.modal-x { position: absolute; top: 14px; right: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-mute); background: var(--surface-3); font-size: 13px; }
.modal-x:hover { background: var(--ink); color: #fff; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbModalIn { from { opacity: 0; transform: translate(-50%,-46%); } to { opacity: 1; transform: translate(-50%,-50%); } }

/* ---------- MISC ---------- */
.items-tbl td { padding: 6px 8px; }
.items-tbl td input, .items-tbl td select { padding: 7px 9px; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.3); z-index: 200; opacity: 0; transform: translateY(10px); transition: .2s; font-weight: 500; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--danger); }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } .app { grid-template-columns: 64px 1fr; } .nav-item span:last-child, .brand-text, .brand-tag, .nav-label, .sidebar-foot-info { display: none; } }
