/* ==========================================================================
   Miray Döküm Makina — Tasarım sistemi (Minimals UI temelinde, markaya uyarlanmış)
   Kaynak: Minimals v7 tema token'ları (palette, customShadows, typography, bileşen stilleri).
   Birincil renk marka turuncusu, ikincil renk marka laciverti; gri skala ve durum renkleri Minimals'tır.
   Hem herkese açık site (site.css) hem yönetim paneli (admin.css) bu dosyayı kullanır.
   ========================================================================== */

:root {
  /* ---- Palet: birincil (marka turuncusu, Minimals preset yapısında) ---- */
  --primary-lighter: #ffe9d9;
  --primary-light: #ffa66b;
  --primary-main: #f26b1d;
  --primary-dark: #b94a0a;
  --primary-darker: #7b2c04;
  --primary-rgb: 242 107 29;
  --primary-contrast: #ffffff;

  /* ---- İkincil (marka laciverti) ---- */
  --secondary-lighter: #d6e4f7;
  --secondary-light: #6f95cc;
  --secondary-main: #173a69;
  --secondary-dark: #0f2a4f;
  --secondary-darker: #0a1f3c;
  --secondary-rgb: 23 58 105;

  /* ---- Durum renkleri (Minimals) ---- */
  --info-lighter: #cafdf5;   --info-light: #61f3f3;    --info-main: #00b8d9;    --info-dark: #006c9c;    --info-darker: #003768;    --info-rgb: 0 184 217;
  --success-lighter: #d3fcd2; --success-light: #77ed8b; --success-main: #22c55e; --success-dark: #118d57; --success-darker: #065e49; --success-rgb: 34 197 94;
  --warning-lighter: #fff5cc; --warning-light: #ffd666; --warning-main: #ffab00; --warning-dark: #b76e00; --warning-darker: #7a4100; --warning-rgb: 255 171 0;
  --error-lighter: #ffe9d5;   --error-light: #ffac82;   --error-main: #ff5630;   --error-dark: #b71d18;   --error-darker: #7a0916;   --error-rgb: 255 86 48;

  /* ---- Gri skala (Minimals) ---- */
  --grey-50: #fcfdfd;
  --grey-100: #f9fafb;
  --grey-200: #f4f6f8;
  --grey-300: #dfe3e8;
  --grey-400: #c4cdd5;
  --grey-500: #919eab;
  --grey-600: #637381;
  --grey-700: #454f5b;
  --grey-800: #1c252e;
  --grey-900: #141a21;
  --grey-500-rgb: 145 158 171;
  --grey-800-rgb: 28 37 46;

  /* ---- Metin, zemin, eylem ---- */
  --text-primary: var(--grey-800);
  --text-secondary: var(--grey-600);
  --text-disabled: var(--grey-500);
  --bg-paper: #ffffff;
  --bg-default: #ffffff;
  --bg-neutral: var(--grey-200);
  --divider: rgb(var(--grey-500-rgb) / 0.2);
  --divider-dashed: rgb(var(--grey-500-rgb) / 0.2);
  --action-hover: rgb(var(--grey-500-rgb) / 0.08);
  --action-selected: rgb(var(--grey-500-rgb) / 0.16);
  --action-focus: rgb(var(--grey-500-rgb) / 0.24);
  --action-disabled: rgb(var(--grey-500-rgb) / 0.8);
  --action-disabled-bg: rgb(var(--grey-500-rgb) / 0.24);
  --input-outlined: rgb(var(--grey-500-rgb) / 0.2);
  --button-outlined: rgb(var(--grey-500-rgb) / 0.32);
  --paper-outlined: rgb(var(--grey-500-rgb) / 0.16);

  /* ---- Gölgeler (Minimals customShadows) ---- */
  --shadow-z1: 0 1px 2px 0 rgb(var(--grey-500-rgb) / 0.16);
  --shadow-z4: 0 4px 8px 0 rgb(var(--grey-500-rgb) / 0.16);
  --shadow-z8: 0 8px 16px 0 rgb(var(--grey-500-rgb) / 0.16);
  --shadow-z12: 0 12px 24px -4px rgb(var(--grey-500-rgb) / 0.16);
  --shadow-z16: 0 16px 32px -4px rgb(var(--grey-500-rgb) / 0.16);
  --shadow-z20: 0 20px 40px -4px rgb(var(--grey-500-rgb) / 0.16);
  --shadow-z24: 0 24px 48px 0 rgb(var(--grey-500-rgb) / 0.16);
  --shadow-card: 0 0 2px 0 rgb(var(--grey-500-rgb) / 0.2), 0 12px 24px -4px rgb(var(--grey-500-rgb) / 0.12);
  --shadow-dropdown: 0 0 2px 0 rgb(var(--grey-500-rgb) / 0.24), -20px 20px 40px -4px rgb(var(--grey-500-rgb) / 0.24);
  --shadow-dialog: -40px 40px 80px -8px rgb(0 0 0 / 0.24);
  --shadow-primary: 0 8px 16px 0 rgb(var(--primary-rgb) / 0.24);
  --shadow-secondary: 0 8px 16px 0 rgb(var(--secondary-rgb) / 0.24);

  /* ---- Tipografi: Minimals "Inter" yazı tipi seçeneği + başlıklarda ikincil yazı tipi ---- */
  --font-primary: "Inter", "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-secondary: "Manrope", "Barlow", "Inter", system-ui, sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* ---- Şekil ---- */
  --radius: 8px;            /* shape.borderRadius */
  --radius-sm: 6px;         /* label, tooltip */
  --radius-md: 10px;        /* dropdown */
  --radius-lg: 16px;        /* card, dialog */
  --radius-xl: 24px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* ---- Karanlık mod (Minimals dark palette) — yalnızca kök öğede data-color-scheme="dark" iken ---- */
:root[data-color-scheme="dark"] {
  color-scheme: dark;
  --text-primary: #ffffff;
  --text-secondary: var(--grey-500);
  --text-disabled: var(--grey-600);
  --bg-paper: var(--grey-800);
  --bg-default: var(--grey-900);
  --bg-neutral: #28323d;
  --divider: rgb(var(--grey-500-rgb) / 0.2);
  --action-hover: rgb(var(--grey-500-rgb) / 0.08);
  --action-selected: rgb(var(--grey-500-rgb) / 0.16);
  --paper-outlined: rgb(var(--grey-500-rgb) / 0.12);
  --shadow-z1: 0 1px 2px 0 rgb(0 0 0 / 0.16);
  --shadow-z4: 0 4px 8px 0 rgb(0 0 0 / 0.16);
  --shadow-z8: 0 8px 16px 0 rgb(0 0 0 / 0.16);
  --shadow-z12: 0 12px 24px -4px rgb(0 0 0 / 0.16);
  --shadow-z16: 0 16px 32px -4px rgb(0 0 0 / 0.16);
  --shadow-z20: 0 20px 40px -4px rgb(0 0 0 / 0.16);
  --shadow-z24: 0 24px 48px 0 rgb(0 0 0 / 0.16);
  --shadow-card: 0 0 2px 0 rgb(0 0 0 / 0.2), 0 12px 24px -4px rgb(0 0 0 / 0.12);
  --shadow-dropdown: 0 0 2px 0 rgb(0 0 0 / 0.24), -20px 20px 40px -4px rgb(0 0 0 / 0.24);
}

/* ---------- Tipografi ölçeği (Minimals variants) ---------- */
.t-h1 { font-family: var(--font-secondary); font-weight: 800; line-height: 1.25; font-size: 2.5rem; }
.t-h2 { font-family: var(--font-secondary); font-weight: 800; line-height: 1.3333; font-size: 2rem; }
.t-h3 { font-family: var(--font-secondary); font-weight: 700; line-height: 1.5; font-size: 1.5rem; }
.t-h4 { font-weight: 700; line-height: 1.5; font-size: 1.25rem; }
.t-h5 { font-weight: 700; line-height: 1.5; font-size: 1.125rem; }
.t-h6 { font-weight: 600; line-height: 1.5556; font-size: 1.0625rem; }
.t-subtitle1 { font-weight: 600; line-height: 1.5; font-size: 1rem; }
.t-subtitle2 { font-weight: 600; line-height: 1.5714; font-size: .875rem; }
.t-body2 { line-height: 1.5714; font-size: .875rem; }
.t-caption { line-height: 1.5; font-size: .75rem; }
.t-overline { font-weight: 700; line-height: 1.5; font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; }
@media (min-width: 600px) { .t-h1 { font-size: 3.25rem; } .t-h2 { font-size: 2.5rem; } .t-h3 { font-size: 1.625rem; } .t-h6 { font-size: 1.125rem; } .t-h5 { font-size: 1.1875rem; } }
@media (min-width: 900px) { .t-h1 { font-size: 3.625rem; } .t-h2 { font-size: 2.75rem; } .t-h3 { font-size: 1.875rem; } .t-h4 { font-size: 1.5rem; } }
@media (min-width: 1200px) { .t-h1 { font-size: 4rem; } .t-h2 { font-size: 3rem; } .t-h3 { font-size: 2rem; } }

/* ---------- Label (Minimals <Label variant="soft">) ---------- */
.label {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 24px; min-width: 24px; padding: 0 6px; flex-shrink: 0;
  font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
  border-radius: var(--radius-sm);
  color: var(--grey-600); background: rgb(var(--grey-500-rgb) / 0.16);
}
.label i { font-size: .7rem; }
.label--primary   { color: var(--primary-dark);   background: rgb(var(--primary-rgb) / 0.16); }
.label--secondary { color: var(--secondary-main); background: rgb(var(--secondary-rgb) / 0.12); }
.label--info      { color: var(--info-dark);      background: rgb(var(--info-rgb) / 0.16); }
.label--success   { color: var(--success-dark);   background: rgb(var(--success-rgb) / 0.16); }
.label--warning   { color: var(--warning-dark);   background: rgb(var(--warning-rgb) / 0.16); }
.label--error     { color: var(--error-dark);     background: rgb(var(--error-rgb) / 0.16); }
.label--filled    { color: #fff; background: var(--grey-800); }
.label--filled.label--primary { background: var(--primary-dark); color: #fff; }

/* ---------- Avatar ---------- */
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; font-weight: 600; font-size: 1rem; color: var(--primary-contrast); background: var(--primary-main); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--rounded { border-radius: 12px; }
.avatar--sm { width: 32px; height: 32px; font-size: .8125rem; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.25rem; }
.avatar--info { background: var(--info-main); }
.avatar--success { background: var(--success-main); }
.avatar--warning { background: var(--warning-main); color: var(--grey-800); }
.avatar--error { background: var(--error-main); }
.avatar--secondary { background: var(--secondary-main); }
.avatar--soft { color: var(--primary-dark); background: rgb(var(--primary-rgb) / 0.16); }

/* ---------- Kaydırma çubuğu (Minimals scrollbarStyles) ---------- */
.scrollbar { scrollbar-width: thin; scrollbar-color: rgb(var(--grey-500-rgb) / 0.4) transparent; }

/* ---------- Açılır panel / popover (Minimals paperStyles dropdown) ---------- */
.paper-dropdown {
  padding: 4px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  background-color: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-image: radial-gradient(circle at 100% 0%, rgb(var(--info-rgb) / 0.12), transparent 50%), radial-gradient(circle at 0% 100%, rgb(var(--error-rgb) / 0.12), transparent 50%);
}
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-primary); font: inherit; font-size: .875rem; line-height: 1.5714; text-align: left; cursor: pointer; }
.menu-item + .menu-item { margin-top: 4px; }
.menu-item:hover { background: var(--action-hover); color: var(--text-primary); }
.menu-item.is-selected { background: var(--action-selected); font-weight: 600; }
.menu-item--error { color: var(--error-main); }

/* ---------- Maske ikon (Minimals SvgColor) ---------- */
.svg-color { display: inline-block; flex-shrink: 0; width: 24px; height: 24px; background-color: currentColor; -webkit-mask: var(--icon) no-repeat center / contain; mask: var(--icon) no-repeat center / contain; }

@media (prefers-reduced-motion: reduce) {
  :root { --duration: 1ms; }
}
