/* =============================================
   Portal do Expositor — Estilos
   Cores dinâmicas via CSS custom properties
   ============================================= */

:root {
  --cor-primaria:   #1e40af;
  --cor-secundaria: #3b82f6;
  --cor-acento:     #f59e0b;
  --bg:        #f3f4f6;
  --card-bg:   #ffffff;
  --text:      #111827;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --danger:    #ef4444;
  --success:   #10b981;
  --r:         8px;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--cor-secundaria); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================================================
   LOGIN / RECUPERAR / TROCAR SENHA (páginas auth)
   ================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--r);
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.auth-header {
  background: var(--cor-primaria);
  padding: 28px 32px;
  text-align: center;
  color: #fff;
}

.auth-header h1 { font-size: 1.4rem; font-weight: 700; }
.auth-header p  { opacity: .75; font-size: .9rem; margin-top: 4px; }
.auth-header .auth-logo { max-height: 56px; margin-bottom: 12px; object-fit: contain; }

.auth-body { padding: 28px 32px; }

/* ================================================
   FORMS
   ================================================ */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--cor-primaria);
  box-shadow: 0 0 0 3px rgba(30,64,175,.15);
}

/* ================================================
   BOTÕES
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  transition: background .15s, opacity .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }

.btn-primary   { background: var(--cor-primaria); color: #fff; }
.btn-primary:hover:not(:disabled) { filter: brightness(.85); }

.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border); }

.btn-block { width: 100%; }

/* ================================================
   ALERTAS
   ================================================ */
.alert {
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: .9rem;
  margin-bottom: 16px;
}
.alert-error   { background: #fee2e2; color: #b91c1c; border-left: 4px solid var(--danger); }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-info    { background: #dbeafe; color: #1e3a8a; border-left: 4px solid var(--cor-primaria); }

/* ================================================
   SIDEBAR LAYOUT
   ================================================ */
.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--cor-primaria);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: transform .25s ease;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  text-align: center;
}

.sidebar-logo {
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 4px;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.sidebar-subtitle {
  font-size: .78rem;
  opacity: .65;
  margin-top: 2px;
}

/* --- Nav Items --- */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
}

.nav-item.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-left-color: var(--cor-acento);
  font-weight: 600;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: .95rem;
}

/* --- Sidebar Footer --- */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .82rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.8);
  margin-bottom: 10px;
  line-height: 1.3;
}

.sidebar-user i { font-size: 1.2rem; }

.sidebar-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.6);
  font-size: .82rem;
  text-decoration: none;
  transition: color .15s;
}
.sidebar-logout:hover { color: #fff; text-decoration: none; }

/* --- Main Content Area --- */
.portal-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.portal-topbar {
  background: var(--card-bg);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.portal-topbar .topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.portal-content {
  flex: 1;
  padding: 28px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Sidebar Overlay (mobile) --- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 150;
}
.sidebar-overlay.active { display: block; }

/* ================================================
   CARDS
   ================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--r);
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  padding: 24px 28px;
}

.card h2 {
  font-size: 1.05rem;
  color: var(--cor-primaria);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================================================
   INFO GRID
   ================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 24px;
}

.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-item .label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.info-item .value { font-size: .95rem; color: var(--text); }
.info-item .value.highlight {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cor-primaria);
}

/* ================================================
   BANNERS
   ================================================ */
.banner-wrap { border-radius: var(--r); overflow: hidden; }

.evento-banner {
  width: 100%;
  display: block;
  border-radius: var(--r);
}

/* ================================================
   MANUAL
   ================================================ */
.manual-embed embed {
  display: block;
  min-height: 500px;
  border-radius: var(--r);
  border: 1px solid var(--border);
}

/* ================================================
   TABELAS (para módulos futuros)
   ================================================ */
.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
table.data-table th,
table.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data-table th {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}
table.data-table tr:hover td { background: #f9fafb; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .portal-main {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .portal-content {
    padding: 20px 16px;
  }

  .portal-topbar {
    padding: 0 16px;
  }

  .auth-body, .auth-header { padding: 20px; }
  .card { padding: 16px 18px; }
}

@media (max-width: 480px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}
