/* BriefCase Dashboard Styles */
@import url('variables.css');

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--neutral);
  color: var(--gray-700);
  line-height: 1.5;
  min-height: 100vh;
}

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

.app.topnav-layout {
  flex-direction: column;
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.topnav {
  height: 56px;
  background: #072742;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.topnav-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topnav-waffle {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.15s ease;
}

.topnav-waffle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.topnav-waffle svg {
  width: 20px;
  height: 20px;
}

.topnav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding-right: var(--space-4);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  margin-right: var(--space-2);
}

.topnav-logo-img {
  height: 28px;
  width: auto;
}

.topnav-main {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.topnav-link {
  padding: var(--space-2) var(--space-4);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.15s ease;
  position: relative;
}

.topnav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.topnav-link.active {
  color: var(--white);
}

.topnav-link.active::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--white);
  border-radius: 3px 3px 0 0;
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.topnav-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.15s ease;
}

.topnav-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.topnav-icon-btn svg {
  width: 20px;
  height: 20px;
}

.topnav-avatar {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--secondary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.topnav-avatar:hover {
  opacity: 0.9;
}

.topnav-avatar-initials {
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

/* Dropdowns */
.dropdown {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--gray-200);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
}

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

.waffle-dropdown {
  top: 52px;
  left: var(--space-5);
  width: 280px;
  padding: var(--space-3);
}

.avatar-dropdown {
  top: 52px;
  right: var(--space-5);
  width: 260px;
}

.dropdown-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.dropdown-app {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-700);
  transition: background 0.15s ease;
}

.dropdown-app:hover {
  background: var(--gray-50);
}

.dropdown-app.active {
  background: #eef5fc;
}

.dropdown-app.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dropdown-app.disabled:hover {
  background: none;
}

.dropdown-app-icon {
  width: 40px;
  height: 40px;
  background: #eef5fc;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  flex-shrink: 0;
}

.dropdown-app-icon svg {
  width: 20px;
  height: 20px;
}

.dropdown-app-info {
  min-width: 0;
}

.dropdown-app-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

.dropdown-app-status {
  font-size: 12px;
  color: var(--gray-400);
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: var(--space-2) 0;
}

.dropdown-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
}

.dropdown-user-avatar {
  width: 40px;
  height: 40px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.dropdown-user-info {
  min-width: 0;
}

.dropdown-user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-email {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-role {
  font-size: 11px;
  color: var(--gray-400);
  text-transform: capitalize;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--gray-600);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
}

/* Sub-navigation Pills */
.subnav-pills {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  background: var(--gray-100);
  padding: var(--space-1);
  border-radius: var(--radius);
  width: fit-content;
}

.subnav-pill {
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.subnav-pill:hover {
  color: var(--primary);
}

.subnav-pill.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Subviews */
.subview {
  display: none;
}

.subview.active {
  display: block;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.logo-section {
  padding: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-icon {
  height: 24px;
  width: auto;
}

.logo-wordmark {
  height: 14px;
  width: auto;
}

/* Legacy - for old dashboard pages still using PNG */
.logo-img {
  height: 28px;
  width: auto;
  border-radius: var(--radius);
  object-fit: contain;
}

.logo-text {
  display: none;
}

/* Navigation */
.nav {
  flex: 1;
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: var(--space-3) var(--space-3) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: var(--space-1);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.nav-item.active {
  background: var(--secondary);
  color: var(--white);
}

.nav-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-item.disabled:hover {
  background: none;
  color: rgba(255, 255, 255, 0.7);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* User Section */
.user-section {
  padding: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: capitalize;
}

.logout-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.logout-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.logout-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
}

/* Top nav layout overrides */
.topnav-layout .main {
  margin-left: 0;
  margin-top: 56px;
}

/* Header */
.header {
  background: var(--white);
  padding: var(--space-4) var(--space-8);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  width: 280px;
  transition: all 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--secondary);
  background: var(--white);
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--gray-400);
}

/* Content Area */
.content {
  flex: 1;
  padding: var(--space-6) var(--space-8);
}

/* ============================================
   VIEWS
   ============================================ */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.blue {
  background: #4a91d4;
  color: var(--white);
}

.stat-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.stat-icon.red {
  background: var(--error-light);
  color: var(--error);
}

.stat-icon.gray {
  background: #eef5fc;
  color: var(--secondary);
}

.stat-content {
  min-width: 0;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.card-title svg {
  width: 20px;
  height: 20px;
  color: var(--secondary);
}

/* ============================================
   TABLE STYLES
   ============================================ */
.table-header {
  display: grid;
  grid-template-columns: 1fr 100px 100px 100px 150px;
  padding: var(--space-3) var(--space-6);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
}

.date-row {
  padding: var(--space-3) var(--space-6);
  background: var(--gray-50);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.date-row svg {
  width: 16px;
  height: 16px;
  color: var(--gray-400);
}

.exec-row {
  display: grid;
  grid-template-columns: 1fr 100px 100px 100px 150px;
  padding: 14px var(--space-6);
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.exec-row:hover {
  background: var(--gray-50);
}

.case-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.case-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.case-icon svg {
  width: 16px;
  height: 16px;
}

.case-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.case-icon.failed {
  background: var(--error-light);
  color: var(--error);
}

.case-icon.running {
  background: var(--warning-light);
  color: var(--warning);
}

.case-icon.attention {
  background: var(--attention-light);
  color: var(--attention);
}

.case-details {
  min-width: 0;
}

.case-ref {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--primary);
  font-size: 13px;
}

.case-pipeline {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exec-time,
.exec-duration {
  font-size: 13px;
  color: var(--gray-600);
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.status.success {
  color: var(--success);
}

.status.failed {
  color: var(--error);
}

.status.running {
  color: var(--warning);
}

.status.attention {
  color: var(--attention);
}

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

.dot.success {
  background: var(--success);
}

.dot.failed {
  background: var(--error);
}

.dot.running {
  background: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.dot.attention {
  background: var(--attention);
}

.dot.pending {
  background: var(--gray-300);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-family: inherit;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:disabled:hover {
  border-color: var(--gray-200);
  color: var(--gray-600);
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn.primary {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.btn.primary:hover {
  background: #1f5a94;
  border-color: #1f5a94;
}

.btn.success {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.btn.success:hover {
  background: #0d9668;
  border-color: #0d9668;
}

.btn.warning {
  background: #f59e0b;
  border-color: #f59e0b;
  color: var(--white);
}

.btn.warning:hover {
  background: #d97706;
  border-color: #d97706;
}

.btn-lg {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-lg svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   BACK LINK
   ============================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gray-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-5);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--secondary);
}

.back-link svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   DETAIL HEADER
   ============================================ */
.detail-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: var(--shadow);
}

.detail-info {
  display: flex;
  gap: var(--space-5);
}

.detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-icon svg {
  width: 28px;
  height: 28px;
}

.detail-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.detail-icon.failed {
  background: var(--error-light);
  color: var(--error);
}

.detail-icon.running {
  background: var(--warning-light);
  color: var(--warning);
}

.detail-icon.attention {
  background: var(--attention-light);
  color: var(--attention);
}

.detail-text {
  min-width: 0;
}

.detail-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.detail-status {
  margin-bottom: var(--space-3);
}

.detail-meta {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
}

.meta-item svg {
  width: 16px;
  height: 16px;
}

.meta-item strong {
  color: var(--gray-700);
  font-weight: 500;
}

.detail-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow);
}

.timeline-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-100);
}

.step {
  display: flex;
}

.step-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: var(--space-5);
  width: 24px;
}

.step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--white);
  z-index: 1;
  flex-shrink: 0;
}

.step-dot.success {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
}

.step-dot.failed {
  background: var(--error);
  box-shadow: 0 0 0 2px var(--error);
}

.step-dot.running {
  background: var(--warning);
  box-shadow: 0 0 0 2px var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.step-dot.attention {
  background: var(--attention);
  box-shadow: 0 0 0 2px var(--attention);
}

.step-dot.pending {
  background: var(--gray-300);
  box-shadow: 0 0 0 2px var(--gray-300);
}

.connector {
  width: 2px;
  flex: 1;
  margin: var(--space-1) 0;
}

.connector.done {
  background: var(--success);
}

.connector.pending {
  background: var(--gray-200);
}

.step:last-child .connector {
  display: none;
}

.step-content {
  flex: 1;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  transition: border-color 0.15s ease;
}

.step-content:hover {
  border-color: var(--secondary);
}

.step-content.failed {
  background: var(--error-light);
  border-color: var(--error);
}

.step-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.step-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}

.step-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  flex: 1;
}

.step-btns {
  display: flex;
  gap: 6px;
}

.step-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.step-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.step-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.step-dur {
  font-size: 12px;
  color: var(--gray-500);
}

.step-desc {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: var(--space-2);
}

.step-time {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-time .dot {
  width: 6px;
  height: 6px;
}

.step-error {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--white);
  border-left: 3px solid var(--error);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--error);
}

/* ============================================
   CHARTS SECTION
   ============================================ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.chart-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.chart-container {
  position: relative;
  height: 200px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 300px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--error);
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error .toast-icon {
  color: var(--error);
}

.toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--gray-700);
}

.toast-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: var(--space-1);
}

.toast-close:hover {
  color: var(--gray-600);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  color: var(--gray-500);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: var(--space-3);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-8);
  color: var(--gray-500);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--gray-300);
  margin-bottom: var(--space-4);
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.empty-state p {
  font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  /* Top nav responsive */
  .topnav {
    padding: 0 var(--space-3);
  }

  .topnav-left {
    gap: var(--space-2);
  }

  .topnav-logo {
    padding-right: var(--space-2);
    margin-right: 0;
    border-right: none;
  }

  .topnav-logo-text {
    display: none;
  }

  .topnav-main {
    display: none;
  }

  .topnav-link.active::after {
    display: none;
  }

  .waffle-dropdown {
    left: var(--space-3);
    width: calc(100vw - 32px);
    max-width: 320px;
  }

  .avatar-dropdown {
    right: var(--space-3);
    width: calc(100vw - 32px);
    max-width: 280px;
  }

  /* Show subnav pills as main nav on mobile */
  .subnav-pills {
    width: 100%;
    justify-content: center;
  }

  .header {
    padding: var(--space-4);
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .content {
    padding: var(--space-4);
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .table-header {
    display: none;
  }

  .exec-row {
    grid-template-columns: 1fr auto;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .exec-time,
  .exec-duration {
    display: none;
  }

  .detail-header {
    flex-direction: column;
    gap: var(--space-4);
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ============================================
   LOGIN PAGE - New Figma Design
   ============================================ */
.login-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #E8F0F7;
  background-image: url('../assets/login-bg-pattern.svg');
  /* SVG viewBox is 1920x1280 - scale to cover viewport */
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.login-card {
  background: var(--white);
  padding: 48px 40px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  text-align: center;
  max-width: 420px;
  width: 100%;
  margin: var(--space-4);
}

.login-logo {
  margin-bottom: 24px;
}

.login-logo img {
  height: 48px;
  width: auto;
}

.login-heading {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input-wrapper {
  position: relative;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-700);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(47, 120, 190, 0.1);
}

.login-input::placeholder {
  color: var(--gray-400);
}

.login-input-wrapper.has-error .login-input {
  border-color: var(--error);
  color: var(--error);
}

.login-input-wrapper.has-error .login-input:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--error-light);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--error);
  text-align: left;
}

.login-error svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  background: var(--secondary);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.login-btn:hover {
  background: #1f5a94;
}

.login-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 32px 0;
}

.login-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.login-footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-footer-logo img {
  height: 24px;
  width: auto;
}

.login-footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.login-footer-links a {
  color: var(--gray-500);
  text-decoration: underline;
}

.login-footer-links a:hover {
  color: var(--secondary);
}

.login-footer-sep {
  color: var(--gray-300);
}

.login-footer-google {
  font-size: 12px;
  color: var(--gray-400);
}

.login-footer-google a {
  color: var(--gray-500);
  text-decoration: underline;
}

.login-footer-google a:hover {
  color: var(--secondary);
}

/* Login page responsive */
@media (max-width: 480px) {
  .login-bg {
    padding: var(--space-4);
    background-size: cover;
  }

  .login-card {
    padding: 32px 24px;
    margin: var(--space-2);
    border-radius: 12px;
  }

  .login-logo img {
    height: 40px;
  }

  .login-heading {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .login-input {
    padding: 12px 14px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .login-btn {
    padding: 12px 20px;
    font-size: 15px;
  }

  .login-divider {
    margin: 24px 0;
  }

  .login-footer-logo img {
    height: 20px;
  }

  .login-footer-links {
    font-size: 12px;
  }

  .login-footer-google {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .login-card {
    padding: 24px 16px;
  }

  .login-logo img {
    height: 36px;
  }
}

/* Legacy login styles - kept for backwards compat */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral);
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
}

.google-btn:hover {
  border-color: var(--gray-400);
  box-shadow: var(--shadow);
}

.google-btn svg {
  width: 20px;
  height: 20px;
}

/* Flash messages */
.flash {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: 14px;
}

.flash-error {
  background: var(--error-light);
  color: var(--error);
}

.flash-success {
  background: var(--success-light);
  color: var(--success);
}

/* ============================================
   HISTORY VIEW
   ============================================ */
.history-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-6);
}

.history-filters {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.filter-section {
  margin-bottom: var(--space-5);
}

.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-presets {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.date-preset-btn {
  padding: var(--space-1) var(--space-2);
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.date-preset-btn:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.date-preset-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.filter-select,
.filter-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-700);
  transition: border-color 0.15s ease;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--secondary);
}

.filter-input + .filter-input {
  margin-top: var(--space-2);
}

.history-main {
  min-width: 0;
}

.history-table-header {
  grid-template-columns: 40px 1fr 100px 100px 100px 150px;
}

.history-table-header .checkbox-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-group-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}

.date-group-header svg {
  width: 16px;
  height: 16px;
  color: var(--gray-400);
}

.checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--secondary);
}

.exec-row.history-row {
  grid-template-columns: 40px 1fr 100px 100px 100px 150px;
}

.exec-row .checkbox-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bulk Actions Bar */
.bulk-actions {
  background: var(--primary);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.bulk-count {
  font-size: 14px;
  font-weight: 500;
}

.bulk-actions .btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.bulk-actions .btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.bulk-actions .btn.primary {
  background: var(--accent);
  border-color: var(--accent);
}

.bulk-actions .btn.primary:hover {
  background: #0d9668;
  border-color: #0d9668;
}

.bulk-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.page-info {
  font-size: 14px;
  color: var(--gray-600);
}

/* ============================================
   SLIDE-IN DETAIL PANEL
   ============================================ */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.detail-panel.open {
  transform: translateX(0);
}

.panel-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.panel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.panel-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.panel-close:hover {
  color: var(--gray-600);
  background: var(--gray-100);
}

.panel-close svg {
  width: 20px;
  height: 20px;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
}

/* Panel Execution Info */
.panel-exec-info {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--gray-200);
}

.panel-exec-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.panel-exec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.panel-meta-item {
  font-size: 13px;
  color: var(--gray-500);
}

.panel-meta-item strong {
  color: var(--gray-700);
  font-weight: 500;
}

/* Panel Timeline */
.panel-timeline-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.panel-step {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  transition: border-color 0.15s ease;
}

.panel-step:hover {
  border-color: var(--gray-300);
}

.panel-step.failed {
  background: var(--error-light);
  border-color: var(--error);
}

.panel-step-header {
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.panel-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.panel-step-dot.success {
  background: var(--success);
}

.panel-step-dot.failed {
  background: var(--error);
}

.panel-step-dot.running {
  background: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.panel-step-dot.attention {
  background: var(--attention);
}

.panel-step-dot.pending {
  background: var(--gray-300);
}

.panel-step-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
}

.panel-step-dur {
  font-size: 12px;
  color: var(--gray-500);
}

.panel-step-btns {
  display: flex;
  gap: 4px;
}

.panel-step-btn {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.panel-step-btn:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.panel-step-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.panel-step-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Step Metadata Expansion */
.panel-step-metadata {
  display: none;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.panel-step-metadata.open {
  display: block;
}

.panel-step-metadata pre {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-700);
  background: var(--gray-50);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Metadata View Toggle */
.meta-view-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--gray-100);
}

.meta-toggle-btn {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.15s ease;
}

.meta-toggle-btn:hover {
  border-color: var(--gray-300);
}

.meta-toggle-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Formatted Metadata Styles */
.meta-formatted {
  display: block;
}

.meta-raw {
  display: none;
}

.panel-step-metadata.show-raw .meta-formatted {
  display: none;
}

.panel-step-metadata.show-raw .meta-raw {
  display: block;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--gray-50);
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-label {
  flex: 0 0 130px;
  font-size: 12px;
  color: var(--gray-500);
}

.meta-value {
  flex: 1;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

/* Metadata Badges */
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.meta-badge.success {
  background: #dcfce7;
  color: #166534;
}

.meta-badge.error {
  background: #fee2e2;
  color: #991b1b;
}

.meta-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.meta-badge.info {
  background: #dbeafe;
  color: #1e40af;
}

.meta-badge.neutral {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* Metadata Section Titles */
.meta-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--gray-100);
}

.meta-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Checklist */
.meta-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.meta-check-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--gray-600);
}

.meta-check-item.pass {
  color: #166534;
}

.meta-check-item.fail {
  color: #991b1b;
}

.meta-check-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 10px;
  flex-shrink: 0;
}

.meta-check-icon.pass {
  background: #dcfce7;
  color: #22c55e;
}

.meta-check-icon.fail {
  background: #fee2e2;
  color: #ef4444;
}

/* Fields Grid */
.meta-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-1);
}

.meta-field-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--gray-600);
}

.meta-field-item .meta-check-icon {
  width: 14px;
  height: 14px;
  font-size: 8px;
}

/* Document Items */
.meta-doc-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
  font-size: 12px;
}

.meta-doc-item:last-child {
  margin-bottom: 0;
}

.meta-doc-icon {
  width: 24px;
  height: 24px;
  background: var(--white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 9px;
  font-weight: 600;
  flex-shrink: 0;
}

.meta-doc-name {
  flex: 1;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-doc-meta {
  color: var(--gray-400);
  font-size: 11px;
  flex-shrink: 0;
}

/* Progress Bar */
.meta-progress {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.meta-progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
  width: 80px;
}

.meta-progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
}

/* Stage Flow */
.meta-stage-flow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11px;
  flex-wrap: wrap;
}

.meta-stage-box {
  padding: 4px 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  color: var(--gray-600);
}

.meta-stage-arrow {
  color: var(--gray-400);
}

.meta-stage-box.current {
  background: #dcfce7;
  color: #166534;
}

/* Preview Text */
.meta-preview {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.6;
  max-height: 80px;
  overflow: hidden;
  position: relative;
}

.meta-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, var(--gray-50));
}

/* Mismatch details styling */
.meta-mismatch-item {
  background: var(--gray-50);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}

.meta-mismatch-item:last-child {
  margin-bottom: 0;
}

.meta-mismatch-field {
  font-weight: 600;
  font-size: 12px;
  color: var(--error);
  margin-bottom: var(--space-1);
}

.meta-mismatch-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--gray-600);
}

.meta-mismatch-sent,
.meta-mismatch-stored {
  display: flex;
  gap: var(--space-2);
}

.meta-mismatch-values code {
  background: var(--white);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray-700);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-step-error {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid rgba(231, 76, 60, 0.2);
  background: var(--white);
  font-size: 13px;
  color: var(--error);
}

/* Panel Actions */
.panel-actions {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

.panel-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Responsive adjustments for history */
@media (max-width: 1024px) {
  .history-layout {
    grid-template-columns: 1fr;
  }

  .history-filters {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .filter-section {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
  }

  .detail-panel {
    width: 100%;
  }
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 520px;
  margin: var(--space-4);
  transform: translateY(-20px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}

.modal-icon svg {
  width: 22px;
  height: 22px;
}

.modal-title-group {
  flex: 1;
  min-width: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.modal-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-body {
  padding: var(--space-5);
}

.modal-text {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.fields-box {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  max-height: 300px;
  overflow-y: auto;
}

.fields-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

.fields-label:not(:first-child) {
  margin-top: var(--space-3);
}

.field-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-tag {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--gray-600);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--secondary);
}

.checkbox-row label {
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
}

.modal-footer {
  padding: var(--space-4) var(--space-5);
  background: var(--gray-50);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-footer .btn {
  min-width: 80px;
}

/* Restart modal icon (blue) */
.modal-icon.restart {
  background: #dbeafe;
  color: #3b82f6;
}

/* Section box for modal content */
.section-box {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}

.section-label:not(:first-child) {
  margin-top: var(--space-3);
}

/* Pipeline name */
.pipeline-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--gray-100);
}

/* Steps list */
.steps-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.step-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--gray-600);
}

.step-tag .step-number {
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  margin-right: 2px;
}

/* Single case header */
.single-case-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--gray-100);
}

.single-case-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
}

.single-case-icon svg {
  width: 18px;
  height: 18px;
}

.single-case-info {
  flex: 1;
}

.single-case-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.single-case-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* Cases list box */
.cases-box {
  max-height: 150px;
  overflow-y: auto;
}

.case-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 13px;
}

.case-item:last-child {
  margin-bottom: 0;
}

.case-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.case-status.failed {
  background: #ef4444;
}

.case-status.success {
  background: #22c55e;
}

.case-status.running {
  background: #3b82f6;
}

.case-name {
  flex: 1;
  color: var(--primary);
  font-weight: 500;
}

.case-id {
  color: var(--gray-400);
  font-size: 11px;
  font-family: monospace;
}

/* Info box (warning) */
.info-box {
  background: #fef3c7;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.info-box svg {
  width: 18px;
  height: 18px;
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-box p {
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
  margin: 0;
}

/* Panel action sections */
.panel-section {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

.panel-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-3);
}

.panel-section-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.panel-section-actions .btn {
  justify-content: flex-start;
}

.panel-section-actions .btn svg {
  margin-right: var(--space-2);
}

/* ============================================
   SETTINGS VIEW - User Management
   ============================================ */

/* Settings Container - Split Panel Layout */
.settings-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 150px);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Settings Sidebar */
.settings-sidebar {
  background: var(--gray-50);
  border-right: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
}

.settings-sidebar .sidebar-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--gray-100);
}

.settings-sidebar .sidebar-header h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.settings-sidebar .user-count {
  color: var(--gray-400);
  font-weight: 400;
}

.settings-sidebar .sidebar-search {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--gray-100);
}

.settings-sidebar .search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10px center no-repeat;
}

.settings-sidebar .search-input:focus {
  outline: none;
  border-color: var(--blue);
}

.settings-sidebar .user-list {
  flex: 1;
  overflow-y: auto;
}

.settings-sidebar .user-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}

.settings-sidebar .user-item:hover {
  background: var(--white);
}

.settings-sidebar .user-item.active {
  background: var(--white);
  border-left-color: var(--blue);
}

.settings-sidebar .user-item .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-600);
  flex-shrink: 0;
}

.settings-sidebar .user-item .avatar.admin { background: #dbeafe; color: #1d4ed8; }
.settings-sidebar .user-item .avatar.operator { background: #dcfce7; color: #15803d; }
.settings-sidebar .user-item .avatar.viewer { background: var(--gray-100); color: var(--gray-500); }

.settings-sidebar .user-item .info {
  flex: 1;
  min-width: 0;
}

.settings-sidebar .user-item .name {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-sidebar .user-item .role {
  font-size: 12px;
  color: var(--gray-500);
}

.settings-sidebar .sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--gray-100);
}

.settings-sidebar .sidebar-footer .btn {
  width: 100%;
}

/* Settings Detail Panel */
.settings-detail {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}

.settings-detail .empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6);
}

.settings-detail .empty-state .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.settings-detail .empty-state .empty-icon svg {
  width: 32px;
  height: 32px;
  color: var(--gray-400);
}

.settings-detail .empty-state .empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.settings-detail .empty-state .empty-text {
  font-size: 14px;
  color: var(--gray-500);
}

.settings-detail .empty-state.small {
  padding: var(--space-4);
}

.settings-detail .empty-state.small p {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
}

/* User Detail */
.user-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.user-detail .detail-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: var(--space-5);
}

.user-detail .detail-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 24px;
  color: var(--gray-600);
  flex-shrink: 0;
}

.user-detail .detail-avatar.admin { background: #dbeafe; color: #1d4ed8; }
.user-detail .detail-avatar.operator { background: #dcfce7; color: #15803d; }
.user-detail .detail-avatar.viewer { background: var(--gray-100); color: var(--gray-500); }

.user-detail .detail-info {
  flex: 1;
}

.user-detail .detail-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.user-detail .detail-email {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: var(--space-3);
}

.user-detail .detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.user-detail .detail-badge svg {
  width: 14px;
  height: 14px;
}

.user-detail .detail-badge.admin { background: #dbeafe; color: #1d4ed8; }
.user-detail .detail-badge.operator { background: #dcfce7; color: #15803d; }
.user-detail .detail-badge.viewer { background: var(--gray-100); color: var(--gray-500); }

.user-detail .detail-actions {
  display: flex;
  gap: var(--space-2);
}

.user-detail .action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-detail .action-btn:hover {
  background: var(--gray-50);
}

.user-detail .action-btn.danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.user-detail .action-btn svg {
  width: 16px;
  height: 16px;
  color: var(--gray-500);
}

.user-detail .action-btn.danger:hover svg {
  color: var(--error);
}

/* Form Sections */
.form-section {
  margin-bottom: var(--space-5);
}

.form-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-3);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:disabled {
  background: var(--gray-50);
  color: var(--gray-500);
  cursor: not-allowed;
}

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--white);
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--blue);
}

.form-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: var(--space-1);
}

.form-error {
  color: var(--error);
  font-size: 13px;
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: #fef2f2;
  border-radius: var(--radius);
}

/* Role Options */
.role-options {
  display: flex;
  gap: var(--space-3);
}

.role-option {
  flex: 1;
  padding: var(--space-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.role-option:hover {
  border-color: var(--gray-300);
}

.role-option.active {
  border-color: var(--blue);
  background: #f8faff;
}

.role-option .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 auto var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-option .icon svg {
  width: 16px;
  height: 16px;
}

.role-option.admin .icon { background: #dbeafe; color: #1d4ed8; }
.role-option.operator .icon { background: #dcfce7; color: #15803d; }
.role-option.viewer .icon { background: var(--gray-100); color: var(--gray-500); }

.role-option .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2px;
}

.role-option .desc {
  font-size: 11px;
  color: var(--gray-500);
}

/* Activity Section */
.activity-section {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-top: auto;
}

.activity-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: var(--space-3);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--gray-600);
}

.activity-item svg {
  width: 14px;
  height: 14px;
  color: var(--gray-400);
  flex-shrink: 0;
}

.activity-item .activity-text {
  flex: 1;
}

.activity-item .time {
  color: var(--gray-400);
  white-space: nowrap;
}

.activity-empty {
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
  padding: var(--space-3);
}

/* Modal icon colors */
.modal-icon.primary {
  background: #dbeafe;
}

.modal-icon.primary svg {
  color: #1d4ed8;
}

.modal-icon.danger {
  background: #fef2f2;
}

.modal-icon.danger svg {
  color: var(--error);
}

/* Warning box */
.warning-box {
  background: #fef3c7;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
}

.warning-box svg {
  width: 18px;
  height: 18px;
  color: #f59e0b;
  flex-shrink: 0;
}

.warning-box span {
  font-size: 13px;
  color: #92400e;
}

/* Danger button */
.btn.danger {
  background: var(--error);
  border-color: var(--error);
  color: var(--white);
}

.btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* Settings responsive */
@media (max-width: 768px) {
  .settings-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .settings-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--gray-100);
    max-height: 300px;
  }

  .role-options {
    flex-direction: column;
  }
}

/* ============================================
   PIPELINE VIEW STYLES (Issue #017)
   ============================================ */

/* Pipeline row */
.pipeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  background: var(--white);
  transition: all 0.2s ease;
}

.pipeline-row:hover {
  border-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.pipeline-row.paused {
  background: var(--gray-50);
  opacity: 0.9;
}

.pipeline-row.paused .pipeline-name {
  color: var(--gray-500);
}

/* Pipeline info */
.pipeline-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
}

.pipeline-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pipeline-icon svg {
  width: 20px;
  height: 20px;
}

.pipeline-icon.success {
  background: var(--success-bg);
  color: var(--success);
}

.pipeline-icon.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.pipeline-details {
  min-width: 0;
}

.pipeline-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.pipeline-description {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* Pipeline status */
.pipeline-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 150px;
}

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

.status-dot.success {
  background: var(--success);
}

.status-dot.warning {
  background: var(--warning);
}

.status-text {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
}

.paused-count {
  font-size: var(--text-xs);
  color: var(--warning);
  font-weight: 500;
}

/* Pipeline actions */
.pipeline-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal warning button */
.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Modal pipeline name */
.modal-pipeline-name {
  font-weight: 600;
  color: var(--gray-700);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

/* Small button variant */
.btn-sm {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-sm);
}
