/* ============================================================
   Tempus — layout.css
   Login, sidebar, navegação, main content, sections, responsive
   ============================================================ */

/* ── Login ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}
.login-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 15%, rgba(20,184,166,.35), transparent 50%),
    radial-gradient(ellipse at 20% 85%, rgba(56,189,248,.18), transparent 55%);
  pointer-events: none;
}
.login-box {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-img {
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 0 18px var(--brand-glow));
}
.login-logo h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 4px;
}
.login-logo p { color: var(--text-muted); font-size: 13px; }

/* ── App layout ── */
.app-layout { display: flex; min-height: 100vh; overflow-x: hidden; }

/* ── Sidebar ── */
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--glass-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar-header {
  padding: 22px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  border-bottom: 1px solid var(--glass-border);
}
.sidebar-logo-img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px var(--brand-glow));
}
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--glass-border);
}

/* ── Grupos de navegação ── */
.nav-group       { margin-bottom: 4px; }
.nav-group-label {
  display: block;
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item:hover          { background: var(--glass-hover); color: var(--text); }
.nav-item.active         { background: var(--brand-soft); color: var(--brand-light); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(20,184,166,.2); }
.nav-item.active i       { color: var(--brand-light); }
.nav-item i              { width: 18px; text-align: center; font-size: 14px; }

/* ── Main content ── */
.main-content {
  margin-left: 224px;
  flex: 1;
  min-width: 0;
  padding: 28px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Sections ── */
.section { animation: fadeIn .2s ease; }
.section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 20px;
  color: var(--text);
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header .section-title { margin-bottom: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { width: 62px; }
  .sidebar-header span, .nav-item span, .sidebar-footer .btn span,
  .nav-group-label { display: none; }
  .sidebar-header { justify-content: center; padding: 18px 0; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .main-content { margin-left: 62px; padding: 16px; }
  .charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .fields-row { grid-template-columns: 1fr; }
}
