/* ===================================================================
   havuz — Tasarım Sistemi ve Stiller (style.css)
   Sadece yerel CSS, harici kütüphane veya CDN içermez.
   Açık ve Koyu tema (prefers-color-scheme ve [data-theme]) destekler.
   =================================================================== */

:root {
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Işık Modu Renkleri */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #f1f5f9;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Tek Vurgu Rengi: Güven veren Mavi */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-active: #1e40af;
  --primary-light: #eff6ff;
  --primary-text: #1d4ed8;

  /* Durum Renkleri */
  --success: #16a34a;
  --success-light: #f0fdf4;
  --success-border: #bbf7d0;

  --warning: #d97706;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;

  /* Kırmızı sadece uyarı ve korumasızlık için */
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.12);

  --transition-fast: 150ms ease;
  --transition-normal: 220ms ease;
}

/* Koyu Tema: Sistem Tercihi veya data-theme="dark" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: #0b0f17;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --bg-surface-hover: #232f42;

    --border-subtle: #1f2937;
    --border-strong: #374151;
    --border-focus: #3b82f6;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-active: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.14);
    --primary-text: #93c5fd;

    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.14);
    --success-border: rgba(34, 197, 94, 0.3);

    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.14);
    --warning-border: rgba(245, 158, 11, 0.3);

    --danger: #ef4444;
    --danger-hover: #f87171;
    --danger-light: rgba(239, 68, 68, 0.14);
    --danger-border: rgba(239, 68, 68, 0.3);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-surface-hover: #232f42;

  --border-subtle: #1f2937;
  --border-strong: #374151;
  --border-focus: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-active: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.14);
  --primary-text: #93c5fd;

  --success: #22c55e;
  --success-light: rgba(34, 197, 94, 0.14);
  --success-border: rgba(34, 197, 94, 0.3);

  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.14);
  --warning-border: rgba(245, 158, 11, 0.3);

  --danger: #ef4444;
  --danger-hover: #f87171;
  --danger-light: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.3);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.5);
}

/* ===================================================================
   Temel Sıfırlamalar ve Yapı
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  flex-direction: column;
}

button, input {
  font-family: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Ekran Okuyucu / Gizli Elementler */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* ===================================================================
   Uygulama İskeleti (App Container)
   =================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* Üst Çubuk (Header) */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.75rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.brand-svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.user-avatar {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.user-email-text {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .user-email-text {
    max-width: 220px;
  }
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.icon-button:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

/* Ana İçerik */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.screen-view {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Alt Çubuk (Footer) */
.app-footer {
  margin-top: auto;
  padding: 2rem 0 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .app-footer {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-demo-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-demo-btn {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.footer-demo-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ===================================================================
   Yetkilendirme Kartları (Giriş / Havuz Oluştur / Kurtarma)
   =================================================================== */
.auth-card {
  max-width: 480px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 640px) {
  .auth-card {
    padding: 2.75rem 2.25rem;
  }
}

.auth-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.auth-large-icon {
  width: 44px;
  height: 44px;
}

.auth-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.auth-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.75rem;
  max-width: 380px;
}

.auth-trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trust-icon {
  width: 18px;
  height: 18px;
  color: var(--success);
  flex-shrink: 0;
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-light);
  color: var(--primary-text);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.card-badge.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.unlock-user-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem 0.4rem 0.4rem;
  margin-bottom: 1.5rem;
}

.unlock-email {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Form Elemanları */
.auth-form {
  width: 100%;
  text-align: left;
}

.form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.form-input {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input.font-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  font-size: 1rem;
}

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

.input-password-wrap .form-input {
  padding-right: 2.75rem;
}

.btn-toggle-pw {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-toggle-pw:hover {
  color: var(--text-primary);
}

.btn-toggle-pw svg {
  width: 18px;
  height: 18px;
}

/* Şifre Güç Göstergesi */
.strength-meter-container {
  margin-top: 0.45rem;
}

.strength-bar-track {
  width: 100%;
  height: 4px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: var(--danger);
  transition: width 200ms ease, background-color 200ms ease;
}

.strength-bar-fill.weak {
  width: 30%;
  background: var(--danger);
}

.strength-bar-fill.medium {
  width: 65%;
  background: var(--warning);
}

.strength-bar-fill.strong {
  width: 100%;
  background: var(--success);
}

.strength-label-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.strength-text {
  font-weight: 500;
  color: var(--text-muted);
}

.strength-text.weak { color: var(--danger); }
.strength-text.medium { color: var(--warning); }
.strength-text.strong { color: var(--success); }

.char-count {
  color: var(--text-muted);
}

.input-hint-error {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--danger);
}

/* Uyarı Kutuları */
.alert-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.alert-box.alert-warning {
  background: var(--warning-light);
  border: 1px solid var(--warning-border);
  color: var(--text-primary);
}

.alert-icon {
  width: 20px;
  height: 20px;
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.alert-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.alert-desc {
  color: var(--text-secondary);
}

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
}

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

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

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--text-muted);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

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

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  border: 1px solid transparent;
}

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

.btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.btn-google {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.btn-google:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-focus);
}

.btn-icon-svg {
  width: 20px;
  height: 20px;
}

.btn-link {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.auth-footer-links {
  margin-top: 1.25rem;
  text-align: center;
}

/* Kurtarma Anahtarı Görünümü */
.recovery-key-card {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .recovery-key-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.key-display-wrapper {
  overflow-x: auto;
  padding: 0.25rem 0;
}

.recovery-key-code {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  white-space: nowrap;
}

.btn-copy {
  flex-shrink: 0;
}

.checkbox-container {
  width: 100%;
  margin-bottom: 1.5rem;
  text-align: left;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox-box svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox input[type="checkbox"]:checked ~ .checkbox-box svg {
  opacity: 1;
  transform: scale(1);
}

.custom-checkbox input[type="checkbox"]:focus-visible ~ .checkbox-box {
  box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-text {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ===================================================================
   6. ANA EKRAN (Dashboard)
   =================================================================== */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

/* Doluluk Kartı (Storage Card) */
.storage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .storage-card {
    padding: 1.75rem 1.75rem;
  }
}

.storage-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .storage-card-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.storage-main-stat {
  display: flex;
  flex-direction: column;
}

.storage-percent-label {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.storage-sub-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.storage-free-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  align-self: flex-start;
}

.badge-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* Geniş İlerleme Çubuğu */
.storage-progress-bar-track {
  width: 100%;
  height: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.storage-progress-bar-fill {
  height: 100%;
  width: 37%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1), background-color 300ms ease;
}

/* %90 üstü dolulukta uyarı rengi */
.storage-progress-bar-fill.warning {
  background: linear-gradient(90deg, #ea580c, #dc2626);
}

/* Koruma Durumu Kartı */
.protection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  gap: 0.75rem;
}

.protection-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.protection-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.protection-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.protection-title {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Parite ve Kopya: Yeşil */
.protection-card.protection-parity,
.protection-card.protection-copy {
  background: var(--success-light);
  border-color: var(--success-border);
  color: var(--text-primary);
}

.protection-card.protection-parity .protection-icon-wrap,
.protection-card.protection-copy .protection-icon-wrap {
  background: var(--success);
  color: #ffffff;
}

/* Korumasız: Kırmızı */
.protection-card.protection-none {
  background: var(--danger-light);
  border-color: var(--danger-border);
  color: var(--text-primary);
}

.protection-card.protection-none .protection-icon-wrap {
  background: var(--danger);
  color: #ffffff;
}

.protection-card.protection-none .protection-title {
  color: var(--danger);
}

/* Dosya Bırakma Alanı (Dropzone) */
.dropzone-card {
  border: 2px dashed var(--border-strong);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropzone-card:hover,
.dropzone-card:focus-visible {
  border-color: var(--primary);
  background: var(--primary-light);
  outline: none;
}

.dropzone-card.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.01);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.dropzone-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-card:hover .dropzone-icon-circle,
.dropzone-card.dragover .dropzone-icon-circle {
  background: var(--primary);
  color: #ffffff;
}

.dropzone-icon {
  width: 26px;
  height: 26px;
}

.dropzone-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropzone-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dropzone-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 440px;
}

/* Yükleme Kuyruğu (Upload Queue) */
.upload-queue-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upload-queue-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.upload-queue-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.queue-item-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
}

.queue-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.queue-filename {
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.queue-percent {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.queue-progress-track {
  width: 100%;
  height: 4px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.queue-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 150ms ease;
}

/* Dosya Listesi Bölümü */
.files-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.section-header-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .section-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-neutral {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.file-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 260px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 38px;
  padding: 0.4rem 0.75rem 0.4rem 2.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.files-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.files-list {
  display: flex;
  flex-direction: column;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
  transition: background-color var(--transition-fast);
}

.file-row:last-child {
  border-bottom: none;
}

.file-row:hover {
  background: var(--bg-surface-hover);
}

.file-main-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.file-type-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-surface-elevated);
  color: var(--primary);
}

.file-type-icon svg {
  width: 20px;
  height: 20px;
}

.file-name-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.action-btn.btn-delete:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.action-btn svg {
  width: 18px;
  height: 18px;
}

/* Boş Durum (Empty State) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.empty-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.empty-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.empty-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 340px;
}

/* Hesaplar Katlanabilir Bölümü (Accordion) */
.accordion-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
  background: var(--bg-surface);
  transition: background-color var(--transition-fast);
}

.accordion-header:hover {
  background: var(--bg-surface-hover);
}

.accordion-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.accordion-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.accordion-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.accordion-chevron {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
}

.accordion-header[aria-expanded="false"] .accordion-chevron {
  transform: rotate(-90deg);
}

.accordion-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.accordion-body.collapsed {
  display: none;
}

.accounts-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
}

.account-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.account-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.account-email-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.account-email {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.badge-main {
  background: var(--primary-light);
  color: var(--primary-text);
  border: 1px solid transparent;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
}

.badge-unreachable {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
}

.account-usage-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.account-usage-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.account-progress-track {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.account-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* ===================================================================
   Modallar (Modal Dialogs)
   =================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  animation: fadeIn 180ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: scaleUp 180ms ease;
}

.modal-box-sm {
  max-width: 400px;
  align-items: center;
  text-align: center;
}

@keyframes scaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.device-link-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.device-link-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.device-url-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

.external-icon {
  width: 16px;
  height: 16px;
}

.device-code-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.device-code-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-and-copy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.device-code-display {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  flex: 1;
  text-align: center;
}

.connecting-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.spinner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.3; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

/* Silme Onay Modalı */
.delete-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--danger-light);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.delete-icon-circle svg {
  width: 26px;
  height: 26px;
}

.text-danger {
  color: var(--danger);
  font-weight: 600;
}

.text-center {
  text-align: center;
}

.modal-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.modal-actions-row .btn {
  flex: 1;
}

/* ===================================================================
   Bildirim Kartları (Toast Notifications)
   =================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  z-index: 2000;
}

@media (min-width: 640px) {
  .toast-container {
    left: auto;
    align-items: flex-end;
  }
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  max-width: 420px;
  width: 100%;
  animation: toastSlideUp 220ms ease;
  transition: opacity 200ms ease, transform 200ms ease;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

.toast.toast-info {
  border-left: 4px solid var(--primary);
}

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

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--primary); }

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-close-btn {
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.toast-close-btn:hover {
  color: var(--text-primary);
}

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

.added-ok { color: var(--success); font-weight: 600; }

/* never let one long value push the page sideways on phones */
html, body { max-width: 100%; overflow-x: hidden; }
.storage-percent-label, .storage-sub-label, .file-name, .user-email-text { overflow-wrap: anywhere; }
