* { -webkit-tap-highlight-color: transparent; }

/* Reset de altura para layout fixo */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Scrollbars customizadas */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.4); }

/* Scrollbar da sidebar */
aside nav::-webkit-scrollbar { width: 4px; }
aside nav::-webkit-scrollbar-thumb { background: rgba(100,116,139,.15); border-radius: 2px; }
aside nav::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.3); }

input[type=color] { padding: 2px; cursor: pointer; }
input[type=date] { color-scheme: light dark; }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.2s;
  vertical-align: middle;
  margin-left: auto;
}
details[open] > summary::after { transform: rotate(180deg); }
details[open] summary { margin-bottom: 1rem; }

/* Animações sutis */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
main > * { animation: fadeIn 0.3s ease-out; }

/* Focus states */
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: none;
}

/* Selects customizados */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 16px;
  padding-right: 2rem !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input[type=checkbox] {
  cursor: pointer;
}

/* Prevenir overflow horizontal */
body {
  overflow-x: hidden;
}