/* assets/css/app.css - GIS Kamera ve Yüz Tanıma Tasarım Sistemi */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  
  /* Renk Paleti */
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --brand-primary: #6366f1;
  --brand-primary-hover: #4f46e5;
  --brand-glow: rgba(99, 102, 241, 0.35);
  --accent-success: #10b981;
  --accent-danger: #ef4444;
  --accent-warning: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Temel Sıfırlamalar */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.app-fullscreen {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Cam Efekti (Glassmorphism) */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Üst Navigasyon Çubuğu */
.navbar-brand-header {
  padding: env(safe-area-inset-top, 10px) 16px 10px 16px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 50;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.brand-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Model Seçici Buton Grubu */
.model-pill-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.model-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.model-pill:hover {
  color: #fff;
}

.model-pill.active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--brand-glow);
}

/* Video ve Kamera Alanı */
.video-container {
  position: relative;
  flex: 1;
  margin: 10px;
  background: #020617;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  min-height: 0;
}

.video-container video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-container canvas.overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Boş Durum / Başlatma İstemi */
.video-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 10;
}

.placeholder-icon {
  font-size: 56px;
  color: var(--text-subtle);
  margin-bottom: 12px;
  animation: pulse-soft 2.5s infinite ease-in-out;
}

/* Canlı HUD Bilgi Şeridi */
.hud-status-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 20;
}

.hud-badge {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hud-live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-success);
  animation: pulse-live 1.6s infinite;
}

/* Tespit Edilen Nesne Çipleri (Etiketler) */
.detected-chips-container {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 80px;
  overflow-y: auto;
  pointer-events: none;
  z-index: 20;
}

.hud-chip {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: chip-pop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-chip.recognized {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(6, 78, 59, 0.85);
  color: #a7f3d0;
}

/* Alt Kontrol Paneli */
.controls-bottom {
  padding: 10px 16px max(14px, env(safe-area-inset-bottom, 14px)) 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.control-buttons-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buton Tasarımları */
.btn-modern-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 16px var(--brand-glow);
}

.btn-modern-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--brand-glow);
  color: #fff;
}

.btn-modern-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-modern-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-modern-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-modern-danger:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.btn-icon-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon-round:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: scale(1.05);
}

/* Durum Metni */
.status-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 18px;
  text-align: center;
}

/* Yönetim Paneli Kartları */
.admin-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.admin-card-header {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.form-control-modern {
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 14px !important;
  font-size: 0.92rem !important;
  transition: var(--transition-fast) !important;
}

.form-control-modern:focus {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px var(--brand-glow) !important;
  color: #fff !important;
}

.form-label-modern {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Önizleme Konteynırı */
.preview-container {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  margin-top: 10px;
  background: #020617;
}

.preview-container img {
  display: block;
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
}

.preview-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Liste Öğesi */
.face-list-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.face-list-item:hover {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

.face-list-name {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.face-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

/* Toast Bildirimi */
.toast-container-custom {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.custom-toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-toast.success { border-left: 4px solid var(--accent-success); }
.custom-toast.error { border-left: 4px solid var(--accent-danger); }
.custom-toast.info { border-left: 4px solid var(--brand-primary); }

/* Animasyonlar */
@keyframes pulse-live {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

@keyframes chip-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes toast-in {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
