/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  --bg-primary: #070a13;
  --bg-secondary: #0f1322;
  --bg-card: rgba(20, 27, 47, 0.7);
  --bg-card-hover: rgba(28, 37, 65, 0.85);
  --border-color: rgba(255, 255, 255, 0.07);
  
  --primary: #10b981; /* Emerald */
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.2);
  
  --accent-amber: #f59e0b; /* Warning/Pregnant */
  --accent-amber-glow: rgba(245, 158, 11, 0.15);
  
  --accent-rose: #f43f5e; /* Dry/Danger */
  --accent-rose-glow: rgba(244, 63, 94, 0.15);
  
  --accent-blue: #3b82f6; /* Milking */
  --accent-blue-glow: rgba(59, 130, 246, 0.15);

  --accent-purple: #8b5cf6; /* Heifer/Düve */
  --accent-purple-glow: rgba(139, 92, 246, 0.15);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dark: #4b5563;
  --text-inverse: #070a13;
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-premium: 0 15px 35px rgba(0, 0, 0, 0.5);
  --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   LAYOUT CONTAINERS
   ========================================== */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-premium), var(--shadow-inset);
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================
   TYPOGRAPHY & BUTTONS
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 12px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background-color: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}
.btn-danger:hover {
  background-color: var(--accent-rose);
  color: var(--text-main);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
}
.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transform: scale(1.05);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--transition-smooth);
}
.btn-text:hover {
  color: var(--primary-hover);
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.05rem;
}

.icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.hidden {
  display: none !important;
}

/* ==========================================
   HEADER COMPONENT
   ========================================== */
.app-header {
  background: rgba(7, 10, 19, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.backup-actions {
  display: flex;
  gap: 0.5rem;
  border-left: 1px solid var(--border-color);
  padding-left: 1rem;
}

/* ==========================================
   FARM DROPDOWN
   ========================================== */
.farm-dropdown {
  position: relative;
}

.farm-select-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.farm-select-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.chevron-icon {
  width: 14px;
  height: 14px;
  transition: var(--transition-smooth);
}

.farm-dropdown:hover .chevron-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-premium);
  padding: 0.5rem;
  z-index: 110;
  animation: slideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.farm-list {
  max-height: 200px;
  overflow-y: auto;
}

.farm-item {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-main);
  text-align: left;
  font-family: var(--font-family);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.farm-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
}

.farm-item.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 500;
}

.farm-item .delete-farm-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: block; /* Always visible on mobile and desktop */
}

.farm-item .delete-farm-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.dropdown-action-btn {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--primary);
  text-align: left;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dropdown-action-btn:hover {
  background: rgba(16, 185, 129, 0.08);
}

/* ==========================================
   WELCOME STATE
   ========================================== */
.welcome-container {
  max-width: 500px;
  margin: 4rem auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.welcome-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.welcome-icon {
  width: 40px;
  height: 40px;
}

.welcome-container h2 {
  font-size: 1.75rem;
}

.welcome-container p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ==========================================
   STATS DASHBOARD CARD ROW
   ========================================== */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

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

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}

/* Stat Icon Backgrounds */
.total-bg { background: rgba(255, 255, 255, 0.05); color: var(--text-main); }
.milking-bg { background: var(--accent-blue-glow); color: var(--accent-blue); }
.pregnant-bg { background: var(--accent-amber-glow); color: var(--accent-amber); }
.dry-bg { background: var(--accent-rose-glow); color: var(--accent-rose); }
.young-bg { background: var(--accent-purple-glow); color: var(--accent-purple); }

/* ==========================================
   LAYOUT GRID
   ========================================== */
.main-layout-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ==========================================
   REMINDERS SIDEBAR
   ========================================== */
.reminder-card {
  position: sticky;
  top: 90px;
  padding: 1.25rem;
}

.reminder-card .card-header h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

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

.events-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 2px;
}

.event-item {
  border-left: 3px solid var(--border-color);
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 10px 10px 0;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.event-item.birth { border-left-color: var(--accent-amber); }
.event-item.dry { border-left-color: var(--accent-rose); }

.event-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.event-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.event-days {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
}

.event-days.danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.event-days.warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.event-days.info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.event-details {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================
   CONTROLS & SEARCH BAR
   ========================================== */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
}

.select-input {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.625rem 1rem;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.filter-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
  padding-left: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.filter-badge-row strong {
  color: var(--primary);
}

/* ==========================================
   ANIMAL GRID & CARDS
   ========================================== */
.animal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.animal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition-smooth);
}

.animal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-premium);
  background: var(--bg-card-hover);
}

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

.tag-badge {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Badges for status */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-sağılan { background: var(--accent-blue-glow); color: var(--accent-blue); }
.badge-gebe { background: var(--accent-amber-glow); color: var(--accent-amber); }
.badge-kuru { background: var(--accent-rose-glow); color: var(--accent-rose); }
.badge-buzağı { background: var(--accent-purple-glow); color: var(--accent-purple); }
.badge-düve { background: rgba(139, 92, 246, 0.15); color: #c084fc; }
.badge-boğa { background: rgba(243, 244, 246, 0.05); color: #e5e7eb; }

.animal-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.animal-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  color: var(--text-main);
  font-weight: 500;
}

.pregnancy-alert-bar {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--accent-amber);
  padding: 6px 10px;
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.animal-notes-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 0.25rem;
  max-height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.75rem;
}

.animal-actions .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

/* ==========================================
   MODAL COMPONENT
   ========================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 5, 10, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
  transition: var(--transition-smooth);
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: none;
  box-shadow: var(--shadow-premium);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
  margin: auto;
}

.modal-large {
  max-width: 600px;
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.2rem;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.close-modal-btn:hover {
  color: var(--text-main);
}

.modal-form {
  padding: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.col-6 {
  flex: 0 0 calc(50% - 0.5rem);
}

.modal-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.modal-form input[type="text"],
.modal-form input[type="date"],
.modal-form textarea,
.modal-form select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem 0.875rem;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  width: 100%;
  transition: var(--transition-smooth);
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(255, 255, 255, 0.06);
}

.required {
  color: var(--accent-rose);
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.text-emerald {
  color: var(--primary) !important;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  margin-top: 1.5rem;
}

.modal-footer .btn {
  min-width: 100px;
}

/* ==========================================
   APP FOOTER BAR
   ========================================== */
.app-footer-bar {
  background: rgba(7, 10, 19, 0.9);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================
   RESPONSIVE DESIGN (MOBILE ADAPTATION)
   ========================================== */
@media (max-width: 900px) {
  .main-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .reminder-card {
    position: static;
  }

  .events-list {
    max-height: 250px;
  }
}

@media (max-width: 600px) {
  body {
    padding-bottom: 2rem; /* Mobile navigation spacer */
  }

  .main-content {
    padding: 1rem;
  }

  .app-header {
    position: sticky;
    top: 0;
  }

  .header-container {
    padding: 0.75rem 1rem;
  }

  .logo-text {
    font-size: 1.15rem;
  }

  .backup-actions {
    padding-left: 0.5rem;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
  }

  .farm-select-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  /* Span the first stat card across both columns */
  .stats-container .stat-card:first-child {
    grid-column: span 2;
  }

  .stat-number {
    font-size: 1.85rem;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.875rem;
    margin-bottom: 1rem;
  }

  .filter-actions {
    width: 100%;
  }

  .filter-actions select {
    flex: 1;
  }

  .filter-actions button {
    flex: 1.2;
  }

  .animal-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .col-6 {
    flex: 0 0 100%;
  }

  .modal-content {
    border-radius: 16px;
    width: calc(100% - 0rem);
    margin: 0 auto;
  }

  .modal {
    padding: 0.75rem 0.75rem 2rem;
    align-items: flex-start;
  }

  .modal-form {
    padding: 1rem;
  }

  .modal-footer {
    padding-top: 1rem;
    margin-top: 1rem;
  }
}

/* ==========================================
   FIREBASE LOGIN & NOTIFICATION STYLES
   ========================================== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0e1324 0%, #070a13 100%);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

/* Background Animated Blobs */
.auth-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
}
.auth-bg-glow.glob-1 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: -50px;
  left: -50px;
  animation: float-glow 12s infinite ease-in-out alternate;
}
.auth-bg-glow.glob-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-blue);
  bottom: -100px;
  right: -50px;
  animation: float-glow 16s infinite ease-in-out alternate-reverse;
}
.auth-bg-glow.glob-3 {
  width: 250px;
  height: 250px;
  background: var(--accent-purple);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float-glow 10s infinite ease-in-out;
}

@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.1); }
  100% { transform: translate(-20px, -20px) scale(0.9); }
}

/* Dotted Grid Pattern */
.auth-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 2;
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 10;
  background: rgba(15, 19, 34, 0.65);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: authCardPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition-smooth);
}

.auth-card:hover {
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

@keyframes authCardPop {
  from { opacity: 0; transform: scale(0.93) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-card h2 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Custom error banner styling */
.auth-error-banner {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  animation: slideInError 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInError {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-error-banner .error-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-rose);
  flex-shrink: 0;
}

.auth-error-banner span {
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.4;
}

/* Input Icon Styling */
.input-icon-wrapper {
  position: relative;
  width: 100%;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  pointer-events: none;
}

.input-icon-wrapper input {
  padding-left: 2.5rem !important;
}

.input-icon-wrapper input:focus + .input-icon {
  color: var(--primary);
}

/* Password Toggle Icon Button */
.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.password-toggle-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.password-toggle-btn .icon {
  width: 18px;
  height: 18px;
}

/* Logo Animation / Glow */
.logo-glow {
  animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 4px var(--primary-glow)); }
  50% { filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.5)); }
}

/* Auth Divider between buttons */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  padding: 0 0.75rem;
}

/* Yükleme Dairesi (Spinner) */
.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(7, 10, 19, 0.2);
  border-top-color: var(--text-inverse);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   SKELETON LOADING STYLES
   ========================================== */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.10) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  margin-bottom: 0.6rem;
}

.skeleton-card {
  pointer-events: none;
  opacity: 0.7;
}

.skeleton-photo {
  width: 100%;
  height: 140px;
  border-radius: 10px;
}

.skeleton-badge {
  width: 80px;
  height: 22px;
  border-radius: 20px;
}

.skeleton-title {
  width: 55%;
  height: 20px;
  border-radius: 6px;
}

.skeleton-line {
  width: 100%;
  height: 14px;
  border-radius: 6px;
}

.skeleton-line.short {
  width: 65%;
}

/* ==========================================
   PHOTO UPLOAD STYLES
   ========================================== */
.photo-upload-box {
  width: 100%;
  min-height: 140px;
  border: 2px dashed var(--border-color);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-smooth);
  position: relative;
  margin-bottom: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.photo-upload-box:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.04);
}

.photo-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  pointer-events: none;
}

.photo-empty-state svg {
  opacity: 0.4;
}

.photo-empty-state span {
  font-size: 0.9rem;
  font-weight: 500;
}

.photo-empty-state small {
  font-size: 0.75rem;
  opacity: 0.7;
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.photo-btn-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.photo-btn-row .btn {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.5rem 0.875rem;
}

/* Animal Card Photo Display */
.animal-card-photo {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: rgba(0,0,0,0.2);
}

.animal-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.animal-card:hover .animal-card-photo img {
  transform: scale(1.04);
}

/* Disabled submit state styles */
button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Beautiful dark input fields inside auth card */
.auth-card input {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
  padding: 0.75rem 1.25rem 0.75rem 2.65rem !important;
  border-radius: 12px !important;
  font-family: var(--font-family) !important;
  font-size: 0.95rem !important;
  width: 100% !important;
  height: 48px !important;
  transition: var(--transition-smooth) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.auth-card input:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.auth-card label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.btn-danger-hover:hover {
  background-color: rgba(244, 63, 94, 0.15) !important;
  color: var(--accent-rose) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
}

.notification-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.banner-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.banner-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.banner-bell {
  font-size: 1.25rem;
  animation: ringBell 2s ease infinite;
  display: inline-block;
}

.banner-text {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

@keyframes ringBell {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(15deg); }
  20%, 40%, 60%, 80% { transform: rotate(-15deg); }
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 600px) {
  .banner-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    text-align: center;
  }
  .banner-info {
    justify-content: center;
  }
}

