/* ====== ROUGLAS THEME - Atualizador de Estoque (Minimalista) ====== */

/* --- Variáveis de Tema --- */
:root {
  --bg: #f8f9fa;
  --bg-elev: #ffffff;
  --bg-soft: #f1f3f5;
  --border: #dee2e6;
  --muted: #6c757d;
  --text: #343a40;
  --accent: #14b8a6;
  --accent-ink: #ffffff;
  --link-color: #3b82f6;
  --ok: #166534;
  --danger: #991b1b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* --- Reset e Globais --- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex-grow: 1; }

/* --- Cabeçalho --- */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  margin: 0 0 2.5rem;
}
h1 {
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
  color: var(--text);
}
.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  max-width: 600px;
}

/* --- Card Principal --- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow);
}

/* --- Grid --- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
}

/* --- Dropzones --- */
.drop {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.drop.drag {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.drop input[type=file] { display: none; }
.drop .title { font-weight: 600; font-size: 1rem; color: var(--text); }
.drop .hint { font-size: 0.875rem; color: var(--muted); margin-top: 0; }
.drop .choose {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  background: var(--bg-elev);
  color: var(--text);
  transition: all .2s ease;
}
.drop .choose:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--bg);
}
.drop .fileName {
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- AVISO DAS COLUNAS (DENTRO DO CARD) --- */
.layout-info-main {
  font-size: 0.85rem;
  color: var(--muted);
  background-color: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-top: 2rem;
}
.layout-info-main p {
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.layout-info-main ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.layout-info-main li {
  margin-bottom: 0.25rem;
}


/* --- Botões de Ação --- */
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  justify-content: center;
}
button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.95rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  transition: all .2s;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}
button:hover:not(:disabled) {
  background-color: #0d9488;
  transform: translateY(-1px);
}
button:active { transform: scale(0.98); }
button:disabled {
  background-color: #a1a1aa;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
button.secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
}
button.secondary:hover:not(:disabled) {
  background-color: var(--bg-elev);
  border-color: #adb5bd;
}
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
button.ghost:hover:not(:disabled) {
  background-color: var(--bg-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Mensagem de Status --- */
.stats { 
    font-size: 1rem; 
    text-align: center;
    margin-top: 1.5rem !important;
    font-weight: 500;
    min-height: 1.6rem;
}
.stats .ok { color: var(--ok); }
.stats .danger { color: var(--danger); }

/* --- Rodapé --- */
.app-footer {
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.copyright { 
    margin-bottom: 1rem; 
}

.rouglas-logo-img { 
    height: 25px; 
    opacity: 0.7; 
    transition: opacity 0.2s; 
}
.rouglas-logo-img:hover { 
    opacity: 1; 
}

/* --- Toast --- */
.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: var(--text);
  color: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(0.625rem);
  transition: all .3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* --- Responsividade --- */
@media (max-width: 768px) {
  .wrap { padding: 1.5rem 1rem; }
  header { margin-bottom: 2rem; }
  h1 { font-size: 1.75rem; }
  .subtitle { font-size: 0.95rem; }
  .card { padding: 1.5rem; margin-bottom: 1rem; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
}