/* =========================================================================
   Hesap güvenliği bileşenleri (AJAN 05 — revizyon 11, 12, 13, 20)
   Şifremi unuttum paneli, profil şifre / e-posta / hesap silme kartları,
   yönetim IP beyaz listesi kartı. Renkler base.css token'larından gelir
   (açık + koyu tema otomatik). Gradyan dolgu yok.
   ========================================================================= */

/* hidden niteliği display kurallarını ezsin (formlar adım adım açılır) */
.acs-card [hidden], #authForgotPanel [hidden] { display: none !important; }

.acs-stack { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.acs-stack:empty { display: none; }

.acs-card {
  background: var(--card);
  color: var(--card-foreground, var(--foreground));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
}
.acs-card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.acs-icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--brand-rgb), 0.1); color: var(--brand); font-size: 15px;
}
.acs-card h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--foreground); line-height: 1.35; }
.acs-desc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted-foreground); }
.acs-desc strong { color: var(--foreground); }

.acs-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--muted); margin-bottom: 14px; max-width: 100%; }
.acs-seg button {
  border: 0; background: transparent; color: var(--muted-foreground); font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 7px; cursor: pointer; min-height: 34px;
}
.acs-seg button[aria-pressed="true"] { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-xs); }

.acs-form { display: grid; gap: 12px; }
.acs-grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acs-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.acs-field > span { font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.acs-field input {
  width: 100%; min-width: 0; font: inherit; font-size: 14px; color: var(--foreground);
  background: var(--background); border: 1px solid var(--input, var(--border)); border-radius: 8px; padding: 9px 11px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.acs-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15); }
.acs-field small { font-size: 11.5px; color: var(--muted-foreground); }
.acs-code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-size: 20px !important; letter-spacing: 0.35em; text-align: center; font-weight: 700; }

.acs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px;
  font: inherit; font-size: 13px; font-weight: 650; border-radius: 9px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
  transition: background-color var(--dur-fast) ease, opacity var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.acs-btn:hover { background: var(--muted); }
.acs-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.acs-btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-foreground, #fff); }
.acs-btn-primary:hover { background: var(--brand); opacity: 0.92; }
.acs-btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.acs-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.acs-btn-danger-outline { background: transparent; border-color: rgba(220, 38, 38, 0.45); color: #dc2626; }
.acs-btn-danger-outline:hover { background: rgba(220, 38, 38, 0.08); }
.dark .acs-btn-danger-outline { color: #f87171; border-color: rgba(248, 113, 113, 0.45); }
.acs-btn-block { width: 100%; }

.acs-link {
  border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.acs-link:disabled { color: var(--muted-foreground); cursor: default; text-decoration: none; }
.acs-forgot-row { display: flex; justify-content: flex-end; margin-top: 6px; }
.acs-forgot-row.hidden { display: none; }

.acs-msg { font-size: 12.5px; line-height: 1.55; border-radius: 9px; padding: 10px 12px; border: 1px solid transparent; }
.acs-msg:empty, .acs-msg[hidden] { display: none; }
.acs-msg.is-ok { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); color: #047857; }
.acs-msg.is-err { background: rgba(225, 29, 72, 0.08); border-color: rgba(225, 29, 72, 0.3); color: #be123c; }
.acs-msg.is-info { background: rgba(var(--brand-rgb), 0.07); border-color: rgba(var(--brand-rgb), 0.25); color: var(--foreground); }
.dark .acs-msg.is-ok { color: #6ee7b7; }
.dark .acs-msg.is-err { color: #fda4af; }

.acs-kv { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; margin-bottom: 12px; }
.acs-kv b { color: var(--foreground); word-break: break-all; }
.acs-kv span { color: var(--muted-foreground); }

/* Hesap silme */
.acs-danger { border-color: rgba(220, 38, 38, 0.35); }
.acs-danger .acs-icon { background: rgba(220, 38, 38, 0.1); color: #dc2626; }
.dark .acs-danger .acs-icon { color: #f87171; }
.acs-steps { display: flex; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.acs-steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--muted); }
.acs-steps li.is-on { background: #dc2626; }
.acs-list { margin: 0 0 12px; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--foreground); }
.acs-list li::marker { color: #dc2626; }
.acs-warn {
  font-size: 12.5px; line-height: 1.55; padding: 10px 12px; border-radius: 9px; margin-bottom: 12px;
  background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); color: #92400e;
}
.dark .acs-warn { color: #fcd34d; }
.acs-confirm-word { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: 0.05em; color: #dc2626; }
.dark .acs-confirm-word { color: #f87171; }

/* Şifremi unuttum paneli (giriş penceresi içinde) */
#authForgotPanel { margin-top: 2px; }
#authForgotPanel .acs-form { gap: 11px; }
.acs-forgot-title { font-size: 14px; font-weight: 700; color: var(--foreground); margin: 0 0 4px; }
.acs-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; }

/* Yönetim: IP beyaz listesi */
.acs-wl-form { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; align-items: end; margin-bottom: 12px; }
.acs-table-wrap { border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; }
.acs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.acs-table th { text-align: left; font-weight: 600; color: var(--muted-foreground); background: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.acs-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--foreground); vertical-align: middle; }
.acs-table tr:last-child td { border-bottom: 0; }
.acs-table td.acs-ip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; word-break: break-all; }
.acs-table td.acs-muted { color: var(--muted-foreground); }
.acs-table td.acs-right, .acs-table th.acs-right { text-align: right; }
.acs-badge { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(16, 185, 129, 0.12); color: #047857; margin-left: 6px; }
.dark .acs-badge { color: #6ee7b7; }

@media (max-width: 640px) {
  .acs-card { padding: 16px; }
  .acs-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .acs-field input { font-size: 16px; } /* iOS yakınlaştırmasın */
  .acs-actions .acs-btn { flex: 1 1 auto; }
  .acs-wl-form { grid-template-columns: minmax(0, 1fr); }
  .acs-table thead { display: none; }
  .acs-table, .acs-table tbody, .acs-table tr, .acs-table td { display: block; width: 100%; }
  .acs-table tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .acs-table tr:last-child { border-bottom: 0; }
  .acs-table td { border: 0; padding: 2px 0; }
  .acs-table td.acs-right { text-align: left; padding-top: 8px; }
  .acs-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted-foreground); font-weight: 600; }
}
