@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0b14;
  --surface: #12131f;
  --surface-2: #181a29;
  --surface-3: #1f2235;
  --border: #272a3f;
  --border-strong: #363a56;
  --text: #eef0fa;
  --muted: #9195b5;
  --faint: #5c6080;
  --accent: #3d3ff0;
  --accent-2: #7c6ef5;
  --accent-soft: #1d1d4a;
  --pos: #22c55e;
  --pos-soft: #122a1c;
  --warn: #f5a623;
  --warn-soft: #332607;
  --neg: #f0506e;
  --neg-soft: #371023;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 20px 60px -20px rgba(61,63,240,.25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  background: radial-gradient(120% 90% at 15% -10%, #171a3d 0%, var(--bg) 55%), var(--bg);
  color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ===== auth screens ===== */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 408px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 32px;
}
.brand-mark { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; text-align: center; }
.brand-mark img { width: 56px; height: 56px; filter: drop-shadow(0 4px 18px rgba(61,63,240,.45)); }
.brand-mark h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.brand-mark p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { appearance: none; }
.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(--border-strong); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 14px; transition: all .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; width: 100%; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.danger { border-color: var(--neg); color: var(--neg); }
.form-error { background: var(--neg-soft); color: var(--neg); padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ===== launcher shell ===== */
.shell-topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10;
}
.shell-topbar img { width: 30px; height: 30px; }
.shell-topbar .name { font-weight: 800; font-size: 15px; }
.shell-topbar .name span { color: var(--accent-2); }
.shell-topbar .who { font-size: 13px; color: var(--muted); }
.shell-topbar .who b { color: var(--text); }
.shell-main { max-width: 1080px; margin: 0 auto; padding: 48px 24px 60px; }
.hero { margin-bottom: 36px; }
.hero .eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.hero h2 { margin: 10px 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); font-size: 15px; max-width: 520px; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.module-card {
  position: relative; overflow: hidden; display: block; padding: 26px 24px; border-radius: var(--radius);
  background: linear-gradient(155deg, var(--surface-2) 0%, var(--surface) 70%); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: transform .18s, border-color .18s, box-shadow .18s;
}
.module-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.module-card .glow { position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; border-radius: 50%; opacity: .35; filter: blur(30px); }
.module-card .icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; }
.module-card .icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.9; }
.module-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.module-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.module-card .go { margin-top: 16px; font-size: 12.5px; font-weight: 700; color: var(--accent-2); display: flex; align-items: center; gap: 5px; }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.users { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.users th { text-align: left; padding: 11px 16px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
table.users td { padding: 11px 16px; border-bottom: 1px solid var(--border); }
table.users tr:last-child td { border-bottom: 0; }
table.users tr:hover td { background: var(--surface-2); }
.badge { display: inline-flex; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.badge.yonetici { background: var(--accent-soft); color: var(--accent-2); }
.badge.muhasebe { background: var(--pos-soft); color: var(--pos); }
.badge.operasyon { background: var(--warn-soft); color: var(--warn); }
.badge.off { background: var(--neg-soft); color: var(--neg); }

.overlay { position: fixed; inset: 0; background: rgba(4,5,12,.7); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 26px 22px; }
.modal h3 { margin: 0 0 18px; font-size: 17px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--surface-2); border: 1px solid var(--border-strong); padding: 11px 16px; border-radius: var(--radius-sm); font-size: 13.5px; box-shadow: var(--shadow); }
.toast.err { border-color: var(--neg); color: var(--neg); }

@media (max-width: 640px) {
  .shell-main { padding: 30px 16px 50px; }
  .hero h2 { font-size: 24px; }
  .auth-card { padding: 28px 22px; }
}
