/* ============================================================
   Aras Zeytinyağı — shadcn-admin esintili tasarım sistemi
   ============================================================ */

:root {
  --background: 0 0% 100%;
  --foreground: 150 10% 12%;
  --card: 0 0% 100%;
  --card-foreground: 150 10% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 150 10% 12%;
  --primary: 142 72% 24%;
  --primary-foreground: 0 0% 100%;
  --secondary: 140 12% 96%;
  --secondary-foreground: 150 10% 18%;
  --muted: 140 10% 96%;
  --muted-foreground: 150 5% 45%;
  --accent: 84 50% 95%;
  --accent-foreground: 142 60% 22%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 100%;
  --border: 140 8% 90%;
  --input: 140 8% 88%;
  --ring: 142 60% 32%;
  --radius: 0.6rem;

  --sidebar: 140 14% 98%;
  --sidebar-foreground: 150 8% 26%;
  --sidebar-border: 140 8% 91%;
  --sidebar-accent: 140 12% 94%;

  --chart-1: 142 60% 36%;
  --chart-2: 38 92% 50%;
  --chart-3: 190 80% 38%;
  --chart-4: 22 90% 55%;
  --chart-5: 262 60% 55%;

  --success: 142 65% 32%;
  --warning: 38 92% 42%;
  --info: 200 80% 36%;

  --shadow-sm: 0 1px 2px 0 rgb(16 24 20 / 0.05);
  --shadow-md: 0 4px 12px -2px rgb(16 24 20 / 0.08), 0 2px 4px -2px rgb(16 24 20 / 0.05);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dark {
  --background: 150 12% 7%;
  --foreground: 140 10% 94%;
  --card: 150 10% 9%;
  --card-foreground: 140 10% 94%;
  --popover: 150 10% 9%;
  --popover-foreground: 140 10% 94%;
  --primary: 88 60% 50%;
  --primary-foreground: 150 40% 8%;
  --secondary: 150 8% 16%;
  --secondary-foreground: 140 10% 94%;
  --muted: 150 8% 15%;
  --muted-foreground: 140 6% 62%;
  --accent: 150 12% 16%;
  --accent-foreground: 88 60% 60%;
  --destructive: 0 62% 50%;
  --destructive-foreground: 0 0% 100%;
  --border: 150 8% 19%;
  --input: 150 8% 22%;
  --ring: 88 55% 50%;

  --sidebar: 150 12% 6%;
  --sidebar-foreground: 140 8% 78%;
  --sidebar-border: 150 8% 16%;
  --sidebar-accent: 150 10% 14%;

  --chart-1: 90 60% 52%;
  --chart-2: 38 92% 58%;
  --chart-3: 190 75% 50%;
  --chart-4: 22 88% 60%;
  --chart-5: 262 70% 68%;

  --success: 142 55% 50%;
  --warning: 38 92% 58%;
  --info: 200 75% 55%;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 8px 24px -6px rgb(0 0 0 / 0.5);
}

*, *::before, *::after { box-sizing: border-box; border-color: hsl(var(--border)); }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; line-height: 1.25; }
h2 { font-size: 1.125rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; }
hr { border: 0; border-top: 1px solid hsl(var(--border)); margin: 16px 0; }

.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------------- Layout ---------------- */

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  background: hsl(var(--sidebar));
  border-right: 1px solid hsl(var(--sidebar-border));
  color: hsl(var(--sidebar-foreground));
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform .2s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 16px;
}
.sidebar-brand .logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(140deg, hsl(90 55% 38%), hsl(142 72% 26%));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}
.sidebar-brand .logo .icon { width: 22px; height: 22px; }
.sidebar-brand strong { font-size: 14.5px; display: block; letter-spacing: -0.02em; }
.sidebar-brand span { font-size: 11px; color: hsl(var(--muted-foreground)); }

.sidebar-scroll { overflow-y: auto; flex: 1; padding: 4px 12px 16px; }
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 4px; }

.nav-group-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  padding: 16px 10px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: hsl(var(--sidebar-foreground));
  margin-bottom: 2px;
  transition: background .15s ease, color .15s ease;
}
.nav-link .icon { width: 17px; height: 17px; opacity: .8; }
.nav-link:hover { background: hsl(var(--sidebar-accent)); }
.nav-link.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.nav-link.active .icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-radius: 999px;
  padding: 1px 7px;
}
.nav-link.active .nav-badge { background: hsl(0 0% 100% / .2); color: inherit; }

.sidebar-footer { padding: 12px; border-top: 1px solid hsl(var(--sidebar-border)); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.sidebar-user:hover { background: hsl(var(--sidebar-accent)); }
.avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: hsl(var(--primary) / .12);
  color: hsl(var(--primary));
  font-weight: 700; font-size: 13px;
  display: grid; place-items: center; flex-shrink: 0;
}
.sidebar-user .meta { min-width: 0; }
.sidebar-user small { display: block; font-size: 11.5px; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user strong { font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-area { margin-left: 264px; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 60px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: hsl(var(--background) / .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--border));
}
.topbar-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.breadcrumb strong { color: hsl(var(--foreground)); font-weight: 500; }
.breadcrumb .sep { opacity: .5; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  color: hsl(var(--muted-foreground)); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
.icon-btn .icon { width: 18px; height: 18px; }

.page-content { padding: 24px; flex: 1; max-width: 1440px; width: 100%; }

.page-header {
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-header .page-heading { min-width: 200px; flex: 1; }
.page-header h1 { font-size: 1.35rem; }
.page-header p { color: hsl(var(--muted-foreground)); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.mobile-only { display: none; }
.sidebar-overlay { display: none; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  background: transparent;
  color: hsl(var(--foreground));
}
.btn .icon { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / .9); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / .75); }
.btn-outline { background: hsl(var(--background)); border-color: hsl(var(--border)); }
.btn-outline:hover { background: hsl(var(--secondary)); }
.btn-ghost:hover { background: hsl(var(--secondary)); }
.btn-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.btn-destructive:hover { background: hsl(var(--destructive) / .9); }
.btn-success { background: hsl(var(--success)); color: #fff; }
.btn-success:hover { background: hsl(var(--success) / .9); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.btn-block { width: 100%; }

/* ---------------- Cards ---------------- */

.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header { padding: 18px 20px 0; }
.card-header.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-title .icon { width: 17px; height: 17px; color: hsl(var(--muted-foreground)); }
.card-description { font-size: 12.5px; color: hsl(var(--muted-foreground)); margin-top: 3px; }
.card-content { padding: 18px 20px 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid hsl(var(--border)); }

/* ---------------- Grid ---------------- */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-full { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-lg { font-size: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ---------------- Forms ---------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-full { grid-column: 1 / -1; }
.label { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.label .req { color: hsl(var(--destructive)); }
.hint { font-size: 11.5px; color: hsl(var(--muted-foreground)); line-height: 1.45; }

.input, .select, .textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: calc(var(--radius) - 3px);
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.input:focus, .select:focus, .textarea:focus { border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(var(--ring) / .12); }
.input::placeholder, .textarea::placeholder { color: hsl(var(--muted-foreground) / .7); }
.input:disabled, .select:disabled, .textarea:disabled { background: hsl(var(--muted)); opacity: .7; cursor: not-allowed; }
.input.is-invalid { border-color: hsl(var(--destructive)); }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: 34px; }
.input-group .input-icon { position: absolute; left: 11px; color: hsl(var(--muted-foreground)); pointer-events: none; }
.input-group .input-icon .icon { width: 15px; height: 15px; }
.input-with-unit { position: relative; }
.input-with-unit .input { padding-right: 44px; }
.input-with-unit .unit { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 11.5px; color: hsl(var(--muted-foreground)); pointer-events: none; }

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkbox input { width: 15px; height: 15px; accent-color: hsl(var(--primary)); }

.segmented { display: inline-flex; background: hsl(var(--muted)); padding: 3px; border-radius: 9px; gap: 2px; }
.segmented label { padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 500; cursor: pointer; color: hsl(var(--muted-foreground)); display: flex; align-items: center; gap: 6px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + label { background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: var(--shadow-sm); font-weight: 600; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-bar .input, .filter-bar .select { height: 36px; }
.search-box { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: hsl(var(--muted-foreground)); }
.search-box .input { padding-left: 34px; height: 36px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }

.calc-summary {
  background: hsl(var(--accent) / .55);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.calc-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.calc-item span { color: hsl(var(--muted-foreground)); }
.calc-item strong { font-variant-numeric: tabular-nums; }
.calc-item.total { grid-column: 1 / -1; border-top: 1px dashed hsl(var(--border)); padding-top: 10px; font-size: 14px; }
.calc-item.total strong { color: hsl(var(--primary)); font-size: 16px; }

/* ---------------- Tables ---------------- */

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / .55);
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border));
  white-space: nowrap;
}
.table tbody td { padding: 11px 14px; border-bottom: 1px solid hsl(var(--border)); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: hsl(var(--muted) / .35); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid hsl(var(--border)); flex-wrap: wrap; font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.table-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.cell-main { font-weight: 600; font-size: 13px; display: block; }
.cell-sub { font-size: 11.5px; color: hsl(var(--muted-foreground)); display: block; }
.cell-entity { display: flex; align-items: center; gap: 10px; }
.cell-entity .avatar { width: 32px; height: 32px; font-size: 11px; }

/* ---------------- Badges ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.6;
  white-space: nowrap;
}
.badge-muted { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); border-color: hsl(var(--border)); }
.badge-success { background: hsl(var(--success) / .1); color: hsl(var(--success)); border-color: hsl(var(--success) / .25); }
.badge-warning { background: hsl(var(--warning) / .12); color: hsl(var(--warning)); border-color: hsl(var(--warning) / .3); }
.badge-danger { background: hsl(var(--destructive) / .1); color: hsl(var(--destructive)); border-color: hsl(var(--destructive) / .25); }
.badge-info { background: hsl(var(--info) / .1); color: hsl(var(--info)); border-color: hsl(var(--info) / .25); }
.badge-primary { background: hsl(var(--primary) / .1); color: hsl(var(--primary)); border-color: hsl(var(--primary) / .25); }
.badge-outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--muted-foreground)); }

/* ---------------- Stat cards ---------------- */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { position: relative; overflow: hidden; }
.stat-card .card-content { padding: 18px 18px 16px; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.stat-label { font-size: 12px; font-weight: 500; color: hsl(var(--muted-foreground)); }
.stat-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: hsl(var(--chart-1) / .12); color: hsl(var(--chart-1)); }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-icon.amber { background: hsl(var(--chart-2) / .14); color: hsl(var(--chart-2)); }
.stat-icon.blue { background: hsl(var(--chart-3) / .12); color: hsl(var(--chart-3)); }
.stat-icon.orange { background: hsl(var(--chart-4) / .14); color: hsl(var(--chart-4)); }
.stat-icon.violet { background: hsl(var(--chart-5) / .14); color: hsl(var(--chart-5)); }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 12px; font-weight: 500; color: hsl(var(--muted-foreground)); margin-left: 3px; }
.stat-foot { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: hsl(var(--muted-foreground)); margin-top: 6px; }
.trend { font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.trend.up { color: hsl(var(--success)); }
.trend.down { color: hsl(var(--destructive)); }
.trend .icon { width: 13px; height: 13px; }

/* ---------------- Chart ---------------- */

.chart-box { width: 100%; min-height: 240px; position: relative; }
.chart-box svg { width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chart-tooltip { font-size: 11px; fill: hsl(var(--muted-foreground)); }
.axis-label { font-size: 10.5px; fill: hsl(var(--muted-foreground)); }
.axis-line { stroke: hsl(var(--border)); stroke-width: 1; }
.chart-empty { display: grid; place-items: center; min-height: 200px; color: hsl(var(--muted-foreground)); font-size: 13px; }

/* ---------------- Progress / lists ---------------- */

.progress { height: 8px; background: hsl(var(--muted)); border-radius: 999px; overflow: hidden; width: 100%; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: hsl(var(--chart-1)); transition: width .4s ease; }
.progress.warning > span { background: hsl(var(--warning)); }
.progress.danger > span { background: hsl(var(--destructive)); }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid hsl(var(--border)); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; font-size: 13px; }
.list-row .sub { font-size: 11.5px; color: hsl(var(--muted-foreground)); }

/* ---------------- Alerts & toast ---------------- */

.flash-stack { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-md);
  animation: flashIn .2s ease;
}
.flash .icon { width: 17px; height: 17px; margin-top: 1px; }
.flash-success { border-left: 3px solid hsl(var(--success)); }
.flash-success .icon { color: hsl(var(--success)); }
.flash-danger { border-left: 3px solid hsl(var(--destructive)); }
.flash-danger .icon { color: hsl(var(--destructive)); }
.flash-warning { border-left: 3px solid hsl(var(--warning)); }
.flash-warning .icon { color: hsl(var(--warning)); }
.flash-info { border-left: 3px solid hsl(var(--info)); }
.flash-info .icon { color: hsl(var(--info)); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13px; border: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .5); }
.alert .icon { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: hsl(var(--warning) / .1); border-color: hsl(var(--warning) / .3); color: hsl(var(--warning)); }
.alert-danger { background: hsl(var(--destructive) / .08); border-color: hsl(var(--destructive) / .3); color: hsl(var(--destructive)); }

.empty-state { padding: 40px 20px; text-align: center; color: hsl(var(--muted-foreground)); }
.table-compact th, .table-compact td { padding-top: 8px; padding-bottom: 8px; }
.table-compact thead th { font-size: 11px; letter-spacing: .03em; }
.bag-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-variant-numeric: tabular-nums; }
.tank-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.empty-state .icon { width: 36px; height: 36px; margin: 0 auto 10px; opacity: .45; }
.empty-state strong { display: block; color: hsl(var(--foreground)); font-size: 14px; margin-bottom: 4px; }

/* ---------------- Pagination ---------------- */

.pagination { display: flex; gap: 4px; align-items: center; }
.pagination a, .pagination span {
  min-width: 32px; height: 32px; padding: 0 8px;
  display: inline-grid; place-items: center;
  border-radius: 7px; border: 1px solid hsl(var(--border));
  font-size: 12.5px; color: hsl(var(--foreground));
  background: hsl(var(--background));
}
.pagination a:hover { background: hsl(var(--secondary)); }
.pagination .active { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-weight: 600; }
.pagination .disabled { opacity: .45; pointer-events: none; }

/* ---------------- Dropdown ---------------- */

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  background: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 5px;
  z-index: 80;
  display: none;
}
.dropdown.open .dropdown-menu { display: block; animation: flashIn .12s ease; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  border: 0; background: transparent; color: inherit;
  border-radius: 7px; font-size: 12.5px; text-align: left; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: hsl(var(--secondary)); }
.dropdown-menu .icon { width: 15px; height: 15px; color: hsl(var(--muted-foreground)); }
.dropdown-menu .divider { height: 1px; background: hsl(var(--border)); margin: 5px 0; }
.dropdown-menu .danger { color: hsl(var(--destructive)); }
.dropdown-menu .danger .icon { color: inherit; }

/* ---------------- Modal ---------------- */

dialog.modal {
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  padding: 0;
  width: min(92vw, 460px);
  box-shadow: 0 24px 70px rgb(0 0 0 / .35);
}
dialog.modal::backdrop { background: rgb(6 12 9 / .55); backdrop-filter: blur(2px); }
.modal-head { padding: 18px 20px 0; }
.modal-head h3 { font-size: 15px; }
.modal-head p { font-size: 12.5px; color: hsl(var(--muted-foreground)); margin-top: 4px; }
.modal-body { padding: 16px 20px; font-size: 13px; }
.modal-foot { padding: 0 20px 18px; display: flex; gap: 8px; justify-content: flex-end; }

/* ---------------- Detail / description list ---------------- */

.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.detail-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed hsl(var(--border)); font-size: 13px; }
.detail-item dt { color: hsl(var(--muted-foreground)); }
.detail-item dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.detail-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); overflow: hidden; background: hsl(var(--card)); }
.summary-strip > div { padding: 14px 16px; border-right: 1px solid hsl(var(--border)); }
.summary-strip > div:last-child { border-right: 0; }
.summary-strip .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: hsl(var(--muted-foreground)); font-weight: 600; }
.summary-strip .v { font-size: 17px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid hsl(var(--border)); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 9px 14px; font-size: 13px; font-weight: 500; color: hsl(var(--muted-foreground)); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: hsl(var(--foreground)); }
.tab.active { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); font-weight: 600; }

.bank-note { background: hsl(var(--muted) / .6); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: hsl(var(--muted-foreground)); }

/* ---------------- Auth ---------------- */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: hsl(var(--background));
}
.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f4f7f2;
  background:
    radial-gradient(1200px 600px at 10% 0%, hsl(88 55% 30% / .55), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, hsl(142 60% 22% / .8), transparent 55%),
    linear-gradient(150deg, #16251a, #0c1510 60%, #101b14);
}
.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / .055) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand .logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(140deg, #8fbc2a, #3f7d1f); display: grid; place-items: center; color: #0c1a08; }
.auth-brand strong { font-size: 16px; letter-spacing: -0.02em; }
.auth-brand span { display: block; font-size: 11.5px; color: rgb(244 247 242 / .65); }
.auth-copy { position: relative; z-index: 1; max-width: 460px; }
.auth-copy h2 { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 14px; }
.auth-copy p { color: rgb(244 247 242 / .72); font-size: 14px; line-height: 1.65; }
.auth-features { display: grid; gap: 10px; margin-top: 26px; }
.auth-feature { display: flex; gap: 10px; align-items: center; font-size: 13px; color: rgb(244 247 242 / .82); }
.auth-feature .ic { width: 28px; height: 28px; border-radius: 8px; background: rgb(255 255 255 / .08); display: grid; place-items: center; flex-shrink: 0; }
.auth-feature .ic .icon { width: 15px; height: 15px; color: #b6e05a; }
.auth-foot { position: relative; z-index: 1; font-size: 11.5px; color: rgb(244 247 242 / .45); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo-sm { width: 42px; height: 42px; border-radius: 11px; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); display: none; place-items: center; margin-bottom: 16px; }
.auth-card h1 { font-size: 22px; letter-spacing: -0.02em; }
.auth-card .sub { color: hsl(var(--muted-foreground)); font-size: 13px; margin: 6px 0 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-demo { margin-top: 22px; border: 1px dashed hsl(var(--border)); border-radius: 10px; padding: 12px 14px; font-size: 12px; color: hsl(var(--muted-foreground)); line-height: 1.7; }
.auth-demo code { background: hsl(var(--muted)); padding: 1px 6px; border-radius: 5px; color: hsl(var(--foreground)); font-size: 11.5px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: hsl(var(--muted-foreground)); cursor: pointer; padding: 6px; border-radius: 6px; }
.password-toggle:hover { background: hsl(var(--secondary)); }

/* ---------------- Receipt (makbuz) ---------------- */

.receipt-page { background: #eef1ee; min-height: 100vh; padding: 28px 16px; }
.receipt-actions { max-width: 820px; margin: 0 auto 14px; display: flex; gap: 8px; justify-content: flex-end; }
.receipt {
  max-width: 820px; margin: 0 auto; background: #fff; color: #16211b;
  padding: 36px 40px; border-radius: 6px; box-shadow: 0 12px 40px rgb(16 24 20 / .12);
  font-size: 13px;
}
.receipt-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid #16211b; padding-bottom: 16px; }
.receipt-brand { display: flex; gap: 12px; align-items: flex-start; }
.receipt-brand .r-logo { width: 42px; height: 42px; border-radius: 10px; background: #3f7d1f; color: #fff; display: grid; place-items: center; font-size: 20px; }
.receipt-brand h2 { font-size: 17px; letter-spacing: -0.02em; }
.receipt-brand p { font-size: 11px; color: #5b6a60; margin-top: 2px; line-height: 1.5; }
.receipt-title { text-align: right; }
.receipt-title h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .12em; }
.receipt-title .no { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 13px; margin-top: 4px; color: #3f7d1f; font-weight: 700; }
.receipt-title .date { font-size: 11.5px; color: #5b6a60; margin-top: 4px; }
.receipt-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 16px 0; border-bottom: 1px solid #dfe6e1; }
.receipt-parties h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #6b7a70; margin-bottom: 6px; }
.receipt-parties p { font-size: 12.5px; line-height: 1.65; }
.receipt-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 12.5px; }
.receipt-table th { background: #f2f6f3; text-align: left; padding: 8px 10px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #4c5a51; border: 1px solid #dfe6e1; }
.receipt-table td { padding: 8px 10px; border: 1px solid #dfe6e1; }
.receipt-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.receipt-table tr.highlight td { background: #f5faee; font-weight: 700; }
.receipt-notes { display: flex; gap: 20px; justify-content: space-between; margin-top: 10px; }
.receipt-sign { margin-top: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; text-align: center; font-size: 11.5px; color: #4c5a51; }
.receipt-sign div { border-top: 1px solid #9aa8a0; padding-top: 8px; }
.receipt-meta { margin-top: 18px; padding-top: 12px; border-top: 1px dashed #dfe6e1; font-size: 10.5px; color: #7b8981; display: flex; justify-content: space-between; gap: 12px; }
.receipt-bank {
  margin-top: 14px; padding: 10px 12px; border: 1px solid #d9e2db; border-radius: 8px;
  background: #f4f8f4; font-size: 10.8px; color: #33443a; line-height: 1.55;
}
.receipt-bank strong { display: block; font-size: 11px; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .06em; color: #1d2f26; }

/* ---------------- Responsive ---------------- */

@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgb(0 0 0 / .3); }
  body.sidebar-open .sidebar { transform: none; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgb(6 12 9 / .5); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .main-area { margin-left: 0; }
  .mobile-only { display: inline-grid; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-card .logo-sm { display: grid; }
}
@media (max-width: 720px) {
  .page-content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .grid-2, .grid-3, .grid-4, .grid-5, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .stat-grid { grid-template-columns: 1fr; }
  .detail-grid, .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip > div:nth-child(2) { border-right: 0; }
  .detail-item { flex-direction: column; gap: 2px; align-items: flex-start; }
  .detail-item dd { text-align: left; }
  .receipt { padding: 22px 18px; }
  .receipt-head { flex-direction: column; gap: 12px; }
  .receipt-title { text-align: left; }
  .receipt-parties { grid-template-columns: 1fr; }
  .receipt-sign { gap: 24px; }
  .calc-summary { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.2rem; }
  .hide-sm { display: none !important; }
}

/* ---------------- Print ---------------- */

@media print {
  .no-print, .sidebar, .topbar, .flash-stack, .receipt-actions { display: none !important; }
  body, .receipt-page { background: #fff !important; padding: 0 !important; }
  .receipt { box-shadow: none; border-radius: 0; max-width: none; padding: 12mm 14mm; }
  .main-area { margin-left: 0 !important; }
  @page { margin: 8mm; }
}

/* ---------------- Marka / Logo ---------------- */

.sidebar-brand .logo { overflow: hidden; }
.sidebar-brand .logo .brand-logo { width: 100%; height: 100%; object-fit: contain; }
.brand-logo-fallback { font-size: 20px; line-height: 1; }
.auth-brand .logo .brand-logo { width: 100%; height: 100%; object-fit: contain; }
.receipt-brand .r-logo { overflow: hidden; }
.receipt-brand .r-logo .brand-logo { width: 100%; height: 100%; object-fit: contain; }
.print-brand { display: flex; align-items: center; gap: 12px; }
.print-brand img { width: 56px; height: 56px; object-fit: contain; }

/* ---------------- Sıra (queue) ---------------- */

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px; border-radius: 10px; border: 1px solid hsl(var(--border));
  background: hsl(var(--card)); font-size: 12.5px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.slot:hover { border-color: hsl(var(--ring)); }
.slot strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.slot small { font-size: 10.5px; color: hsl(var(--muted-foreground)); }
.slot.is-full { opacity: .55; cursor: not-allowed; background: hsl(var(--muted)); }
.slot.is-free { border-color: hsl(var(--success) / .45); }
.slot.is-free:hover { background: hsl(var(--success) / .07); }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot:has(input:checked) { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .08); box-shadow: 0 0 0 2px hsl(var(--primary) / .2); }
.slot-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: hsl(var(--success) / .12); color: hsl(var(--success)); }
.slot-badge.full { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }

.queue-ticket {
  border: 1px dashed hsl(var(--border));
  border-radius: 12px;
  padding: 14px 16px;
  background: hsl(var(--accent) / .4);
}
.queue-no {
  font-size: 30px; font-weight: 800; line-height: 1;
  color: hsl(var(--primary)); font-variant-numeric: tabular-nums;
}

/* ---------------- Canlı üretim ---------------- */

.prod-card { position: relative; }
.prod-card .prod-cabinet {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: hsl(var(--primary) / .1); color: hsl(var(--primary));
}
.prod-timer { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.prod-timer.warn { color: hsl(var(--warning)); }
.prod-timer.done { color: hsl(var(--success)); }
.prod-card.is-done { opacity: .75; }
.pulse-dot { width: 8px; height: 8px; border-radius: 999px; background: hsl(var(--success)); display: inline-block; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.25); } }

/* ---------------- İletişim ---------------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 16px; align-items: start; }
.contact-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed hsl(var(--border)); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: hsl(var(--primary) / .1); color: hsl(var(--primary)); flex-shrink: 0; }
.contact-item .ic .icon { width: 17px; height: 17px; }
.contact-item .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: hsl(var(--muted-foreground)); font-weight: 600; }
.contact-item .v { font-size: 13.5px; font-weight: 500; }

/* ---------------- Sekmeler (ayarlar) ---------------- */

.settings-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.settings-tabs a {
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 500;
  border: 1px solid hsl(var(--border)); background: hsl(var(--background)); color: hsl(var(--muted-foreground));
  display: inline-flex; align-items: center; gap: 6px;
}
.settings-tabs a:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
.settings-tabs a.active { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-weight: 600; }
.settings-tabs a .icon { width: 15px; height: 15px; }

/* ---------------- Tablo ek ---------------- */

.table .tiny { font-size: 11px; }
.serial-chip { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 11.5px; background: hsl(var(--muted)); border: 1px solid hsl(var(--border)); padding: 1px 6px; border-radius: 5px; }
.stat-inline { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; }
.stat-inline b { font-size: 15px; }
.note-box { border-left: 3px solid hsl(var(--primary)); background: hsl(var(--primary) / .06); padding: 10px 14px; border-radius: 8px; font-size: 12.5px; }

/* ---------------- Müşteri arama (combobox) ---------------- */

.customer-picker { position: relative; }
.customer-picker .cp-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: hsl(var(--popover)); border: 1px solid hsl(var(--border));
  border-radius: 10px; box-shadow: var(--shadow-md);
  max-height: 260px; overflow-y: auto; z-index: 90; padding: 4px; display: none;
}
.customer-picker .cp-results.open { display: block; }
.cp-item {
  display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; background: transparent; border-radius: 7px;
  cursor: pointer; color: inherit; font-family: inherit;
}
.cp-item:hover, .cp-item:focus { background: hsl(var(--secondary)); outline: none; }
.cp-item .cp-name { font-size: 13px; font-weight: 600; }
.cp-item .cp-meta { font-size: 11px; color: hsl(var(--muted-foreground)); }
.cp-empty { padding: 10px; font-size: 12px; color: hsl(var(--muted-foreground)); text-align: center; }

/* ---------------- Sidebar kullanıcı menüsü (yukarı açılır) ---------------- */

.sidebar-footer .dropdown-menu {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0; right: 0;
  min-width: 0;
}
.sidebar-footer .dropdown-menu .dd-user {
  padding: 8px 10px 6px;
}
.sidebar-footer .dropdown-menu .dd-user strong { display: block; font-size: 12.5px; }
.sidebar-footer .dropdown-menu .dd-user small { display: block; font-size: 11px; color: hsl(var(--muted-foreground)); word-break: break-all; }
.sidebar-footer .dropdown-menu .dd-role {
  display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px; background: hsl(var(--primary) / .12); color: hsl(var(--primary));
}

/* ---------------- Sıra / üretim kartı ---------------- */

.queue-prod-box {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 9px; border: 1px dashed hsl(var(--border));
  background: hsl(var(--accent) / .35); font-size: 12px; margin-top: 8px;
}
.qr-card {
  max-width: 420px; margin: 0 auto; background: #fff; color: #111;
  border: 2px dashed #16211b; border-radius: 12px; padding: 20px;
}
.qr-card h3 { font-size: 16px; margin: 0 0 2px; }
.qr-card .qr-box { display: grid; place-items: center; padding: 10px 0; }
.qr-card .qr-box img { width: 190px; height: 190px; image-rendering: pixelated; }
.qr-card .qr-code { font-family: ui-monospace, monospace; font-size: 15px; font-weight: 700; letter-spacing: .08em; }
.qr-card .qr-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 4px 0; border-bottom: 1px dotted #d5ded8; }
.qr-card .qr-row:last-of-type { border-bottom: 0; }

/* ---------------- Logo: her yerde orantılı ve taşmasız ---------------- */

img.brand-logo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.sidebar-brand .logo,
.auth-brand .logo,
.auth-card .logo-sm,
.receipt-brand .r-logo,
.public-brand .logo,
.sidebar-brand .logo img,
.auth-brand .logo img,
.receipt-brand .r-logo img {
  overflow: hidden;
}
.sidebar-brand .logo { max-width: 38px; max-height: 38px; }
.auth-brand .logo { max-width: 46px; max-height: 46px; }
.receipt-brand .r-logo { max-width: 42px; max-height: 42px; }
.public-brand .logo { max-width: 40px; max-height: 40px; }

/* ---------------- Slot tahtası ---------------- */

.slot-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.slot-cell {
  border-radius: 10px; padding: 12px; border: 1px solid hsl(var(--border));
  background: hsl(var(--card)); font-size: 12px;
}
.slot-cell.free { border-style: dashed; color: hsl(var(--muted-foreground)); }
.slot-cell.busy { border-color: hsl(var(--primary) / .45); background: hsl(var(--primary) / .06); }
.slot-cell.extra { border-color: hsl(var(--chart-2) / .5); background: hsl(var(--chart-2) / .08); }
.slot-cell strong { display: block; font-size: 12.5px; }


@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .prod-timer { font-size: 22px; }
}

.contract-text { font-size: 13px; line-height: 1.75; color: hsl(var(--foreground)); max-height: 68vh; overflow-y: auto; padding-right: 6px; white-space: normal; }

/* ---------------- Herkese açık sayfalar (randevu / kayıt / QR) ---------------- */

.public-page { background: hsl(var(--background)); min-height: 100vh; display: flex; flex-direction: column; }

.pub-header {
  position: sticky; top: 0; z-index: 40;
  background: hsl(var(--card) / .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--border));
}
.pub-header-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.pub-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.pub-logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  display: grid; place-items: center; overflow: hidden;
  background: hsl(var(--primary) / .1); border: 1px solid hsl(var(--border));
}
.pub-logo .brand-logo { width: 100%; height: 100%; object-fit: contain; }
.pub-logo .brand-logo-fallback { font-size: 20px; }
.pub-brand-text { min-width: 0; }
.pub-brand-text strong { display: block; font-size: 14px; line-height: 1.2; }
.pub-brand-text small { display: block; font-size: 11px; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }

.pub-nav { display: flex; align-items: center; gap: 4px; }
.pub-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: hsl(var(--muted-foreground)); text-decoration: none;
}
.pub-nav a:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
.pub-nav a.is-active { background: hsl(var(--primary) / .1); color: hsl(var(--primary)); }
.pub-nav .pub-login-btn { margin-left: 6px; color: #fff; }
.pub-nav .pub-login-btn:hover { background: hsl(var(--primary) / .9); color: #fff; }
.pub-menu-btn {
  display: none; border: 1px solid hsl(var(--border)); background: transparent;
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer; color: inherit;
  place-items: center;
}

.public-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 20px 48px; }
.public-head { margin-bottom: 18px; }
.public-head h1 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.01em; }
.public-head p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 13.5px; }

.pub-footer { border-top: 1px solid hsl(var(--border)); background: hsl(var(--card)); margin-top: auto; }
.pub-footer-inner {
  max-width: 1080px; margin: 0 auto; padding: 28px 20px;
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 24px;
}
.pub-foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.pub-foot-brand strong { display: block; font-size: 14px; }
.pub-foot-brand p { margin: 4px 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); max-width: 240px; }
.pub-foot-col { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.pub-foot-col h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: hsl(var(--foreground)); }
.pub-foot-col a { color: hsl(var(--muted-foreground)); text-decoration: none; }
.pub-foot-col a:hover { color: hsl(var(--primary)); }
.pub-foot-col span { display: inline-flex; align-items: center; gap: 6px; }
.pub-iban { font-family: ui-monospace, monospace; font-size: 11.5px; color: hsl(var(--foreground)); }
.pub-footer-bar {
  border-top: 1px solid hsl(var(--border)); padding: 12px 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11.5px; color: hsl(var(--muted-foreground));
  max-width: 1080px; margin: 0 auto;
}

@media (max-width: 900px) {
  .pub-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pub-menu-btn { display: grid; }
  .pub-nav {
    display: none; position: absolute; left: 12px; right: 12px; top: 64px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: hsl(var(--card)); border: 1px solid hsl(var(--border));
    border-radius: 12px; box-shadow: var(--shadow-md); padding: 8px;
  }
  .pub-nav.is-open { display: flex; }
  .pub-nav .pub-login-btn { margin: 4px 0 0; justify-content: center; }
  .pub-brand-text small { max-width: 170px; }
  .pub-footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .public-main { padding: 18px 16px 40px; }
}


.contact-mini { display: grid; gap: 8px; }
.contact-mini > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding-bottom: 6px; border-bottom: 1px dashed hsl(var(--border)); }
.contact-mini > div:last-child { border-bottom: 0; }
.contact-mini .k { color: hsl(var(--muted-foreground)); }
.contact-mini .v { font-weight: 600; text-align: right; }

.ticket-box {
  border: 2px dashed hsl(var(--primary) / .5); border-radius: 14px; padding: 16px;
  background: hsl(var(--primary) / .05); margin: 14px 0;
}
.ticket-no { font-family: ui-monospace, monospace; font-size: 26px; font-weight: 700; letter-spacing: .06em; }
.ticket-meta { font-size: 12.5px; color: hsl(var(--muted-foreground)); }
.success-ring {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  background: hsl(var(--success) / .15); color: hsl(var(--success));
}
.success-ring svg { width: 26px; height: 26px; }

