/* Ortak UI bileşenleri — site, auth, panel, admin */

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

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 28px;
}
.brand:hover { text-decoration: none; }

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.brand h1 { font-size: 1.35rem; font-weight: 800; }
.brand p { font-size: 0.85rem; color: var(--muted); }

.card {
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  padding: 24px;
  margin-bottom: 18px;
}
.card h2 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--primary-dark);
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--muted);
}

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=file], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--input-focus-border, var(--primary));
  box-shadow: var(--input-focus-shadow, 0 0 0 3px rgba(15, 118, 110, 0.15));
}

textarea { min-height: 72px; resize: vertical; }

.row, .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .row, .row-2 { grid-template-columns: 1fr; }
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.check input { width: auto; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: transform 0.12s, opacity 0.12s, box-shadow 0.12s;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--btn-primary-bg, linear-gradient(135deg, var(--primary), var(--primary-dark)));
  color: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
.btn-secondary {
  background: var(--card, #fff);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--btn-outline-border, var(--primary));
  color: var(--btn-outline-color, var(--primary));
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text); }
.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}
.btn-danger {
  background: #fee2e2;
  color: var(--err, #991b1b);
}

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

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 20px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.msg {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.msg-ok {
  background: #ecfdf5;
  color: var(--ok, #065f46);
  border: 1px solid #a7f3d0;
}
.msg-err {
  background: #fef2f2;
  color: var(--err, #991b1b);
  border: 1px solid #fecaca;
}
.msg-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* tiny utilities used in static pages */
.w-full { width: 100%; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mb-0 { margin-bottom: 0; }
.muted-sm { font-size: 0.8rem; color: var(--muted); }
.muted-xs { font-size: 0.78rem; color: var(--muted); }
.hidden-inline { display: none; }
.lh-16 { line-height: 1.6; }
.footer-links { margin-top: 8px; }
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 18px;
}
.terms-row input {
  width: auto;
  margin: 4px 0 0;
}
.helper-note { margin: -8px 0 14px; }
.worker-hint { margin-left: auto; font-size: 0.78rem; color: var(--muted); }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.badge-ok { background: #dcfce7; color: var(--ok); }
.badge-warn { background: #fef3c7; color: var(--warn); }
.badge-err { background: #fee2e2; color: var(--err); }
.badge-muted { background: #f1f5f9; color: var(--muted); }
.badge-inline { margin-left: 8px; display: none; }
.badge-inline.is-visible { display: inline-block; }
.filter-caption { font-size: 0.8rem; color: var(--muted); }
.muted { color: var(--muted); }
.text-err { color: var(--err, #991b1b); }
.actions-mt-14 { margin-top: 14px; }
.mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}
.payment-ref-code {
  font-family: ui-monospace, monospace;
  font-size: 1.15rem;
  margin: 8px 0;
  font-weight: 700;
}
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mt-6 { margin-top: 6px; }
.mt-2 { margin-top: 2px; }
.mt-16 { margin-top: 16px; }
.mt-neg-8 { margin-top: -8px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.ox-auto { overflow-x: auto; }
.actions-tight { margin: 0; }
.actions-mt-12 { margin-top: 12px; }
.actions-mt-8 { margin-top: 8px; }
.badge-chip { display: inline-block; padding: 2px 8px; font-size: 0.75rem; }
.label-tight { margin-bottom: 6px; }
.duty-empty-compact { padding: 14px; font-size: 0.82rem; }
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  max-height: 48vh;
  overflow: auto;
}
.support-message {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  line-height: 1.45;
}
.support-message-own {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.support-message-admin {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.support-message-pharmacy {
  border-color: #fde68a;
  background: #fffbeb;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.82rem;
}
.pager:empty { display: none; }
.pager-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pager-page {
  min-width: 54px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}
.pager-summary { white-space: nowrap; }
@media (max-width: 560px) {
  .pager {
    align-items: stretch;
    flex-direction: column;
  }
  .pager-actions { justify-content: space-between; }
}

.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  box-shadow: 0 14px 36px rgba(15, 40, 35, 0.16);
  font-size: 0.9rem;
  line-height: 1.4;
}
.toast-ok { border-color: #a7d8c5; background: #eefaf5; color: var(--ok, #166534); }
.toast-err { border-color: #fecaca; background: #fff5f5; color: var(--err, #991b1b); }
.toast-info { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.toast button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  opacity: 0.72;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  cursor: pointer;
}
.modal-backdrop .modal {
  cursor: auto;
}
.modal {
  background: var(--card);
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
}
.modal h3 { margin-bottom: 14px; }
.confirm-modal {
  max-width: 460px;
}
.confirm-message {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
}
