/* =====================================================================
   RPA Portal — arayüz stilleri
   ===================================================================== */

:root {
  --bg: #f3f5fa;
  --bg-grad: radial-gradient(1200px 500px at 85% -10%, #e3ebff 0%, rgba(227,235,255,0) 60%),
             radial-gradient(900px 400px at -10% 0%, #eef0ff 0%, rgba(238,240,255,0) 55%);
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e3e8f0;
  --border-strong: #cfd7e3;

  --primary: #2563eb;
  --primary-2: #4f46e5;
  --primary-soft: #eef3ff;
  --primary-ring: rgba(37, 99, 235, .18);
  --grad: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);

  --ok: #059669;     --ok-soft: #e7f8f1;
  --danger: #dc2626; --danger-soft: #fdeeee;
  --warn: #d97706;   --info-soft: #eaf2ff;

  --nav: #0b1530;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;

  --sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-2: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px -6px rgba(15, 23, 42, .10);
  --sh-3: 0 2px 4px rgba(15, 23, 42, .04), 0 18px 40px -12px rgba(30, 41, 99, .22);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .15s;
  --t: .25s;

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

/* Sayfa geçişleri (destekleyen tarayıcılarda yumuşak geçiş) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .28s var(--ease) both; }
.topbar { view-transition-name: topbar; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(6px); } }

/* ---------------- Temel ---------------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px; line-height: 1.55; color: var(--text);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
::selection { background: rgba(79, 70, 229, .18); }
a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary-2); }
code, .mono { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.upper { text-transform: uppercase; }
h1, h2, h3 { letter-spacing: -.015em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd5e1; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #aab6c8; }

/* ---------------- Üst menü ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(11,21,48,.97), rgba(13,25,58,.94));
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 8px 30px -12px rgba(11, 21, 48, .5);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,140,255,.55), rgba(139,92,246,.55), transparent);
  opacity: .7;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 62px;
  display: flex; align-items: center; gap: 32px;
}
.brand { color: #fff; font-weight: 700; font-size: 16.5px; display: flex; align-items: center; gap: 11px; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand-mark {
  position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 6px 16px -4px rgba(79, 70, 229, .65), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform var(--t) var(--spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  color: #aab6d3; padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 14.5px;
  transition: color var(--t-fast), background var(--t-fast);
}
.mainnav a svg { opacity: .75; transition: transform var(--t) var(--spring), opacity var(--t-fast); }
.mainnav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.mainnav a:hover svg { transform: translateY(-1px) scale(1.08); opacity: 1; }
.mainnav a.active { color: #fff; background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.mainnav a.active svg { opacity: 1; color: #93b4ff; }
.mainnav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -12px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  transform: scaleX(0); transition: transform var(--t) var(--ease);
}
.mainnav a.active::after { transform: scaleX(1); }

.usermenu { display: flex; align-items: center; gap: 10px; }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #6366f1); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}
.who { display: flex; flex-direction: column; line-height: 1.2; margin-right: 6px; }
.who strong { color: #fff; font-size: 13.5px; font-weight: 600; }
.who small { color: #8f9cc0; font-size: 11.5px; }
.icon-link {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #aab6d3;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.icon-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-link:active { transform: scale(.92); }

.badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 600; vertical-align: middle;
}

/* ---------------- Sayfa ---------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 30px 24px 72px; }
.app .container > * { animation: rise .5s var(--ease) both; }
.app .container > *:nth-child(2) { animation-delay: .04s; }
.app .container > *:nth-child(3) { animation-delay: .08s; }
.app .container > *:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.page-title {
  font-size: 28px; line-height: 1.2; margin: 6px 0 24px; font-weight: 700; letter-spacing: -.025em;
  display: flex; align-items: baseline; gap: 10px;
}
.page-title .muted { font-size: 16px; font-weight: 500; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); padding: 2px 6px; margin: 0 -2px; border-radius: 6px; transition: background var(--t-fast), color var(--t-fast); }
.crumbs a:hover { color: var(--primary); background: var(--primary-soft); }
.crumbs .sep { opacity: .5; }
.crumbs > span:last-child { color: var(--text-2); font-weight: 500; }

/* ---------------- Kutucuklar ---------------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1024px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .tiles { grid-template-columns: 1fr; } }
.tile {
  --c: #2563eb; --c-soft: #eaf1ff;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px; padding: 26px 26px 24px; min-height: 178px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); color: var(--text);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
  animation: tile-in .55s var(--ease) both;
}
.tiles .tile:nth-child(1) { animation-delay: .05s; }
.tiles .tile:nth-child(2) { animation-delay: .11s; }
.tiles .tile:nth-child(3) { animation-delay: .17s; }
.tiles .tile:nth-child(4) { animation-delay: .23s; }
.tiles .tile:nth-child(5) { animation-delay: .29s; }
.tiles .tile:nth-child(n+6) { animation-delay: .35s; }
@keyframes tile-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* imleci takip eden ışık */
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--c-soft), transparent 45%);
  transition: opacity var(--t);
}
/* üst kenar ince renk çizgisi */
.tile::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--c), transparent 80%);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.tile:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--sh-3); border-color: color-mix(in srgb, var(--c) 30%, var(--border)); }
.tile:hover::before { opacity: 1; }
.tile:hover::after { transform: scaleX(1); }
.tile:active { transform: translateY(-1px) scale(.99); transition-duration: .08s; }

.tile-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--c-soft); color: var(--c);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 12%, transparent);
  transition: transform .4s var(--spring), background var(--t), color var(--t), box-shadow var(--t);
}
.tile:hover .tile-icon {
  transform: translateY(-2px) rotate(-6deg) scale(1.06);
  background: var(--c); color: #fff;
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--c) 70%, transparent);
}
.tile-title { font-size: 18.5px; font-weight: 650; letter-spacing: -.015em; }
.tile-desc { font-size: 13.5px; color: var(--muted); max-width: 30ch; }
.tile-arrow {
  position: absolute; right: 22px; bottom: 22px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--muted);
  opacity: 0; transform: translateX(-8px);
  transition: opacity var(--t), transform var(--t) var(--ease), background var(--t), color var(--t);
}
.tile:hover .tile-arrow { opacity: 1; transform: none; background: var(--c); color: #fff; }

.tile-blue   { --c: #2563eb; --c-soft: #eaf1ff; }
.tile-green  { --c: #059669; --c-soft: #e3f7ef; }
.tile-amber  { --c: #d97706; --c-soft: #fdf2e1; }
.tile-slate  { --c: #475569; --c-soft: #edf1f6; }
.tile-violet { --c: #7c3aed; --c-soft: #f1ebff; }

/* ---------------- Kart ve form ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); padding: 26px; margin-bottom: 20px;
}
.card-title { font-size: 19px; margin: 0 0 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
h2.card-title { font-size: 16px; }
.code-chip {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  background: var(--primary-soft); color: var(--primary); padding: 3px 10px; border-radius: 999px;
}
.form-card { max-width: 780px; padding: 30px; margin-left: auto; margin-right: auto; }
.form-card.narrow { max-width: 440px; }
/* form sayfalarında yol bilgisini kartla aynı hizaya al */
.container:has(> .form-card) > .crumbs { max-width: 780px; margin-left: auto; margin-right: auto; }
.container:has(> .form-card.narrow) > .crumbs { max-width: 440px; }
.container:has(> .form-card) > .alert { max-width: 780px; margin-left: auto; margin-right: auto; }
.container:has(> .form-card.narrow) > .alert { max-width: 440px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form > p { margin: -6px 0 0; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0; min-width: 0; }
.field > span, .field > label { font-size: 13.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field b, .weigh-title b {
  display: inline-grid; place-items: center; min-width: 21px; height: 21px; border-radius: 7px; padding: 0 5px;
  background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--border);
}
.field em { color: var(--danger); font-style: normal; }
.field small { font-weight: 400; }

.input {
  width: 100%; padding: 11px 14px; font: inherit; font-size: 14.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; outline: none;
  box-shadow: var(--sh-1);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input::placeholder { color: #a3adbd; }
.input:hover { border-color: #b7c2d3; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.input:disabled { background: var(--surface-2); color: var(--muted); }
textarea.input { resize: vertical; min-height: 90px; }
.input.flash-fill { animation: fill-flash 1s var(--ease); }
@keyframes fill-flash { 0%, 30% { background: #fff8db; border-color: #f5c542; } }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.input-sm { padding: 6px 10px; font-size: 13px; width: auto; border-radius: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.span-2 { grid-column: span 2; }
.fieldset { border: 1px solid var(--border); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 14px; margin: 0; background: var(--surface-2); }
.fieldset legend { font-weight: 700; padding: 0 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* Bedelli / Bedelsiz: segment kartlar */
.radio-group { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; }
.radio, .check {
  position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  padding: 13px 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface);
  font-weight: 600; color: var(--text-2); box-shadow: var(--sh-1);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.radio:hover, .check:hover { border-color: #b7c2d3; }
.radio:active, .check:active { transform: scale(.985); }
.radio input, .check input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 18px; height: 18px; border: 2px solid #b3bdcc; background: #fff;
  display: grid; place-items: center; transition: border-color var(--t-fast), background var(--t-fast);
}
.radio input { border-radius: 50%; }
.check input { border-radius: 5px; }
.radio input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform var(--t) var(--spring); }
.check input::after {
  content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform var(--t) var(--spring);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.radio input:checked, .check input:checked { border-color: var(--primary); background: var(--primary); }
.radio input:checked::after, .check input:checked::after { transform: scale(1); }
.radio:has(input:checked), .check:has(input:checked) {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.radio:has(input:focus-visible), .check:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--primary-ring); }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------------- Hurda tartım panelleri ---------------- */
.weigh {
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.weigh.open { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); box-shadow: 0 0 0 3px var(--primary-ring); }
.weigh-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.weigh-title { font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.weigh-summary { margin-left: auto; font-family: var(--mono); font-weight: 700; color: var(--ok); font-size: 14px; opacity: 0; transform: translateX(6px); transition: opacity var(--t), transform var(--t); }
.weigh:not(.open) .weigh-summary { display: none; }
.weigh.open .weigh-summary.has { opacity: 1; transform: none; }

/* toggle switch */
.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; cursor: pointer;
  position: relative; width: 40px; height: 23px; border-radius: 999px; background: #cfd7e3;
  transition: background var(--t) var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.3);
  transition: transform var(--t) var(--spring);
}
.switch:checked { background: var(--grad); }
.switch:checked::after { transform: translateX(17px); }
.switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.weigh-fields { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.weigh.open .weigh-fields { grid-template-rows: 1fr; }
.weigh-inner {
  overflow: hidden; min-height: 0;
  display: grid; grid-template-columns: 1fr 1fr 170px; gap: 14px; padding: 0 16px;
  opacity: 0; transition: opacity .25s var(--ease), padding .35s var(--ease);
}
.weigh.open .weigh-inner { opacity: 1; padding: 2px 16px 16px; }
.net {
  display: flex; align-items: center; height: 45px; padding: 0 14px; border-radius: 10px;
  background: var(--ok-soft); color: var(--ok); font-family: var(--mono); font-weight: 700; font-size: 16px;
  border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.net.neg { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.net.bump { animation: bump .35s var(--spring); }
@keyframes bump { 40% { transform: scale(1.05); } }

/* ---------------- Butonlar ---------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text-2);
  box-shadow: var(--sh-1); white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:hover { background: var(--surface-2); border-color: #b7c2d3; color: var(--text); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary {
  background: var(--grad); border-color: transparent; color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 20px -8px rgba(79, 70, 229, .7);
  overflow: hidden;
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transition: transform .7s var(--ease);
}
.btn-primary:hover { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 26px -8px rgba(79, 70, 229, .8); filter: brightness(1.05); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.btn-ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { cursor: progress; opacity: .85; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Uyarılar ---------------- */
.alert {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 44px 14px 16px; border-radius: var(--r); margin-bottom: 20px;
  border: 1px solid; word-break: break-word; box-shadow: var(--sh-2);
  animation: alert-in .45s var(--spring) both;
}
.alert.hide { animation: alert-out .3s var(--ease) forwards; }
@keyframes alert-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes alert-out { to { opacity: 0; transform: translateY(-8px); margin-bottom: -50px; } }
.alert-icon { flex: none; display: grid; margin-top: 1px; }
.alert-text { flex: 1; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-close {
  position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 8px;
  border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .55;
  transition: opacity var(--t-fast), background var(--t-fast);
}
.alert-close:hover { opacity: 1; background: rgba(0,0,0,.06); }
.alert-success { background: #f0fbf6; border-color: #bfe8d5; color: #065f46; }
.alert-error   { background: #fef4f4; border-color: #f6c9c9; color: #991b1b; }
.alert-info    { background: #f2f7ff; border-color: #c9dafa; color: #1e3a8a; }
form .alert, .card > .alert { box-shadow: none; }
.card > .alert:not(:has(.alert-icon)) { padding-right: 16px; }

.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok  { background: var(--ok-soft); color: var(--ok); }
.status.err { background: var(--danger-soft); color: var(--danger); }
.err-text { max-width: 300px; margin-top: 4px; }

/* ---------------- Tablolar ---------------- */
.table-wrap { overflow-x: auto; margin: 0 -26px; padding: 0 26px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  font-weight: 700; padding: 10px 12px; background: var(--surface-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.table th:first-child { border-left: 1px solid var(--border); border-radius: 10px 0 0 10px; }
.table th:last-child { border-right: 1px solid var(--border); border-radius: 0 10px 10px 0; }
.table td { padding: 12px; border-bottom: 1px solid #eef1f6; vertical-align: middle; transition: background var(--t-fast); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f7f9fd; }
.table th.right { text-align: right; }
.table td.mono { color: var(--text-2); }
.row-muted td { opacity: .5; }
.inline { display: inline; }
.inline-edit { display: inline-flex; gap: 6px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.searchbar { display: flex; gap: 10px; margin-bottom: 18px; }
.searchbar .input { flex: 1; }
.searchbar input.input {
  padding-left: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 13px center;
}
.searchbar select.input { flex: 0 0 240px; }

.pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--surface); transition: all var(--t-fast);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager a.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px rgba(79,70,229,.7); }
.pager span { border-color: transparent; background: transparent; }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.layout-2 > * { min-width: 0; }
.card { min-width: 0; }

/* Kullanıcı listesi */
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar-sm { width: 36px; height: 36px; font-size: 14px; flex: none; box-shadow: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-meta strong { font-weight: 600; color: var(--text); }
.user-meta small { color: var(--muted); font-size: 12px; }
.you { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); background: var(--primary-soft); padding: 1px 6px; border-radius: 6px; margin-left: 4px; vertical-align: middle; }
[data-expand][aria-expanded="true"] { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); color: var(--primary); }
.table tr.edit-row > td { padding: 0 12px 14px; background: transparent !important; }
.table tr.has-open > td { border-bottom-color: transparent; }
.edit-panel {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 22px;
  padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
  animation: rise .25s var(--ease);
}
.edit-group { margin: 0; min-width: 0; }
.edit-group .field > span { font-size: 12px; }
.input-row { display: flex; gap: 6px; }
.input-row .input { width: 200px; max-width: 100%; }
.edit-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.layout-2 > aside.card, .layout-2 > aside { position: sticky; top: 86px; }

/* ---------------- Aramalı seçim ---------------- */
.combo { position: relative; }
.combo .combo-input {
  padding-left: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 13px center;
}
.combo.selected .combo-input {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--border-strong));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.combo.selected .combo-input:focus { border-color: var(--primary); }
.combo-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: rgba(255,255,255,.98); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .25), 0 0 0 1px rgba(15,23,42,.02);
  backdrop-filter: blur(8px);
  transform-origin: top center;
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.combo-list li {
  padding: 9px 12px; border-radius: 9px; cursor: pointer; display: flex; align-items: center; gap: 12px;
  transition: background .1s;
}
.combo-list li strong {
  font-family: var(--mono); font-weight: 600; font-size: 12.5px; color: var(--primary);
  background: var(--primary-soft); padding: 2px 8px; border-radius: 6px; min-width: 84px; text-align: center;
}
.combo-list li span { color: var(--text-2); }
.combo-list li mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-list li.active { background: #f1f5ff; }
.combo-list li.active span { color: var(--text); }
.combo-list li.empty { color: var(--muted); cursor: default; justify-content: center; padding: 18px; }
.combo-hint { display: none; font-size: 12.5px; color: var(--danger); margin-top: 6px; font-weight: 500; }
.combo.invalid .input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.combo.invalid .combo-hint { display: block; animation: rise .25s var(--ease); }
.combo.invalid { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---------------- Giriş ekranı ---------------- */
body.bare { background: #070f24; color: var(--text); overflow-x: hidden; }
body.bare .container { padding: 0; max-width: none; }
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.aurora span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 520px; height: 520px; background: #2563eb; top: -140px; left: -120px; }
.aurora span:nth-child(2) { width: 460px; height: 460px; background: #7c3aed; bottom: -160px; right: -100px; animation-duration: 22s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 320px; height: 320px; background: #06b6d4; top: 40%; left: 55%; opacity: .3; animation-duration: 26s; animation-delay: -12s; }
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-40px, 70px) scale(.95); }
}
.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 410px; padding: 38px 36px; margin: 0;
  background: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  animation: card-in .7s var(--spring) both .05s;
}
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; font-weight: 750; }
.auth-sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.auth-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 15px; margin-bottom: 26px; color: var(--text-2); }
.auth-card .form > * { animation: rise .5s var(--ease) both; }
.auth-card .form > *:nth-child(2) { animation-delay: .15s; }
.auth-card .form > *:nth-child(3) { animation-delay: .22s; }
.auth-card .form > *:nth-child(4) { animation-delay: .29s; }
.auth-card .btn-primary { padding: 13px 18px; font-size: 15px; margin-top: 4px; }

/* ---------------- Duyarlı ---------------- */
@media (max-width: 960px) {
  .who { display: none; }
  .mainnav a span { display: none; }
  .mainnav a { padding: 9px 11px; }
}
@media (max-width: 860px) {
  .layout-2 { grid-template-columns: 1fr; }
  .layout-2 > aside.card, .layout-2 > aside { position: static; }
  .grid-2, .grid-3, .weigh-inner { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .topbar-inner { gap: 14px; padding: 0 14px; }
  .brand-text { display: none; }
  .container { padding: 22px 16px 60px; }
  .page-title { font-size: 23px; }
  .card, .form-card { padding: 20px; }
  .table-wrap { margin: 0 -20px; padding: 0 20px; }
  .searchbar { flex-wrap: wrap; }
  .searchbar select.input { flex-basis: 100%; }
  .radio-group { grid-template-columns: 1fr 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
}

/* Hareket hassasiyeti olan kullanıcılar için animasyonları kapat */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
