/* ============================================================
   layout.css — Layout principal
   Responsabilidad: topbar, tabs, content area y estructura
   general de la aplicación.
   ============================================================ */

.main-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ------------------------------------------------------------
   TOPBAR
   ------------------------------------------------------------ */
.topbar {
  background: rgba(8, 12, 18, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 200;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 180, 255, 0.25);
  flex-shrink: 0;
}

.topbar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: 0.3px;
}

.topbar-sep {
  color: var(--hint);
  margin: 0 4px;
  font-size: 16px;
}

.topbar-module {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* User chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px 5px 6px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Logout button */
.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.logout-btn:hover {
  background: var(--redbg);
  color: var(--red);
  border-color: rgba(255, 68, 85, 0.3);
}

/* ------------------------------------------------------------
   TABS
   ------------------------------------------------------------ */
.tabs {
  background: rgba(8, 12, 18, 0.8);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 2px;
  padding: 0 1.5rem;
  backdrop-filter: blur(10px);
  overflow-x: auto;
}

.tab {
  padding: 0 18px;
  height: var(--tabs-h);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  transition: all 0.15s;
  position: relative;
  white-space: nowrap;
}

.tab i { font-size: 15px; }

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-count {
  background: var(--accentbg);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------
   CONTENT AREA
   ------------------------------------------------------------ */
.content {
  flex: 1;
  padding: 1.8rem 1.5rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  animation: fadeUp 0.3s ease;
}

.content-wide {
  max-width: 1100px;
}

/* Section heading */
.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: 0.3px;
}

.section-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}
