@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');

:root {
  --primary-blue: #1ca0dd;
  --primary-green: #7ed957;
  --gradient: linear-gradient(90deg, #1ca0dd 0%, #7ed957 100%);
  --font-family: 'Nunito', Arial, sans-serif;
  --sidebar-bg: var(--gradient);
  --sidebar-link: #fff;
  --sidebar-link-hover: #e0f7fa;
  --sidebar-active: #fff;
  --header-bg: #fff;
  --header-color: #1ca0dd;
  --success-bg: #e6f4ea;
  --success-color: #188038;
  --error-bg: #fce8e8;
  --error-color: #d93025;
  --processing-bg: #e8f0fe;
  --processing-color: #1967d2;
  --card-shadow: 0 4px 16px rgba(28,160,221,0.08);
  --border-radius: 16px;
  /* Dense data grids: CSV upload preview, Client Tickets CSV modal, cache editor, All Analyzes */
  --aaa-dense-table-font-size: 0.75rem;
  --aaa-dense-table-line-height: 1.15;
  --aaa-dense-table-cell-padding-y: 0.14rem;
  --aaa-dense-table-cell-padding-x: 0.3rem;
}

body {
  font-family: var(--font-family);
  background: #f8f9fa;
  margin: 0;
  padding: 0;
}

#sidebar {
  background: var(--sidebar-bg);
  border-right: none;
  box-shadow: 2px 0 8px rgba(28,160,221,0.08);
  color: #fff;
}
#sidebar a {
  color: var(--sidebar-link);
  text-decoration: none;
  font-weight: bold;
  display: block;
  padding: 12px 24px;
  border-radius: 8px;
  margin: 0 8px 8px 8px;
  transition: background 0.2s, color 0.2s;
}
#sidebar a:hover, #sidebar a.active {
  background: rgba(255,255,255,0.12);
  color: var(--sidebar-link-hover);
}
#sidebar .logo {
  display: block;
  margin: 0 auto 24px auto;
  width: 90px;
  height: 90px;
  background: url('logo.png') no-repeat center center / contain;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(28,160,221,0.10);
}

h1, h2 {
  color: var(--header-color);
  font-family: var(--font-family);
  font-weight: 700;
  letter-spacing: -1px;
}

.button {
  background: var(--gradient);
  color: white;
  padding: 12px 28px;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  font-size: 16px;
  font-family: var(--font-family);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(28,160,221,0.15), 
              0 2px 8px rgba(28,160,221,0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.button:hover {
  background: linear-gradient(90deg, #7ed957 0%, #1ca0dd 100%);
  box-shadow: 0 6px 20px rgba(28,160,221,0.25), 
              0 4px 12px rgba(28,160,221,0.15);
  transform: translateY(-2px);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.button.warning {
  background: linear-gradient(90deg, #ff9800, #f57c00);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button.warning:hover {
  background: linear-gradient(90deg, #f57c00, #ff9800);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.button.warning:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button:hover::before {
  left: 100%;
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(28,160,221,0.2);
}

.button:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status.success {
  background-color: var(--success-bg);
  color: var(--success-color);
  border: 1px solid var(--success-color);
  border-radius: var(--border-radius);
}
.status.error {
  background-color: var(--error-bg);
  color: var(--error-color);
  border: 1px solid var(--error-color);
  border-radius: var(--border-radius);
}
.status.processing {
  background-color: var(--processing-bg);
  color: var(--processing-color);
  border: 1px solid var(--processing-color);
  border-radius: var(--border-radius);
}

.process-form, #configPage form {
  background: #fff;
  padding: 32px 32px 24px 32px;
  border: none;
  border-radius: var(--border-radius);
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(28,160,221,0.12), 
              0 4px 16px rgba(28,160,221,0.08),
              0 2px 8px rgba(28,160,221,0.04);
  border: 1px solid rgba(28,160,221,0.08);
  transition: all 0.3s ease;
}

.process-form:hover, #configPage form:hover {
  box-shadow: 0 12px 40px rgba(28,160,221,0.15), 
              0 6px 20px rgba(28,160,221,0.1),
              0 3px 12px rgba(28,160,221,0.06);
  transform: translateY(-2px);
}

.form-group {
  margin-bottom: 22px;
}
label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  color: #333;
}
input[type="text"], input[type="password"], input[type="number"], input[type="url"], select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-family);
  background: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 
              inset 0 1px 0 rgba(255,255,255,0.8);
}

input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="url"]:focus, select:focus {
  border: 2px solid var(--primary-blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(28,160,221,0.1), 
              0 4px 16px rgba(28,160,221,0.15),
              inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

.page-content {
  max-width: 1600px;
  margin: 40px auto;
  padding: 24px 24px 32px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(28,160,221,0.12), 
              0 4px 16px rgba(28,160,221,0.08),
              0 2px 8px rgba(28,160,221,0.04);
  border: 1px solid rgba(28,160,221,0.08);
  display: flex;
  flex-direction: column;
  min-height: 400px;
  transition: all 0.3s ease;
}

.page-content:hover {
  box-shadow: 0 12px 40px rgba(28,160,221,0.15), 
              0 6px 20px rgba(28,160,221,0.1),
              0 3px 12px rgba(28,160,221,0.06);
}
.table-container {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(28,160,221,0.10);
  padding: 8px 8px 8px 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.table-container, #resultsBox > div {
  margin-top: 24px;
  max-height: 400px;
  overflow: auto;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  background: #fff;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1200px;
  background: #fff;
  border-radius: var(--border-radius);
}
th, td {
  border: none;
  padding: 16px 10px;
  text-align: left;
  min-width: 150px;
  max-width: 300px;
  white-space: normal;
  word-wrap: break-word;
  vertical-align: top;
}
th {
  color: #1967d2 !important;
  background: #f4f6fa !important;
  font-weight: bold !important;
}
tr:nth-child(even) {
  background-color: #f8f9fa;
}
tr:hover {
  background-color: #e8f0fe;
}

/* Sticky header for cache editor table */
.table-container th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f6fa !important;
  color: #1967d2;
  font-weight: bold;
  border-bottom: 2px solid #e0e0e0;
  text-align: left;
  padding: 12px 8px;
  box-shadow: 0 2px 4px rgba(28,160,221,0.04);
}

/* Add a little extra top padding to the first row to avoid overlap if needed */
.table-container tbody tr:first-child td {
  padding-top: 18px;
}

.spinner {
  display: inline-block;
  border: 4px solid #e8f0fe;
  border-top: 4px solid #1ca0dd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  width: 32px;
  height: 32px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Database upload progress bar styles */
#dbUploadProgress {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(28,160,221,0.10);
  border: 1px solid #e8f0fe;
}

#dbProgressBar {
  transition: width 0.5s ease-in-out;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

#dbProgressBar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

#mainContent {
  padding: 32px 40px 32px 40px;
}

.help-text {
  background: #f8f9fa;
  padding: 18px 24px;
  border-radius: 8px;
  margin-bottom: 28px;
  border-left: 5px solid #1ca0dd;
  font-size: 1.08em;
}

.console-output {
  background: #f8f9fa;
  border: none;
  border-radius: 8px;
  padding: 18px;
  margin-top: 24px;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 300px;
  overflow: auto;
  display: none;
  box-shadow: var(--card-shadow);
}

/* Category badge styles */
.badge-category {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.95em;
  font-weight: 700;
  color: #fff;
  background: #1ca0dd;
  margin-right: 2px;
  vertical-align: middle;
}
.badge-category.cost { background: #7ed957; color: #19692c; }
.badge-category.security { background: #d93025; color: #fff; }
.badge-category.reliability { background: #1967d2; color: #fff; }
.badge-category.performance { background: #fbbc04; color: #333; }
.badge-category.other { background: #b0b0b0; color: #fff; }

/* Ellipsis and tooltip for long text */
.ellipsis {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  vertical-align: top;
}

/* Right-align numbers */
td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Boolean icon styles */
.boolean-icon {
  font-size: 1.2em;
  color: #7ed957;
  vertical-align: middle;
}
.boolean-icon.false {
  color: #d93025;
  opacity: 0.5;
}

/* Row hover (already present, but make it more visible) */
tr:hover {
  background-color: #e0f7fa !important;
} 

/* Sticky first column (checkbox) */
#recommendationsTable th:first-child,
#recommendationsTable td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f4f6fa;
  width: 32px;
  min-width: 32px;
  max-width: 32px;
}
/* Sticky second column (edit icon) */
#recommendationsTable th:nth-child(2),
#recommendationsTable td:nth-child(2) {
  position: sticky;
  left: 32px;
  z-index: 3;
  background: #f4f6fa;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
} 

.prompts-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}
.prompt-row {
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(28,160,221,0.06);
  padding: 24px 32px 18px 32px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s;
}
.prompt-row:hover {
  box-shadow: 0 4px 16px rgba(28,160,221,0.10);
  background: #e8f0fe;
}
.prompt-preview-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.prompt-row label {
  font-size: 1.12em;
  font-weight: 700;
  color: #1967d2;
  margin-bottom: 0;
}
.prompt-preview-row textarea[readonly] {
  border: none;
  background: #f4f6fa;
  color: #333;
  font-size: 1em;
  padding: 12px 16px;
  border-radius: 8px;
  min-height: 38px;
  resize: none;
  box-shadow: none;
  width: 90%;
  flex: 1 1 90%;
  transition: background 0.2s;
  margin-right: 16px;
}
.prompt-preview-row textarea[readonly]:hover {
  background: #e8f0fe;
}
.edit-btn {
  margin-left: 0;
  min-width: 90px;
  align-self: flex-start;
}
#editPromptModal .modal-content {
  border-radius: 20px !important;
  box-shadow: 0 8px 32px rgba(28,160,221,0.18) !important;
  max-width: 800px;
  width: 90%;
}
#modalPromptLabel {
  font-size: 1.25em;
  font-weight: 700;
  color: #1967d2;
  margin-bottom: 12px;
} 

#tableArea {
  max-width: 100vw;
  overflow-x: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(28,160,221,0.06);
  padding: 18px 18px 18px 18px;
}
.dataTable {
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.97em;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(28,160,221,0.08);
  background: #fff;
  min-width: 1200px;
}
.dataTable th, .dataTable td {
  padding: 6px 10px !important;
  vertical-align: middle;
  line-height: 1.3;
}
.dataTable th {
  background: #e8f0fe !important;
  color: #1967d2;
  font-weight: 800;
  border-bottom: 2px solid #b5d0f7;
  font-size: 1.05em;
  letter-spacing: 0.01em;
  z-index: 2;
}
.dataTable td {
  border-bottom: 1px solid #f0f0f0;
}
.dataTable tbody tr:nth-child(even) {
  background-color: #f4f8fc;
}
.dataTable tbody tr:nth-child(odd) {
  background-color: #fff;
}
.dataTable tbody tr:hover {
  background: #e0f6ff;
}
.dataTable td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dataTable td.ellipsis {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.dataTable td.editable-estimated {
  background: #f8f9fa;
  cursor: pointer;
  transition: background 0.2s;
}
.dataTable td.editable-estimated:hover {
  background: #e8f0fe;
  outline: 1.5px solid #1ca0dd;
}
.dataTable td.editable-estimated input {
  background: #fff;
  border: 1px solid #1ca0dd;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 1em;
  width: 80px;
}
.dataTable th.id-col, .dataTable td.id-col {
  min-width: 40px;
  max-width: 60px;
  text-align: right;
}
.dataTable th.recommendation-col, .dataTable td.recommendation-col {
  min-width: 220px;
  max-width: 400px;
}

/* Enhanced Step 3 Design - Modern UX */
.step-header {
  text-align: center;
  margin-bottom: 32px;
}

.step-header h2 {
  margin-bottom: 8px;
  font-size: 2.2em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-description {
  color: #666;
  font-size: 1.1em;
  margin: 0;
  font-weight: 400;
}

.configuration-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(28,160,221,0.12);
  border: 1px solid rgba(28,160,221,0.08);
  max-width: 600px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: 32px;
}

.form-label {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
  color: #333;
  font-size: 1.1em;
}

.label-text {
  margin-right: 8px;
}

.required-indicator {
  color: #d93025;
  font-weight: 900;
  font-size: 1.2em;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1.1em;
  font-family: var(--font-family);
  transition: all 0.3s ease;
  background: #fafafa;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(28,160,221,0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: #999;
  font-style: italic;
}

.form-help {
  display: flex;
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
}

.help-icon {
  color: var(--primary-blue);
  font-weight: bold;
  margin-right: 8px;
  font-size: 1.1em;
}

.form-help span {
  color: #666;
  font-size: 0.95em;
  line-height: 1.4;
}

.form-actions {
  text-align: center;
  margin-top: 40px;
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.2em;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-icon {
  font-size: 1.3em;
}

.btn-text {
  font-weight: 700;
}

.btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28,160,221,0.25);
}

/* Loading spinner for large file processing */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Processing Progress */
.progress-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(28,160,221,0.12);
  border: 1px solid rgba(28,160,221,0.08);
  margin-bottom: 24px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.progress-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.4em;
  font-weight: 700;
}

.progress-stats {
  background: var(--gradient);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1em;
}

.progress-bar-container {
  margin-bottom: 24px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 6px;
  transition: width 0.3s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-bar-container .progress-fill {
  width: 0%;
}

#processingProgressText {
  text-align: center;
  font-weight: 700;
  color: var(--primary-blue);
  font-size: 1.1em;
}

.processing-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.detail-label {
  font-weight: 600;
  color: #666;
}

.detail-value {
  font-weight: 700;
  color: #333;
  font-family: 'Courier New', monospace;
}

.processing-status {
  text-align: center;
}

.status.processing {
  background: linear-gradient(90deg, #e8f0fe, #f0f8ff);
  color: #1967d2;
  border: 1px solid #b5d0f7;
  padding: 16px;
  border-radius: 8px;
  font-weight: 600;
}

/* Responsive design */
@media (max-width: 768px) {
  .configuration-card {
    padding: 24px;
    margin: 0 16px;
  }
  
  .step-header h2 {
    font-size: 1.8em;
  }
  
  .btn-large {
    padding: 16px 28px;
    font-size: 1.1em;
    min-width: 180px;
  }
}

/* Processing messages styles */
.processing-messages {
  margin-top: 20px;
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
}

.processing-messages h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.messages-container {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #666;
}

.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Enhanced Error State Styles */
.error-state {
  margin-top: 20px;
}

.error-card {
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border: 2px solid #feb2b2;
  box-shadow: 0 8px 32px rgba(245, 101, 101, 0.15), 
              0 4px 16px rgba(245, 101, 101, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 30px;
  border-radius: 20px;
  animation: slideInUp 0.5s ease;
}

.error-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fc8181, #f56565, #e53e3e);
  border-radius: 2px 2px 0 0;
}

.error-icon {
  font-size: 72px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(245, 101, 101, 0.3));
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.error-title {
  font-size: 32px;
  font-weight: 800;
  color: #c53030;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(197, 48, 48, 0.1);
  letter-spacing: -0.5px;
}

.error-details {
  color: #742a2a;
  font-size: 18px;
  margin-bottom: 24px;
  opacity: 0.9;
  line-height: 1.5;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.6);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(245, 101, 101, 0.2);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.error-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-retry, .btn-details {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.btn-retry {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
  box-shadow: 0 4px 16px rgba(72, 187, 120, 0.3);
}

.btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-details {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  color: white;
  box-shadow: 0 4px 16px rgba(237, 137, 54, 0.3);
}

.btn-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
}

/* Success State Styles */
.success-state {
  margin-top: 20px;
}

.success-card {
  background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
  border: 2px solid #9ae6b4;
  box-shadow: 0 8px 32px rgba(72, 187, 120, 0.15), 
              0 4px 16px rgba(72, 187, 120, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 30px;
  border-radius: 20px;
  animation: slideInUp 0.5s ease;
}

.success-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #68d391, #48bb78, #38a169);
  border-radius: 2px 2px 0 0;
}

.success-icon {
  font-size: 72px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(72, 187, 120, 0.3));
  animation: bounce 1s ease;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.success-title {
  font-size: 32px;
  font-weight: 800;
  color: #22543d;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(34, 84, 61, 0.1);
  letter-spacing: -0.5px;
}

.success-details {
  color: #22543d;
  font-size: 18px;
  margin-bottom: 24px;
  opacity: 0.9;
  line-height: 1.5;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.6);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(154, 230, 180, 0.2);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.completion-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.completion-actions .button {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  min-width: 140px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.completion-actions .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 160, 221, 0.25);
}

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

/* Enhanced Status Card Styles */
.status-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
  border: 2px solid #e1f0ff;
  box-shadow: 0 12px 40px rgba(28, 160, 221, 0.15),
              0 6px 20px rgba(28, 160, 221, 0.1),
              0 3px 12px rgba(28, 160, 221, 0.05);
  border-radius: 24px;
  padding: 32px;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #1ca0dd, #7ed957, #1ca0dd);
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.status-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(28, 160, 221, 0.2),
              0 10px 30px rgba(28, 160, 221, 0.15),
              0 5px 15px rgba(28, 160, 221, 0.1);
  border-color: #1ca0dd;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
}

.status-icon {
  font-size: 48px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f4fd 0%, #d1e9fb 100%);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(28, 160, 221, 0.15);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.status-main {
  flex: 1;
}

.status-title {
  font-size: 28px;
  font-weight: 800;
  color: #1a365d;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(26, 54, 93, 0.1);
}

.status-subtitle {
  font-size: 18px;
  color: #4a5568;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.4;
}

.btn-refresh {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-refresh:hover {
  background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
  border-color: #1ca0dd;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(28, 160, 221, 0.15);
}

.btn-refresh:active {
  transform: scale(0.95);
}

.status-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.metric {
  background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1ca0dd, #7ed957);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric:hover {
  transform: translateY(-2px);
  border-color: #1ca0dd;
  box-shadow: 0 8px 24px rgba(28, 160, 221, 0.15);
}

.metric:hover::before {
  opacity: 1;
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
  color: #1a365d;
  margin-bottom: 8px;
  font-family: 'Courier New', monospace;
  text-shadow: 0 2px 4px rgba(26, 54, 93, 0.1);
}

.metric-label {
  font-size: 16px;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

/* Enhanced Progress Header */
.progress-header h3 {
  background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: -1px;
  text-shadow: none;
}

/* Enhanced Database Upload Section */
.db-upload-section {
  background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%);
  border-radius: 24px;
  padding: 32px;
  border: 2px solid #e1f0ff;
  box-shadow: 0 8px 32px rgba(28, 160, 221, 0.1);
}

/* Enhanced Success Message */
.success-message {
  background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
  border: 2px solid #9ae6b4;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(72, 187, 120, 0.15);
  position: relative;
  overflow: hidden;
}

.success-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #68d391, #48bb78, #38a169);
  border-radius: 6px 6px 0 0;
}

.success-message h3 {
  font-size: 36px;
  font-weight: 800;
  color: #22543d;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(34, 84, 61, 0.1);
}

.success-message p {
  font-size: 20px;
  color: #2f855a;
  margin-bottom: 32px;
  font-weight: 500;
  opacity: 0.9;
}

/* Enhanced Button Variants */
.btn-primary, .btn-secondary {
  padding: 16px 32px;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #1ca0dd 0%, #3182ce 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(28, 160, 221, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(28, 160, 221, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(113, 128, 150, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(113, 128, 150, 0.4);
}

/* Responsive Design for Status Card */
@media (max-width: 768px) {
  .status-card {
    padding: 24px;
    margin: 16px 0;
  }
  
  .status-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .status-icon {
    width: 64px;
    height: 64px;
    font-size: 36px;
  }
  
  .status-title {
    font-size: 24px;
  }
  
  .status-subtitle {
    font-size: 16px;
  }
  
  .status-metrics {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .metric {
    padding: 20px 16px;
  }
  
  .metric-value {
    font-size: 28px;
  }
}

/* Modern Dashboard Styles */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Grouped top nav: few top-level labels, menus stack on < xl */
.navbar .navbar-nav .nav-link {
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 20rem;
}

.navbar-user-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar .dropdown-menu {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.16);
  padding: 0.4rem 0;
  min-width: 15.5rem;
}

.navbar .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  white-space: nowrap;
}

.navbar .dropdown-item .nav-review-badge {
  margin-left: auto;
}

.navbar .nav-link .nav-review-badge {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
  background-color: #0078d4;
  color: #fff;
}

@media (max-width: 1199.98px) {
  .navbar-collapse .dropdown-menu {
    position: static;
    float: none;
    min-width: 0;
    margin: 0;
    padding: 0 0 0.35rem 0.75rem;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .navbar-collapse .dropdown-item {
    color: rgba(255, 255, 255, 0.92);
    border-radius: 0.375rem;
  }

  .navbar-collapse .dropdown-item:hover,
  .navbar-collapse .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .navbar-collapse .dropdown-item.active,
  .navbar-collapse .dropdown-item:active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
  }

  .navbar-collapse .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.25);
  }
}

/* Cards */
.card {
  border: none;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.25rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: #0078d4;
  border-color: #0078d4;
}

.btn-primary:hover {
  background-color: #106ebe;
  border-color: #106ebe;
}

.btn-outline-primary {
  color: #0078d4;
  border-color: #0078d4;
}

.btn-outline-primary:hover {
  background-color: #0078d4;
  border-color: #0078d4;
}

/* Forms */
.form-control, .form-select {
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #0078d4;
  box-shadow: 0 0 0 0.2rem rgba(0, 120, 212, 0.25);
}

.form-label {
  font-weight: 500;
  color: #333;
}

/* Tables */
.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #333;
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 120, 212, 0.05);
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}

/* Stats Cards */
.bg-primary.bg-opacity-10 {
  background-color: rgba(0, 120, 212, 0.1) !important;
}

.bg-success.bg-opacity-10 {
  background-color: rgba(40, 167, 69, 0.1) !important;
}

.bg-warning.bg-opacity-10 {
  background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-info.bg-opacity-10 {
  background-color: rgba(23, 162, 184, 0.1) !important;
}

/* Icons */
.bi {
  line-height: 1;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border-left: 4px solid #ffc107;
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
  border-left: 4px solid #17a2b8;
}

/* Modals */
.modal-content {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 1.5rem 1.5rem 1rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.5rem 1.5rem;
}

/* Loading States */
.spinner-border {
  width: 1.5rem;
  height: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .table-responsive {
    font-size: 0.875rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

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

/* Step-based workflow styles */
.step-container {
    display: none;
    padding: 20px;
    margin-bottom: 20px;
}

.step-container.active {
    display: block;
}

.step-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.upload-section {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.file-info {
    margin: 15px 0;
    padding: 10px;
    background: #e9ecef;
    border-radius: 4px;
    font-weight: 500;
}

.file-size-info {
    margin-top: 10px;
}

.status {
    margin: 15px 0;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
}

.status.uploading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.preview-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.auto-advance-countdown {
    margin: 16px auto 0;
    padding: 14px 16px;
    max-width: 760px;
    background: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-left: 4px solid #0d6efd;
    border-radius: 8px;
    color: #084298;
}

.auto-advance-countdown .auto-advance-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auto-advance-countdown .auto-advance-title {
    font-weight: 700;
}

.auto-advance-countdown .auto-advance-detail {
    margin-top: 4px;
    font-size: 0.9rem;
    color: #365f8f;
}

.auto-advance-countdown .auto-advance-seconds {
    display: inline-block;
    min-width: 2ch;
    text-align: center;
    font-weight: 800;
}

.auto-advance-countdown .auto-advance-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Optional class for JS-built grids (All Analyzes, etc.) */
table.aaa-table-dense > thead > tr > th,
table.aaa-table-dense > tbody > tr > td {
  font-size: var(--aaa-dense-table-font-size);
  line-height: var(--aaa-dense-table-line-height);
  padding: var(--aaa-dense-table-cell-padding-y) var(--aaa-dense-table-cell-padding-x);
  vertical-align: middle;
}

.preview-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

/* Step 2 CSV preview: compact grid (shared tokens), expand on hover for long cells */
.preview-table-container .csv-preview-table {
  font-size: var(--aaa-dense-table-font-size);
  line-height: var(--aaa-dense-table-line-height);
  margin-bottom: 0;
}

.preview-table-container .csv-preview-table th,
.preview-table-container .csv-preview-table td {
  padding: var(--aaa-dense-table-cell-padding-y) var(--aaa-dense-table-cell-padding-x);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
  line-height: var(--aaa-dense-table-line-height);
}

/* Bootstrap .table / .table-sm default padding is larger — keep dense preview everywhere */
.preview-table-container .csv-preview-table.table > :not(caption) > * > * {
  padding: var(--aaa-dense-table-cell-padding-y) var(--aaa-dense-table-cell-padding-x) !important;
}

.modal-body .preview-table-container .csv-preview-table th,
.modal-body .preview-table-container .csv-preview-table td {
  padding: var(--aaa-dense-table-cell-padding-y) var(--aaa-dense-table-cell-padding-x) !important;
}

.preview-table-container .csv-preview-table th {
    font-weight: 600;
    background-color: #e7f1ff;
}

.preview-table-container .csv-preview-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.preview-table-container .csv-preview-table td:hover {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    max-width: min(28rem, 85vw);
    z-index: 2;
    position: relative;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

/* Client Tickets CSV structure modal: narrow line # column (Excel-style view) */
.preview-table-container.csv-error-structure-preview .csv-preview-table th:first-child,
.preview-table-container.csv-error-structure-preview .csv-preview-table td:first-child {
    max-width: 3.75rem;
}

/* Parser-merged fallback: wider first column for long context labels */
.preview-table-container.csv-error-parser-merge-preview .csv-preview-table th:first-child,
.preview-table-container.csv-error-parser-merge-preview .csv-preview-table td:first-child {
    max-width: 14rem;
}

.preview-info {
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

.config-section {
    max-width: 600px;
    margin: 0 auto;
}

.configuration-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.step-header {
    text-align: center;
    margin-bottom: 30px;
}

.step-description {
    color: #6c757d;
    font-size: 1.1em;
}

.form-section {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.label-text {
    margin-right: 5px;
}

.required-indicator {
    color: #e74c3c;
}

.help-text {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.processing-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #dee2e6;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progress-stats {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.progress-bar-container {
    margin: 20px 0;
    text-align: center;
}

.progress {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
}

.processing-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.detail-label {
    font-weight: 500;
    color: #6c757d;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
}

.processing-status {
    margin: 20px 0;
    text-align: center;
}

.status.processing {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.processing-messages {
    margin-top: 25px;
}

.messages-container {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
}

.message {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9em;
}

.message:last-child {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.db-upload-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.status-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #dee2e6;
    margin: 20px 0;
}

.status-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.status-icon {
    font-size: 2em;
    margin-right: 15px;
}

.status-main {
    flex: 1;
}

.status-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.status-subtitle {
    color: #6c757d;
}

.simple-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.metric {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.metric-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 0.9em;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-messages {
    margin-top: 20px;
}

.status-message {
    padding: 10px 15px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    margin-bottom: 10px;
}

.success-state, .error-state {
    margin-top: 20px;
}

.success-card, .error-card {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
}

.success-card {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-card {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-icon, .error-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.success-title, .error-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
}

.success-details, .error-details {
    margin-bottom: 20px;
}

.success-actions, .error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.powerbi-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.powerbi-success-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.powerbi-success-container .success-card {
    background: #fff;
    color: #2c3e50;
    max-width: 500px;
    width: 90%;
}

.powerbi-report-link {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: left;
}

.loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.large-file-warning, .timeout-warning, .error-message {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.large-file-warning h4, .timeout-warning h4, .error-message h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.large-file-actions, .timeout-actions, .error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.validation-issues {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.issues-list {
    margin-top: 15px;
}

.issue-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.issue-severity {
    font-size: 0.8em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 15px;
    min-width: 60px;
    text-align: center;
}

.issue-severity.error {
    background: #f8d7da;
    color: #721c24;
}

.issue-severity.warning {
    background: #fff3cd;
    color: #856404;
}

.issue-severity.info {
    background: #d1ecf1;
    color: #0c5460;
}

.issue-message {
    flex: 1;
    font-weight: 500;
    margin-bottom: 5px;
}

.issue-suggestion {
    font-size: 0.9em;
    color: #6c757d;
}

.fix-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.fix-option {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.fix-option h5 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.fix-option p {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.results-summary {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.results-summary h4 {
    margin-bottom: 15px;
    color: #155724;
}

.results-summary p {
    margin-bottom: 10px;
}

.results-summary strong {
    color: #0f5132;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .simple-metrics {
        grid-template-columns: 1fr;
    }
    
    .processing-details {
        grid-template-columns: 1fr;
    }
    
    .preview-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .success-actions, .error-actions {
        flex-direction: column;
    }
} 

/* Simple Database Upload UI */
.simple-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    text-align: center;
    padding: 40px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.success-message h3 {
    margin-bottom: 15px;
    color: #155724;
}

.success-actions {
    margin-top: 30px;
}

.success-actions .btn {
    margin: 0 10px;
} 

/* Power BI Authentication Popup */
.auth-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-popup-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.auth-popup-content h3 {
    margin-top: 0;
    color: #333;
}

.device-code-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.device-code-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.device-code {
    background: #e9ecef;
    padding: 10px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 18px;
    text-align: center;
    flex: 1;
    font-weight: bold;
}

.copy-btn {
    white-space: nowrap;
}

.verification-url-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.verification-link {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
    flex: 1;
}

.verification-link:hover {
    text-decoration: underline;
}

.open-btn {
    white-space: nowrap;
}

.auth-actions {
    margin-top: 20px;
    text-align: center;
}

.auth-actions .btn {
    margin: 0 10px;
} 