/* ============================================================
   SANTOOLIVER AGENDA — DESIGN SYSTEM GLOBAL 2026
   Moderno, Responsivo para Desktop, Android e iPhone (iOS)
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f4f5fa;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --primary: #7650d4;
  --primary2: #5933b3;
  --line: #e5e7f0;
  --ok: #147d55;
  --danger: #c43853;
  --shadow: 0 10px 35px rgba(31, 31, 67, 0.065);
  --shadow-lg: 0 20px 50px rgba(31, 31, 67, 0.12);
  --focus-ring: 0 0 0 4px rgba(118, 80, 212, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background: linear-gradient(150deg, #f9f8ff 0%, #f4f5fa 46%, #f4f8fb 100%);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

button, input, select, textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.oculto {
  display: none !important;
}

.app {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 2.7vw, 32px);
}

/* Toast container */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: #242126;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  display: none;
  animation: fadeIn 0.25s ease-out;
}

/* Spinner e Overlay de carregamento */
.loading {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  z-index: 9999;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #eadfe5;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Animações e acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
