/* =================================
   LAYOUT.CSS — App shell, sidebar, topbar
   DeloneTech Design System v2
   ================================= */

/* =================================
   App shell
   ================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
}

[data-theme="light"] .app-sidebar { background: linear-gradient(180deg, var(--bg-primary) 0%, #e8e6e0 100%); }
[data-theme="light"] .auth-split-left { background: linear-gradient(160deg, #f0ebe2 0%, #e8e3d8 60%, #e2dcd0 100%); }
[data-theme="light"] .auth-split-left::before { background: radial-gradient(ellipse at center, rgba(196,109,40,0.1) 0%, transparent 65%); }
[data-theme="light"] .auth-split-left::after  { background: radial-gradient(ellipse at center, rgba(196,109,40,0.05) 0%, transparent 65%); }

.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--bg-primary) 0%, #0c0c16 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform var(--transition);
  will-change: transform;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  background: var(--bg-primary);
}

/* =================================
   Topbar
   ================================= */
.app-topbar {
  height: var(--nav-height);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 0.75rem;
  will-change: transform;
  transform: translateZ(0);
}

.app-content {
  flex: 1;
  padding: 2rem 2.25rem 3rem;
}

/* =================================
   Topbar search button
   ================================= */
.topbar-search-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  flex-shrink: 0;
}
.topbar-search-btn:hover {
  border-color: var(--border-bright);
  color: var(--text-secondary);
  background: var(--bg-card);
}
.topbar-search-btn i { width: 13px; height: 13px; }
.topbar-search-btn kbd {
  font-size: 0.62rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 0.08rem 0.38rem;
  font-family: monospace;
  color: var(--text-tertiary);
  margin-left: 0.25rem;
}
.topbar-search-hint { min-width: 120px; }

@media (max-width: 768px) {
  .topbar-search-hint { display: none; }
  .topbar-search-btn kbd { display: none; }
}

/* =================================
   Sidebar brand
   ================================= */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none !important;
  transition: none;
}

.sidebar-brand-icon-img {
  height: 22px;
  width: auto;
  flex-shrink: 0;
}

[data-theme="light"] .sidebar-brand-icon-img { filter: invert(1); }

.sidebar-brand-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* =================================
   Sidebar org switcher
   ================================= */
.sidebar-org {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.sidebar-org-current {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.625rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
}

.sidebar-org-current:hover { background: var(--bg-elevated); }

.sidebar-org-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--accent-glow-sm);
}

.sidebar-org-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-org-chevron {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: var(--text-tertiary);
  transition: transform var(--transition);
}

.sidebar-org-current.expanded .sidebar-org-chevron { transform: rotate(180deg); }

.sidebar-org-list {
  padding: 0.25rem 0.625rem 0.375rem;
  display: none;
}

.sidebar-org-list.open { display: block; }

.sidebar-org-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.sidebar-org-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.sidebar-org-item.active { color: var(--text-primary); font-weight: 600; }

.sidebar-org-item-avatar {
  width: 19px;
  height: 19px;
  border-radius: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sidebar-org-item.active .sidebar-org-item-avatar {
  background: var(--accent-muted);
  border-color: rgba(212,118,44,0.3);
  color: var(--accent);
}

/* =================================
   Sidebar nav
   ================================= */
.sidebar-nav {
  flex: 1;
  padding: 0.875rem 0;
}

.sidebar-section-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: 0.85rem 1.25rem 0.3rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-section-label:first-child {
  border-top: none;
  margin-top: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.45rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.845rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  text-decoration: none !important;
  position: relative;
}

.sidebar-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: stroke var(--transition);
}

.sidebar-item:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.sidebar-item.active {
  color: var(--text-primary);
  background: var(--accent-muted);
  font-weight: 600;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-item.active svg { stroke: var(--accent); }

/* Module groups */
.sidebar-module-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.45rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.845rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  text-decoration: none !important;
  position: relative;
}

.sidebar-module-header svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.sidebar-module-header:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.sidebar-module-children {
  padding-left: 2.625rem;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.25s ease-out;
}
.sidebar-module.expanded .sidebar-module-children {
  grid-template-rows: 1fr;
}
.sidebar-module-children > .sidebar-module-children-inner {
  min-height: 0;
  overflow: hidden;
}

/* Chevron rotation: collapsed → right, expanded → down */
.sidebar-chevron {
  transition: transform 0.25s ease;
  transform: rotate(-90deg);
}
.sidebar-module.expanded .sidebar-chevron {
  transform: rotate(0deg);
}

.sidebar-module-child {
  display: flex;
  align-items: center;
  padding: 0.35rem 1.25rem 0.35rem 0;
  color: var(--text-primary);
  font-size: 0.8rem;
  transition: color var(--transition);
  text-decoration: none !important;
  position: relative;
}

.sidebar-module-child:hover { color: var(--accent); }
.sidebar-module-child.active { color: var(--accent); font-weight: 600; }

/* Locked module items */
.sidebar-item-locked {
  opacity: 0.45;
  cursor: pointer;
}

.sidebar-item-locked:hover {
  opacity: 0.7;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.sidebar-lock-icon {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0;
  stroke: var(--text-tertiary);
  margin-left: auto;
}

.sidebar-item-locked:hover .sidebar-lock-icon {
  stroke: var(--accent);
}

/* Active module header (when a child is active) */
.sidebar-module-header.active {
  color: var(--text-primary);
  background: var(--accent-muted);
  font-weight: 600;
}
.sidebar-module-header.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.sidebar-module-header.active svg:first-child { stroke: var(--accent); }

/* Sidebar search trigger */
.sidebar-search-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.sidebar-search-trigger:hover {
  border-color: var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
}
.sidebar-search-trigger span { flex: 1; text-align: left; }
.sidebar-search-trigger kbd {
  font-size: 0.62rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  font-family: monospace;
  color: var(--text-tertiary);
}

/* Sidebar recent items */
.sidebar-recent-item {
  font-size: 0.8rem !important;
  padding: 0.3rem 1.25rem !important;
  color: var(--text-tertiary) !important;
  gap: 0.5rem;
}
.sidebar-recent-item:hover { color: var(--text-primary) !important; }
.sidebar-recent-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.admin-nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.5rem 1rem;
}

/* =================================
   Sidebar footer
   ================================= */
.sidebar-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-role {
  font-size: 0.67rem;
  color: var(--text-tertiary);
}

/* =================================
   Topbar elements
   ================================= */
.topbar-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
}

.topbar-icon-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-bright);
  text-decoration: none;
}

.topbar-icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 99px;
  padding: 0 3px;
  font-size: 0.58rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

.topbar-demo-tag {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid rgba(212,118,44,0.3);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =================================
   Theme toggle
   ================================= */
.theme-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

.theme-toggle button {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all var(--transition);
}

.theme-toggle button:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.theme-toggle button.active {
  color: var(--accent);
  background: var(--accent-muted);
}

.theme-toggle button svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

/* =================================
   Dropdown
   ================================= */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: all 0.15s ease;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  color: var(--text-secondary);
  font-size: 0.845rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}

.dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.dropdown-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-tertiary);
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.2rem 0;
}

.dropdown-header {
  padding: 0.5rem 0.875rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

/* =================================
   Page header
   ================================= */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.page-header-left { min-width: 0; }

.page-header-left h1,
.page-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 0.3rem 0;
}

.page-header-left p,
.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.page-subtitle .badge { vertical-align: middle; }

/* Settings / org config: fila 1 = 3 cols (Datos, Stripe, Suscripción), fila 2 = Personalización + Módulos, fila 3 = Zona peligro */
.settings-page-width {
  max-width: 1400px;
  width: 100%;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.settings-card-wide {
  grid-column: span 2;
}

.settings-card-full {
  grid-column: 1 / -1;
}

.settings-sla-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
}

.settings-sla-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-sla-label {
  min-width: 3.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 991px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-card-wide {
    grid-column: 1;
  }
}

/* =================================
   Auth layout — split
   ================================= */
.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

/* Left decorative panel */
.auth-split-left {
  background: linear-gradient(160deg, #181825 0%, #0f0f19 60%, #0a0a14 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.auth-split-left::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(212,118,44,0.14) 0%, transparent 65%);
  pointer-events: none;
}

.auth-split-left::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(212,118,44,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.auth-split-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.auth-split-logo {
  height: 28px;
  width: auto;
}

[data-theme="light"] .auth-split-logo { filter: invert(1); }

.auth-split-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-split-content {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
}

.auth-split-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(212,118,44,0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.auth-split-headline {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.auth-split-headline span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-split-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.auth-split-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.auth-split-features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-split-feat-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-muted-mid);
  border: 1px solid rgba(212,118,44,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-split-feat-dot svg {
  width: 9px;
  height: 9px;
  stroke: var(--accent);
}

.auth-split-footer {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Right form panel */
.auth-split-right {
  background: var(--bg-body);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  min-width: 0;
  min-height: 100vh;
}

.auth-form-wrap {
  width: 100%;
  max-width: 380px;
  min-height: 200px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  letter-spacing: -0.03em;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Legacy centered auth (error pages etc.) */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-layout::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(212,118,44,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* Onboarding banner */
.onboarding-banner {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.375rem;
  background: linear-gradient(135deg, rgba(212,118,44,0.18) 0%, rgba(232,133,53,0.1) 100%);
  border: 1px solid rgba(212,118,44,0.3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.875rem;
  position: relative;
  overflow: hidden;
}

.onboarding-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 160px;
  height: 160px;
  background: radial-gradient(ellipse, rgba(212,118,44,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.onboarding-banner-text strong {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}

.onboarding-banner-text p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

.onboarding-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.onboarding-banner-btn {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(212,118,44,0.35);
  background: rgba(212,118,44,0.12);
  color: var(--accent);
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font);
}

.onboarding-banner-btn:hover {
  background: rgba(212,118,44,0.22);
  color: var(--accent-hover);
  text-decoration: none;
}

.onboarding-banner-btn-dismiss {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font);
}

.onboarding-banner-btn-dismiss:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
}

/* Onboarding checklist */
.onboarding-checklist {
  margin: 0 0 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}
.onboarding-checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.onboarding-checklist-header strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}
.onboarding-checklist-counter {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-left: 0.5rem;
  font-weight: 500;
}
.onboarding-dismiss-btn {
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.onboarding-dismiss-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}
.onboarding-checklist-progress {
  height: 3px;
  background: var(--bg-elevated);
}
.onboarding-checklist-progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.onboarding-checklist-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}
.onboarding-step:last-child { border-bottom: none; }
.onboarding-step:hover { background: var(--bg-elevated); }
.onboarding-step.done { opacity: 0.7; }
.onboarding-step-check { flex-shrink: 0; display: flex; }
.onboarding-step-content { flex: 1; min-width: 0; }
.onboarding-step-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}
.onboarding-step-title.done {
  text-decoration: line-through;
  color: var(--text-tertiary);
}
.onboarding-step-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-split-left { display: none; }
  .auth-split-right { padding: 2.5rem 1.5rem; min-height: 100vh; }
}

/* =================================
   Responsive
   ================================= */
/* ── Trial banner ─────────────────────────── */
.trial-banner {
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
    padding: .625rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.trial-banner-content {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0;
    color: #fff;
    font-size: .875rem;
}
.trial-banner .btn-sm {
    padding: .25rem .75rem;
    font-size: .8rem;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    border-radius: var(--radius-md);
}
.trial-banner .btn-sm:hover { background: rgba(255,255,255,.3); }
.trial-banner--urgent { background: linear-gradient(90deg, #dc2626, #ea580c); }

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .app-main { margin-left: 0; }
  .app-content { padding: 1.5rem 1.25rem 2rem; padding-bottom: 4.5rem; }
  .page-header-left h1,
  .page-title { font-size: 1.35rem; }
  .page-header { margin-bottom: 1.5rem; }
}

/* ── Mobile bottom navigation ─────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    z-index: 1000;
    padding: .5rem 0;
    padding-bottom: env(safe-area-inset-bottom, .5rem);
    justify-content: space-around;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .125rem;
    padding: .25rem .75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .7rem;
    transition: color .2s;
}
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--accent); }

@media (max-width: 768px) {
    .mobile-bottom-nav { display: flex; }
}

/* =================================
   Print styles
   ================================= */
@media print {
  .sidebar, .app-sidebar, .topbar, .app-topbar, .mobile-nav, .mobile-menu-btn,
  .skip-link, .fab, .toast-container { display: none !important; }
  .app-main, .app-content { margin: 0 !important; padding: 1rem !important; width: 100% !important; }
  .app-layout { display: block !important; }
  .page-header .btn, .page-header-right { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
}
