@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --font-family: 'Outfit', sans-serif;

  /* Palette - Default (Tutor) */
  --color-primary: #2563eb;
  /* Blue 600 */
  --color-primary-hover: #1d4ed8;
  --color-secondary: #059669 !important;
  /* Verde Puppie Planet Oficial */
  --color-bg-body: #f8fafc;
  /* Slate 50 */
  --color-bg-card: #ffffff;
  --color-text-main: #0f172a;
  /* Slate 900 */
  --color-text-muted: #64748b;
  /* Slate 500 */
  --color-border: #e2e8f0;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 0.75rem;
  --transition-speed: 0.3s;
}

/* Dark Mode Icon Toggle Helper */
.light-icon { display: none !important; }
.dark-mode .dark-icon { display: none !important; }
.dark-mode .light-icon { display: inline-block !important; }

/* Dark Mode Palette (Fuerza Bruta) */
:root.dark-mode {
  --color-bg-body: #020617 !important; /* Slate 950 */
  --color-bg-card: #0f172a !important; /* Slate 900 */
  --color-text-main: #f1f5f9 !important; /* Slate 50 (Softened) */
  --color-text-muted: #94a3b8 !important; /* Slate 400 */
  --color-border: #1e293b !important; /* Slate 800 */
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5) !important;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.7) !important;
}

:root.dark-mode.theme-vet {
  --color-bg-body: #082f49 !important; /* Cyan 950 */
  --color-bg-card: #0c4a6e !important; /* Cyan 900 */
}

/* Vet Theme Override */
body.theme-vet {
  --color-primary: #0891b2;
  /* Cyan 600 */
  --color-primary-hover: #0e7490;
  --color-secondary: #4f46e5;
  /* Indigo 600 */
  --color-bg-body: #f0f9ff;
  /* Sky 50 */
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background-color: var(--color-bg-card);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-content {
  flex: 1;
  padding: 2rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* Components */
.card {
  background-color: var(--color-bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
}

.btn-outline:hover {
  border-color: var(--color-text-muted);
  background-color: #f1f5f9;
}

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text-main);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.25rem;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-small {
  font-size: 0.875rem;
}

/* Utilities */
.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-4 {
  gap: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.w-full {
  width: 100%;
}

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}


/* Deceased pet effect */
.grayscale-pet {
  filter: grayscale(100%);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.deceased-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #4b5563;
  color: white;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: bold;
  z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    display: none;
    /* Mobile menu needed */
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}
 
/* Read-only / Disabled Button State */
.btn-disabled {
    background-color: #9ca3af !important; /* gray-400 */
    color: #f3f4f6 !important; /* gray-100 */
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.7;
}

/* --- BLOQUE DE SOBREESCRITURA AGRESIVA (DARK MODE) --- */
.dark-mode,
.dark-mode body,
.dark-mode .app-container,
.dark-mode .main-content,
.dark-mode .bg-slate-50,
.dark-mode .bg-gray-50,
.dark-mode .bg-indigo-50 {
    background-color: var(--color-bg-body) !important;
    color: var(--color-text-main) !important;
}

.dark-mode .sidebar,
.dark-mode .card,
.dark-mode .bg-white,
.dark-mode .modal-content {
    background-color: var(--color-bg-card) !important;
    color: var(--color-text-main) !important;
}

.dark-mode .border,
.dark-mode .border-slate-100,
.dark-mode .border-gray-100,
.dark-mode .border-slate-200,
.dark-mode .divide-slate-100 > *,
.dark-mode .divide-slate-50 > * {
    border-color: var(--color-border) !important;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode .text-slate-900,
.dark-mode .text-gray-900,
.dark-mode .text-slate-800,
.dark-mode .text-slate-700 {
    color: var(--color-text-main) !important;
}

.dark-mode .text-slate-500,
.dark-mode .text-gray-500,
.dark-mode .text-slate-400 {
    color: var(--color-text-muted) !important;
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background-color: var(--color-bg-body) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text-main) !important;
}

/* Transición suave global */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}