/* ============================================
   BOTICA AI — MAIN CSS
   Global variables, reset, body, scrollbar, animations
   ============================================ */

:root {
  /* Colors */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-10: rgba(37, 99, 235, 0.1);
  --color-primary-05: rgba(29, 78, 216, 0.05);
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-text-mid: #475569;
  --color-text-body: #334155;
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-success-dark: #059669;
  --color-warning: #d97706;
  --color-warning-bg: rgba(251, 191, 36, 0.1);
  --color-error: #ef4444;
  --color-hover-bg: #f1f5f9;
  --color-border-light: #cbd5e1;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --gradient-primary-soft: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(29, 78, 216, 0.05));

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(37, 99, 235, 0.15);
  --shadow-lg: 0 8px 24px rgba(37, 99, 235, 0.25);
  --shadow-primary-sm: 0 4px 12px rgba(37, 99, 235, 0.25);
  --shadow-primary-md: 0 6px 20px rgba(37, 99, 235, 0.35);
  --shadow-primary-lg: 0 8px 24px rgba(37, 99, 235, 0.25);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* Sidebar */
  --sidebar-width: 280px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.15s var(--ease-smooth);
  --transition-base: 0.2s var(--ease-smooth);
  --transition-slow: 0.3s var(--ease-smooth);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-bg);
  height: 100vh;
  overflow: hidden;
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App layout */
.app-container {
  width: 100%;
  height: 100vh;
  display: flex;
}

/* Main area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  min-width: 0;
  overflow: hidden;
}

/* Content area */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Screen transitions */
.screen {
  display: none;
  animation: screenFadeIn 0.3s var(--ease-smooth);
}

.screen.active {
  display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Animations */
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-10px); opacity: 1; }
}

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

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

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

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

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

/* Utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }
