/* ============================================================
   LIBRO DE OBRA — Architectural SaaS & Engineering Design System v4
   60% Alabaster Slate (#F4F6FB / #FFFFFF)
   30% Obsidian Structural Slate (#0B1120 / #0F172A / #1E293B)
   10% Architectural Cobalt (#2563EB) & Terracotta Amber (#F59E0B / #D97706)
   ============================================================ */

:root {
  --obra-canvas:        #f1f5f9;
  --obra-surface:       #ffffff;
  --obra-border:        #e2e8f0;
  --obra-border-subtle: #f1f5f9;

  --obra-slate-950:     #070b14;
  --obra-slate-900:     #0f172a;
  --obra-slate-800:     #1e293b;
  --obra-slate-600:     #475569;
  --obra-slate-400:     #94a3b8;

  --obra-cobalt:        #2563eb;
  --obra-cobalt-light:  #eff6ff;
  --obra-amber:         #d97706;
  --obra-amber-bright:  #f59e0b;
  --obra-amber-soft:    #fef3c7;

  --obra-success:       #16a34a;
  --obra-warning:       #d97706;
  --obra-danger:        #dc2626;
  --obra-info:          #0284c7;

  --font-display:       'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans:          'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:          'JetBrains Mono', monospace;

  --radius-sm:          6px;
  --radius-md:          10px;
  --radius-lg:          14px;
  --radius-xl:          18px;
}

/* ── Global Typography & Surface Reset ────────────────────── */
body,
.wrapper,
.content-wrapper {
  font-family: var(--font-sans) !important;
  color: var(--obra-slate-900);
  background-color: var(--obra-canvas) !important;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, .brand-text, .page-title {
  font-family: var(--font-display) !important;
  letter-spacing: -0.025em;
  color: var(--obra-slate-900);
}

code, pre, .font-mono, .kpi-value, .tabular-nums {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}

/* ── Top Navigation Bar (3-Zone Friendly Architecture) ────── */
.navbar-obra {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--obra-border) !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04) !important;
  padding: 0.45rem 1rem !important;
  min-height: 60px;
  z-index: 1035;
}

/* Hamburger Toggle Button */
.navbar-obra .hamburger-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: var(--obra-slate-900) !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.42rem 0.75rem !important;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.navbar-obra .hamburger-btn:hover {
  background: var(--obra-slate-900) !important;
  border-color: var(--obra-slate-900) !important;
  color: #ffffff !important;
}

.navbar-obra .hamburger-label {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Top Brand Link */
.top-brand-link {
  text-decoration: none !important;
  gap: 8px;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
}

.top-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--obra-amber-bright), var(--obra-amber));
  color: var(--obra-slate-950);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.28);
}

.top-brand-text {
  font-family: var(--font-display) !important;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--obra-slate-900);
  letter-spacing: -0.02em;
}

/* Center Friendly Top Menu */
.top-menu-center {
  background: #f8fafc;
  border: 1px solid var(--obra-border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.navbar-obra .top-menu-link {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  color: var(--obra-slate-600) !important;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem !important;
  border-radius: 7px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.navbar-obra .top-menu-link i {
  font-size: 0.82rem;
  opacity: 0.85;
}

.navbar-obra .top-menu-link:hover {
  color: var(--obra-slate-900) !important;
  background-color: #ffffff;
}

.navbar-obra .top-menu-link.active-top {
  color: var(--obra-slate-900) !important;
  background-color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.navbar-obra .top-menu-link.active-top i {
  color: var(--obra-amber) !important;
  opacity: 1;
}

.user-pill-trigger {
  background: #f8fafc;
  border: 1px solid var(--obra-border);
  border-radius: 9px !important;
  padding: 0.28rem 0.65rem !important;
}

.user-pill-trigger:hover {
  background: #f1f5f9 !important;
}

/* ── Sidebar (Obsidian Structural Slate — Zero Scroll & Full Hide/Show) ── */
.main-sidebar,
.sidebar-obra {
  width: 260px !important;
  max-width: 260px !important;
  height: 100vh !important;
  position: fixed !important;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(180deg, #070b14 0%, #0f172a 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(7, 11, 20, 0.25) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 1045 !important;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.24s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Completely eliminate any horizontal or vertical scrollbars inside sidebar */
.main-sidebar *,
.sidebar-obra,
.sidebar-obra .sidebar,
.sidebar-obra .nav-sidebar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.main-sidebar::-webkit-scrollbar,
.sidebar-obra::-webkit-scrollbar,
.sidebar-obra .sidebar::-webkit-scrollbar,
.sidebar-obra .nav-sidebar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.sidebar-obra .brand-link {
  background-color: rgba(7, 11, 20, 0.65) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 0.75rem 1rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0;
  float: none !important;
}

.sidebar-obra .brand-link .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--obra-amber-bright), var(--obra-amber));
  color: var(--obra-slate-950);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.sidebar-obra .brand-text {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: 1rem;
  color: #ffffff !important;
  letter-spacing: -0.02em;
}

.sidebar-obra .brand-subtext {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

.btn-sidebar-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-obra .sidebar.sidebar-no-scroll {
  flex: 1 1 auto !important;
  height: calc(100vh - 58px) !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.55rem 0.65rem !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

/* Compact User Card inside Sidebar */
.user-panel-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  flex-shrink: 0;
}

.user-panel-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.user-panel-name {
  color: #f8fafc !important;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none !important;
}

.user-panel-role {
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 600;
}

/* Friendly Descriptive Sidebar Accordion Links (Zero Horizontal/Vertical Scroll) */
.sidebar-nav-container {
  flex: 1 1 auto;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  width: 100% !important;
}

.obra-sidebar-list {
  list-style: none !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.obra-nav-item {
  width: 100% !important;
  margin: 0 0 3px 0 !important;
}

.obra-nav-link {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 8px !important;
  border: none;
  background: transparent;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  text-align: left;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box !important;
  transition: all 0.15s ease;
}

.obra-nav-link:focus {
  outline: none;
}

.obra-nav-icon {
  width: 22px;
  text-align: center;
  font-size: 0.92rem !important;
  margin: 0 !important;
  color: #94a3b8;
  flex-shrink: 0;
}

.sidebar-obra .nav-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.18;
}

.sidebar-obra .nav-title {
  font-size: 0.81rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-obra .nav-desc {
  font-size: 0.66rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obra-submenu-arrow {
  font-size: 0.7rem;
  color: #64748b;
  transition: transform 0.22s ease, color 0.15s ease;
  flex-shrink: 0;
}

.obra-nav-group.open > .obra-nav-link .obra-submenu-arrow {
  transform: rotate(180deg);
  color: var(--obra-amber-bright);
}

.obra-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
}

.obra-nav-link:hover .nav-desc {
  color: #94a3b8;
}

.obra-nav-link.active,
.obra-nav-group.open > .obra-nav-link {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.04) 100%) !important;
  color: #ffffff !important;
  border-left: 3px solid var(--obra-amber-bright);
}

.obra-nav-link.active .obra-nav-icon,
.obra-nav-group.open > .obra-nav-link .obra-nav-icon {
  color: var(--obra-amber-bright) !important;
}

.obra-nav-link.active .nav-title,
.obra-nav-group.open > .obra-nav-link .nav-title {
  color: #ffffff;
  font-weight: 700;
}

.obra-nav-link.active .nav-desc,
.obra-nav-group.open > .obra-nav-link .nav-desc {
  color: #cbd5e1;
}

/* Collapsible Submenu (Drops Down Smoothly on Click) */
.obra-submenu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 0 0 18px !important;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, padding 0.2s ease;
}

.obra-nav-group.open > .obra-submenu {
  max-height: 180px;
  opacity: 1;
  padding: 4px 0 4px 18px !important;
}

.obra-submenu li {
  margin: 2px 0;
}

.obra-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.36rem 0.65rem;
  border-radius: 6px;
  color: #94a3b8 !important;
  font-size: 0.77rem;
  font-weight: 500;
  text-decoration: none !important;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.obra-sublink i {
  font-size: 0.74rem;
  width: 16px;
  text-align: center;
}

.obra-sublink:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #94a3b8;
}

.obra-sublink.active {
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.12);
  border-left-color: var(--obra-amber-bright);
  font-weight: 600;
}

.sidebar-obra .nav-header {
  color: #64748b !important;
  font-size: 0.63rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.5rem 0.18rem !important;
  margin: 0 !important;
  text-transform: uppercase;
}

/* Sidebar Pinned Footer Actions */
.sidebar-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.5rem;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.sidebar-footer-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
}

.sidebar-footer-logout {
  color: #fca5a5 !important;
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.25);
}

.sidebar-footer-logout:hover {
  background: rgba(220, 38, 38, 0.25);
  color: #ffffff !important;
}

/* ── Hamburger Off-Canvas Hide / Show Mechanics ───────────── */
.obra-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 11, 20, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1040;
}

@media (min-width: 768px) {
  body:not(.obra-sidebar-collapsed):not(.sidebar-collapse) .content-wrapper,
  body:not(.obra-sidebar-collapsed):not(.sidebar-collapse) .main-header,
  body:not(.obra-sidebar-collapsed):not(.sidebar-collapse) .main-footer {
    margin-left: 260px !important;
    transition: margin-left 0.24s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  /* When collapsed via Hamburger, completely hide sidebar off-canvas (no broken mini strip or scroll!) */
  body.obra-sidebar-collapsed .main-sidebar,
  body.obra-sidebar-collapsed .sidebar-obra,
  body.sidebar-collapse .main-sidebar,
  body.sidebar-collapse .sidebar-obra {
    margin-left: -260px !important;
    transform: translateX(-260px) !important;
    width: 260px !important;
  }

  body.obra-sidebar-collapsed .content-wrapper,
  body.obra-sidebar-collapsed .main-header,
  body.obra-sidebar-collapsed .main-footer,
  body.sidebar-collapse .content-wrapper,
  body.sidebar-collapse .main-header,
  body.sidebar-collapse .main-footer {
    margin-left: 0 !important;
    transition: margin-left 0.24s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
}

@media (max-width: 767.98px) {
  .content-wrapper,
  .main-header,
  .main-footer {
    margin-left: 0 !important;
  }

  body:not(.obra-sidebar-open):not(.sidebar-open) .main-sidebar,
  body:not(.obra-sidebar-open):not(.sidebar-open) .sidebar-obra {
    margin-left: -260px !important;
    transform: translateX(-260px) !important;
  }

  body.obra-sidebar-open .main-sidebar,
  body.obra-sidebar-open .sidebar-obra,
  body.sidebar-open .main-sidebar,
  body.sidebar-open .sidebar-obra {
    margin-left: 0 !important;
    transform: translateX(0) !important;
  }

  body.obra-sidebar-open .obra-sidebar-backdrop,
  body.sidebar-open .obra-sidebar-backdrop {
    display: block;
  }
}

/* ── Executive Dashboard Hero Banner ──────────────────────── */
.exec-hero-banner {
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--obra-amber-bright);
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.exec-hero-title {
  font-family: var(--font-display) !important;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}

.exec-hero-subtitle {
  color: #94a3b8;
  font-size: 0.86rem;
  margin: 0;
}

.exec-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-family: var(--font-mono) !important;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ── Content Header & Breadcrumbs ─────────────────────────── */
.content-header {
  padding: 1.25rem 0.5rem 0.65rem !important;
}

.content-header h1 {
  font-family: var(--font-display) !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: var(--obra-slate-900);
  letter-spacing: -0.025em;
}

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.breadcrumb-item a {
  color: var(--obra-slate-600);
  font-weight: 500;
}

/* ── Unified Architectural KPI Strip ──────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 1.5rem;
}

@media (max-width: 991.98px) {
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .kpi-strip {
    grid-template-columns: 1fr;
  }
}

.kpi-cell {
  background: var(--obra-surface);
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--obra-border);
  border-top: 3px solid var(--obra-slate-900);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-cell:nth-child(1) { border-top-color: var(--obra-amber-bright); }
.kpi-cell:nth-child(2) { border-top-color: var(--obra-cobalt); }
.kpi-cell:nth-child(3) { border-top-color: var(--obra-success); }
.kpi-cell:nth-child(4) { border-top-color: var(--obra-slate-900); }

.kpi-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -6px rgba(15, 23, 42, 0.1);
}

.kpi-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.kpi-cell-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--obra-slate-600);
}

.kpi-cell-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--obra-border);
  color: var(--obra-slate-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.kpi-cell-value {
  font-family: var(--font-mono) !important;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--obra-slate-900);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.45rem;
}

.kpi-cell-footer {
  font-size: 0.78rem;
  color: var(--obra-slate-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-delta {
  font-family: var(--font-mono) !important;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
}

.kpi-delta.positive {
  background: #dcfce7;
  color: #15803d;
}

.kpi-delta.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.kpi-delta.neutral {
  background: #f1f5f9;
  color: #334155;
}

/* ── Cards & Structural Containers ────────────────────────── */
.card,
.card-obra {
  background: var(--obra-surface);
  border: 1px solid var(--obra-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
  margin-bottom: 1.5rem;
}

.card-obra > .card-header,
.card > .card-header {
  background-color: var(--obra-surface) !important;
  border-bottom: 1px solid var(--obra-border) !important;
  padding: 0.95rem 1.25rem;
}

.card-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 0.98rem !important;
  color: var(--obra-slate-900);
  margin-bottom: 0;
}

.card-proyecto {
  border: 1px solid var(--obra-border) !important;
  border-radius: var(--radius-md) !important;
  background: var(--obra-surface);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card-proyecto:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.1) !important;
  border-color: #cbd5e1 !important;
}

.border-left-success { border-left: 4px solid var(--obra-success) !important; }
.border-left-warning { border-left: 4px solid var(--obra-amber-bright) !important; }
.border-left-secondary { border-left: 4px solid var(--obra-slate-400) !important; }
.border-left-primary, .border-left-info { border-left: 4px solid var(--obra-cobalt) !important; }

/* ── Zero-Pill Discipline: Status Dots & Monospace Meta ───── */
.status-dot-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--obra-slate-800);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.dot-success { background-color: var(--obra-success); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16); }
.status-dot.dot-warning { background-color: var(--obra-amber-bright); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.status-dot.dot-danger  { background-color: var(--obra-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16); }
.status-dot.dot-info    { background-color: var(--obra-cobalt); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.status-dot.dot-muted   { background-color: var(--obra-slate-400); }

.meta-code {
  font-family: var(--font-mono) !important;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--obra-slate-600);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 4px;
}

.meta-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--obra-slate-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Segmented Filter Bar ─────────────────────────────────── */
.segmented-bar {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.segmented-bar .seg-btn {
  border: none;
  background: transparent;
  color: var(--obra-slate-600);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.36rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented-bar .seg-btn:hover {
  color: var(--obra-slate-900);
}

.segmented-bar .seg-btn.active {
  background: var(--obra-surface);
  color: var(--obra-slate-900);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* ── Buttons (10% Accent Budget) ──────────────────────────── */
.btn-obra {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #0f172a;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  padding: 0.48rem 1rem;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.btn-obra:hover,
.btn-obra:focus {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #b45309;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
}

.btn-obra-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid #d97706;
  color: #090d16 !important;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-obra-amber:hover {
  background: #d97706;
  color: #ffffff !important;
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 5px;
}

/* ── Tables (High-Contrast Scannable Engineering Grid) ────── */
.table thead.thead-dark th {
  background-color: #f8fafc !important;
  color: var(--obra-slate-600) !important;
  border-bottom: 2px solid var(--obra-border) !important;
  border-top: none !important;
  font-family: var(--font-sans) !important;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
}

.table td {
  vertical-align: middle !important;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--obra-border-subtle);
  font-size: 0.875rem;
  color: var(--obra-slate-800);
}

.table-hover tbody tr:hover {
  background-color: #f8fafc !important;
}

/* ── Progress Bars ────────────────────────────────────────── */
.progress {
  background-color: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-sm { height: 6px !important; }
.progress-xs { height: 4px !important; }

.progress-bar {
  border-radius: 999px;
}

/* ── Avatars ──────────────────────────────────────────────── */
.user-avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--obra-slate-900);
  color: var(--obra-amber-bright);
  font-family: var(--font-mono) !important;
  font-size: 0.78rem;
  font-weight: 700;
}

.user-avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--obra-amber-bright);
  font-family: var(--font-mono) !important;
  font-weight: 700;
  font-size: 0.85rem;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--obra-slate-900);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono) !important;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* ── Login Page (Architectural Split Command Portal) ──────── */
body.login-page,
.bg-obra-dark {
  background-color: var(--obra-slate-950) !important;
  background-image:
    radial-gradient(at 12% 15%, rgba(245, 158, 11, 0.16) 0px, transparent 45%),
    radial-gradient(at 88% 85%, rgba(37, 99, 235, 0.18) 0px, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-portal-shell {
  width: 100%;
  max-width: 940px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: #0f172a;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

@media (max-width: 767.98px) {
  .login-portal-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .login-portal-showcase {
    display: none !important;
  }
}

.login-portal-showcase {
  padding: 2.75rem 2.5rem;
  background:
    radial-gradient(at 0% 0%, rgba(245, 158, 11, 0.2) 0px, transparent 55%),
    linear-gradient(160deg, #090d16 0%, #0f172a 65%, #1e293b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f8fafc;
}

.login-portal-form-pane {
  background: #ffffff;
  padding: 2.75rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-box {
  width: 100%;
  max-width: 430px;
}

.login-logo a {
  color: #ffffff !important;
  font-family: var(--font-display) !important;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.login-brand-badge {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--obra-amber-bright), var(--obra-amber));
  color: var(--obra-slate-950);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.login-card,
.login-card-body {
  border-radius: var(--radius-lg) !important;
  background: #ffffff !important;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-control {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--obra-slate-900);
  height: calc(2.35rem + 2px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--obra-cobalt);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--obra-slate-800);
  margin-bottom: 0.35rem;
}

/* ── API Documentation & SDK Console ──────────────────────── */
.api-endpoint-row {
  border: 1px solid var(--obra-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--obra-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.api-method {
  font-family: var(--font-mono) !important;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  min-width: 58px;
  text-align: center;
  text-transform: uppercase;
  display: inline-block;
}

.api-method.get    { background: #dbeafe; color: #1d4ed8; }
.api-method.post   { background: #dcfce7; color: #15803d; }
.api-method.put    { background: #fef3c7; color: #b45309; }
.api-method.delete { background: #fee2e2; color: #b91c1c; }

.api-code-block {
  background: var(--obra-slate-950);
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono) !important;
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Footer ───────────────────────────────────────────────── */
.main-footer {
  background: var(--obra-surface) !important;
  border-top: 1px solid var(--obra-border) !important;
  color: var(--obra-slate-600) !important;
  font-size: 0.8rem;
  padding: 0.85rem 1.25rem;
}

/* ── Print Overrides ──────────────────────────────────────── */
@media print {
  .no-print, .main-sidebar, .main-header, .main-footer {
    display: none !important;
  }
  .content-wrapper {
    margin-left: 0 !important;
    background: #fff !important;
  }
}
