/* ProDev B2B — Portal kabuk / tema kuralları */

:root,
html[data-theme="light-orange"] {
  --paper: #ffffff;
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --panel: #ffffff;
  --panel-mute: #f3f4f6;
  --signal: #f97316;
  --signal-fg: #ffffff;
  --signal-soft: rgba(249, 115, 22, 0.12);
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #a16207;
  --warn-bg: #fef3c7;
  --mute-bg: #f3f4f6;
  --mute-fg: #4b5563;
  --rail: #111827;
  --rail-fg: #d1d5db;
  --rail-line: #1f2937;
  --rail-hover: #1f2937;
  --rail-active: #f97316;
  --ring: #f97316;
  --glow: rgba(249, 115, 22, 0.08);
  --shadow: 0 1px 2px rgba(31, 41, 55, 0.05), 0 4px 16px rgba(31, 41, 55, 0.06);
  --shadow-lg: 0 8px 28px rgba(31, 41, 55, 0.12);
  --radius: 0.5rem;
  --radius-sm: 0.375rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --font: "Barlow", "Segoe UI", system-ui, sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 180ms;
  --background: var(--paper);
  --foreground: var(--ink);
  --card: var(--panel);
  --muted: var(--panel-mute);
  --muted-foreground: var(--ink-soft);
  --border: var(--line);
  --destructive: #dc2626;
  --sidebar: var(--rail);
  --sidebar-foreground: var(--rail-fg);
  --sidebar-accent: var(--rail-active);
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: var(--rail-line);
  /* B2B uyumluluk alias */
  --bg: var(--background);
  --text: var(--foreground);
  --accent: var(--signal);
  --danger: var(--destructive);
}

html[data-theme="dark-orange"] {
  --paper: #0f1115;
  --ink: #f3f4f6;
  --ink-soft: #9ca3af;
  --line: #2a2f3a;
  --line-strong: #3b4252;
  --panel: #1a1d24;
  --panel-mute: #22262f;
  --signal: #f97316;
  --signal-fg: #111827;
  --signal-soft: rgba(249, 115, 22, 0.18);
  --ok: #4ade80;
  --ok-bg: #14532d;
  --warn: #fbbf24;
  --warn-bg: #422006;
  --mute-bg: #22262f;
  --mute-fg: #d1d5db;
  --rail: #0b0e14;
  --rail-fg: #d1d5db;
  --rail-line: #1a1f2a;
  --rail-hover: #171b24;
  --rail-active: #f97316;
  --ring: #fb923c;
  --glow: rgba(249, 115, 22, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --destructive: #f87171;
  --sidebar-accent-foreground: #fff;
}

html[data-theme="slate"] {
  --paper: #f1f5f9;
  --ink: #0f172a;
  --ink-soft: #64748b;
  --line: #cbd5e1;
  --line-strong: #94a3b8;
  --panel: #ffffff;
  --panel-mute: #e2e8f0;
  --signal: #06b6d4;
  --signal-fg: #ffffff;
  --signal-soft: rgba(6, 182, 212, 0.14);
  --ok: #0f766e;
  --ok-bg: #ccfbf1;
  --warn: #b45309;
  --warn-bg: #ffedd5;
  --mute-bg: #e2e8f0;
  --mute-fg: #475569;
  --rail: #0f172a;
  --rail-fg: #e2e8f0;
  --rail-line: #1e293b;
  --rail-hover: #1e293b;
  --rail-active: #06b6d4;
  --ring: #06b6d4;
  --glow: rgba(6, 182, 212, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 8px 28px rgba(15, 23, 42, 0.14);
  --destructive: #e11d48;
  --sidebar-accent-foreground: #fff;
}

html[data-theme="forest"] {
  --paper: #f4f6f5;
  --ink: #1a2e24;
  --ink-soft: #5f7268;
  --line: #d7e0db;
  --line-strong: #b8c7bf;
  --panel: #ffffff;
  --panel-mute: #e8eeea;
  --signal: #16a34a;
  --signal-fg: #ffffff;
  --signal-soft: rgba(22, 163, 74, 0.12);
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #a16207;
  --warn-bg: #fef3c7;
  --mute-bg: #e8eeea;
  --mute-fg: #3f4f46;
  --rail: #102018;
  --rail-fg: #d1e0d7;
  --rail-line: #1a3326;
  --rail-hover: #1a3326;
  --rail-active: #16a34a;
  --ring: #16a34a;
  --glow: rgba(22, 163, 74, 0.08);
  --shadow: 0 1px 2px rgba(26, 46, 36, 0.05), 0 4px 16px rgba(26, 46, 36, 0.06);
  --shadow-lg: 0 8px 28px rgba(26, 46, 36, 0.12);
  --destructive: #dc2626;
  --sidebar-accent-foreground: #fff;
}

html[data-theme="prodev-light"] {
  --paper: #F3F2EC;
  --ink: #173B40;
  --ink-soft: #526B6D;
  --line: #D9DFD6;
  --line-strong: #C8D0C2;
  --panel: #FFFFFF;
  --panel-mute: #EAEDE5;
  --signal: #087C93;
  --signal-fg: #FFFFFF;
  --signal-soft: rgba(21, 159, 192, 0.14);
  --ok: #3D6224;
  --ok-bg: #EDF4DD;
  --warn: #80521A;
  --warn-bg: #FAEFD9;
  --mute-bg: #EAEDE5;
  --mute-fg: #526B6D;
  --rail: #173B40;
  --rail-fg: #F7F8F3;
  --rail-line: #1F4A50;
  --rail-hover: #1F4A50;
  --rail-active: #A1C548;
  --ring: #159FC0;
  --glow: rgba(21, 159, 192, 0.08);
  --shadow: 0 1px 2px rgba(23, 59, 64, 0.06), 0 4px 16px rgba(23, 59, 64, 0.07);
  --shadow-lg: 0 8px 28px rgba(23, 59, 64, 0.12);
  --destructive: #983C2C;
  --sidebar-accent-foreground: #173B40;
}

html[data-theme="prodev-dark"] {
  --paper: #111D20;
  --ink: #E8EEEA;
  --ink-soft: #AFBFBA;
  --line: #365055;
  --line-strong: #456268;
  --panel: #192A2E;
  --panel-mute: #21363A;
  --signal: #32B4D0;
  --signal-fg: #102327;
  --signal-soft: rgba(50, 180, 208, 0.18);
  --ok: #C2D995;
  --ok-bg: #283D28;
  --warn: #EAC58A;
  --warn-bg: #443722;
  --mute-bg: #21363A;
  --mute-fg: #AFBFBA;
  --rail: #0D171A;
  --rail-fg: #E8EEEA;
  --rail-line: #152328;
  --rail-hover: #152328;
  --rail-active: #B0CE60;
  --ring: #32B4D0;
  --glow: rgba(50, 180, 208, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --destructive: #F1B3A5;
  --sidebar-accent-foreground: #17231B;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 0% -10%, var(--glow), transparent 55%),
    var(--background);
  color: var(--foreground);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.muted { color: var(--muted-foreground); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--card);
  color: var(--foreground);
  padding: 0.5rem 0.75rem;
  z-index: 100;
  border-radius: var(--radius-sm);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* —— Shell —— */
.shell {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  width: 15rem;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-foreground);
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0.85rem 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: width var(--dur) var(--ease);
  z-index: 20;
}

.shell.collapsed .sidebar { width: 4.25rem; }
.shell.collapsed .brand-version,
.shell.collapsed .nav-label,
.shell.collapsed .nav-section { display: none; }
.shell.collapsed .nav a { justify-content: center; padding-inline: 0.5rem; }
.shell.collapsed .brand { justify-content: center; padding-inline: 0.25rem; }
.shell.collapsed .brand-logo { width: 2.35rem; max-height: 2.35rem; }
.shell.collapsed .nav-group.is-collapsed .nav-group-items { display: grid; }

.brand-block {
  padding: 0.1rem 0.15rem 0.65rem;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  text-decoration: none !important;
}
.brand-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 5.5rem;
  object-fit: contain;
  border-radius: 0.35rem;
}
.brand-version {
  display: grid;
  gap: 0.12rem;
  margin-top: 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  color: color-mix(in srgb, var(--sidebar-foreground) 78%, transparent);
  letter-spacing: 0.02em;
  text-align: center;
}
.brand-version span { display: block; }
.brand-version .brand-portal-title {
  font-family: var(--font-cond);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sidebar-foreground);
}

.nav {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding-top: 0.35rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.nav-group { display: grid; align-content: start; gap: 0.05rem; }
.nav-section {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--font-cond);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--sidebar-foreground) 72%, transparent);
  padding: 0.55rem 0.55rem 0.25rem;
  cursor: pointer;
  border-radius: 0.45rem;
}
.nav-section:hover {
  color: #fff;
  background: color-mix(in srgb, var(--rail-hover) 55%, transparent);
}
.nav-chevron {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform var(--dur) var(--ease);
}
.nav-group.is-collapsed .nav-chevron { transform: rotate(-90deg); }
.nav-group.is-collapsed .nav-group-items { display: none; }
.nav-group-items { display: grid; gap: 0.05rem; }
.nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  color: color-mix(in srgb, var(--sidebar-foreground) 82%, transparent);
  border-radius: 0.55rem;
  padding: 0.38rem 0.65rem;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-ico {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.85;
}
.nav a:hover {
  background: var(--rail-hover);
  color: #fff;
}
.nav a.active {
  background: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
  font-weight: 600;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--sidebar-accent) 35%, transparent);
}
.nav a.active .nav-ico { opacity: 1; }

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  overflow: hidden;
}

/* Masaüstünde sidebar zaten açık — hamburger yalnızca mobil drawer için */
.topbar [data-mobile-toggle] { display: none; }

.topbar {
  height: 3.15rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1.15rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 15;
}
.topbar .spacer { flex: 1; min-width: 0.5rem; }
.topbar-crumbs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted-foreground);
}
.topbar-crumbs span { color: var(--foreground); font-weight: 500; }

.user-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  max-width: 11rem;
  min-width: 0;
}
.user-chip strong {
  color: var(--foreground);
  font-weight: 600;
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.user-chip span {
  color: var(--muted-foreground);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.theme-menu { position: relative; }
.theme-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 13rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem;
  z-index: 40;
  display: grid;
  gap: 0.15rem;
}
.theme-menu-panel[hidden] { display: none; }
.theme-menu-panel button,
.theme-menu-panel a {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--foreground);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.theme-menu-panel button:hover,
.theme-menu-panel a:hover { background: var(--muted); }
.theme-menu-panel button.active {
  background: var(--signal-soft);
  color: var(--signal);
  font-weight: 600;
}
.announce-panel { min-width: 17rem; max-width: 22rem; padding: 0.55rem 0.65rem 0.65rem; }
.announce-head { font-weight: 650; font-size: 0.9rem; margin-bottom: 0.25rem; }
.announce-empty { margin: 0 0 0.35rem; font-size: 0.82rem; line-height: 1.4; }
.announce-link { color: var(--signal) !important; font-size: 0.86rem; font-weight: 600; display: inline-block; margin-top: 0.35rem; }
.theme-menu [data-announce-toggle] { position: relative; }
.announce-badge {
  position: absolute; top: 0.1rem; right: 0.05rem;
  min-width: 1rem; height: 1rem; padding: 0 0.22rem;
  border-radius: 999px; background: #b42318; color: #fff;
  font-size: 0.62rem; font-weight: 700; line-height: 1rem; text-align: center;
}
.announce-list { list-style: none; margin: 0 0 0.35rem; padding: 0; max-height: 16rem; overflow: auto; }
.announce-list li + li { border-top: 1px solid var(--border); }
.announce-item {
  display: grid; gap: 0.08rem; padding: 0.4rem 0.1rem; text-decoration: none !important;
  color: inherit !important;
}
.announce-item-kind { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--muted-foreground); }
.announce-item.is-acil .announce-item-kind { color: #b42318; }
.announce-item-title { font-size: 0.84rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-item.is-unread .announce-item-title { font-weight: 700; }
.announce-item-meta { font-size: 0.72rem; }
.announce-urgent-dialog {
  border: 0; padding: 0; border-radius: 0.75rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.35);
  width: max-content;
  min-width: min(28rem, calc(100vw - 2rem));
  max-width: min(56rem, calc(100vw - 2rem));
  max-height: min(92vh, 54rem);
  height: fit-content;
}
.announce-urgent-dialog::backdrop { background: rgba(15, 23, 42, 0.5); }
.announce-urgent-box {
  padding: 1rem 1.15rem 1.1rem; display: grid; gap: 0.7rem;
  width: max-content;
  min-width: min(28rem, calc(100vw - 2.5rem));
  max-width: min(54rem, calc(100vw - 2.5rem));
  max-height: min(92vh, 54rem);
  overflow: auto;
  box-sizing: border-box;
}
.announce-urgent-head-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.announce-urgent-close { font-size: 1.25rem; line-height: 1; }
.announce-urgent-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: #b42318; background: #fdecec;
  padding: 0.12rem 0.4rem; border-radius: 0.3rem;
}
.announce-urgent-head h2 { margin: 0.35rem 0 0; font-size: 1.2rem; line-height: 1.3; }
.announce-urgent-date { margin: 0.2rem 0 0; font-size: 0.8rem; }
.announce-urgent-cover img {
  display: block; width: 100%; max-height: 14rem; object-fit: cover;
  border-radius: 0.45rem; border: 1px solid var(--border);
}
.announce-urgent-summary { margin: 0; font-weight: 600; line-height: 1.45; max-width: 48rem; }
.announce-urgent-body { line-height: 1.55; max-width: 48rem; white-space: normal; }
.announce-urgent-body p { margin: 0 0 0.55rem; }
.announce-urgent-body img { max-width: 100%; height: auto; }
.announce-urgent-foot { display: flex; gap: 0.45rem; justify-content: flex-end; flex-wrap: wrap; }
.announce-urgent-more { margin: 0; font-size: 0.78rem; }

.content {
  padding: 1rem 1.25rem 1.1rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
  animation: enter 280ms var(--ease);
}
@keyframes enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .content { animation: none; }
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.page-header h1 {
  margin: 0;
  font-family: var(--font-cond);
  font-size: 1.35rem;
  font-weight: 650;
}
.page-header p {
  margin: 0.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--signal);
  background: var(--signal);
  color: var(--signal-fg);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.btn:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--foreground);
}
.btn-ghost:hover { background: var(--muted); }
.btn.icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--muted-foreground);
}
.btn.icon:hover,
.btn.icon[aria-expanded="true"],
.btn.icon.active {
  color: var(--foreground);
  background: var(--muted);
}
.btn-outline-accent {
  background: transparent;
  color: var(--signal);
  border: 1px solid var(--signal);
}
.btn-outline-accent:hover { background: var(--signal-soft); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.lead { margin: 0 0 0.75rem; font-size: 1.05rem; }
.soon p { margin: 0; color: var(--muted-foreground); line-height: 1.5; }

.kpi-strip {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: var(--space-5);
}
.kpi-strip .kpi {
  padding: var(--space-4) var(--space-5);
  border-right: 1px solid var(--border);
  position: relative;
}
.kpi-strip .kpi:last-child { border-right: 0; }
.kpi-strip .kpi .label {
  margin: 0;
  font-family: var(--font-cond);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.kpi-strip .kpi .value {
  margin: 0.35rem 0 0;
  font-family: var(--font-cond);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.kpi-strip .kpi.accent .value { color: var(--signal); }
.kpi-strip-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  border-right: 1px solid var(--border);
  margin-bottom: 0;
}
.kpi-strip-wrap .kpi {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.kpi-strip-wrap .kpi:last-child { border-right: 1px solid var(--border); }
a.kpi-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.12s ease;
}
a.kpi-link:hover { background: color-mix(in srgb, var(--signal) 8%, transparent); }

.dash-kpi-layout {
  display: grid;
  gap: 0.75rem;
  margin-bottom: var(--space-5);
}
.dash-kpi-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: stretch;
}
.dash-kpi-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dash-kpi-group .dash-kpi-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-cond);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  flex: 0 0 auto;
}
.dash-kpi-group .kpi-strip {
  margin-bottom: 0;
  flex: 1 1 auto;
}
.dash-kpi-leader-row {
  grid-template-columns: 1fr;
  align-content: center;
}
.dash-kpi-leader-row .kpi {
  border-right: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  box-sizing: border-box;
}
.kpi .kpi-name {
  font-size: 0.95rem;
  line-height: 1.2;
  margin: 0;
}
.dash-kpi-leader-row .kpi .kpi-name {
  max-width: none;
  width: 100%;
  font-size: 1.05rem;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}
.kpi .kpi-meta {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 960px) {
  .dash-kpi-pair { grid-template-columns: 1fr; }
}

.dash-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1.5fr 1fr;
}
.dash-grid-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4) var(--space-5);
}
.panel-table { padding-bottom: 0.55rem; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.section-title {
  margin: 0;
  font-family: var(--font-cond);
  font-size: 0.95rem;
  font-weight: 650;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
}
.dash-preview { max-height: 14rem; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}
table.data th,
table.data td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.86rem;
}
table.data th {
  font-family: var(--font-cond);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  background: var(--muted);
}
table.data.compact th,
table.data.compact td {
  padding: 0.28rem 0.45rem;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}
table.data tr[data-href] { cursor: pointer; }
table.data tr[data-href]:hover { background: color-mix(in srgb, var(--signal) 8%, transparent); }
@media (max-width: 900px) {
  .dash-grid, .dash-grid-ops { grid-template-columns: 1fr; }
}

.search-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(24rem, calc(100vw - 2rem));
  width: 100%;
  background: transparent;
}
.search-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.search-dialog-box {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.search-dialog-box h2 { margin: 0; font-size: 1.05rem; }
.search-results {
  display: grid;
  gap: 0.15rem;
  max-height: 16rem;
  overflow: auto;
}
.search-results a {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--foreground);
}
.search-results a:hover { background: var(--muted); }
.search-actions { display: flex; justify-content: flex-end; }

/* —— Liste / ürün ağacı (Portal erp-window) —— */
.content:has(.erp-window) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.content:has(.erp-window) > .page-header,
.content:has(.erp-window) > .list-toolbar {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
}
.content:has(.erp-window) > .erp-window {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.erp-window {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 0;
  overflow: hidden;
}
.erp-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.erp-window-bar h2 {
  margin: 0;
  font-family: var(--font-cond);
  font-size: 0.98rem;
  font-weight: 650;
}
.erp-window-bar .muted { font-size: 0.8rem; }
.erp-window > .table-wrap.tree-browser,
.erp-window > .table-wrap.grid-browser {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
}
.product-table {
  table-layout: fixed;
  min-width: 68rem;
  width: max-content;
}
.product-table th,
.product-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-table .col-date { width: 6.5rem; }
.product-table .col-pcktype { width: 12rem; }
.product-table .col-pckname { width: 16rem; }
.product-table .col-prodkey { width: 11rem; }
.product-table .col-lictype { width: 7.5rem; }
.product-table .col-exp,
.product-table .col-cldexp { width: 7rem; }
.product-table .col-locked,
.product-table .col-cancel { width: 4.5rem; }
.product-table .mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
}
.product-table tbody tr.tree-row > td.col-tree .tree-label {
  display: inline-block;
  max-width: 100%;
  padding-left: calc(0.15rem + var(--depth, 0) * 1.35rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.product-table tbody tr.is-main > td {
  background: color-mix(in srgb, var(--signal) 14%, var(--panel));
}
.product-table tbody tr.is-main:hover > td {
  background: color-mix(in srgb, var(--signal) 22%, var(--panel));
}
.product-table tbody tr.is-main > td.col-tree .tree-label { font-weight: 650; }
.product-table tbody tr.is-child > td.col-tree .tree-label::before {
  content: "↳ ";
  color: var(--muted-foreground);
  font-weight: 400;
}
.product-table tbody tr.is-child { color: color-mix(in srgb, var(--foreground) 88%, var(--muted-foreground)); }
.product-table tbody tr.is-cancelled { opacity: 0.72; }
.product-table tbody tr.is-locked .col-locked { color: var(--signal); font-weight: 600; }
.product-table tbody tr.empty td {
  text-align: center;
  color: var(--muted-foreground);
  padding: 1.25rem;
}

.customer-table {
  table-layout: fixed;
  min-width: 56rem;
  width: max-content;
}
.customer-table th,
.customer-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-table tbody td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  vertical-align: middle;
}
.customer-table tbody tr:nth-child(odd) > td { background: #ffffff; }
.customer-table tbody tr:nth-child(even) > td { background: #e8edf5; }
.customer-table tbody tr:hover > td {
  background: color-mix(in srgb, var(--signal) 10%, #e8edf5);
}
.customer-table .col-name { width: 18rem; }
.customer-table .col-groups { width: 14rem; }
.customer-table .col-district,
.customer-table .col-city { width: 7rem; }
.customer-table .col-taxno { width: 8rem; }
.customer-table .col-actions {
  width: 7.5rem;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.customer-table .btn-row {
  height: 1.55rem;
  padding: 0 0.55rem;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
}
.customer-table tbody tr.empty td {
  text-align: center;
  color: var(--muted-foreground);
  padding: 1.25rem;
  background: transparent;
}
.erp-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.list-toolbar {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
}
.list-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.list-toolbar .control {
  width: min(22rem, 100%);
  height: 2rem;
  padding: 0.3rem 0.55rem;
}
.list-toolbar .btn {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.84rem;
}

.order-table {
  table-layout: fixed;
  min-width: 58rem;
  width: max-content;
}
.order-table th,
.order-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-table tbody td {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  vertical-align: middle;
}
.order-table tbody tr:nth-child(odd) > td { background: #ffffff; }
.order-table tbody tr:nth-child(even) > td { background: #e8edf5; }
.order-table tbody tr.is-submitted > td { background: #d8efe4; }
.order-table tbody tr.is-submitted:nth-child(even) > td { background: #c8e6d8; }
.order-table tbody tr.is-submitted:hover > td {
  background: #b8dccc;
}
.order-table tbody tr:hover > td {
  background: color-mix(in srgb, var(--signal) 10%, #e8edf5);
}
.order-table .col-no { width: 9.5rem; }
.order-table .col-date { width: 8rem; }
.order-table .col-type { width: 6.5rem; }
.order-table .col-customer { width: 14rem; }
.order-table .col-group { width: 11rem; }
.order-table .col-total { width: 6rem; }
.order-table .col-status { width: 5.5rem; }
.order-table .col-actions {
  width: 14rem;
  overflow: visible;
  white-space: nowrap;
}
.order-table .mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
}
.order-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.order-actions .inline-form { display: inline; margin: 0; }
.order-table .btn-row {
  height: 1.55rem;
  padding: 0 0.5rem;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
}
.order-table tbody tr.empty td {
  text-align: center;
  color: var(--muted-foreground);
  padding: 1.25rem;
  background: transparent;
}

.order-review {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 56rem;
}
.order-review-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.55rem;
}
.order-review-bar h2 { margin: 0; font-size: 1.1rem; }
.order-review-bar .muted { margin: 0.2rem 0 0; }
.order-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (max-width: 52rem) {
  .order-review-grid { grid-template-columns: 1fr; }
}
.order-review-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  background: var(--panel);
}
.order-review-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}
.order-review-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0;
}
.order-review-dl > div { min-width: 0; }
.order-review-dl > div.span-2 { grid-column: 1 / -1; }
.order-review-dl dt {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin: 0;
}
.order-review-dl dd {
  margin: 0.05rem 0 0;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-review-lines { width: 100%; }
.order-review-lines .num { text-align: right; white-space: nowrap; }
.order-review-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem 1.25rem;
  margin-top: 0.55rem;
  font-size: 0.9rem;
}
.order-review-note {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 0.9rem;
}

.order-wizard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow: auto;
}
.wizard-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.wizard-bar h2 { margin: 0; font-size: 1.1rem; }
.wizard-bar .muted { margin: 0.2rem 0 0; }
.wizard-chrome {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.wizard-step {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.wizard-step.is-active {
  background: var(--signal-soft);
  border-color: color-mix(in srgb, var(--signal) 35%, var(--border));
  color: var(--foreground);
  font-weight: 600;
}
.wizard-panel { display: none; }
.wizard-panel.is-active { display: grid; gap: 0.75rem; }
.wizard-panel h3 { margin: 0; font-size: 1rem; }
.wizard-panel h4 { margin: 0.35rem 0 0; font-size: 0.9rem; }
.wizard-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.wizard-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  background: var(--panel);
}
.wizard-choice:has(input:checked) {
  background: var(--signal-soft);
  border-color: color-mix(in srgb, var(--signal) 35%, var(--border));
}
.wizard-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem 0.75rem;
  max-width: 36rem;
}
.wizard-form-grid .field { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.wizard-form-grid .field.span-2 { grid-column: 1 / -1; }
.wizard-form-grid .field span { font-size: 0.78rem; color: var(--muted-foreground); }
.wizard-form-grid.is-locked .control {
  background: var(--panel-mute);
  color: var(--muted-foreground);
  cursor: default;
}
@media (max-width: 40rem) {
  .wizard-form-grid { grid-template-columns: 1fr; max-width: none; }
  .wizard-form-grid .field.span-2 { grid-column: auto; }
}
.wizard-vkn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-end;
}
.wizard-vkn-row.is-hidden { display: none; }
.wizard-vkn-row .field { display: flex; flex-direction: column; gap: 0.15rem; }
.wizard-addon-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  margin: 0 0 0.4rem;
}
.wizard-addon-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  margin: 0;
}
.wizard-addon-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.wizard-filter-chip {
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--foreground);
}
.wizard-filter-chip.is-active,
.wizard-filter-chip:hover {
  background: var(--signal-soft);
  border-color: color-mix(in srgb, var(--signal) 40%, var(--border));
  color: var(--foreground);
}
.wizard-group-list,
.wizard-option-list {
  display: grid;
  gap: 0.3rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  background: var(--panel);
}
.wizard-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.wizard-option:nth-child(odd) { background: #fff; }
.wizard-option:nth-child(even) { background: #e8edf5; }
.wizard-option.is-selected {
  background: color-mix(in srgb, var(--signal) 16%, #fff);
  font-weight: 600;
}
.wizard-option em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}
.wizard-product-block { display: grid; gap: 0.35rem; }
.wizard-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
}
.wizard-total-values {
  display: grid;
  gap: 0.2rem;
  text-align: right;
  font-size: 0.9rem;
}
.wizard-line-table { width: 100%; }
.wizard-line-table .control {
  width: 100%;
  min-width: 0;
  height: 1.7rem;
  padding: 0.15rem 0.35rem;
}
.wizard-nav-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.35rem 0 0.55rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.wizard-nav-bar .btn[hidden],
.wizard-nav-bar .btn.is-hidden {
  display: none !important;
}
.btn-wizard-back,
.btn-wizard-next {
  min-width: 8.5rem;
  padding-left: 1.7rem;
  padding-right: 1.7rem;
}
.btn-wizard-back {
  border: 1px solid color-mix(in srgb, var(--muted-foreground) 35%, var(--border));
  background: var(--panel-mute);
  color: var(--foreground);
}
.btn-wizard-back:hover { background: color-mix(in srgb, var(--muted-foreground) 12%, var(--panel-mute)); }
.btn-wizard-next {
  border: 1px solid transparent;
  background: var(--signal);
  color: var(--signal-fg);
}
.btn-wizard-next:hover { filter: brightness(1.05); }

.profile-color-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.profile-color-row input[type="color"] {
  width: 2.6rem;
  height: 2rem;
  padding: 0.15rem;
  flex: 0 0 auto;
}
.profile-logo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.45rem;
}
.profile-logo-preview img {
  max-height: 2.5rem;
  max-width: 8rem;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.2rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: auto;
  background:
    radial-gradient(1200px 600px at 0% -10%, var(--glow), transparent 55%),
    var(--background);
}
.auth-shell.has-hero {
  background:
    linear-gradient(180deg, rgba(11, 14, 20, 0.45), rgba(11, 14, 20, 0.62)),
    var(--auth-hero) center / cover no-repeat,
    var(--background);
}
.login-card {
  width: min(22rem, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
}
.login-brand { margin-bottom: 1.1rem; text-align: center; }
.login-brand .login-logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 4.5rem;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}
.login-brand .brand-title {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 1.2rem;
}
.login-brand .brand-sub {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-top: 0.15rem;
}
.login-form { display: flex; flex-direction: column; gap: 0.35rem; }
.login-form label { font-size: 0.82rem; color: var(--muted-foreground); margin-top: 0.35rem; }
.control {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font: inherit;
  background: var(--card);
  color: var(--foreground);
}
.control:focus {
  outline: 2px solid color-mix(in srgb, var(--signal) 35%, transparent);
  border-color: var(--signal);
}
.login-form .btn { margin-top: 0.85rem; width: 100%; }
.error {
  background: color-mix(in srgb, var(--destructive) 10%, var(--card));
  color: var(--destructive);
  border: 1px solid color-mix(in srgb, var(--destructive) 25%, var(--border));
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
  font-size: 0.86rem;
}
.field-validation-error { color: var(--destructive); font-size: 0.8rem; }
.validation-summary-valid { display: none !important; }

.toast {
  background: var(--signal-soft);
  border: 1px solid color-mix(in srgb, var(--signal) 30%, var(--border));
  color: var(--foreground);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

.profile-card { margin-top: 0; }
.profile-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.profile-head h2 { margin: 0 0 0.2rem; }
.profile-head .muted { margin: 0; font-size: 0.85rem; }
.profile-id {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  font-size: 0.9rem;
}
.profile-id strong { font-family: ui-monospace, Consolas, monospace; }
.profile-tabs { display: grid; gap: 0.75rem; }
.profile-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
}
.profile-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-foreground);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.profile-tab:hover { color: var(--foreground); background: var(--muted); }
.profile-tab.active {
  color: var(--signal);
  background: var(--signal-soft);
  border-color: color-mix(in srgb, var(--signal) 30%, var(--border));
  font-weight: 600;
}
.profile-panel { padding-top: 0.25rem; }
.profile-section {
  margin: 1rem 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 650;
}
.profile-form { margin-top: 0.35rem; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.65rem 0.9rem;
}
.profile-grid .field { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.profile-grid .field.span-2 { grid-column: span 2; }
.profile-grid label { font-size: 0.78rem; color: var(--muted-foreground); }
.profile-grid .control[readonly] { background: var(--muted); color: var(--mute-fg); }
.profile-actions { margin-top: 1rem; }
.profile-form .error,
.profile-dialog-box .error {
  color: var(--destructive);
  font-size: 0.85rem;
  margin-bottom: 0.55rem;
  background: color-mix(in srgb, var(--destructive) 10%, var(--card));
  border: 1px solid color-mix(in srgb, var(--destructive) 25%, var(--border));
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
}
.profile-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--foreground);
  cursor: pointer;
  user-select: none;
}

.profile-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(24rem, calc(100vw - 2rem));
  width: 100%;
  box-shadow: var(--shadow-lg);
  background: transparent;
}
.profile-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.profile-dialog-box {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.1rem 1.05rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.profile-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.profile-dialog-head h3 { margin: 0; font-size: 1.05rem; }
.btn-dialog-close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.btn-dialog-close:hover { color: var(--foreground); }
.profile-dialog-box .field { display: flex; flex-direction: column; gap: 0.25rem; }
.profile-dialog-box label { font-size: 0.8rem; color: var(--muted-foreground); }
.profile-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .topbar [data-mobile-toggle] { display: inline-flex; }
  .topbar [data-sidebar-toggle] { display: none; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform var(--dur) var(--ease);
  }
  .shell.mobile-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .shell.mobile-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 15;
  }
  .shell.collapsed .sidebar { width: 15rem; }
  .shell.collapsed .brand-version,
  .shell.collapsed .nav-label,
  .shell.collapsed .nav-section { display: initial; }
  .shell.collapsed .brand-logo { width: 100%; max-height: 5.5rem; }
  .user-chip { display: none; }
}

@media (max-width: 720px) {
  .profile-grid .field.span-2 { grid-column: span 1; }
  .profile-id { align-items: flex-start; }
}

/* Record card � Portal erp.css yo�unluk standard� (B2B) */
.record-stage {
  position: relative;
  min-height: calc(100vh - 12rem);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  isolation: isolate;
}
.record-card {
  position: relative;
  width: min(42rem, 100%);
  max-width: 100%;
  border: 1px solid #1f2430;
  border-radius: var(--radius);
  overflow: hidden;
  background: #2c313c;
  color: #f3f4f6;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}
.record-stage > .record-card {
  position: absolute;
  top: 0;
  left: 0;
}
.record-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.75rem 0.35rem 0.9rem;
  background: #2c313c;
  border-top: 3px solid var(--signal);
  cursor: grab;
  user-select: none;
}
.record-card-bar h2 {
  margin: 0;
  font-family: var(--font-cond);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
}
.record-close {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 0.25rem;
}
.record-close:hover { background: rgba(255,255,255,0.08); color: #fff; }
.record-card-body { padding: 0.55rem 0.75rem 0.35rem; }
.record-top { display: grid; gap: 0.35rem; margin-bottom: 0.45rem; }
.record-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.3rem 0.55rem;
  align-items: center;
}
.record-row > label {
  margin: 0;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
}
.record-row > span { grid-column: 2; }
.record-row-stack { align-items: start; }
.record-checks,
.module-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 0.75rem;
}
.record-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  user-select: none;
}
.record-card .control {
  background: #fff;
  color: #111827;
  border-color: #9ca3af;
  height: 1.7rem;
  font-size: 0.82rem;
}
.record-card-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem 0.55rem;
  background: #2c313c;
}
.record-card .hint { color: #d1d5db; }

/* Kart koyu; içindeki açık zeminli tablo/metin kontrastı */
.record-card .table-wrap {
  background: #fff;
  border-color: #d1d5db;
}
.record-card table.data {
  background: #fff;
  color: #111827;
}
.record-card table.data th {
  color: #4b5563;
  background: #f3f4f6;
  border-bottom-color: #e5e7eb;
}
.record-card table.data td {
  color: #111827;
  border-bottom-color: #e5e7eb;
}
.record-card table.data a {
  color: #087C93;
  text-decoration: none;
}
.record-card table.data a:hover {
  color: #06677A;
  text-decoration: underline;
}
.record-card table.data tr.is-selected > td {
  background: #E2F0F0;
}
.record-card table.data .muted,
.record-card .table-wrap .muted {
  color: #6b7280;
}

/* Personel yetki Aktif/Pasif */
.perm-table {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  min-width: 0;
}
.perm-head,
.perm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  gap: 0.35rem 0.55rem;
  align-items: center;
}
.perm-head {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid #4b5563;
}
.perm-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f3f4f6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.perm-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.78rem;
  font-weight: 700;
}
.perm-switch input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--signal);
  cursor: pointer;
}
.perm-switch .perm-aktif { display: none; color: #86efac; }
.perm-switch .perm-pasif { display: inline; color: #fca5a5; }
.perm-switch input:checked ~ .perm-aktif { display: inline; }
.perm-switch input:checked ~ .perm-pasif { display: none; }

/* Destek form tabs (B2B record-card) */
.record-card-wide { width: min(52rem, 100%); }
.record-tabs { margin-top: 0.35rem; }
.record-tab-list {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #4b5563;
}
.record-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: #d1d5db;
  padding: 0.28rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.record-tab.active {
  background: #fff;
  color: #111827;
  border-color: #9ca3af;
  border-bottom-color: #fff;
  margin-bottom: -1px;
}
.record-tab-panel {
  background: #fff;
  border: 1px solid #9ca3af;
  border-top: 0;
  padding: 0.45rem 0.55rem;
  color: #111827;
}
.record-lookup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.65rem;
}
.lookup-field { display: grid; gap: 0.08rem; }
.lookup-field.span-2 { grid-column: span 2; }
.lookup-field > label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e3a8a;
}
.record-card textarea.control {
  height: auto;
  min-height: 5rem;
  resize: vertical;
}

.issue-desc-readonly {
  margin: 0.08rem 0 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid #9ca3af;
  border-radius: 0.25rem;
  background: #f4f6f9;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 4rem;
  font-size: 0.85rem;
  line-height: 1.35;
}
