.live-console-container {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
    margin-top: 2rem;
}

.console-header {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-body {
    display: flex;
    height: 500px;
}

.artifact-list {
    width: 300px;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    background: #fdfdfd;
    height: 100%;
}

.artifact-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.artifact-item:hover {
    background: #f0f7ff;
}

.artifact-item.active {
    background: #e7f1ff;
    border-left: 4px solid #0d6efd;
}

.artifact-item .status-icon {
    width: 20px;
    text-align: center;
}

.code-preview {
    flex-grow: 1;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.code-header {
    padding: 0.5rem 1rem;
    background: #333;
    color: #fff;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-content {
    padding: 1rem;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow: auto;
    flex-grow: 1;
    white-space: pre-wrap;
}

.status-pending { color: #6c757d; }
.status-loading { color: #0d6efd; }
.status-ready { color: #198754; }
.status-failed { color: #dc3545; }

.draft-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    text-transform: uppercase;
    font-weight: bold;
    white-space: nowrap;
}

.code-preview-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.progress-bar-container {
    height: 4px;
    width: 100%;
    background: #e9ecef;
}

.progress-bar-fill {
    height: 100%;
    background: #0d6efd;
    transition: width 0.3s ease;
}

/* Inline Validation Styles */
.field-wrapper.has-error .form-control,
.field-wrapper.has-error .form-select {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.field-wrapper.has-error .form-control:focus,
.field-wrapper.has-error .form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.field-error-message {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.field-error-message i {
    margin-right: 0.25rem;
}

.field-wrapper.has-error .field-error-message {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Collapsed field toggle — chevron rotates when expanded */
.collapse-chevron {
    transition: transform 0.2s ease;
}
label[aria-expanded="true"] .collapse-chevron {
    transform: rotate(90deg);
}

/* Validation summary banner (optional, for multiple errors) */
.validation-summary {
    display: none;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.validation-summary.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.validation-summary h6 {
    color: #842029;
    margin-bottom: 0.5rem;
}

.validation-summary ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.validation-summary li {
    color: #842029;
    cursor: pointer;
}

.validation-summary li:hover {
    text-decoration: underline;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: toastSlideIn 0.3s ease-out;
    min-width: 300px;
    max-width: 500px;
}

.toast-notification:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.toast-notification.toast-has-errors {
    max-height: 60vh;
    overflow: hidden;
}

.toast-notification.toast-has-errors .toast-content {
    max-height: calc(60vh - 24px);
    overflow-y: auto;
    padding-right: 4px;
}

/* Visible scrollbar for error toasts */
.toast-notification.toast-has-errors .toast-content::-webkit-scrollbar {
    width: 6px;
}

.toast-notification.toast-has-errors .toast-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.toast-notification.toast-has-errors .toast-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.toast-notification.toast-has-errors .toast-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

.toast-notification.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

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

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

.toast-notification .toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
}

.toast-notification .toast-content {
    flex-grow: 1;
    min-height: 0;
    overflow-wrap: break-word;
}

.toast-notification .toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-notification .toast-message {
    font-size: 0.9rem;
    line-height: 1.4;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

.toast-notification .toast-copy-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid currentColor;
    border-radius: 4px;
    color: inherit;
    cursor: pointer !important;
    opacity: 0.85;
    transition: opacity 0.2s, background 0.2s;
    user-select: none;
    -webkit-user-select: none;
    position: sticky;
    bottom: 0;
}

.toast-notification .toast-copy-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.toast-notification .toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    margin-left: 12px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    font-size: 1.2rem;
    line-height: 1;
}

.toast-notification .toast-close:hover {
    opacity: 1;
}

/* Toast variants */
.toast-notification.toast-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.toast-notification.toast-error .toast-icon {
    color: #dc2626;
}

.toast-notification.toast-error .toast-close {
    color: #991b1b;
}

.toast-notification.toast-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.toast-notification.toast-success .toast-icon {
    color: #16a34a;
}

.toast-notification.toast-success .toast-close {
    color: #166534;
}

.toast-notification.toast-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.toast-notification.toast-warning .toast-icon {
    color: #d97706;
}

.toast-notification.toast-warning .toast-close {
    color: #92400e;
}

.toast-notification.toast-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.toast-notification.toast-info .toast-icon {
    color: #2563eb;
}

.toast-notification.toast-info .toast-close {
    color: #1e40af;
}

/* Toast confirm dialog */
.toast-notification.toast-confirm .toast-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.toast-notification.toast-confirm .toast-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toast-notification.toast-confirm .toast-btn-primary {
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    color: white;
}

.toast-notification.toast-confirm .toast-btn-primary:hover {
    background-color: #0b5ed7;
}

.toast-notification.toast-confirm .toast-btn-secondary {
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.toast-notification.toast-confirm .toast-btn-secondary:hover {
    background-color: #f3f4f6;
}

/* Sidebar container */
.config-sidebar {
  width: 240px;
  min-width: 240px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* Section header */
.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

/* Navigation items */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 0.875rem;
  color: #475569;
}

.sidebar-item:hover {
  background: #e2e8f0;
}

.sidebar-item.current {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 500;
}

.sidebar-item.completed .status-icon {
  color: #22c55e;
}

.sidebar-item.skipped {
  color: #94a3b8;
}

/* Required badge */
.required-badge {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Footer with progress */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.progress-indicator {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  text-align: center;
}

.generate-btn {
  width: 100%;
  padding: 0.625rem 1rem;
  background: #0ea5e9;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
}

.generate-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* Mobile Responsive Behavior */
@media (max-width: 768px) {
  .config-sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
  }
  
  .sidebar-header {
    display: none;
  }
  
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    padding: 0.5rem;
  }
  
  .sidebar-item {
    flex-direction: column;
    min-width: 80px;
    padding: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
  }
  
  .sidebar-footer {
    display: none;
  }
}

/* Container styles */
.wizard-container {
  display: flex;
  min-height: calc(100vh - 64px); /* Adjust for header height */
}

.wizard-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.5rem 1.5rem 1rem;
}

/* Mode Selector Component */
.mode-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.mode-selector-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.mode-options {
  display: flex;
  gap: 0.25rem;
  background: #e2e8f0;
  padding: 0.25rem;
  border-radius: 6px;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #64748b;
  transition: all 0.15s ease;
}

.mode-option:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.5);
}

.mode-option.active {
  background: white;
  color: #0f172a;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.mode-icon {
  font-size: 1rem;
}

.mode-description {
  display: none;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-left: auto;
  padding-left: 1rem;
}

.mode-selector:hover .mode-description {
  display: block;
}

/* Mobile responsive for mode selector */
@media (max-width: 640px) {
  .mode-selector {
    flex-direction: column;
    align-items: stretch;
  }

  .mode-options {
    width: 100%;
  }

  .mode-option {
    flex: 1;
    justify-content: center;
    padding: 0.625rem 0.5rem;
  }

  .mode-selector .mode-label {
    display: none;
  }

  .mode-description {
    display: none !important;
  }
}

@media (max-width: 400px) {
  .mode-selector .mode-label {
    display: none;
  }
}

/* Mode Change Confirmation Dialog */
.mode-change-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.mode-change-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 420px;
  width: 90%;
  padding: 1.5rem;
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mode-change-dialog-icon {
  width: 48px;
  height: 48px;
  background: #fef3c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.mode-change-dialog-icon i {
  font-size: 1.25rem;
  color: #d97706;
}

.mode-change-dialog-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.mode-change-dialog-message {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.mode-change-dialog-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.mode-change-dialog-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-change-dialog-btn-cancel {
  background: white;
  border: 1px solid #d1d5db;
  color: #374151;
}

.mode-change-dialog-btn-cancel:hover {
  background: #f3f4f6;
}

.mode-change-dialog-btn-confirm {
  background: #d97706;
  border: 1px solid #d97706;
  color: white;
}

.mode-change-dialog-btn-confirm:hover {
  background: #b45309;
  border-color: #b45309;
}

/* ================================================
   Express Summary Card with Status Indicators
   ================================================ */

/* Card container with status-based left border */
.express-summary-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.express-summary-card.status-success {
  border-left: 4px solid #22c55e;
}

.express-summary-card.status-warning {
  border-left: 4px solid #f59e0b;
}

.express-summary-card.status-error {
  border-left: 4px solid #ef4444;
}

.express-summary-card.status-info {
  border-left: 4px solid #64748b;
}

/* Card header */
.express-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.express-card-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overall-status-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.overall-status-icon.size-small {
  font-size: 1rem;
}

.overall-status-icon.size-large {
  font-size: 1.5rem;
}

.express-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

/* Customize button */
.express-customize-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.express-customize-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Subtitle */
.express-card-subtitle {
  padding: 0.75rem 1.25rem;
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
}

/* Items container */
.express-card-items {
  padding: 0.5rem;
}

/* Individual summary item */
.summary-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.summary-item:hover {
  background: #f8fafc;
}

.item-status-icon {
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

.item-label {
  flex: 1;
  font-size: 0.875rem;
  color: #475569;
}

.item-value {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
}

/* Status-specific value colors */
.summary-item.status-success .item-value {
  color: #15803d;
}

.summary-item.status-warning .item-value {
  color: #b45309;
}

.summary-item.status-error .item-value {
  color: #dc2626;
}

.summary-item.status-info .item-value {
  color: #64748b;
}

/* Background highlight for warning/error items */
.summary-item.status-warning {
  background: #fffbeb;
}

.summary-item.status-warning:hover {
  background: #fef3c7;
}

.summary-item.status-error {
  background: #fef2f2;
}

.summary-item.status-error:hover {
  background: #fee2e2;
}

/* Tooltip for summary items */
.summary-item[title] {
  cursor: help;
}

/* Legacy express-card compatibility - update existing styles */
.express-card.border-success {
  border-left: 4px solid #22c55e;
}

/* ================================================
   Output Page - Tabbed Interface
   ================================================ */

/* Success Banner */
.success-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.banner-icon {
  font-size: 2rem;
  color: #059669;
}

.banner-text h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  color: #065f46;
}

.banner-text p {
  margin: 0;
  font-size: 0.875rem;
  color: #047857;
}

.banner-actions {
  display: flex;
  gap: 0.75rem;
}

.success-banner .btn-primary {
  padding: 0.625rem 1.25rem;
  background: #059669;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.success-banner .btn-primary:hover {
  background: #047857;
}

.success-banner .btn-secondary {
  padding: 0.625rem 1.25rem;
  background: white;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.success-banner .btn-secondary:hover {
  background: #f0fdf4;
  border-color: #6ee7b7;
}

/* Tab Navigation */
.output-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 0;
  background: #f8fafc;
  padding: 0.5rem 1rem 0;
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.tab-button:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.tab-button.active {
  color: #0ea5e9;
  border-bottom-color: #0ea5e9;
  background: white;
}

.tab-count {
  padding: 0.125rem 0.5rem;
  background: #e2e8f0;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tab-button.active .tab-count {
  background: #e0f2fe;
  color: #0369a1;
}

/* Output Content */
.output-content {
  background: white;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.tab-panel {
  min-height: 500px;
}

/* Terraform Panel (Split View) */
.terraform-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  min-height: 500px;
}

.file-list {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  max-height: 600px;
}

.file-list h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  margin: 0;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.file-items {
  padding: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 0.875rem;
  color: #475569;
  transition: all 0.15s ease;
}

.file-item:hover {
  background: #e2e8f0;
}

.file-item.active {
  background: #0ea5e9;
  color: white;
}

.file-item .file-icon {
  flex-shrink: 0;
  width: 20px;
}

.file-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item .file-status {
  flex-shrink: 0;
}

.file-item.active .file-status i {
  color: white;
}

/* File Preview */
.file-preview {
  background: #1e293b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #334155;
  border-bottom: 1px solid #475569;
}

.preview-filename {
  color: #e2e8f0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
}

.preview-actions {
  display: flex;
  gap: 0.5rem;
}

.preview-actions button {
  padding: 0.375rem 0.75rem;
  background: #475569;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.preview-actions button:hover {
  background: #64748b;
}

.preview-content {
  padding: 1rem;
  margin: 0;
  overflow: auto;
  flex: 1;
  max-height: 550px;
  font-size: 0.8125rem;
  line-height: 1.6;
  background: #1e293b;
}

.preview-content code {
  color: #e2e8f0;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Sidebar Collapsed State */
.config-sidebar.collapsed {
  display: none;
}

.wizard-container.sidebar-collapsed .wizard-content {
  max-width: 100%;
}

/* Diagrams Panel */
.diagrams-panel {
  background: white;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

/* Diagram Code Wrapper with Header */
.diagram-code-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.diagram-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #334155;
  border-bottom: 1px solid #475569;
}

.diagram-title {
  color: #e2e8f0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  font-weight: 500;
}

.diagram-copy-btn {
  padding: 0.375rem 0.875rem;
  background: #0ea5e9;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.diagram-copy-btn:hover {
  background: #0284c7;
}

.diagram-copy-btn.copied {
  background: #22c55e;
}

.diagram-copy-btn i {
  font-size: 0.75rem;
}

.diagram-selector {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
}

.diagram-tab {
  padding: 0.5rem 1rem;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.diagram-tab:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.diagram-tab.active {
  background: #0ea5e9;
  color: white;
  border-color: #0ea5e9;
}

.view-toggle {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.view-toggle button {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #64748b;
  transition: all 0.15s ease;
}

.view-toggle button:hover {
  background: #e2e8f0;
}

.view-toggle button.active {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  color: #0f172a;
}

.diagram-display {
  flex: 1;
  overflow: auto;
  position: relative;
}

.mermaid-container {
  padding: 2rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.mermaid-container svg {
  max-width: 100%;
  height: auto;
}

.diagram-error {
  text-align: center;
  padding: 2rem;
  color: #64748b;
}

.diagram-error p {
  margin: 0.5rem 0;
}

.code-block {
  margin: 0;
  padding: 1rem;
  background: #1e293b;
  color: #e2e8f0;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow: auto;
  min-height: 400px;
}

/* Diagram code view - always visible */
.code-block.diagram-code-view {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.diagram-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.diagram-actions button,
.diagram-actions .btn-link {
  padding: 0.5rem 1rem;
  background: white;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.diagram-actions button:hover,
.diagram-actions .btn-link:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Scorecards Panel */
.scorecards-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
}

.scorecard-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.scorecard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.scorecard-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.scorecard-grade {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: white;
}

.grade-letter {
  font-size: 1.5rem;
  font-weight: 700;
}

.grade-score {
  font-size: 0.875rem;
  opacity: 0.9;
}

.scorecard-summary {
  display: flex;
  gap: 2rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.summary-stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
}

.stat-label {
  font-size: 0.75rem;
  color: #64748b;
}

.scorecard-checks {
  max-height: 300px;
  overflow-y: auto;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

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

.check-item.fail {
  background: #fef2f2;
}

.check-icon {
  flex-shrink: 0;
}

.check-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.875rem;
  color: #0f172a;
}

.check-description {
  color: #64748b;
  font-size: 0.875rem;
}

/* Mobile Responsive for Output Page */
@media (max-width: 768px) {
  .success-banner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .banner-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .output-tabs {
    overflow-x: auto;
    padding: 0.5rem 0.5rem 0;
  }

  .tab-button {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }

  .terraform-panel {
    grid-template-columns: 1fr;
  }

  .file-list {
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .preview-content {
    max-height: 400px;
  }

  .scorecard-summary {
    gap: 1rem;
    justify-content: space-around;
  }

  .check-item {
    flex-wrap: wrap;
  }

  .check-description {
    width: 100%;
    padding-left: 2rem;
    margin-top: 0.25rem;
  }

  .diagram-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}
