/* ==========================================================================
   Components — tüm modüllerde ortak kullanılan UI yapı taşları
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-h: 40px;
  --btn-px: 16px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 var(--btn-px);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: var(--shadow-xs);
}

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

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.btn-ghost {
  color: var(--fg-muted);
}

.btn-ghost:hover {
  background: var(--surface-3);
  color: var(--fg);
}

.btn-outline {
  border-color: var(--border-strong);
  color: var(--fg);
}

.btn-outline:hover {
  background: var(--surface-2);
}

.btn-danger {
  background: var(--danger-strong);
  color: #fff;
}

.btn-danger:hover {
  background: var(--danger);
}

.btn-danger-soft {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger-soft:hover {
  background: color-mix(in srgb, var(--danger-strong) 16%, var(--surface));
}

.btn-success {
  background: var(--success-strong);
  color: #fff;
}

.btn-success:hover {
  background: color-mix(in srgb, var(--success-strong) 88%, #000);
}

.btn-warning {
  background: var(--warning-strong);
  color: #1a1203;
}

.btn-info {
  background: var(--info-strong);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-sm {
  --btn-h: 32px;
  --btn-px: 12px;
  font-size: var(--text-xs);
  border-radius: 7px;
}

.btn-lg {
  --btn-h: 48px;
  --btn-px: 20px;
  font-size: var(--text-base);
  border-radius: var(--r-md);
}

.btn-xl {
  --btn-h: 56px;
  --btn-px: 24px;
  font-size: var(--text-md);
  border-radius: var(--r-md);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  --btn-px: 0;
  width: var(--btn-h);
}

.btn-pill {
  border-radius: var(--r-full);
}

.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: var(--primary-fg) var(--primary-fg) transparent transparent;
  animation: spin 0.7s linear infinite;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  color: var(--fg-muted);
  position: relative;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--fg);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.icon-btn.is-active {
  color: var(--fg);
  background: var(--surface-3);
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.label {
  font-size: var(--text-xs);
  font-weight: 550;
  color: var(--fg-muted);
}

.hint {
  font-size: var(--text-xs);
  color: var(--fg-subtle);
}

.field-error {
  font-size: var(--text-xs);
  color: var(--danger);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--fg);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--fg-faint);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.input[aria-invalid="true"] {
  border-color: var(--danger-strong);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.45;
}

.select {
  appearance: none;
  padding-right: 34px;
  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='%2371717a' 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;
  cursor: pointer;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group > .icon,
.input-group > [data-icon] {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--fg-subtle);
  pointer-events: none;
}

.input-group > .input {
  padding-left: 36px;
}

.input-group .input-suffix {
  position: absolute;
  right: 12px;
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  pointer-events: none;
}

.input-sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: var(--text-xs);
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.fieldset {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.fieldset-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Switch */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--text-sm);
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color var(--dur) var(--ease-out);
  flex-shrink: 0;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur) var(--ease-spring);
}

.switch input:checked + .switch-track {
  background: var(--success-strong);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px var(--ring);
}

.switch.is-danger input:not(:checked) + .switch-track {
  background: var(--danger-strong);
}

/* Checkbox / radio card */
.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--text-sm);
}

.check input {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all var(--dur-fast);
  cursor: pointer;
}

.check input[type="radio"] {
  border-radius: 50%;
}

.check input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.check input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border: 2px solid var(--primary-fg);
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.check input[type="radio"]:checked::after {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 50%;
  background: var(--primary-fg);
  transform: none;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-fast);
}

.option-card:hover {
  border-color: var(--border-strong);
}

.option-card:has(input:checked) {
  border-color: var(--fg);
  box-shadow: 0 0 0 1px var(--fg);
  background: var(--surface-2);
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card .option-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: all var(--dur-fast);
}

.option-card .option-check {
  border-radius: 5px;
}

.option-card:has(input:checked) .option-radio {
  border-color: var(--fg);
  background: var(--fg);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.option-card:has(input:checked) .option-check {
  box-shadow: none;
  background: var(--fg) 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='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

:root[data-theme="dark"] .option-card:has(input:checked) .option-check {
  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='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.option-card:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--text-xs);
  font-weight: 550;
  color: var(--fg-muted);
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-out);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.chip .icon {
  width: 14px;
  height: 14px;
}

.chip.is-active,
.chip[aria-pressed="true"],
.chip:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-count {
  font-size: var(--text-2xs);
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--fg-muted);
}

.chip.is-active .chip-count {
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
}

/* Segmented control */
.segmented {
  position: relative;
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
}

.segmented button,
.segmented label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: var(--text-xs);
  font-weight: 550;
  color: var(--fg-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-fast);
}

.segmented button:hover,
.segmented label:hover {
  color: var(--fg);
}

.segmented .is-active,
.segmented [aria-selected="true"],
.segmented label:has(input:checked) {
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--hairline);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented .icon {
  width: 14px;
  height: 14px;
}

.segmented.is-block {
  display: flex;
  width: 100%;
}

.segmented.is-block > * {
  flex: 1;
}

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  height: 36px;
  box-shadow: var(--shadow-xs);
}

.stepper button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 100%;
  color: var(--fg-muted);
  border-radius: var(--r-full);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}

.stepper button:hover {
  color: var(--fg);
  background: var(--surface-3);
}

.stepper button .icon {
  width: 16px;
  height: 16px;
}

.stepper output {
  min-width: 26px;
  text-align: center;
  font-weight: 600;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.stepper-lg {
  height: 48px;
}

.stepper-lg button {
  width: 48px;
}

.stepper-lg output {
  min-width: 34px;
  font-size: var(--text-md);
}

/* --------------------------------------------------------------------------
   Badges & dots
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-full);
  font-size: var(--text-2xs);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--fg-muted);
}

.badge .icon {
  width: 12px;
  height: 12px;
}

.badge-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.badge-solid { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-lg { height: 26px; padding: 0 10px; font-size: var(--text-xs); }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.dot-live {
  position: relative;
}

.dot-live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.count-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger-strong);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
  font-variant-numeric: tabular-nums;
  transform-origin: center;
}

.count-badge.is-bump {
  animation: bump 0.45s var(--ease-spring);
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-subtle);
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}

.card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  margin-top: 2px;
}

.card-body {
  padding: 16px 18px 18px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.card-flat {
  box-shadow: none;
}

.card-interactive {
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}

.card-interactive:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* Spotlight (cursor-following highlight) */
.spotlight {
  --mx: 50%;
  --my: 50%;
  isolation: isolate;
}

.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--spotlight), transparent 60%);
  transition: opacity var(--dur) var(--ease-out);
}

.spotlight:hover::before {
  opacity: 1;
}

/* Avatar */
.avatar {
  --size: 32px;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  font-size: calc(var(--size) * 0.38);
  font-weight: 600;
  color: #fff;
  background: hsl(var(--h, 220) 55% 48%);
  flex-shrink: 0;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.avatar-lg { --size: 48px; }
.avatar-xl { --size: 64px; }
.avatar-sm { --size: 24px; }

/* Brand mark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-size: var(--text-sm);
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--fg-subtle);
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Overlay / Modal / Sheet / Drawer
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.overlay.is-open {
  opacity: 1;
}

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 860px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur) var(--ease-out);
}

.overlay.is-open .modal {
  transform: none;
  opacity: 1;
}

.modal:focus {
  outline: none;
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 980px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
}

.modal-subtitle {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
  margin-top: 3px;
}

.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-2);
}

.modal-footer.is-split {
  justify-content: space-between;
}

.modal-close {
  margin: -6px -8px 0 0;
}

.modal-handle {
  display: none;
}

/* Bottom sheet (mobile) */
.overlay.is-sheet {
  align-items: flex-end;
  padding: 0;
}

.overlay.is-sheet .modal {
  max-width: 100%;
  max-height: calc(100dvh - 32px - var(--safe-top));
  border-radius: 22px 22px 0 0;
  border-bottom: 0;
  transform: translateY(100%);
  opacity: 1;
  transition: transform 460ms var(--ease-out);
  padding-bottom: var(--safe-bottom);
}

.overlay.is-sheet.is-open .modal {
  transform: translateY(var(--drag-y, 0px));
}

.overlay.is-sheet.is-dragging .modal {
  transition: none;
}

.overlay.is-sheet .modal-handle {
  display: block;
  position: absolute;
  top: 7px;
  left: 50%;
  width: 38px;
  height: 5px;
  margin-left: -19px;
  border-radius: 999px;
  background: var(--border-strong);
  z-index: 2;
}

.overlay.is-sheet .modal-header {
  padding-top: 22px;
}

/* Side drawer (desktop panels) */
.overlay.is-drawer {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}

.overlay.is-drawer .modal {
  max-width: 480px;
  max-height: none;
  height: 100%;
  border-radius: 0;
  border-width: 0 0 0 1px;
  transform: translateX(100%);
  opacity: 1;
}

.overlay.is-drawer.is-open .modal {
  transform: none;
}

.overlay.is-drawer .modal-lg {
  max-width: 640px;
}

@media (min-width: 640px) {
  .overlay.is-sheet.is-auto {
    align-items: center;
    padding: 24px;
  }
  .overlay.is-sheet.is-auto .modal {
    max-width: 560px;
    border-radius: var(--r-xl);
    border-bottom: 1px solid var(--border);
    transform: translateY(12px) scale(0.97);
    opacity: 0;
    padding-bottom: 0;
    transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur) var(--ease-out);
  }
  .overlay.is-sheet.is-auto.is-open .modal {
    transform: none;
    opacity: 1;
  }
  .overlay.is-sheet.is-auto .modal-handle {
    display: none;
  }
  .overlay.is-sheet.is-auto .modal-header {
    padding-top: 18px;
  }
  .overlay.is-sheet.is-auto .modal-lg {
    max-width: 720px;
  }
  .overlay.is-sheet.is-auto .modal-xl {
    max-width: 1080px;
    max-height: min(92vh, 940px);
  }
}

@media (max-width: 639px) {
  .overlay.is-drawer {
    align-items: flex-end;
  }
  .overlay.is-drawer .modal {
    height: auto;
    max-height: calc(100dvh - 24px);
    border-radius: 22px 22px 0 0;
    border-width: 1px 0 0;
    transform: translateY(100%);
    padding-bottom: var(--safe-bottom);
  }
}

/* --------------------------------------------------------------------------
   Popover / Dropdown
   -------------------------------------------------------------------------- */
.popover {
  position: fixed;
  z-index: var(--z-dropdown);
  min-width: 220px;
  max-width: min(360px, calc(100vw - 24px));
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transform-origin: var(--origin, top right);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur) var(--ease-out);
}

.popover.is-open {
  opacity: 1;
  transform: none;
}

.popover.is-up {
  transform: translateY(4px) scale(0.98);
}

.popover.is-up.is-open {
  transform: none;
}

.menu-label {
  padding: 8px 10px 6px;
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  color: var(--fg);
  text-align: left;
  transition: background-color var(--dur-fast);
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--surface-3);
  outline: none;
}

.menu-item .icon {
  width: 16px;
  height: 16px;
  color: var(--fg-muted);
}

.menu-item .menu-meta {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--fg-subtle);
}

.menu-item.is-danger {
  color: var(--danger);
}

.menu-item.is-danger .icon {
  color: var(--danger);
}

.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */
.toast-region {
  position: fixed;
  z-index: var(--z-toast);
  top: calc(12px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (min-width: 768px) {
  .toast-region {
    left: auto;
    right: 20px;
    transform: none;
    top: calc(76px + var(--safe-top));
  }
  .toast-region.is-top-center {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    top: 16px;
  }
}

.toast {
  --tone: var(--fg-muted);
  --tone-bg: var(--surface-3);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 16px;
  border-radius: 14px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  overflow: hidden;
  touch-action: pan-y;
  animation: toast-in 520ms var(--ease-spring) both;
}

.toast.is-leaving {
  animation: toast-out 260ms var(--ease-in-out) forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-14px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(24px) scale(0.96); margin-top: -76px; }
}

.toast-success { --tone: var(--success); --tone-bg: var(--success-soft); }
.toast-warning { --tone: var(--warning); --tone-bg: var(--warning-soft); }
.toast-danger { --tone: var(--danger); --tone-bg: var(--danger-soft); }
.toast-info { --tone: var(--info); --tone-bg: var(--info-soft); }
.toast-accent { --tone: var(--accent); --tone-bg: var(--accent-soft); }

.toast-danger {
  border-color: var(--danger-border);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--tone-bg);
  color: var(--tone);
}

.toast-icon .icon {
  width: 18px;
  height: 18px;
}

.toast-title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.toast-message {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.toast-meta {
  font-size: var(--text-2xs);
  color: var(--fg-subtle);
  margin-top: 6px;
}

.toast-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.toast-close {
  width: 26px;
  height: 26px;
  margin: -4px -4px 0 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--fg-subtle);
}

.toast-close:hover {
  background: var(--surface-3);
  color: var(--fg);
}

.toast-close .icon {
  width: 14px;
  height: 14px;
}

.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--tone);
  opacity: 0.55;
  transform-origin: left;
  animation: progress-shrink var(--duration, 5000ms) linear forwards;
}

.toast:hover .toast-progress {
  animation-play-state: paused;
}

.toast.is-critical {
  border-color: var(--danger-strong);
  box-shadow: 0 0 0 1px var(--danger-strong), var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--fg-subtle);
  white-space: nowrap;
  transition: color var(--dur-fast);
}

.tab:hover {
  color: var(--fg);
}

.tab[aria-selected="true"],
.tab.is-active {
  color: var(--fg);
}

.tab[aria-selected="true"]::after,
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
}

.tab .icon {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   Data table
   -------------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: inherit;
}

.table {
  width: 100%;
  font-size: var(--text-sm);
}

.table th {
  text-align: left;
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-subtle);
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color var(--dur-fast);
}

.table tbody tr:hover {
  background: var(--surface-2);
}

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

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table tfoot td {
  font-weight: 600;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.table-compact td {
  padding: 8px 12px;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--fg-subtle);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.empty-icon .icon {
  width: 24px;
  height: 24px;
}

.empty-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--fg);
}

.empty-text {
  font-size: var(--text-sm);
  max-width: 320px;
}

/* --------------------------------------------------------------------------
   Tooltip (CSS only)
   -------------------------------------------------------------------------- */
[data-tooltip] {
  position: relative;
}

@media (hover: hover) {
  [data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translate(-50%, -4px);
    padding: 6px 9px;
    border-radius: 7px;
    background: var(--surface-inverse);
    color: var(--fg-inverse);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--dur-fast), transform var(--dur-fast);
    z-index: var(--z-dropdown);
  }
  [data-tooltip]:hover::after,
  [data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: 350ms;
  }
  [data-tooltip-pos="left"]::after {
    left: auto;
    right: calc(100% + 8px);
    top: 50%;
    transform: translate(4px, -50%);
  }
  [data-tooltip-pos="left"]:hover::after {
    transform: translate(0, -50%);
  }
}

/* --------------------------------------------------------------------------
   Progress
   -------------------------------------------------------------------------- */
.progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value, 0%);
  border-radius: inherit;
  background: var(--fg);
  transition: width var(--dur-slow) var(--ease-out), background-color var(--dur);
}

/* --------------------------------------------------------------------------
   Shared app header (panel modülleri)
   -------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.7);
  backdrop-filter: blur(16px) saturate(1.7);
  border-bottom: 1px solid var(--border);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-inline: max(var(--gutter), var(--safe-left)) max(var(--gutter), var(--safe-right));
}

.app-header .brand {
  min-width: 0;
}

.header-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}

.header-title {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

@media (max-width: 560px) {
  .app-header .hide-sm {
    display: none;
  }
  .app-header .brand-name {
    display: none;
  }
}

.menu-only-sm {
  display: none;
}

@media (max-width: 560px) {
  .menu-only-sm {
    display: flex;
  }
}

.lang-btn {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  width: auto;
  padding: 0 9px;
}

/* Connection status */
.conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--text-2xs);
  font-weight: 600;
  color: var(--fg-muted);
  white-space: nowrap;
}

.conn .dot {
  width: 7px;
  height: 7px;
}

.conn[data-state="open"] .dot { background: var(--success-strong); }
.conn[data-state="connecting"] .dot { background: var(--warning-strong); animation: pulse-soft 0.9s infinite; }
.conn[data-state="closed"] .dot { background: var(--danger-strong); }

.conn[data-state="open"] .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success-strong);
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.conn .dot {
  position: relative;
}

@media (max-width: 640px) {
  .conn-label {
    display: none;
  }
  .conn {
    padding: 0 8px;
  }
}

/* User chip */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 4px;
  border-radius: var(--r-full);
  transition: background-color var(--dur-fast);
}

.user-chip:hover {
  background: var(--surface-3);
}

.user-chip-name {
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.1;
  text-align: left;
}

.user-chip-role {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--fg-subtle);
}

@media (max-width: 720px) {
  .user-chip-text {
    display: none;
  }
  .user-chip {
    padding: 0 4px;
  }
}

/* --------------------------------------------------------------------------
   Notification center
   -------------------------------------------------------------------------- */
.notif-panel {
  width: min(400px, calc(100vw - 24px));
  padding: 0;
  max-height: min(560px, calc(100dvh - 90px));
  display: flex;
  flex-direction: column;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.notif-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
}

.notif-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  text-align: left;
  transition: background-color var(--dur-fast);
}

.notif-item:hover {
  background: var(--surface-3);
}

.notif-item .toast-icon {
  width: 32px;
  height: 32px;
}

.notif-item-title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
}

.notif-item-body {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  margin-top: 2px;
}

.notif-item-time {
  font-size: var(--text-2xs);
  color: var(--fg-subtle);
  white-space: nowrap;
}

.notif-item.is-unread .notif-item-title::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
  vertical-align: 1px;
}

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

/* --------------------------------------------------------------------------
   Banner (PWA install, offline, etc.)
   -------------------------------------------------------------------------- */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
}

.banner-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-3);
  flex-shrink: 0;
}

.banner-warning {
  background: var(--warning-soft);
  border-color: var(--warning-border);
}

.banner-danger {
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.offline-bar {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  transform: translate(-50%, calc(100% + 32px));
  visibility: hidden;
  z-index: var(--z-toast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-full);
  background: var(--surface-inverse);
  color: var(--fg-inverse);
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-slow) var(--ease-spring), visibility 0s linear var(--dur-slow);
}

.offline-bar.is-visible {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform var(--dur-slow) var(--ease-spring);
}

/* --------------------------------------------------------------------------
   PIN pad
   -------------------------------------------------------------------------- */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 8px 0 20px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  transition: all var(--dur-fast) var(--ease-spring);
}

.pin-dot.is-filled {
  background: var(--fg);
  border-color: var(--fg);
  transform: scale(1.1);
}

.pin-dots.is-error .pin-dot {
  border-color: var(--danger-strong);
  background: var(--danger-strong);
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

.pin-key {
  height: 58px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: var(--text-xl);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  transition: background-color var(--dur-fast), transform var(--dur-fast);
}

.pin-key:hover {
  background: var(--surface-3);
}

.pin-key:active {
  transform: scale(0.95);
  background: var(--border);
}

.pin-key.is-muted {
  background: transparent;
  border-color: transparent;
  color: var(--fg-muted);
}

.pin-key .icon {
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------------------
   Stat tile
   -------------------------------------------------------------------------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  min-width: 0;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 550;
  color: var(--fg-subtle);
}

.stat-label .icon {
  width: 15px;
  height: 15px;
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
}

.stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.stat-delta .icon {
  width: 13px;
  height: 13px;
}

.stat-delta.is-up { color: var(--delta-up); }
.stat-delta.is-down { color: var(--delta-down); }

.stat-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Kbd-like key-value list
   -------------------------------------------------------------------------- */
.kv {
  display: grid;
  gap: 10px;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-sm);
}

.kv-row dt {
  color: var(--fg-subtle);
}

.kv-row dd {
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.kv-total {
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  font-size: var(--text-md);
}

.kv-total dd {
  font-weight: 700;
}

/* Status dot legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: var(--text-xs);
  color: var(--fg-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Shared domain bits (sipariş durum rozetleri, seçenek listeleri, özet kutuları)
   -------------------------------------------------------------------------- */
.qm-card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--fg);
  flex-shrink: 0;
}

.qm-card-icon .icon {
  width: 18px;
  height: 18px;
}

.pd-options {
  display: grid;
  gap: 8px;
}

.cart-summary {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
}

.order-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.order-card + .order-card {
  margin-top: 10px;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-lines {
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
}

.order-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.order-line span:first-child {
  min-width: 0;
}

.status-badge[data-status="pending"] { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.status-badge[data-status="preparing"] { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.status-badge[data-status="ready"] { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.status-badge[data-status="served"] { background: var(--surface-3); color: var(--fg-muted); }
.status-badge[data-status="cancelled"] { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); text-decoration: line-through; }

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}


/* --------------------------------------------------------------------------
   Product art (üretilmiş görsel)
   -------------------------------------------------------------------------- */
.art {
  --h: 30;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: hsl(var(--h) 42% 30%);
  background:
    radial-gradient(120% 90% at 15% 10%, hsl(var(--h) 92% 90%), transparent 60%),
    radial-gradient(90% 80% at 95% 100%, hsl(calc(var(--h) + 36) 80% 82%), transparent 62%),
    linear-gradient(140deg, hsl(var(--h) 70% 95%), hsl(calc(var(--h) + 20) 60% 86%));
}

.art::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.12) 60%, transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 40%);
  pointer-events: none;
}

.art .icon {
  position: relative;
  z-index: 1;
  width: 42%;
  height: 42%;
  stroke-width: 1.35;
}

.art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

:root[data-theme="dark"] .art {
  color: hsl(var(--h) 70% 80%);
  background:
    radial-gradient(120% 90% at 15% 10%, hsl(var(--h) 55% 26%), transparent 60%),
    radial-gradient(90% 80% at 95% 100%, hsl(calc(var(--h) + 36) 50% 20%), transparent 62%),
    linear-gradient(140deg, hsl(var(--h) 30% 14%), hsl(calc(var(--h) + 20) 30% 10%));
}

:root[data-theme="dark"] .art::before {
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03) 60%, transparent 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}


.form-grid > *,
.cart-lines > *,
.order-lines > * {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Etkinlik akışı (yönetici paneli)
   -------------------------------------------------------------------------- */
.feed {
  display: grid;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}

.feed-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 9px 4px;
  font-size: var(--text-sm);
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--fg-faint);
}

.feed-time {
  color: var(--fg-subtle);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
