/* ==========================================================================
   HİSS — Tasarım sistemi: token'lar, temel stiller ve bileşenler
   Kimlik: toprak/arazi tonları — koyu çam mürekkebi, sıcak kâğıt zemini,
   tarla yeşili vurgu, kiremit (önemli) tonu. Serif başlık + grotesk arayüz.
   ========================================================================== */

:root {
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ink-950: #0b1411;
  --ink-900: #111c18;
  --ink-850: #16241f;
  --ink-800: #1b2b24;
  --ink-700: #283b32;
  --ink-600: #3b5046;
  --ink-400: #8a9b92;
  --ink-300: #b4c1ba;

  --paper: #f3f1ea;
  --paper-2: #e9e5d9;
  --surface: #ffffff;
  --surface-sunken: #f8f6f0;
  --surface-hover: #fbfaf6;
  --line: #e3ded2;
  --line-strong: #cec7b6;

  --text: #16201b;
  --text-2: #4a544e;
  --text-3: #7a827c;
  --text-inverse: #f3f1ea;

  --green-800: #0f4a2c;
  --green-700: #155c38;
  --green-600: #1b6e44;
  --green-500: #24894f;
  --green-100: #d9eddf;
  --green-50: #edf6f0;
  --leaf: #6bd69a;

  --clay-700: #8b3a1b;
  --clay-600: #a84a26;
  --clay-100: #f4e0d3;
  --clay-50: #fbf1ea;

  --amber-700: #855709;
  --amber-500: #c98a14;
  --amber-100: #f5e8c6;
  --amber-50: #fbf5e3;

  --red-700: #9f281d;
  --red-600: #b63125;
  --red-100: #f6dcd8;
  --red-50: #fcefed;

  --blue-700: #24517b;
  --blue-100: #dbe6f1;
  --blue-50: #eef3f9;

  --pink-700: #9a2b5f;
  --pink-100: #f5dce8;
  --pink-50: #fbf0f5;

  --slate-700: #4f5852;
  --slate-100: #e8e9e4;
  --slate-50: #f3f4f1;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;

  --shadow-1: 0 1px 2px rgba(17, 28, 24, 0.05), 0 1px 1px rgba(17, 28, 24, 0.03);
  --shadow-2: 0 10px 28px -12px rgba(17, 28, 24, 0.22), 0 2px 6px rgba(17, 28, 24, 0.05);
  --shadow-pop: 0 24px 60px -18px rgba(11, 20, 17, 0.42), 0 4px 12px rgba(11, 20, 17, 0.08);
  --focus-ring: 0 0 0 3px rgba(36, 137, 79, 0.26);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 0;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--green-700);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
dl,
dd {
  margin: 0;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Tipografi ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-variation-settings: "opsz" 72;
}
.h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.h3 {
  font-size: 14px;
  font-weight: 600;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.muted {
  color: var(--text-2);
}
.subtle {
  color: var(--text-3);
}
.small {
  font-size: 12.5px;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.num {
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pre-line {
  white-space: pre-line;
}

/* ---------- Düğmeler ---------- */
.btn {
  --btn-h: 38px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  user-select: none;
}
.btn svg {
  flex: none;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--green-600);
  border-color: var(--green-700);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover:not(:disabled) {
  background: var(--green-700);
}
.btn-dark {
  background: var(--ink-900);
  border-color: var(--ink-950);
  color: var(--text-inverse);
}
.btn-dark:hover:not(:disabled) {
  background: var(--ink-800);
}
.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-sunken);
  border-color: #bdb5a2;
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--paper-2);
  color: var(--text);
}
.btn-danger {
  background: var(--red-600);
  border-color: var(--red-700);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-700);
}
.btn-danger-quiet {
  background: transparent;
  color: var(--red-700);
}
.btn-danger-quiet:hover:not(:disabled) {
  background: var(--red-50);
}
.btn-whatsapp {
  background: #1f8f52;
  border-color: #187543;
  color: #fff;
}
.btn-whatsapp:hover:not(:disabled) {
  background: #187543;
}
.btn-sm {
  --btn-h: 30px;
  padding: 0 10px;
  font-size: 13px;
  gap: 6px;
}
.btn-lg {
  --btn-h: 46px;
  padding: 0 18px;
  font-size: 15px;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  width: var(--btn-h);
  padding: 0;
}
.btn[aria-busy="true"] {
  color: transparent !important;
  pointer-events: none;
}
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, 0.9) rgba(255, 255, 255, 0.9) rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.25);
  animation: spin 0.7s linear infinite;
}
.btn-secondary[aria-busy="true"]::after,
.btn-ghost[aria-busy="true"]::after {
  border-color: var(--text-2) var(--text-2) var(--line) var(--line);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  gap: 16px;
}
.form-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.span-2 {
  grid-column: span 2;
}
.span-all {
  grid-column: 1 / -1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.field-label .optional {
  font-weight: 400;
  color: var(--text-3);
}
.field-hint {
  font-size: 12px;
  color: var(--text-3);
}
.field-error {
  font-size: 12px;
  color: var(--red-700);
  display: none;
}
.field.has-error .field-error {
  display: block;
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input::placeholder,
.textarea::placeholder {
  color: #a4a89f;
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: #b8b09c;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: var(--focus-ring);
}
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--red-600);
}
.field.has-error .input:focus {
  box-shadow: 0 0 0 3px rgba(182, 49, 37, 0.18);
}
.input-lg {
  min-height: 46px;
  font-size: 15px;
}
.textarea {
  min-height: 110px;
  resize: vertical;
}
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a827c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input-affix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-affix .input {
  padding-right: 46px;
}
.input-affix .affix-btn {
  position: absolute;
  right: 4px;
  height: calc(100% - 8px);
  width: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-3);
}
.input-affix .affix-btn:hover {
  color: var(--text);
  background: var(--surface-sunken);
}
.input-icon {
  position: relative;
}
.input-icon > svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.input-icon .input {
  padding-left: 34px;
}

/* Anahtar (switch) */
.switch {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-track {
  flex: none;
  position: relative;
  width: 34px;
  height: 20px;
  margin-top: 1px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color 0.15s var(--ease);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s var(--ease);
}
.switch input:checked + .switch-track {
  background: var(--green-600);
}
.switch input:checked + .switch-track::after {
  transform: translateX(14px);
}
.switch input:focus-visible + .switch-track {
  box-shadow: var(--focus-ring);
}
.switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  font-weight: 500;
}
.switch-text small {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
}

/* Onay kutusu */
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
}
.check input {
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}
.check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.check input:checked {
  background: var(--green-600);
  border-color: var(--green-600);
}
.check input:checked::after {
  opacity: 1;
}
.check input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Segment kontrol (filtre) */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar {
  display: none;
}
.segmented button {
  flex: none;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.segmented button:hover {
  color: var(--text);
}
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.segmented .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  background: var(--slate-100);
  color: var(--slate-700);
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge svg {
  width: 13px;
  height: 13px;
}
.badge-green {
  background: var(--green-50);
  color: var(--green-700);
  box-shadow: inset 0 0 0 1px var(--green-100);
}
.badge-amber {
  background: var(--amber-50);
  color: var(--amber-700);
  box-shadow: inset 0 0 0 1px var(--amber-100);
}
.badge-red {
  background: var(--red-50);
  color: var(--red-700);
  box-shadow: inset 0 0 0 1px var(--red-100);
}
.badge-blue {
  background: var(--blue-50);
  color: var(--blue-700);
  box-shadow: inset 0 0 0 1px var(--blue-100);
}
.badge-clay {
  background: var(--clay-50);
  color: var(--clay-700);
  box-shadow: inset 0 0 0 1px var(--clay-100);
}
.badge-pink {
  background: var(--pink-50);
  color: var(--pink-700);
  box-shadow: inset 0 0 0 1px var(--pink-100);
}
.badge-slate {
  background: var(--slate-50);
  color: var(--slate-700);
  box-shadow: inset 0 0 0 1px var(--slate-100);
}
.badge-ink {
  background: var(--ink-900);
  color: var(--text-inverse);
}
.badge-outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text-2);
}

/* ---------- Paneller ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}
.panel-head .h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-head .panel-sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}
.panel-body {
  padding: 20px;
}
.panel-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.panel-flush {
  padding: 0;
}

/* ---------- Uyarı kutusu ---------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.45;
  border: 1px solid;
}
.alert svg {
  flex: none;
  margin-top: 1px;
}
.alert-error {
  background: var(--red-50);
  border-color: var(--red-100);
  color: var(--red-700);
}
.alert-info {
  background: var(--blue-50);
  border-color: var(--blue-100);
  color: var(--blue-700);
}
.alert-warning {
  background: var(--amber-50);
  border-color: var(--amber-100);
  color: var(--amber-700);
}
.alert-success {
  background: var(--green-50);
  border-color: var(--green-100);
  color: var(--green-700);
}
.alert strong {
  font-weight: 600;
}

/* ---------- Tablo ---------- */
.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 16px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr {
  transition: background-color 0.12s;
}
.table tbody tr:hover {
  background: var(--surface-hover);
}
.table .col-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}
.table .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table tr.is-clickable {
  cursor: pointer;
}
.cell-title {
  font-weight: 500;
  color: var(--text);
}
.table .cell-title {
  white-space: nowrap;
}
.table td.cell-primary {
  min-width: 200px;
}
.cell-sub {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- Sekmeler ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
}
.tab:hover {
  color: var(--text);
}
.tab[aria-selected="true"] {
  color: var(--text);
}
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--green-600);
}
.tab .count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--text-2);
}

/* ---------- Açılır menü ---------- */
.menu {
  position: fixed;
  z-index: 60;
  min-width: 210px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-pop);
  animation: pop-in 0.12s var(--ease);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: none;
  font-size: 13.5px;
  text-align: left;
  color: var(--text);
}
.menu-item svg {
  color: var(--text-3);
}
.menu-item:hover:not(:disabled),
.menu-item:focus-visible {
  background: var(--surface-sunken);
  box-shadow: none;
}
.menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.menu-item.is-danger {
  color: var(--red-700);
}
.menu-item.is-danger svg {
  color: var(--red-600);
}
.menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}
.menu-label {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------- Modal ---------- */
.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.18s var(--ease);
}
.modal.modal-sm {
  width: min(440px, calc(100vw - 32px));
}
.modal.modal-lg {
  width: min(760px, calc(100vw - 32px));
}
.modal::backdrop {
  background: rgba(11, 20, 17, 0.48);
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
  font-variation-settings: "opsz" 48;
}
.modal-desc {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-2);
}
.modal-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

/* ---------- Bildirimler (toast) ---------- */
.toasts {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink-900);
  color: var(--text-inverse);
  font-size: 13.5px;
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.22s var(--ease);
}
.toast svg {
  flex: none;
  margin-top: 1px;
}
.toast-success svg {
  color: var(--leaf);
}
.toast-error {
  background: #3a1410;
}
.toast-error svg {
  color: #ff9b8f;
}
.toast-info svg {
  color: #9cc3ea;
}
.toast-body {
  flex: 1;
  min-width: 0;
}
.toast-close {
  border: 0;
  background: none;
  color: rgba(243, 241, 234, 0.6);
  padding: 0;
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s var(--ease);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Boş / hata / yükleniyor ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 44px 24px;
}
.empty-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  color: var(--text-3);
}
.empty-title {
  font-size: 15px;
  font-weight: 600;
}
.empty-text {
  max-width: 380px;
  font-size: 13.5px;
  color: var(--text-2);
}
.empty .btn {
  margin-top: 12px;
}
.empty.is-error .empty-icon {
  background: var(--red-50);
  border-color: var(--red-100);
  color: var(--red-600);
}
.skeleton {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--paper-2) 0%, #f2efe7 50%, var(--paper-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
.loading-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 20px;
}

/* ---------- İlerleme çubuğu ---------- */
.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: visible;
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green-600);
  transition: width 0.6s var(--ease);
}
.progress-target {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  border-radius: 1px;
  background: var(--clay-600);
}
.progress-sm {
  height: 5px;
}
.progress-sm .progress-target {
  top: -3px;
  bottom: -3px;
}

/* ---------- Yardımcılar ---------- */
.stack {
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
}
.wrap {
  flex-wrap: wrap;
}
.gap-4 {
  gap: 4px;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.gap-24 {
  gap: 24px;
}
.between {
  justify-content: space-between;
}
.grow {
  flex: 1;
  min-width: 0;
}
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}
.avatar {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
}
.code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-sunken);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.code-box span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.code-box .btn {
  font-family: var(--font-sans);
}
.code-box-lg {
  flex-wrap: wrap;
  padding: 10px 10px 10px 16px;
}
.code-box-lg .code-value {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 720px) {
  .form-grid.cols-2,
  .form-grid.cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .span-2 {
    grid-column: auto;
  }
  .panel-head,
  .panel-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .toasts {
    right: 16px;
    bottom: 16px;
  }
}
