/* RabbitDrop — paylaşılan uygulama bileşenleri.
   Bu ilkeller daha önce dashboard.html / plans.html / transfer-detail.html
   içinde ayrı ayrı kopyalanmıştı ve kaymaya başlamıştı (.btn dolgusu
   dashboard'da 8/14, plans'ta 9/18 idi — aynı buton iki sayfada farklı
   boydaydı). Tek kaynak burası; sayfaya özgü stiller sayfada kalır.

   Palet: #7c3aed mor · #ede9fe lavanta · #241449 koyu mor · #757393 gri mor */

/* ── Kart ────────────────────────────────────────────────────────────────── */

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 15px -12px rgba(36, 20, 73, 0.2);
  border: 1px solid #ede9fe;
}

/* ── Buton ───────────────────────────────────────────────────────────────── */

.btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }

/* Plan kartlarındaki geniş CTA'lar için (eski plans.html dolgusu). */
.btn-lg { padding: 9px 18px; }

.btn-primary { background: #7c3aed; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #6d28d9; }
.btn-soft { background: #ede9fe; color: #7c3aed; border-color: #ddd6fe; }
.btn-soft:hover:not(:disabled) { background: #ddd6fe; }
.btn-ghost { background: transparent; color: #757393; border-color: #e5e7eb; }
.btn-ghost:hover:not(:disabled) { color: #241449; border-color: #ddd6fe; }
.btn-danger { background: transparent; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover:not(:disabled) { background: #fee2e2; }
.btn-warn { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.btn-warn:hover:not(:disabled) { background: #fde68a; }
.btn-rescue { background: #fee2e2; color: #b91c1c; border-color: #fecaca; font-weight: 700; }
.btn-rescue:hover:not(:disabled) { background: #fecaca; }

/* Yalnız ikon taşıyan kare buton (⋯ menüsü gibi). */
.btn-icon { padding: 8px; width: 32px; height: 32px; }

/* SVG ikonlar metin rengini alır ve satırla hizalanır. */
.icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-lg { width: 18px; height: 18px; }

/* ── Durum rozeti ────────────────────────────────────────────────────────── */
/* Renk zaten durumu anlatıyor; eskiden ayrıca emoji + BÜYÜK HARF vardı.
   Şimdi renkli bir nokta + normal yazım — daha sakin, işletim sisteminden
   bağımsız. */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-active  { background: #dcfce7; color: #15803d; }
.badge-expired { background: #fee2e2; color: #b91c1c; }
.badge-deleted { background: #f3f4f6; color: #6b7280; }

/* Uzantı rozeti — dosya tipi için emoji yerine. RAW formatlarında emoji seti
   zaten çalışmıyordu (mime bilinmeyince hepsi aynı ikona düşüyordu). */
.ext-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  overflow: hidden;
}
.ext-badge--image { background: #eff6ff; border-color: #dbeafe; color: #1d4ed8; }
.ext-badge--video { background: #fdf4ff; border-color: #f3e8ff; color: #a21caf; }
.ext-badge--audio { background: #f0fdfa; border-color: #ccfbf1; color: #0f766e; }
.ext-badge--doc   { background: #fef2f2; border-color: #fee2e2; color: #b91c1c; }
.ext-badge--archive { background: #fffbeb; border-color: #fef3c7; color: #b45309; }

/* ── Açılır menü (⋯) ─────────────────────────────────────────────────────── */

.menu-wrap { position: relative; display: inline-flex; }
/* Menü açıkken görünmez bir dismiss katmanı: dışarıya yapılan ilk tıklama
   yalnızca menüyü kapatır, altındaki kontrolü ÇALIŞTIRMAZ. Bu olmadan açık bir
   menü alttaki satırın butonlarının üstünü kaplıyor ve oraya nişan alan tıklama
   menünün "Delete transfer" öğesine düşebiliyordu. */
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: transparent;
}
.menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid #ede9fe;
  border-radius: 12px;
  box-shadow: 0 10px 28px -6px rgba(36, 20, 73, 0.2);
  padding: 6px;
  z-index: 60;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.menu.open { display: flex; }
.menu__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: #241449;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.menu__item:hover { background: #f5f3ff; color: #7c3aed; }
.menu__item--danger { color: #dc2626; }
.menu__item--danger:hover { background: #fef2f2; color: #b91c1c; }
.menu__divider { border: none; border-top: 1px solid #f3f4f6; margin: 4px 2px; }

/* ── Arama alanı ─────────────────────────────────────────────────────────── */
/* Eskiden inline style + onfocus/onblur inline JS ile yapılıyordu. */

.search-wrap { position: relative; }
.search-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  width: 16px;
  height: 16px;
}
.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  font-size: 13px;
  color: #241449;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px #ede9fe;
}

/* ── Segment filtresi ────────────────────────────────────────────────────── */

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #f3f0fa;
  border: 1px solid #ede9fe;
  border-radius: 12px;
}
.segmented__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #757393;
  background: none;
  border: none;
  border-radius: 9px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.segmented__btn:hover { color: #241449; }
.segmented__btn[aria-selected="true"] {
  background: #fff;
  color: #7c3aed;
  box-shadow: 0 1px 3px rgba(36, 20, 73, 0.1);
}
.segmented__count {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
}
.segmented__btn[aria-selected="true"] .segmented__count { color: #a78bfa; }

/* ── Boş / hata durumu ───────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #757393;
}
.empty-state__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: #c4b5fd;
}
.empty-state__icon .icon { width: 44px; height: 44px; stroke-width: 1.5; }
.empty-state__title { color: #241449; font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.empty-state__actions { margin-top: 18px; display: flex; justify-content: center; gap: 8px; }

/* ── Yükleniyor iskeleti ─────────────────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, #f5f3ff 0%, #ede9fe 50%, #f5f3ff 100%);
  background-size: 200% 100%;
  animation: rd-skeleton 1.2s ease-in-out infinite;
  border-radius: 12px;
}
@keyframes rd-skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Diyalog ─────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 20, 73, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px -10px rgba(36, 20, 73, 0.35);
}
.modal h3 { font-size: 18px; font-weight: 700; color: #241449; margin: 0 0 8px; }
.modal p { font-size: 13px; color: #757393; margin: 0 0 16px; line-height: 1.5; }
.modal input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  font-size: 14px;
  color: #241449;
  outline: none;
  margin-bottom: 16px;
}
.modal input:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px #ede9fe; }
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; }
