﻿/* ==========================================================================
   Gmail İdarəetmə - Komponentlər (Ultra-İncə Qaranlıq Rejim)
   ========================================================================== */

/* ─── Auth / Giriş Ekranı ────────────────────────────────────────────────── */
.auth-hero-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; z-index: 10;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79,142,247,0.06) 0%, transparent 70%),
              var(--bg-root);
}

.auth-card {
  max-width: 500px; width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 34px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  text-align: center;
  position: relative; overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
}

.auth-logo-badge {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  box-shadow: 0 8px 20px rgba(37,99,235,0.3);
}

.auth-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.4px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; line-height: 1.5; }

.auth-features-list {
  text-align: left;
  background: var(--bg-card-inner);
  border-radius: var(--r-md);
  padding: 12px 16px; margin-bottom: 22px;
  display: flex; flex-direction: column; gap: 9px;
  border: 1px solid var(--border-subtle);
}

.auth-feature-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--text-muted);
}
.auth-feature-icon { color: var(--accent-green); font-size: 13px; }

.btn-google-login {
  width: 100%; padding: 12px 18px;
  border-radius: var(--r-sm);
  background: #ffffff; color: #111827;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid #e3e8f0;
  cursor: pointer; transition: var(--ease);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-google-login:hover { background: #f8fafc; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }

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

.auth-privacy-notice {
  margin-top: 16px; font-size: 11px; color: var(--text-sub); line-height: 1.4;
}

/* ─── E-mail Toolbar ─────────────────────────────────────────────────────── */
.email-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 9px 16px;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 9px;
  border-bottom: 1px solid var(--border-subtle);
}

.bulk-actions-group { display: flex; align-items: center; gap: 7px; }

.checkbox-custom {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--text-sub);
  background: transparent; cursor: pointer;
  appearance: none; display: inline-grid; place-content: center;
  transition: var(--ease);
}
.checkbox-custom:checked { background: var(--primary); border-color: var(--primary); }
.checkbox-custom:checked::before { content: "✓"; color: white; font-size: 10px; font-weight: 700; }

.selection-count {
  font-size: 12px; font-weight: 600; color: var(--primary); margin-left: 5px;
}

/* Email Siyahısı */
.email-list-container { display: flex; flex-direction: column; gap: 8px; }

/* ─── İncə Kart Elementi ─────────────────────────────────────────────────── */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex; flex-direction: column; gap: 11px;
  transition: var(--ease);
  position: relative;
}
.item-card:hover { border-color: rgba(79,142,247,0.28); background: var(--bg-card-hover); }
.item-card.unread { border-left: 2.5px solid var(--primary); }
.item-card.selected { border-color: var(--primary); background: rgba(79,142,247,0.06); }

.item-card-header { display: flex; align-items: center; gap: 11px; }

.item-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card-inner); border: 1px solid var(--border);
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}

.item-meta-main { flex: 1; min-width: 0; }

.item-title {
  font-size: 13.5px; font-weight: 700; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 7px;
}
.item-sub {
  font-size: 11.5px; color: var(--text-sub); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.item-badge-pill {
  font-size: 10.5px; font-family: var(--font-mono);
  background: var(--bg-card-inner); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: var(--r-xs); color: var(--text-sub);
  display: inline-flex; align-items: center; gap: 4px;
}

/* 3-Sütunlu Stat Zolağı */
.item-stat-strip {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 8px 13px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}

.stat-strip-col { display: flex; flex-direction: column; gap: 2px; }

.stat-strip-label {
  font-size: 10.5px; color: var(--text-sub);
  display: flex; align-items: center; gap: 3px; font-weight: 500;
}

.stat-strip-value {
  font-size: 12.5px; font-weight: 700; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.item-card-actions { display: flex; align-items: center; gap: 7px; }
.item-card-actions .btn { flex: 1; font-size: 12px; padding: 6px 10px; }

/* ─── Modallar ───────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-backdrop.active { display: flex; }

.modal-content {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  max-width: 720px; width: 100%;
  max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-main); }

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

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 9px;
  background: rgba(0,0,0,0.1);
}

.email-reader-body {
  background: #ffffff; color: #1a202c;
  border-radius: var(--r-sm);
  padding: 16px; min-height: 220px; max-height: 460px;
  overflow-y: auto; font-family: sans-serif;
  border: 1px solid #e3e8f0;
  font-size: 14px;
}

/* ─── Toast Bildirişlər ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 18px; right: 18px;
  display: flex; flex-direction: column; gap: 7px;
  z-index: 200; pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 270px; max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  display: flex; align-items: center; gap: 9px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: slideInRight 0.22s ease-out;
  font-size: 12.5px; font-weight: 500;
}

.toast.success { border-left: 2.5px solid var(--accent-green); }
.toast.error   { border-left: 2.5px solid var(--accent-rose);  }
.toast.warning { border-left: 2.5px solid var(--accent-amber); }
.toast.info    { border-left: 2.5px solid var(--primary);      }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0);    }
}

/* ─── Skeleton Loading ───────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.06) 50%,
    rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonLoad 1.6s infinite;
  border-radius: 4px;
}

@keyframes skeletonLoad {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Ümumi Kart / Bölmə ─────────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px;
}

.section-title {
  font-size: 15px; font-weight: 700; color: var(--text-main); letter-spacing: -0.2px;
}
.section-subtitle { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

/* Əməliyyat Bölməsi (Cleaner, Subscription, vs.) */
.action-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  transition: var(--ease);
}
.action-panel:hover { border-color: var(--border-hover); }

.action-panel-text h3 {
  font-size: 13.5px; font-weight: 700; color: var(--text-main); margin-bottom: 3px;
}
.action-panel-text p { font-size: 12px; color: var(--text-sub); line-height: 1.45; }

/* Cədvəllər */
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th {
  padding: 9px 12px;
  text-align: left;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); color: var(--text-main); }

/* Badge-lər */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 600;
}
.badge-primary { background: var(--primary-dim); color: var(--primary); }
.badge-green   { background: rgba(52,211,153,0.12); color: var(--accent-green); }
.badge-rose    { background: rgba(251,113,133,0.12); color: var(--accent-rose); }
.badge-amber   { background: rgba(251,191,36,0.12);  color: var(--accent-amber); }
.badge-gray    { background: var(--bg-card-inner); color: var(--text-muted); border: 1px solid var(--border); }

/* Progress Bar */
.progress-bar-wrap {
  height: 4px; background: var(--bg-card-inner);
  border-radius: var(--r-full); overflow: hidden;
}
.progress-bar-fill {
  height: 100%; background: var(--primary);
  border-radius: var(--r-full);
  transition: width 0.4s ease;
}

/* Divider */
.divider {
  height: 1px; background: var(--border-subtle);
  margin: 12px 0;
}

/* Input / Textarea / Select */
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-main);
  font-family: var(--font-main); font-size: 13px; outline: none;
  transition: var(--ease);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px;
}

/* Toggle Switch */
.toggle-wrap {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
}
.toggle-switch {
  position: relative; width: 36px; height: 20px;
  background: var(--bg-card-inner); border: 1px solid var(--border);
  border-radius: var(--r-full); transition: var(--ease); flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  top: 2px; left: 2px;
  background: var(--text-sub); border-radius: 50%;
  transition: var(--ease);
}
.toggle-switch.on { background: var(--primary); border-color: var(--primary); }
.toggle-switch.on::after { left: 18px; background: #fff; }

/* Loading Spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty State */
.empty-state {
  text-align: center; padding: 50px 20px; color: var(--text-sub);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.empty-state p { font-size: 12.5px; }

/* Konfirm Modal (küçük) */
.confirm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center;
  z-index: 300; padding: 20px;
}
.confirm-modal-overlay.active { display: flex; }

.confirm-modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px 22px;
  max-width: 380px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.confirm-modal-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.confirm-modal-box p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; }

.confirm-modal-options {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; font-size: 12px; color: var(--text-muted); cursor: pointer;
}
.confirm-modal-footer { display: flex; gap: 8px; justify-content: flex-end; }
