/* Reset de Margens e Box Model */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--off-white);
  color: var(--brown-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbar Customizada Premium */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--off-white);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-medium);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brown-medium);
}

/* Seleção de Texto */
::selection {
  background-color: var(--brown-medium);
  color: var(--white);
}

/* Elementos Básicos */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--brown-dark);
  font-weight: 700;
}

a {
  color: var(--brown-medium);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brown-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Classes Utilitárias */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-muted { color: var(--gray-medium); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

.bg-success-light { background-color: var(--success-light); }
.bg-warning-light { background-color: var(--warning-light); }
.bg-danger-light { background-color: var(--danger-light); }
.bg-info-light { background-color: var(--info-light); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Animações Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in { animation: fadeIn var(--transition-base) forwards; }
.animate-slide-up { animation: slideUp var(--transition-base) forwards; }
.animate-scale-in { animation: scaleIn var(--transition-base) forwards; }

/* Splash Screen Styles */
.splash-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-medium) 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.splash-logo {
  max-width: 140px;
  height: auto;
  object-fit: contain;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.25));
}

.splash-spinner {
  border: 3px solid rgba(214, 193, 166, 0.2);
  border-top: 3px solid var(--beige);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Brand container utilities */
.brand-container {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 1.5px;
}

.brand-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.brand-text-light .brand-codex {
  color: var(--beige);
}

.brand-text-light .brand-one {
  color: var(--white);
}

.brand-text-dark .brand-codex {
  color: var(--brown-medium);
}

.brand-text-dark .brand-one {
  color: var(--brown-dark);
}

/* Modal Settings Tabs */
.tabs-modal-settings button {
  border-radius: 0 !important;
  border-bottom: 2px solid transparent !important;
  color: var(--gray-medium) !important;
}

.tabs-modal-settings button.modal-tab-active {
  border-bottom: 2px solid var(--brown-medium) !important;
  color: var(--brown-dark) !important;
  font-weight: 700 !important;
}


