/* Extrator — Lions Intelligence / yannes.app.br */
:root {
  --primary: #1F4E78;
  --primary-light: #2E6AA0;
  --primary-dark: #163957;
  --accent: #E8A317;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --text: #1A2332;
  --muted: #6B7A90;
  --border: #E2E8F0;
  --success: #1DB954;
  --error: #D93025;
  --warning: #F5A623;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Segoe UI', Tahoma, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0; top: 0;
  box-shadow: 2px 0 8px rgba(0,0,0,0.06);
}
.brand {
  display: flex; gap: 12px; align-items: center;
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand .logo { font-size: 32px; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.brand-domain { font-size: 12px; opacity: 0.7; }
.sidebar nav {
  flex: 1;
  padding: 20px 10px;
  overflow-y: auto;
}
.nav-section {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  padding: 18px 10px 6px;
  letter-spacing: 1px;
  font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin: 2px 0;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  opacity: 0.7;
  display: flex; justify-content: space-between;
}
.sidebar-footer a { color: #fff; text-decoration: none; }
.sidebar-footer a:hover { text-decoration: underline; }

/* ---- Conteúdo principal ---- */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 40px;
  max-width: calc(100vw - var(--sidebar-w));
}
.page-header {
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 28px; font-weight: 700;
  color: var(--primary); letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.page-header p { color: var(--muted); font-size: 15px; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.panel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex; flex-direction: column; gap: 10px;
}
.panel-card:hover:not(.disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(31,78,120,0.12);
  border-color: var(--primary);
}
.panel-card.disabled { opacity: 0.7; cursor: not-allowed; }
.panel-icon { font-size: 36px; margin-bottom: 8px; }
.panel-card h3 { color: var(--primary); font-size: 18px; }
.panel-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.panel-status {
  margin-top: auto;
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}
.status-ativo { background: #DCF7E4; color: #0F5132; }
.status-em-breve { background: #FFF3CD; color: #7A5D00; }

.info-box {
  background: #EEF4FA;
  padding: 20px 24px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
}
.info-box h2 { color: var(--primary); font-size: 16px; margin-bottom: 10px; }
.info-box ol { margin-left: 20px; color: var(--text); font-size: 14px; line-height: 1.7; }

/* ---- Dropzone ---- */
.dropzone {
  border: 2px dashed var(--primary-light);
  border-radius: 10px;
  padding: 48px 20px;
  text-align: center;
  background: #F8FAFD;
  cursor: pointer;
  transition: all 0.2s;
}
.dropzone:hover, .dropzone.dragover {
  background: #EEF4FA;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.dropzone-icon { font-size: 48px; margin-bottom: 12px; color: var(--primary); }
.dropzone h2 { font-size: 18px; margin-bottom: 8px; color: var(--primary); }
.dropzone p { color: var(--muted); font-size: 14px; }
.dropzone-hint {
  margin-top: 16px; font-size: 12px; color: var(--muted);
  background: #fff; display: inline-block;
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border);
}
.dropzone input[type=file] { display: none; }

/* ---- File list ---- */
.file-list {
  margin-top: 20px;
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFBFD;
}
.file-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.file-item:last-child { border-bottom: none; }
.file-item .name { color: var(--text); font-weight: 500; }
.file-item .size { color: var(--muted); font-size: 12px; }

/* ---- Actions ---- */
.actions {
  margin-top: 20px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.btn {
  padding: 12px 24px;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(31,78,120,0.25);
}
.btn-primary:disabled { background: #9AA6B8; cursor: not-allowed; }
.btn-secondary {
  background: #fff; color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-secondary:hover { background: #EEF4FA; }
.counter { margin-left: auto; color: var(--muted); font-size: 14px; }

/* ---- Progress ---- */
.progress { margin-top: 20px; display: none; }
.progress.active { display: block; }
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  width: 70%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50%      { opacity: 1; }
}
.progress-label {
  margin-top: 8px; font-size: 13px;
  color: var(--muted); text-align: center;
}

/* ---- Result ---- */
.result { margin-top: 24px; padding: 20px; border-radius: 10px; display: none; }
.result.active { display: block; }
.result.success { background: #E8F7EE; border: 1px solid var(--success); color: #0F5132; }
.result.error   { background: #FDECEA; border: 1px solid var(--error); color: #842029; }
.result h3 { margin-bottom: 10px; font-size: 17px; }
.result .stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin: 14px 0;
}
.result .stat { background: #fff; padding: 12px; border-radius: 8px; text-align: center; }
.result .stat .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.result .stat .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.download-link {
  display: inline-block; margin-top: 12px;
  padding: 10px 20px;
  background: var(--success); color: #fff !important;
  text-decoration: none;
  border-radius: 6px; font-weight: 600;
}
.download-link:hover { background: #179344; }

/* ---- Info grid ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.info-card {
  background: #fff; padding: 14px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  border: 1px solid var(--border);
}
.info-card .title {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.info-card .value {
  font-size: 18px; font-weight: 700;
  color: var(--primary); margin-top: 4px;
}

/* ---- Em breve ---- */
.em-breve {
  text-align: center; padding: 60px 40px;
}
.em-breve-icon { font-size: 64px; margin-bottom: 16px; }
.em-breve h2 { color: var(--primary); margin-bottom: 12px; }
.em-breve p { color: var(--muted); max-width: 520px; margin: 0 auto 10px; }
.em-breve .muted { font-style: italic; font-size: 13px; }
.em-breve a { margin-top: 24px; }

/* ---- Responsivo ---- */
@media (max-width: 900px) {
  .sidebar { position: relative; width: 100%; height: auto; }
  body { flex-direction: column; }
  .content { margin-left: 0; max-width: 100%; padding: 20px; }
  .brand { padding: 0 20px 16px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
  .nav-item { flex: 1 1 auto; justify-content: center; }
  .nav-section { display: none; }
  .sidebar-footer { display: none; }
}
