/* App shell — sidebar layout */

.app-shell {

  display: flex;

  min-height: 100vh;

  background: var(--bg);

}



.app-sidebar {

  width: 240px;

  flex-shrink: 0;

  background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);

  border-right: 1px solid var(--border);

  display: flex;

  flex-direction: column;

  padding: 20px 14px;

  position: sticky;

  top: 0;

  height: 100vh;

}



.sidebar-brand {

  display: flex;

  gap: 12px;

  align-items: center;

  padding: 8px 10px 20px;

  border-bottom: 1px solid var(--border);

  margin-bottom: 16px;

}



.brand-mark {

  width: 40px;

  height: 40px;

  border-radius: 10px;

  background: linear-gradient(135deg, #3b82f6, #8b5cf6);

  display: flex;

  align-items: center;

  justify-content: center;

  font-weight: 800;

  font-size: 0.85rem;

}



.sidebar-nav {

  display: flex;

  flex-direction: column;

  gap: 4px;

  flex: 1;

}



.sidebar-link {

  display: flex;

  align-items: center;

  gap: 10px;

  padding: 10px 12px;

  border-radius: 10px;

  color: var(--muted);

  text-decoration: none;

  font-weight: 500;

  transition: background 0.15s, color 0.15s;

}



.sidebar-link:hover {

  background: rgba(59, 130, 246, 0.1);

  color: var(--text);

}



.sidebar-link.active {

  background: rgba(59, 130, 246, 0.18);

  color: #93c5fd;

  border: 1px solid rgba(59, 130, 246, 0.35);

}



.nav-icon {

  width: 22px;

  text-align: center;

  opacity: 0.85;

}



.sidebar-foot {

  padding-top: 16px;

  border-top: 1px solid var(--border);

}



.plan-badge {

  margin: 8px 0;

  text-transform: uppercase;

  font-size: 0.7rem;

  letter-spacing: 0.05em;

}



.app-main {

  flex: 1;

  min-width: 0;

  display: flex;

  flex-direction: column;

}



.app-header {

  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  gap: 16px;

  padding: 24px 32px 0;

  flex-wrap: wrap;

}



.theme-bar,

.theme-select {

  min-width: 140px;

}



.page-title {

  margin: 0;

  font-size: 1.5rem;

  font-weight: 700;

}



.page-sub {

  margin: 4px 0 0;

}



.app-content {

  padding: 20px 32px 40px;

  max-width: 1200px;

}



@media (max-width: 900px) {

  .app-shell { flex-direction: column; }

  .app-sidebar {

    width: 100%;

    height: auto;

    position: relative;

    flex-direction: row;

    flex-wrap: wrap;

    align-items: center;

    gap: 8px;

  }

  .sidebar-nav { flex-direction: row; flex-wrap: wrap; flex: unset; }

  .sidebar-foot { border: none; padding: 0; display: flex; gap: 8px; align-items: center; }

  .app-content { padding: 16px; }

}



/* Cards & stats */

.hero-card {

  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08));

  border-color: rgba(59, 130, 246, 0.25);

}



.stats-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));

  gap: 12px;

}



.stat-box {

  background: rgba(17, 24, 39, 0.8);

  border: 1px solid var(--border);

  border-radius: 12px;

  padding: 16px;

  text-align: center;

}



.stat-box strong {

  display: block;

  font-size: 1.75rem;

  font-weight: 700;

  margin-bottom: 4px;

  background: linear-gradient(90deg, #60a5fa, #a78bfa);

  -webkit-background-clip: text;

  -webkit-text-fill-color: transparent;

  background-clip: text;

}



/* Automation wizard */

.wizard-steps {

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 8px;

  margin-bottom: 24px;

}



@media (max-width: 700px) {

  .wizard-steps { grid-template-columns: 1fr 1fr; }

}



.wizard-step {

  padding: 12px 14px;

  border-radius: 10px;

  border: 1px solid var(--border);

  background: #111827;

  font-size: 0.85rem;

}



.wizard-step.done {

  border-color: rgba(34, 197, 94, 0.4);

  background: rgba(34, 197, 94, 0.08);

}



.wizard-step.active {

  border-color: rgba(59, 130, 246, 0.5);

  background: rgba(59, 130, 246, 0.1);

}



.wizard-step strong {

  display: block;

  font-size: 0.75rem;

  color: var(--muted);

  margin-bottom: 2px;

}



.panel-section {

  margin-bottom: 20px;

}



.panel-section h3 {

  margin: 0 0 12px;

  font-size: 1rem;

  display: flex;

  align-items: center;

  gap: 8px;

}



.step-num {

  width: 24px;

  height: 24px;

  border-radius: 50%;

  background: var(--primary);

  color: #fff;

  font-size: 0.75rem;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  font-weight: 700;

}



.toolbar {

  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  align-items: center;

  margin-bottom: 12px;

}



.toolbar select {

  padding: 8px 12px;

  border-radius: 8px;

  border: 1px solid var(--border);

  background: #111827;

  color: var(--text);

  min-width: 160px;

}



.accounts-grid { display: grid; gap: 12px; }

.account-card {

  border: 1px solid var(--border);

  border-radius: 12px;

  padding: 16px;

  background: rgba(17, 24, 39, 0.6);

  transition: border-color 0.15s;

}

.account-card:hover { border-color: rgba(59, 130, 246, 0.35); }

.account-card header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }

.account-card.selectable { cursor: pointer; }

.account-card.selectable.selected {

  border-color: var(--primary);

  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);

}

.account-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.upload-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

.upload-form input[type=file] { flex: 1; min-width: 160px; margin-bottom: 0; }



.multi-accounts-grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));

  gap: 10px;

}

.account-card.compact { padding: 12px; }



.groups-table-wrap {

  max-height: 420px;

  overflow: auto;

  border: 1px solid var(--border);

  border-radius: 10px;

}



.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

.data-table th {

  position: sticky;

  top: 0;

  background: #1a2332;

  text-align: left;

  padding: 10px 12px;

  border-bottom: 1px solid var(--border);

  z-index: 1;

}

.data-table td {

  padding: 8px 12px;

  border-bottom: 1px solid rgba(45, 58, 79, 0.5);

  vertical-align: middle;

}

.data-table tr:hover td { background: rgba(59, 130, 246, 0.05); }

.data-table tr.row-selected td { background: rgba(59, 130, 246, 0.1); }



.check-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

.check-row input { width: auto; margin: 0; }



.hero-badges { display: flex; gap: 8px; margin-bottom: 12px; }

.big-actions { gap: 12px; }

.btn.large { padding: 14px 24px; font-size: 1rem; }



.log-pre {

  background: #0a0e14;

  border: 1px solid var(--border);

  border-radius: 8px;

  padding: 12px;

  max-height: 280px;

  overflow: auto;

  font-size: 0.82rem;

  white-space: pre-wrap;

  font-family: ui-monospace, monospace;

}



.search-output {

  margin-top: 12px;

  max-height: 200px;

  overflow: auto;

  font-size: 0.8rem;

  background: #0a0e14;

  border-radius: 8px;

  padding: 10px;

  white-space: pre-wrap;

}



.flow-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}
@media (max-width: 720px) { .flow-cards { grid-template-columns: 1fr; } }

.flow-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  background: var(--surface);
}
.flow-card.done { border-color: var(--ok); }
.flow-card.blocked { opacity: 0.85; }
.flow-card.ready { box-shadow: 0 0 0 2px var(--accent); }
.flow-num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.flow-card h3 { margin: 0 0 6px; font-size: 1rem; }

.empty-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
}
.warn-text { color: var(--warn, #eab308); }
.help-steps { line-height: 2; padding-left: 1.2rem; }
.muted-card { opacity: 0.95; }
.hero-lead { max-width: 52ch; line-height: 1.55; }
.promo-hero .hero-badges { display: flex; gap: 8px; margin-bottom: 8px; }
.panel-section h3 { margin-top: 0; }
.pool-info-banner {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.9rem;
  color: var(--muted);
}
.compact-stats { grid-template-columns: repeat(2, 1fr); max-width: 320px; }
.compact-stats.warn-state .stat-box { border-color: var(--warn, #eab308); }
.pool-status-card { border-left: 3px solid var(--accent); }


.onboarding-card .steps-list li.done { color: var(--ok); }



.mt { margin-top: 16px; }

.full { width: 100%; }



.landing-page { background: radial-gradient(ellipse at top, #1e3a5f 0%, var(--bg) 55%); }

.landing-grid {

  display: grid;

  grid-template-columns: 1.2fr 1fr;

  gap: 32px;

  max-width: 960px;

  width: 100%;

  align-items: center;

}

@media (max-width: 800px) { .landing-grid { grid-template-columns: 1fr; } }

.landing-hero h1 { font-size: 2rem; margin-bottom: 8px; }

.feature-list { color: var(--muted); line-height: 1.8; padding-left: 1.2rem; }

.row.between { justify-content: space-between; align-items: center; }

