:root {
  --primary: #005587;
  --on-primary: #ffffff;
  --primary-container: #c8e6ff;
  --on-primary-container: #001e30;
}

body {
  background: var(--surface);
  color: var(--on-surface);
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-right: 1px solid var(--outline-variant);
  background: var(--surface-container);
  z-index: 10;
}

.sidebar .title {
  font-size: 1.4rem;
  font-weight: 700;
  padding: 0.5rem 0 1rem;
}

.sidebar .info-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--outline-variant);
}

.sidebar .info-section .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--on-surface-variant);
  margin-bottom: 0.25rem;
}

.sidebar .info-section .value {
  font-size: 0.85rem;
  word-break: break-all;
}

.sidebar nav {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar .logout-section {
  padding-top: 0.5rem;
  border-top: 1px solid var(--outline-variant);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Main content */
.main-content {
  margin-left: 280px;
  padding: 2rem;
  min-height: 100vh;
}

/* Search input */
.search-box {
  max-width: 400px;
}

/* Bundle table */
.bundle-table {
  width: 100%;
}

.bundle-table th,
.bundle-table td {
  text-align: left;
  padding: 0.75rem 1rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0;
}

/* Flow state badges */
.state-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.state-badge.completed { background: #1b5e20; color: #c8e6c9; }
.state-badge.running   { background: #0d47a1; color: #bbdefb; }
.state-badge.scheduled { background: #e65100; color: #ffe0b2; }
.state-badge.pending   { background: #4a148c; color: #e1bee7; }
.state-badge.failed    { background: #b71c1c; color: #ffcdd2; }
.state-badge.cancelled { background: #424242; color: #e0e0e0; }
.state-badge.unknown   { background: #616161; color: #e0e0e0; }

/* Login stepper */
.login-container {
  max-width: 480px;
  margin: 10vh auto;
  padding: 2rem;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stepper .step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
}

.stepper .step.active {
  background: var(--primary);
  color: var(--on-primary);
}

.stepper .step.done {
  background: #1b5e20;
  color: #c8e6c9;
}

.stepper .line {
  width: 60px;
  height: 2px;
  background: var(--outline-variant);
}

/* Group menu */
.group-menu-wrapper {
  position: relative;
  max-width: 400px;
}

.group-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  z-index: 20;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.group-menu a {
  display: block;
  padding: 0.75rem 1rem;
  cursor: pointer;
  color: var(--on-surface);
  text-decoration: none;
}

.group-menu a:hover,
.group-menu a.active {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

/* Task list in flow detail */
.task-list {
  padding: 0.5rem 1rem;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--outline-variant);
}

.task-item:last-child {
  border-bottom: none;
}
