/* ══════════════════════════════════════════
   BASE.CSS
   ══════════════════════════════════════════ */

@font-face {
  font-family: 'TheSeasons';
  src: url('/static/TheSeasons-Reg.woff2') format('woff2'),
       url('/static/TheSeasons-Reg.ttf') format('truetype');
}

:root {
  --deep:    #0a1f3d;
  --ocean:   #0d2d54;
  --surface: #103568;
  --mid:     #1a4a7a;
  --teal:    #1a8a9a;
  --aqua:    #2ebfb0;
  --foam:    #7ce8dc;
  --white:   #e8f4f8;
  --muted:   #4a7a8a;

  --serif:   'TheSeasons', Georgia, serif;
  --sans:    'Poppins', sans-serif;

  --sidebar-collapsed: 52px;
  --sidebar-expanded:  210px;
  --header-h:          58px;
  --transition:        0.22s cubic-bezier(.4,0,.2,1);
}

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

html, body {
  height: 100%;
  font-family: var(--sans);
  background: var(--deep);
  color: var(--white);
  overflow: hidden;
}

.app { display: flex; flex-direction: column; height: 100vh; }
.body-row { display: flex; flex: 1; overflow: hidden; }

/* ── HEADER ── */
header {
  height: var(--header-h);
  background: var(--ocean);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
}

.header-left {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-right: 1px solid rgba(255,255,255,.08);
  min-width: var(--sidebar-collapsed);
  transition: min-width var(--transition);
  flex-shrink: 0;
}

body.sidebar-open .header-left {
  min-width: var(--sidebar-expanded);
}

.logo-img {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.sidebar-toggle {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,.5);
  transition: background var(--transition), color var(--transition);
  background: none; border: none;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.08); color: var(--white); }
.sidebar-toggle svg { width: 18px; height: 18px; }

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.header-title {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .14em;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 20px;
}

.relogio {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--white);
  letter-spacing: .1em;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 6px 16px;
  min-width: 96px;
  text-align: center;
}

.btn-logout {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  background: none;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition);
}
.btn-logout:hover { color: var(--white); border-color: rgba(255,255,255,.25); }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-collapsed);
  background: var(--ocean);
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--transition);
  overflow: hidden;
  z-index: 50;
}
.sidebar.expanded { width: var(--sidebar-expanded); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 11px;
  cursor: pointer;
  color: rgba(255,255,255,.4);
  border-radius: 8px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); }
.nav-item.active { background: rgba(46,191,176,.15); color: var(--aqua); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 7px; bottom: 7px;
  width: 3px;
  background: var(--aqua);
  border-radius: 0 2px 2px 0;
}

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-label { font-size: 13px; font-weight: 500; opacity: 0; transition: opacity var(--transition); }
.sidebar.expanded .nav-label { opacity: 1; }

/* ── MAIN ── */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.page-inner {
  flex: 1; overflow-y: auto; padding: 32px 40px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent;
}

.page-title {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--white);
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.section { margin-bottom: 36px; }
.section-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.35);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.log-vazio { font-size: 13px; color: rgba(255,255,255,.25); font-style: italic; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .header-center { display: none; }
  .page-inner { padding: 20px 16px; }
}