:root {
  --bg: #0f172a;
  --bg-2: #1e293b;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #25d366;
  --primary-dark: #1ea952;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --info: #3b82f6;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: linear-gradient(135deg, #075e54, #128c7e);
  color: white;
  padding: 24px 0;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
header h1 { font-size: 22px; font-weight: 600; }
.badge { background: rgba(255,255,255,0.2); padding: 6px 12px; border-radius: 999px; font-size: 14px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.card-header h2 { font-size: 18px; font-weight: 600; }

.muted { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
code {
  background: #f1f5f9; padding: 2px 6px; border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
}

.btn {
  border: none; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 500; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-small { padding: 6px 12px; font-size: 13px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.field textarea, .field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: white; transition: border 0.15s;
}
.field textarea:focus, .field input:focus, .field select:focus {
  outline: none; border-color: var(--primary);
}
.field textarea { resize: vertical; min-height: 100px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

.sessions-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; margin-top: 8px;
}
.session-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  background: #fafbfc; display: flex; flex-direction: column; gap: 10px;
}
.session-card.ready { border-color: var(--success); background: #f0fdf4; }
.session-card.disconnected { border-color: var(--danger); background: #fef2f2; opacity: 0.7; }
.session-status {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.status-initializing, .status-authenticated { background: #dbeafe; color: #1e40af; }
.status-qr_ready { background: #fef3c7; color: #92400e; }
.status-ready { background: #d1fae5; color: #065f46; }
.status-disconnected, .status-auth_failure, .status-error { background: #fee2e2; color: #991b1b; }
.session-qr { width: 100%; max-width: 220px; margin: 8px auto; display: block; border-radius: 8px; }
.session-info { font-size: 13px; color: var(--text-muted); }
.session-info strong { color: var(--text); }
.session-actions { display: flex; gap: 6px; margin-top: auto; }

.upload-area { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upload-result {
  margin-top: 14px; padding: 12px; background: #f0fdf4;
  border: 1px solid #86efac; border-radius: 8px; font-size: 14px;
}

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-top: 16px;
}
.stat {
  background: #f8fafc; padding: 14px; border-radius: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-value { font-size: 22px; font-weight: 600; }
.stat-value.success { color: var(--success); }
.stat-value.danger { color: var(--danger); }

.progress-bar {
  margin-top: 14px; height: 8px; background: #e2e8f0;
  border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  width: 0%; transition: width 0.3s;
}

.per-session-stats {
  margin-top: 14px; padding: 12px; background: #f8fafc;
  border-radius: 8px; font-size: 13px;
}
.per-session-stats h4 { font-size: 13px; margin-bottom: 8px; color: var(--text-muted); }
.per-session-row { display: flex; justify-content: space-between; padding: 4px 0; }

.log {
  background: #0f172a; color: #cbd5e1; padding: 14px;
  border-radius: 8px; font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px; max-height: 320px; overflow-y: auto;
  line-height: 1.7;
}
.log-entry { padding: 2px 0; }
.log-entry.success { color: #86efac; }
.log-entry.error { color: #fca5a5; }
.log-entry.info { color: #93c5fd; }
.log-time { color: #64748b; margin-right: 8px; }

.hidden { display: none !important; }

/* ============== LOGIN SCREEN ============== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #075e54, #128c7e);
  padding: 20px;
}
.login-box {
  background: white;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  text-align: center;
}
.login-logo { font-size: 48px; margin-bottom: 12px; }
.login-box h1 { font-size: 22px; margin-bottom: 8px; color: var(--text); }
.login-box p { margin-bottom: 20px; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box input {
  width: 100%; padding: 14px 16px; border: 2px solid var(--border);
  border-radius: 10px; font-size: 15px; font-family: ui-monospace, Menlo, monospace;
  text-align: center; letter-spacing: 1px; transition: border 0.15s;
}
.login-box input:focus { outline: none; border-color: var(--primary); }
.btn-block { width: 100%; padding: 13px; justify-content: center; font-size: 15px; }
.error-message {
  background: #fef2f2; color: #991b1b; padding: 10px 14px;
  border-radius: 8px; font-size: 14px; border: 1px solid #fecaca;
}
.muted.small { font-size: 12px; margin-top: 16px; }

/* ============== LICENSE INFO BAR ============== */
.license-bar {
  background: white; border-radius: var(--radius); padding: 14px 20px;
  margin-bottom: 20px; box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.license-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; font-size: 14px;
}
.license-info-grid strong { color: var(--text-muted); font-weight: 500; }
#lbDays { font-weight: 600; }
#lbDays.warning { color: var(--warning); }
#lbDays.danger { color: var(--danger); }
header .btn { margin-left: 8px; }

/* ============== HUMAN-LIKE CHECKBOX ============== */
.checkbox-field {
  display: flex; gap: 12px; padding: 14px 16px;
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; margin-top: 4px;
  transition: background 0.15s;
}
.checkbox-field:hover { background: #f1f5f9; }
.checkbox-field input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px; cursor: pointer; flex-shrink: 0;
}
.checkbox-field strong { display: block; font-size: 14px; margin-bottom: 2px; }
.checkbox-field small { color: var(--text-muted); font-size: 12.5px; line-height: 1.5; }

/* ============== TYPING LOG TYPE ============== */
.log-entry.typing {
  color: #6b7280; font-style: italic; opacity: 0.85;
}
.log-entry.typing::before { content: ''; }

/* ============== SONUÇLAR PANELİ ============== */
.results-tab-buttons {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 12px;
}
.tab-btn {
  background: none; border: none; padding: 10px 16px; cursor: pointer;
  font-size: 14px; color: var(--text-muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.results-list {
  max-height: 360px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 8px; background: white;
}
.result-row {
  display: grid; grid-template-columns: 32px 1fr 1fr 90px;
  gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border);
  font-size: 13px; align-items: center;
}
.result-row:last-child { border-bottom: none; }
.result-row.success { background: #f0fdf4; }
.result-row.error { background: #fef2f2; }
.result-icon { font-size: 16px; font-weight: 700; }
.result-row.success .result-icon { color: var(--success); }
.result-row.error .result-icon { color: var(--danger); }
.result-phone {
  font-family: ui-monospace, Menlo, monospace; font-weight: 600;
}
.result-meta {
  color: var(--text-muted); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.result-time { color: var(--text-muted); font-size: 12px; text-align: right; }

/* ============== SESSION USAGE / RAMP-UP ============== */
.session-usage {
  margin-top: 10px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 12.5px;
}
.usage-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.usage-label { color: var(--text-muted); font-weight: 500; }
.usage-count { font-weight: 600; font-family: ui-monospace, Menlo, monospace; }
.usage-count.warning { color: var(--warning); }
.usage-count.danger { color: var(--danger); }
.usage-bar {
  height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden;
}
.usage-fill {
  height: 100%; background: var(--success);
  transition: width 0.3s ease;
}
.usage-fill.warning { background: var(--warning); }
.usage-fill.danger { background: var(--danger); }
.usage-warn {
  margin-top: 6px; padding: 4px 8px;
  background: #fef2f2; color: #991b1b; border-radius: 6px;
  font-size: 11.5px; font-weight: 500; text-align: center;
}

/* Warn log entry */
.log-entry.warn {
  color: #92400e; background: #fffbeb;
}

/* ============== INFO BOX (RAMP-UP) ============== */
.info-box {
  margin-top: 12px;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 13px;
}
.info-box strong { display: block; margin-bottom: 4px; color: #1e3a8a; }
.info-box small { color: #1e40af; line-height: 1.5; display: block; }
.rampup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px 12px;
  margin: 10px 0;
  padding: 10px;
  background: white;
  border-radius: 8px;
}
.rampup-grid div { font-size: 12.5px; color: #1e3a8a; }
.rampup-grid strong { display: inline; color: #1e3a8a; margin-right: 4px; }

/* ============== INPUT MODE TABS ============== */
.input-mode-tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.mode-btn {
  background: none; border: none; padding: 10px 16px; cursor: pointer;
  font-size: 14px; color: var(--text-muted); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.15s;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.input-mode textarea {
  font-family: ui-monospace, Menlo, monospace; font-size: 13.5px;
  letter-spacing: 0.3px; min-height: 140px;
}

/* ============== NUMARA LİSTESİ ============== */
.numbers-list-section {
  margin-top: 16px; padding: 14px; background: #f8fafc;
  border-radius: 10px; border: 1px solid var(--border);
}
.numbers-list-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.numbers-list-header h3 { font-size: 15px; }
.numbers-list-header > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.numbers-list {
  max-height: 320px; overflow-y: auto;
  background: white; border-radius: 8px; border: 1px solid var(--border);
}
.number-row {
  display: grid; grid-template-columns: 160px 1fr 40px;
  gap: 12px; padding: 7px 12px; align-items: center;
  border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.number-row:last-child { border-bottom: none; }
.number-row:hover { background: #f8fafc; }
.number-phone {
  font-family: ui-monospace, Menlo, monospace; font-weight: 600;
}
.number-extra {
  color: var(--text-muted); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.number-extra code {
  background: #f1f5f9; padding: 1px 5px; border-radius: 3px;
  font-size: 11.5px; margin-right: 3px;
}

/* ============== SOFT-BAN ============== */
.session-card.soft-banned {
  border-color: var(--danger);
  background: linear-gradient(0deg, #fef2f2 0%, white 100%);
}
.soft-ban-badge {
  display: inline-block; margin-left: 8px;
  padding: 2px 8px; background: #fee2e2; color: #991b1b;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.soft-ban-warning {
  margin-top: 10px; padding: 12px; background: #fef2f2;
  border: 1px solid #fecaca; border-radius: 8px;
}
.soft-ban-warning strong { display: block; color: #991b1b; margin-bottom: 6px; font-size: 13px; }
.soft-ban-warning small { display: block; color: #7f1d1d; line-height: 1.5; margin-bottom: 8px; font-size: 12px; }
.soft-ban-warning .btn { width: 100%; justify-content: center; }
.btn-warning {
  background: var(--warning); color: white;
}
.btn-warning:hover { background: #d97706; }

/* ============== HISTORY MODAL ============== */
.history-actions {
  display: flex; gap: 8px; align-items: center;
  margin: 12px 0; flex-wrap: wrap;
}
.history-actions input { flex: 1; min-width: 200px; }
.history-list {
  max-height: 400px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px; background: white;
}
.history-row {
  display: grid; grid-template-columns: 160px 1fr 40px;
  gap: 12px; padding: 7px 12px; align-items: center;
  border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.history-row:last-child { border-bottom: none; }
.history-phone {
  font-family: ui-monospace, Menlo, monospace; font-weight: 600;
}
.history-date { color: var(--text-muted); font-size: 12px; }

/* ============== CUSTOM LIMIT TAG ============== */
.custom-tag {
  display: inline-block;
  padding: 1px 6px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  margin-left: 4px;
}

/* ============== MESAJ ŞABLONLARI ============== */
.templates-list {
  display: flex; flex-direction: column; gap: 8px;
  margin: 14px 0;
}
.template-card {
  display: flex; gap: 12px; padding: 14px;
  background: #f8fafc; border: 2px solid var(--border);
  border-radius: 10px; transition: all 0.15s;
}
.template-card:hover { border-color: #cbd5e1; }
.template-card.selected {
  background: #eff6ff; border-color: var(--primary);
}
.template-check input[type="checkbox"] {
  width: 18px; height: 18px; cursor: pointer; margin-top: 2px;
}
.template-body { flex: 1; min-width: 0; }
.template-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; gap: 10px;
}
.template-header strong { font-size: 15px; color: var(--text); }
.template-actions { display: flex; gap: 4px; }
.template-preview {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  max-height: 80px; overflow: hidden;
  font-family: ui-monospace, Menlo, monospace;
}

.empty-templates {
  padding: 30px 20px; text-align: center;
  background: #f8fafc; border-radius: 10px; border: 2px dashed var(--border);
}
.empty-templates p:first-child {
  font-size: 16px; font-weight: 500; margin-bottom: 8px;
}
.empty-templates .muted { margin-bottom: 16px; line-height: 1.5; }

.selection-summary {
  padding: 12px 14px; background: #eff6ff; border-radius: 8px;
  border: 1px solid #bfdbfe; font-size: 13px; display: flex;
  gap: 8px; flex-wrap: wrap; align-items: center;
}
.selection-summary strong { color: #1e40af; }

/* Modal aksiyon butonları */
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}

/* ============================================================
   ANİMASYONLAR — profesyonel ve hızlı (150-250ms)
   ============================================================ */

/* Hareket hassasiyeti olan kullanıcılar için animasyonları azalt */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============== İLK SAYFA YÜKLEME (kedi) ============== */
.initial-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #075e54, #128c7e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 300ms ease-out;
}
.initial-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}
.initial-loader-text {
  margin-top: 12px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  opacity: 0.9;
  animation: pulse-text 1.6s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.4; }
}

/* Admin sayfasında zemin daha koyu */
.admin-body .initial-loader {
  background: linear-gradient(135deg, #1e293b, #334155);
}

/* ============== GLOBAL LOADING OVERLAY (kedi) ============== */
.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: overlay-fade-in 200ms ease-out;
}
@keyframes overlay-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.global-loader-content {
  background: white;
  border-radius: 20px;
  padding: 20px 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scale-in 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scale-in {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.global-loader-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-top: 4px;
}

/* ============== BUTON İÇİ SPINNER ============== */
.btn {
  position: relative;
  transition: opacity 150ms ease;
}
.btn.loading {
  pointer-events: none;
  color: transparent !important;
}
.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner 600ms linear infinite;
  color: white;
}
.btn-secondary.loading::after { color: #475569; }
@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* ============== REFRESH BUTONU DÖNÜŞÜ ============== */
.btn.refreshing,
.refreshing {
  pointer-events: none;
  opacity: 0.7;
}
.btn.refreshing > *:first-child,
.refresh-icon.spinning {
  display: inline-block;
  animation: rotate-cw 600ms linear infinite;
}
@keyframes rotate-cw {
  to { transform: rotate(360deg); }
}

/* ============== MODAL FADE + SCALE ============== */
.modal:not(.hidden) {
  animation: overlay-fade-in 180ms ease-out;
}
.modal:not(.hidden) .modal-content {
  animation: scale-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============== KART SLİDE-IN (yeni eklenen) ============== */
.session-card,
.template-card,
.licenses-table tbody tr {
  animation: slide-in-up 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slide-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============== LOG SATIRI FADE-IN ============== */
.log-entry {
  animation: log-fade-in 180ms ease-out;
}
@keyframes log-fade-in {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============== SAYACLAR PULSE (değiştiğinde) ============== */
.stat-value.pulse {
  animation: stat-pulse 400ms ease-out;
}
@keyframes stat-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); color: var(--primary); }
  100% { transform: scale(1); }
}

/* ============== LOGIN/PANEL SAYFA GEÇİŞİ ============== */
.login-screen,
#appScreen,
#adminLoginScreen,
#adminPanel {
  transition: opacity 250ms ease, transform 250ms ease;
}
.login-screen:not(.hidden),
#appScreen:not(.hidden),
#adminLoginScreen:not(.hidden),
#adminPanel:not(.hidden) {
  animation: fade-slide-in 280ms ease-out;
}
@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============== PROGRESS BAR PÜR ============== */
.progress-fill {
  transition: width 300ms ease-out;
}

/* ============== INPUT FOCUS GENİŞLEME ============== */
input:focus, textarea:focus, select:focus {
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 0 0 3px rgba(7, 94, 84, 0.12);
}

/* ============== TOGGLE / CHECKBOX HOVER ============== */
.mode-btn, .tab-btn {
  transition: color 150ms ease, border-color 150ms ease;
}

/* ============== BUTON HOVER ============== */
.btn {
  transition: background-color 150ms ease, transform 100ms ease, box-shadow 150ms ease;
}
.btn:active:not(:disabled):not(.loading) {
  transform: translateY(1px);
}

/* ============== GİRİŞ EKRANI: MARKA LOGOSU ============== */
.login-screen { position: relative; }
.login-brand {
  position: absolute;
  top: 24px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.login-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}
.login-brand-emoji { font-size: 22px; }
.login-brand-text {
  background: linear-gradient(135deg, #075e54, #25d366);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============== BENİ HATIRLA ============== */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.remember-me span { line-height: 1.3; }

@media (max-width: 560px) {
  .login-brand {
    top: 16px;
    left: 16px;
    font-size: 17px;
    padding: 6px 10px;
  }
}

/* ============================================================
   SEKME SİSTEMİ (Tab Navigation)
   ============================================================ */
.tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-nav .tab-btn {
  flex: 1;
  min-width: max-content;
  padding: 12px 20px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: inherit;
}
.tab-nav .tab-btn:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}
.tab-nav .tab-btn.active {
  background: white;
  color: #075e54;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: tabFadeIn 0.3s ease;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============== GEÇMİŞ SEKMESİ (inline) ============== */
.history-controls {
  display: flex;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.history-controls .search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 14px;
}
.history-stats {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
  font-weight: 600;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 500px;
  overflow-y: auto;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.history-num {
  font-weight: 600;
  font-family: ui-monospace, monospace;
  font-size: 14px;
}
.history-meta {
  flex: 1;
  font-size: 12px;
  color: #94a3b8;
}

/* ============== TOAST POPUP ============== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 260px;
}
.toast.toast-success { background: linear-gradient(135deg, #16a34a, #22c55e); }
.toast.toast-error { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast.toast-out { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 18px; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}
