/* Ortak tasarım belirteçleri, kabuk ve paylaşılan bileşenler. Sayfaya özel stiller css/pages altındadır. */

:root {
  --ground: #f9fbfc;
  --surface: #ffffff;
  --raised: #f4f6f8;
  --active: #ebedee;
  --border: #e8eaec;
  --rule: #f0f1f2;
  --control: #cdced1;
  --text: #131416;
  --muted: #5d5f60;
  --accent: #1b6c80;
  --accent-hover: #155565;
  --accent-pressed: #10424f;
  --accent-soft: #e1f0f3;
  --accent-wash: #d6e5e8;
  --positive: #1e7b4f;
  --positive-soft: #ecfdf5;
  --negative: #c4242a;
  --negative-soft: #fef2f2;
  --warning: #92400e;
  --warning-soft: #fef3c7;
  --outline: #6f797c;
  --shadow-raised: 0 1px 3px 0 rgb(19 20 22 / 4%), 0 1px 2px -1px rgb(19 20 22 / 4%);
  --shadow-overlay: 0 10px 15px -3px rgb(19 20 22 / 8%), 0 4px 6px -4px rgb(19 20 22 / 3%);
  --scrim: rgb(19 20 22 / 35%);
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --topbar-height: 48px;
  --pill-positive-bg: #dcfae5;
  --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea;
  --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb;
  --pill-warning-ink: #92400e;
  --pill-neutral-bg: #ebedee;
  --pill-neutral-ink: #353736;
  --radius-card: 8px;
  --radius-control: 6px;
  --radius-sheet: 16px;
  --sheet-inset: 8px;
  --row-height: 48px;
  --sidebar-width: 228px;
  --gap: 24px;
  --pad: 24px;
  --control-height: 32px;
  --fs-title: 24px;
  --fs-section: 16px;
  --fs-kpi: 28px;
  --fs-body: 14px;
  --fs-small: 12px;
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
}

.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  overflow: hidden;
  font-family: "Material Symbols Outlined";
  font-size: 20px;
  font-style: normal;
  font-weight: normal;
  font-feature-settings: "liga";
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum", "zero";
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--ground);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.app-frame {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.sidebar-scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 12px 10px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius-control);
  color: var(--text);
}

.brand:hover {
  background: var(--raised);
}

.brand-mark {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--surface);
  font-size: 15px;
  font-weight: 700;
  place-items: center;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.brand-copy strong {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.brand-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-small);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-switch {
  margin-left: auto;
  color: var(--outline);
  font-size: 18px;
}

.quick-actions {
  position: relative;
}

.quick-actions-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--raised);
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  list-style: none;
}

.quick-actions-trigger::-webkit-details-marker {
  display: none;
}

.quick-actions-trigger .icon {
  font-size: 17px;
}

.quick-actions-trigger:hover,
.quick-actions[open] .quick-actions-trigger {
  background: var(--accent-wash);
}

.quick-actions-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quick-actions-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-overlay);
}

.quick-actions-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-control);
  font-size: 13px;
}

.quick-actions-menu a:hover {
  background: var(--raised);
  color: var(--accent);
}

.quick-actions-menu .icon {
  color: var(--muted);
  font-size: 18px;
}

.nav-groups {
  display: grid;
  gap: 14px;
}

.nav-group {
  display: grid;
  gap: 2px;
}

.nav-group-title {
  margin: 0 10px 4px;
  color: var(--outline);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border-left: 2px solid transparent;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.nav-item .icon {
  font-size: 19px;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--raised);
  color: var(--accent);
}

.nav-item.is-active {
  border-left-color: var(--accent);
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.is-active .icon {
  font-variation-settings: "FILL" 1;
}

.nav-badge {
  min-width: 20px;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 16px;
  text-align: center;
}

.nav-badge[hidden] {
  display: none;
}

.sidebar-footer {
  display: grid;
  gap: 2px;
  padding: 8px 10px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 4px;
}

.user-avatar {
  display: grid;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  place-items: center;
}

.sidebar-user-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-form {
  margin: 0;
}

.sidebar-tool-button,
.logout-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--negative);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.sidebar-tool-button .icon,
.logout-button .icon {
  font-size: 18px;
}

.sidebar-tool-button:hover {
  background: var(--raised);
}

.logout-button:hover {
  background: var(--negative-soft);
}

.app-main {
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.breadcrumb {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}

.breadcrumb-group,
.breadcrumb-separator {
  color: var(--muted);
}

.breadcrumb-separator {
  color: var(--outline);
}

.breadcrumb-current {
  overflow: hidden;
  color: var(--accent);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--raised);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.erp-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.work-sheet {
  min-width: 0;
  padding: 24px 24px 48px;
}

.status-row span,
.panel-heading p,
.page-heading p,
.section-heading p,
.request-flow small,
.next-panel p {
  color: var(--muted);
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--gap);
  max-width: 1180px;
  margin: 0 auto 24px;
}

.page-heading h1,
.panel-heading h2,
.next-block h2,
.section-heading h2 {
  margin: 0;
  color: var(--text);
}

.page-heading h1 {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-heading p,
.section-heading p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}

.button .icon {
  font-size: 18px;
}

.button-primary {
  background: var(--accent);
  color: var(--surface);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-primary:active {
  background: var(--accent-pressed);
}

.button-primary:disabled {
  background: var(--active);
  color: var(--muted);
  cursor: not-allowed;
}

.button-text {
  min-height: 32px;
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.button-text:hover:not(:disabled) {
  color: var(--accent-hover);
}

.button-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  background: var(--raised);
}

.button-secondary.is-accent {
  border-color: rgb(27 108 128 / 20%);
  background: var(--accent-soft);
  color: var(--accent);
}

.button-secondary.is-accent:hover:not(:disabled) {
  background: var(--accent-wash);
}

.button-secondary.is-danger {
  color: var(--negative);
}

.button-secondary.is-danger:hover:not(:disabled) {
  border-color: rgb(196 36 42 / 25%);
  background: var(--negative-soft);
}

.button-danger {
  background: var(--negative);
  color: var(--surface);
}

.button-danger:hover:not(:disabled) {
  background: #a31d22;
}

.button-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
}

.button-secondary:disabled,
.button-danger:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.icon-only {
  width: 36px;
  padding: 0;
}

.button-sm.icon-only {
  width: 32px;
}

.icon-only .action-label {
  display: none;
}

.status-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: var(--fs-small);
  font-weight: 500;
  white-space: nowrap;
}

.tone-info {
  border-color: rgb(27 108 128 / 20%);
  background: var(--accent-soft);
  color: var(--accent);
}

.tone-success {
  border-color: rgb(30 123 79 / 20%);
  background: var(--positive-soft);
  color: var(--positive);
}

.tone-warning {
  border-color: rgb(146 64 14 / 20%);
  background: var(--warning-soft);
  color: var(--warning);
}

.tone-danger {
  border-color: rgb(196 36 42 / 20%);
  background: var(--negative-soft);
  color: var(--negative);
}

.tone-neutral {
  border-color: var(--border);
  background: var(--raised);
  color: #353736;
}

.status-pending {
  background: var(--pill-warning-bg);
  color: var(--pill-warning-ink);
}

.status-ready {
  background: var(--pill-positive-bg);
  color: var(--pill-positive-ink);
}

.status-error {
  background: var(--pill-negative-bg);
  color: var(--pill-negative-ink);
}

.inline-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  padding: 16px 20px;
}

.inline-error > div {
  display: grid;
  gap: 4px;
}

.inline-error span {
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.mobile-scrim {
  display: none;
}

.app-frame {
  transition: grid-template-columns 160ms ease;
}

/* Daraltılmış masaüstü menüsü: yalnız ikonlar görünür; adlar ekran okuyucuya ve title ipucuna kalır. */
@media (min-width: 1101px) {
  .sidebar-collapsed {
    --sidebar-width: 64px;
  }

  .sidebar-collapsed .sidebar-scroll {
    padding: 12px 8px;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .sidebar-collapsed .brand-copy,
  .sidebar-collapsed .brand-switch,
  .sidebar-collapsed .nav-group-title,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-user-name,
  .sidebar-collapsed .quick-actions-trigger > span:not(.icon),
  .sidebar-collapsed .sidebar-tool-button > span:not(.icon),
  .sidebar-collapsed .logout-button > span:not(.icon) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .sidebar-collapsed .brand,
  .sidebar-collapsed .nav-item,
  .sidebar-collapsed .sidebar-user,
  .sidebar-collapsed .sidebar-tool-button,
  .sidebar-collapsed .logout-button {
    justify-content: center;
    padding: 0;
  }

  .sidebar-collapsed .nav-item {
    position: relative;
    min-height: 40px;
  }

  .sidebar-collapsed .nav-groups {
    gap: 6px;
  }

  .sidebar-collapsed .nav-group + .nav-group {
    padding-top: 6px;
    border-top: 1px solid var(--rule);
  }

  .sidebar-collapsed .nav-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 14px;
  }

  .sidebar-collapsed .sidebar-footer {
    padding: 8px;
  }

  .sidebar-collapsed .sidebar-tool-button,
  .sidebar-collapsed .logout-button {
    min-height: 36px;
  }

  /* Kaydırılan menü kabının dışına taşabilmesi için hızlı işlem menüsü sabit konumda sağa açılır. */
  .sidebar-collapsed .quick-actions-menu {
    position: fixed;
    top: auto;
    right: auto;
    left: 68px;
    width: 220px;
    margin-top: -34px;
  }
}

@media (max-width: 1100px) {
  .report-filter-grid.has-extra-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-frame {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: min(88vw, 300px);
    height: 100dvh;
    box-shadow: var(--shadow-overlay);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 160ms ease, visibility 160ms ease;
  }

  .navigation-open .sidebar {
    visibility: visible;
    transform: translateX(0);
  }

  .mobile-scrim {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: block;
    visibility: hidden;
    background: var(--scrim);
    opacity: 0;
    transition: opacity 160ms ease, visibility 160ms ease;
  }

  .navigation-open .mobile-scrim {
    visibility: visible;
    opacity: 1;
  }

  .topbar {
    gap: 6px;
    padding: 0 12px 0 8px;
  }

  .work-sheet {
    padding: 20px 16px 40px;
  }

  .page-heading {
    align-items: start;
  }

  .page-heading h1 {
    font-size: 21px;
  }
}

@media (max-width: 480px) {
  .breadcrumb-group,
  .breadcrumb-separator {
    display: none;
  }

  .page-heading {
    display: grid;
  }

  .page-heading .button {
    width: 100%;
    min-height: 44px;
  }

  .status-pill {
    width: fit-content;
  }

  .inline-error {
    align-items: start;
  }
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  font-size: 13px;
  font-weight: 500;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
  outline: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(27 108 128 / 12%); /* taste-skill-ignore: yalnız klavye/girdi odağını görünür kılar */
}

.form-message {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.form-message.is-error {
  color: var(--pill-negative-ink);
}

.stocks-heading {
  max-width: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.data-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.data-toolbar h2 {
  margin: 0 0 5px;
  font-size: var(--fs-section);
  font-weight: 600;
}

.data-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-field {
  display: grid;
  gap: 7px;
  width: min(320px, 100%);
  color: var(--muted);
  font-size: 12px;
}

.search-field input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
  outline: none;
}

.search-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(27 108 128 / 12%); /* taste-skill-ignore: yalnız arama odağını görünür kılar */
}

.table-scroll {
  overflow-x: auto;
}

.stock-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.stock-table th,
.stock-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.stock-table th {
  background: var(--raised);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stock-table tbody tr:last-child td {
  border-bottom: 0;
}

.stock-table tbody tr:hover {
  background: var(--ground);
}

.stock-table td:nth-child(1) {
  font-weight: 500;
  white-space: nowrap;
}

.stock-table td:nth-child(3) {
  min-width: 260px;
}

.numeric-cell {
  text-align: right !important;
  white-space: nowrap;
}

td.numeric-cell {
  font-family: var(--font-mono);
  font-size: 13px;
  font-feature-settings: "tnum", "zero";
}

td.numeric-cell::before {
  font-family: var(--font-sans);
}

.table-message-row td {
  height: 180px;
  color: var(--muted);
  text-align: center;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.pagination-actions {
  display: flex;
  gap: 8px;
}

.pagination-actions .button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.pagination-actions .button:hover:not(:disabled) {
  background: var(--raised);
}

.pagination-actions .button:disabled,
.report-submit:disabled,
.report-field input:disabled,
.report-field select:disabled,
.search-field input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.stock-movement-dialog {
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-overlay);
}

.stock-movement-dialog::backdrop {
  background: var(--scrim);
}

.movement-dialog-content {
  max-height: calc(100dvh - 48px);
  overflow: auto;
}

.movement-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.movement-dialog-header h2 {
  margin: 0 0 5px;
  font-size: var(--fs-section);
}

.movement-dialog-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movement-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  background: var(--raised);
  font-variant-numeric: tabular-nums;
}

.movement-summary > div {
  display: grid;
  gap: 7px;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}

.movement-summary > div:last-child {
  border-right: 0;
}

.movement-summary span {
  color: var(--muted);
  font-size: 12px;
}

.movement-summary strong {
  font-size: 20px;
  font-weight: 500;
}

.movement-error {
  margin: 16px;
}

.movement-table-scroll {
  max-height: 52dvh;
}

.movement-table td:nth-child(3),
.movement-table td:nth-child(4) {
  min-width: 180px;
}

.stock-report-page {
  display: grid;
  gap: 20px;
}

.report-filter-panel {
  overflow: hidden;
}

.report-filter-heading {
  padding-bottom: 14px;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 14px;
  padding: 16px 20px 20px;
}

.report-filter-grid.has-extra-filters {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
}

.report-filter-note {
  margin: -6px 20px 16px;
  color: var(--warning);
  font-size: 13px;
}

.report-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.report-field input,
.report-field select,
.report-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.report-field textarea {
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}

.report-field input:focus,
.report-field select:focus,
.report-field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgb(27 108 128 / 18%);
  outline-offset: 1px;
}

.report-submit {
  align-self: end;
  min-height: 40px;
  white-space: nowrap;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.report-summary > div {
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}

.report-summary > div:last-child {
  border-right: 0;
}

.report-summary span {
  color: var(--muted);
  font-size: 12px;
}

.report-summary strong {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  font-feature-settings: "tnum", "zero";
}

.report-table td:nth-child(2) {
  min-width: 260px;
}

.report-table td:nth-child(3) {
  min-width: auto;
}

.report-table th {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.invoice-table td:first-child {
  white-space: nowrap;
}

.invoice-table td:nth-child(2) {
  min-width: 0;
}

.invoice-table td:nth-child(3) {
  min-width: 240px;
}

.invoice-open-action {
  min-height: auto;
  padding: 0;
  font-weight: 500;
  text-align: left;
}

.invoice-detail-note {
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.invoice-line-table td:nth-child(2) {
  min-width: 260px;
}

.invoice-line-table td:nth-child(3),
.invoice-line-table td:nth-child(4) {
  min-width: auto;
}

.invoice-line-table td:nth-child(n+3) {
  font-variant-numeric: tabular-nums;
}

.order-remaining {
  color: var(--accent);
  font-weight: 500;
}

.order-line-suggested td {
  background: var(--accent-soft);
}

.stock-report-page > .page-heading {
  width: 100%;
}

.chart-note {
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--pill-warning-bg);
  color: var(--pill-warning-ink);
  font-size: 13px;
}

.toolbar-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.excel-action {
  flex: none;
  min-height: 36px;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.inline-success {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid rgb(30 123 79 / 20%);
  border-radius: var(--radius-card);
  background: var(--positive-soft);
  color: var(--positive);
}

.customer-form {
  display: grid;
  gap: var(--gap);
}

.form-section {
  overflow: visible;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
}

.form-wide {
  grid-column: span 2;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--text);
  font-size: 14px;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.write-disabled-note {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.quote-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pill-negative-bg);
  border-radius: var(--radius-control);
  background: var(--pill-negative-bg);
  color: var(--pill-negative-ink);
}

.quote-confirm span {
  flex: 1 1 260px;
}

.dispatch-quantity {
  width: 110px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  font: inherit;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dispatch-quantity-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.cell-secondary {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.currency-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  min-height: 18px;
  margin-top: 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.currency-summary:empty {
  display: none;
}

.profit-positive {
  color: var(--positive);
  font-weight: 500;
}

.profit-negative {
  color: var(--negative);
  font-weight: 500;
}

.profitability-table td:nth-child(8),
.customer-profitability-table td:nth-child(7),
.brand-profitability-table td:nth-child(5),
.brand-profitability-table td:nth-child(6),
.invoice-table td:nth-child(n+4) {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-wide {
    grid-column: auto;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .search-field {
    flex: 1;
    min-width: 0;
  }

  .report-filter-grid,
  .report-filter-grid.has-extra-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-submit {
    width: 100%;
  }

  .report-table thead {
    display: none;
  }

  .report-table,
  .report-table tbody,
  .report-table tr,
  .report-table td {
    display: block;
    width: 100%;
  }

  .report-table tr {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
  }

  .report-table td {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
    min-width: 0 !important;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .report-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    text-align: left;
  }

  .report-table .table-message-row {
    padding: 0;
  }

  .report-table .table-message-row td {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    height: 160px;
    padding: 20px;
    text-align: center;
    white-space: normal;
    place-items: center;
  }

  .report-table .table-message-row td::before {
    display: none;
  }

  .movement-table thead {
    display: none;
  }

  .movement-table,
  .movement-table tbody,
  .movement-table tr,
  .movement-table td {
    display: block;
    width: 100%;
  }

  .movement-table tr {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
  }

  .movement-table td {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    min-width: 0 !important;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .movement-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    text-align: left;
  }

  .movement-table .table-message-row {
    padding: 0;
  }

  .movement-table .table-message-row td {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    height: 160px;
    padding: 20px;
    text-align: center;
    white-space: normal;
    place-items: center;
  }

  .movement-table .table-message-row td::before {
    display: none;
  }
}

@media (max-width: 700px) {
  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-summary > div {
    padding: 14px 12px;
  }

  .report-summary strong {
    font-size: 18px;
  }

  .data-toolbar {
    display: grid;
    align-items: start;
  }

  .search-field {
    width: 100%;
  }

  .table-scroll {
    overflow: visible;
  }

  .stock-table thead {
    display: none;
  }

  .stock-table,
  .stock-table tbody,
  .stock-table tr,
  .stock-table td {
    display: block;
    width: 100%;
  }

  .stock-table tr {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
  }

  .stock-table td {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    min-width: 0 !important;
    padding: 7px 0;
    border: 0;
    text-align: right;
  }

  .stock-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    text-align: left;
  }

  .stock-table .table-message-row {
    padding: 0;
  }

  .stock-table .table-message-row td {
    display: grid;
    height: 160px;
    padding: 20px;
    text-align: center;
    place-items: center;
  }

  .stock-table .table-message-row td::before {
    display: none;
  }

  .table-footer {
    align-items: start;
  }

  .stock-movement-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }

  .movement-dialog-content {
    max-height: calc(100dvh - 20px);
  }

  .movement-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movement-summary > div:nth-child(2) {
    border-right: 0;
  }

  .movement-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .movement-table-scroll {
    max-height: none;
  }
}

/* Liste şablonu: filtre satırı, durum sekmeleri, tablo hücreleri ve detay penceresi */
.filter-row {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
  align-items: end;
  padding: 16px 20px;
}

.status-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.status-tabs:empty {
  display: none;
}

.status-tab {
  display: grid;
  gap: 8px;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.status-tab:hover {
  border-color: var(--control);
}

.status-tab[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.status-tab-label {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-tab[aria-pressed="true"] .status-tab-label {
  color: var(--accent);
}

.status-tab-dot {
  flex: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
}

.status-tab-dot.tone-info {
  background: var(--accent);
}

.status-tab-dot.tone-success {
  background: var(--positive);
}

.status-tab-dot.tone-warning {
  background: #d97706;
}

.status-tab-dot.tone-danger {
  background: var(--negative);
}

.status-tab-dot.tone-neutral {
  background: var(--outline);
}

.status-tab strong {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  font-feature-settings: "tnum", "zero";
  line-height: 1;
}

.search-field-icon {
  position: relative;
}

.search-field-icon .icon {
  position: absolute;
  top: 50%;
  left: 11px;
  color: var(--muted);
  font-size: 18px;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-field-icon input {
  padding-left: 36px;
}

.code-cell {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.doc-cell > div {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.doc-cell .cell-secondary {
  font-weight: 400;
}

.party-cell {
  min-width: 220px;
}

.party-cell > div {
  font-weight: 500;
}

.party-cell .cell-secondary {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
}

.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.progress-track {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--active);
}

.progress-bar {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.progress-bar.is-complete {
  background: var(--positive);
}

.progress-label {
  min-width: 42px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: right;
}

.cell-empty {
  color: var(--outline);
}

.mini-badge {
  min-height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
}

.action-cell {
  width: 1%;
  text-align: right !important;
  white-space: nowrap;
}

.action-cell > .button + .button {
  margin-left: 6px;
}

.list-error {
  border: 1px solid rgb(196 36 42 / 20%);
  border-radius: var(--radius-card);
  background: var(--negative-soft);
}

.detail-dialog {
  width: min(1040px, calc(100% - 32px));
}

.release-notes-dialog {
  width: min(640px, calc(100% - 32px));
}

.release-notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--raised);
}

.release-notes-toolbar label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.release-notes-toolbar select {
  min-width: 150px;
  min-height: 34px;
}

.release-notes-list {
  max-height: 52dvh;
  overflow: auto;
  padding: 4px 20px;
}

.release-note {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.release-note:last-child {
  border-bottom: 0;
}

.release-note h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.release-note p,
.release-notes-state {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
}

.release-notes-state {
  padding: 28px 20px;
  text-align: center;
}

.release-notes-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px;
  padding: 12px 14px;
}

.release-notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--raised);
}

.detail-header {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.detail-icon {
  display: grid;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-control);
  background: var(--accent-soft);
  color: var(--accent);
  place-items: center;
}

.detail-heading {
  flex: 1;
  min-width: 0;
}

.detail-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movement-dialog-header .detail-title-row h2 {
  margin: 0;
  font-size: 18px;
}

.detail-heading p {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.dialog-close {
  color: var(--muted);
}

.dialog-close .icon {
  font-size: 22px;
}

.detail-line-scroll {
  max-height: 46dvh;
}

.detail-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-top: 1px solid var(--border);
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0;
}

.detail-facts div,
.detail-totals div {
  display: grid;
  gap: 2px;
}

.detail-facts dt,
.detail-totals dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-facts dd,
.detail-totals dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-feature-settings: "tnum", "zero";
}

.detail-totals {
  display: grid;
  gap: 8px;
  min-width: 300px;
  margin: 0 0 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--raised);
}

.detail-totals div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.detail-grand {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.detail-grand dt {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.detail-grand dd {
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}

.detail-footer form {
  margin: 0;
}

/* İrsaliyede ERP'de olmayan kartlar için bağlantılar. */
.dispatch-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.dispatch-missing[hidden] {
  display: none;
}

/* Bekleyen sipariş detayındaki teklif işlemleri. */
.order-detail-footer {
  flex-wrap: wrap;
}

.order-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.order-detail-actions form {
  margin: 0;
}

/* Ortak stok hareketleri penceresi (_StockMovementDialog). */
.movement-facts {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--raised);
}

.movement-footer {
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

/* Teklif PDF önizlemesi: önizleme alanı pencerenin kalan yüksekliğini doldurur. */
.pdf-dialog-content {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 48px);
  overflow: hidden;
}

.pdf-stage {
  display: grid;
  flex: 1;
  min-height: 0;
  background: var(--raised);
}

.pdf-status {
  align-self: center;
  justify-self: center;
  margin: 0;
  color: var(--muted);
}

.pdf-error {
  align-self: start;
  margin: 20px;
  border: 1px solid rgb(196 36 42 / 20%);
  border-radius: var(--radius-card);
  background: var(--negative-soft);
}

.pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--surface);
}

.pdf-footer > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.pdf-actions a[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.detail-highlight td {
  background: var(--accent-soft);
}

@media (max-width: 900px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .status-tab {
    flex: 0 0 auto;
    min-width: 128px;
    min-height: 64px;
  }

  .report-table .action-cell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    padding-top: 10px;
  }

  .report-table .action-cell::before {
    display: none;
  }

  .report-table .action-cell .button {
    width: 100%;
  }

  .report-table .action-cell .icon-only .action-label {
    display: inline;
  }

  .report-table td > .status-pill {
    justify-self: end;
  }

  .report-table .progress {
    justify-content: flex-end;
  }

  .detail-totals {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .detail-dialog {
    width: calc(100% - 16px);
  }

  .release-notes-dialog {
    width: calc(100% - 16px);
  }

  .release-notes-toolbar,
  .release-notes-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .release-notes-toolbar select,
  .release-notes-footer .button {
    width: 100%;
  }

  .detail-header {
    align-items: start;
  }

  .detail-icon {
    display: none;
  }

  .detail-line-scroll {
    max-height: none;
    overflow: visible;
  }

  .detail-footer span {
    display: none;
  }

  .detail-footer form,
  .detail-footer .button {
    width: 100%;
  }
}

/* Rapor şablonu: dağılım sekmeleri, para birimi kartları ve kâr/zarar gösterimi */
.report-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.report-overview > .status-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: stretch;
}

.status-tab-note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.currency-panel {
  display: grid;
  align-content: start;
}

.currency-panel h2 {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.currency-cards {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.currency-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--raised);
}

.currency-badge {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.currency-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
}

.currency-figures div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.currency-figures dt {
  color: var(--muted);
  font-size: 12px;
}

.currency-figures dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.currency-card .profit-chip {
  margin-left: auto;
}

.currency-empty {
  margin: 0;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 13px;
}

.profit-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: nowrap;
}

.profit-chip.profit-positive {
  border-color: rgb(30 123 79 / 20%);
  background: var(--positive-soft);
}

.profit-chip.profit-negative {
  border-color: rgb(196 36 42 / 20%);
  background: var(--negative-soft);
}

.report-table tr.is-loss td {
  background: #fffafa;
}

.report-table tr.is-loss .cell-empty {
  color: var(--muted);
}

.report-table tr.is-loss:hover td {
  background: var(--negative-soft);
}

@media (max-width: 1100px) {
  .report-overview {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .report-overview > .status-tabs {
    display: flex;
  }

  .currency-card .profit-chip {
    margin-left: 0;
  }
}

/* Giriş düzeni: oturum açma ve çalışma alanı seçimi kenar çubuğu olmadan açılır */
.auth-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.auth-brand strong {
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
}

.auth-brand-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}

.auth-brand-context {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-user-name {
  color: var(--text);
  font-weight: 500;
}

.auth-user .button-text {
  min-height: 32px;
  font-size: 13px;
}

.auth-main {
  min-width: 0;
  padding: 32px 24px 48px;
}

@media (max-width: 700px) {
  .auth-topbar {
    padding: 0 16px;
  }

  .auth-brand-divider,
  .auth-brand-context,
  .auth-user-name,
  .auth-user > .icon {
    display: none;
  }

  .auth-main {
    padding: 20px 16px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes ai-progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(320%); }
}

@media (max-width: 700px) {
  .pdf-footer {
    flex-wrap: wrap;
  }

  .pdf-actions {
    width: 100%;
  }

  .pdf-actions > * {
    flex: 1;
    justify-content: center;
  }
}

/* Ortak arama + seçim penceresi (_PickerDialog) ve yanındaki "Seç" düğmeli alan */

.picker-field {
  display: flex;
  min-width: 0;
}

.report-field .picker-field input {
  min-width: 0;
  border-radius: var(--radius-control) 0 0 var(--radius-control);
}

.picker-trigger {
  flex: none;
  min-width: 52px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--control);
  border-left: 0;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.picker-trigger:hover {
  background: var(--active);
}

.picker-trigger:focus-visible {
  position: relative;
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.picker-trigger:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.picker-dialog {
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(640px, calc(100dvh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
}

.picker-dialog[open] {
  display: flex;
  flex-direction: column;
}

.picker-dialog::backdrop {
  background: rgb(17 24 39 / 42%);
}

.picker-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}

.picker-head h2 {
  margin: 0 0 4px;
  font-size: var(--fs-section);
}

.picker-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.picker-search {
  padding: 16px 20px 0;
}

.picker-status {
  min-height: 18px;
  margin: 10px 20px 6px;
  color: var(--muted);
  font-size: var(--fs-small);
}

.picker-status[data-tone="error"] {
  color: var(--negative);
}

.picker-results {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 8px 8px;
  overflow-y: auto;
  list-style: none;
}

.picker-option {
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr) auto;
  gap: 2px 16px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  cursor: pointer;
}

.picker-option-plain {
  grid-template-columns: minmax(0, 1fr) auto;
}

.picker-option-plain .picker-option-meta {
  grid-column: 1 / -1;
}

.picker-option[aria-selected="true"] {
  background: var(--accent-soft);
}

.picker-option:hover {
  background: var(--raised);
}

.picker-option[aria-selected="true"]:hover {
  background: var(--accent-soft);
}

.picker-option-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.picker-option-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.picker-option-side {
  color: var(--muted);
  font-size: var(--fs-small);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.picker-option-meta {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}

.picker-option-code {
  color: var(--accent);
}

.picker-option-title {
  font-weight: 500;
}

.picker-option-tags {
  display: inline-flex;
  gap: 4px;
}

/* Etiketler durum değil özniteliktir (e-Fatura, e-İrsaliye); hepsi aynı sakin tonda. */
.picker-option-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-pressed);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.picker-footer {
  margin: 0;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 700px) {
  .picker-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .picker-option {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .picker-option-title,
  .picker-option-meta {
    grid-column: 1 / -1;
  }

  .picker-option-side {
    grid-row: 1;
    grid-column: 2;
  }

  .picker-option-plain .picker-option-title {
    grid-column: 1;
  }
}
