:root {
  color-scheme: light dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #1f2933;
  background-color: #f7f9fc;
}

body {
  margin: 0;
  background-color: #f7f9fc;
}

.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.2);
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header p {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

.main-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 2rem 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.panel {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  padding: 1.25rem;
}

.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #1f2933;
}

.account-selector-panel {
  padding: 1rem 1.5rem;
}

.account-dropdown {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  cursor: pointer;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.account-dropdown:hover {
  border-color: #2563eb;
}

.account-dropdown:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.account-dropdown option {
  color: #1f2933;
  background: #ffffff;
}

.selected-account-summary {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f1f5ff;
  border-radius: 8px;
  border: 1px solid #dbeafe;
}

.metrics-row.compact {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.metrics-row.compact .metric-label {
  font-size: 0.85rem;
  color: #64748b;
}

.metrics-row.compact strong {
  color: #1e3a8a;
  margin-right: 1rem;
}

.metrics-row {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.metrics-row span {
  white-space: nowrap;
}

.metrics-row span.metric-label {
  color: #1f2933;
  font-weight: 500;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.summary-tile {
  background: linear-gradient(145deg, #f8fafc, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.summary-tile span.label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.summary-tile span.value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.table-wrapper {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #ffffff;
}

th, td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
}

th {
  background: #f8fafc;
  color: #1f2937;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr:hover td {
  background: #f1f5f9;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-good {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.status-warning {
  background: rgba(234, 179, 8, 0.14);
  color: #92400e;
}

.status-poor {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #0369a1;
}

.keyword-section {
  margin-top: 1.5rem;
}

.keyword-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.keyword-header h3 {
  margin: 0;
  font-size: 1rem;
}

.inline-hint {
  font-size: 0.8rem;
  color: #64748b;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: #64748b;
  border: 1px dashed #cbd5f5;
  border-radius: 12px;
  background: #ffffff;
}

.loading-state {
  padding: 2.5rem;
  text-align: center;
  font-size: 1.05rem;
  color: #475569;
}

.error-state {
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  margin: 1.5rem 2rem;
}

.toggle-btn {
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.toggle-btn:hover {
  text-decoration: underline;
}

.table-footer {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: #475569;
  background: #f8fafc;
}

/* Authentication Styles */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: #1e293b;
}

.login-header h2 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: #64748b;
  font-weight: normal;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form label {
  font-size: 0.875rem;
  color: #475569;
  font-weight: 500;
}

.login-form input {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-form input.error {
  border-color: #ef4444;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: -0.5rem;
}

.login-btn {
  padding: 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
  margin-top: 0.5rem;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.login-footer p {
  color: #64748b;
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
}

.link-btn {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 0.875rem;
  text-decoration: underline;
}

.demo-tokens {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  text-align: left;
}

.demo-tokens h4 {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.token-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.token-list strong {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
}

.token-list code {
  background: white;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  font-family: 'Courier New', monospace;
}

/* Dashboard Layout */
.dashboard {
  min-height: 100vh;
  background: #f1f5f9;
}

.dashboard-header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.header-content h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.role-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.role-badge.admin {
  background: #fef3c7;
  color: #92400e;
}

.role-badge.guest {
  background: #dbeafe;
  color: #1e40af;
}

.logout-btn {
  padding: 0.5rem 1rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: #dc2626;
}

/* Navigation Tabs */
.dashboard-nav {
  display: flex;
  gap: 0;
  padding: 0 2rem;
  background: white;
}

.nav-tab {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tab:hover {
  color: #1e293b;
  background: #f8fafc;
}

.nav-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: #f8fafc;
}

.tab-icon {
  font-size: 1.25rem;
}

.dashboard-content {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Settings Panel */
.settings-panel {
  background: white;
  border-radius: 12px;
  padding: 2rem;
}

.settings-panel h2 {
  margin-top: 0;
  color: #1e293b;
}

.settings-panel h3 {
  color: #334155;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.settings-panel h4 {
  color: #475569;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.settings-panel .user-info,
.info-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
}

.info-grid span:nth-child(odd) {
  color: #64748b;
  font-size: 0.875rem;
}

.token-display {
  font-family: 'Courier New', monospace;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.token-management {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
}

.generate-token {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.form-row input,
.form-row select {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
}

.btn-primary {
  padding: 0.5rem 1.5rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #5a67d8;
}

.btn-danger {
  padding: 0.25rem 0.75rem;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover:not(:disabled) {
  background: #fecaca;
  border-color: #f87171;
}

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

.success-message,
.info-message {
  padding: 0.75rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.success-message {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.info-message {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.token-section {
  margin-bottom: 2rem;
}

.token-section h5 {
  color: #475569;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.token-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.token-row {
  display: grid;
  grid-template-columns: 150px 1fr 100px 80px;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.token-name {
  font-weight: 500;
  color: #334155;
  font-size: 0.875rem;
}

.token-code {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  background: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.token-date {
  color: #64748b;
  font-size: 0.75rem;
}

.guest-message {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 2rem;
}

.guest-message p {
  color: #475569;
  margin: 0.5rem 0;
}

/* AI Recommendations */
.ai-recommendations {
  background: white;
  border-radius: 12px;
  padding: 2rem;
}

.ai-recommendations h2 {
  margin-top: 0;
  color: #1e293b;
}

.coming-soon {
  text-align: center;
  padding: 3rem 2rem;
}

.coming-soon .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.coming-soon h3 {
  color: #334155;
  margin-bottom: 1rem;
}

.coming-soon p {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.coming-soon ul {
  text-align: left;
  display: inline-block;
  color: #475569;
  line-height: 2;
}

/* Performance Container */
#performance-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
}

/* Optimization Conclusion Styles */
.optimization-conclusion {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff, #fefce8);
  border: 2px solid #2563eb;
  border-radius: 12px;
}

.optimization-conclusion h2 {
  color: #1e40af;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #dbeafe;
}

.optimization-conclusion h3 {
  color: #1f2933;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
}

.optimization-conclusion h4 {
  color: #475569;
  font-size: 0.95rem;
  margin: 1rem 0 0.5rem;
  font-weight: 600;
}

.conclusion-summary {
  background: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

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

.metric-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
}

.metric-item .label {
  color: #64748b;
  font-weight: 500;
}

.metric-item .value {
  font-weight: 700;
  font-size: 1.1rem;
}

.issues-section,
.opportunities-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.issue-group,
.opportunity-group,
.strength-group {
  background: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #e2e8f0;
}

.issue-group.critical {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.issue-group.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.opportunity-group {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.strength-group {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.recommendations-section {
  margin: 2rem 0;
}

.recommendation-group {
  background: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #e2e8f0;
}

.recommendation-group.critical {
  border-left-color: #dc2626;
}

.recommendation-group.high {
  border-left-color: #f59e0b;
}

.recommendation-group.medium {
  border-left-color: #3b82f6;
}

.recommendation-group.opportunity {
  border-left-color: #10b981;
}

.recommendation-group ul,
.issue-group ul,
.opportunity-group ul,
.strength-group ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.recommendation-group li,
.issue-group li,
.opportunity-group li,
.strength-group li {
  margin: 0.5rem 0;
  line-height: 1.5;
  color: #475569;
}

.final-conclusion {
  background: #1e40af;
  color: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.final-conclusion h3 {
  color: #ffffff;
  margin-top: 0;
}

.final-conclusion p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.5rem 0 0;
}

/* Tab Navigation Styles */
.tab-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0;
}

.tab-button {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* Project Progress Styles */
.project-progress {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.progress-summary {
  background: linear-gradient(135deg, #f0f9ff, #fef3c7);
  border: 2px solid #3b82f6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.summary-card {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-card h3 {
  margin: 0 0 0.75rem;
  color: #475569;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.status-indicator.on-track {
  color: #10b981;
}

.big-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0.5rem 0;
}

.milestone-date {
  font-size: 1.75rem;
  font-weight: 700;
  color: #dc2626;
  margin: 0.5rem 0;
}

.progress-bar {
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin: 0.75rem 0;
}

.progress-bar.small {
  height: 16px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 12px;
  transition: width 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #1f2937;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Timeline Section */
.timeline-section {
  background: #ffffff;
}

.week-block {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.week-block.complete {
  background: #f0fdf4;
  border-color: #10b981;
}

.week-block.in-progress {
  background: #fef3c7;
  border-color: #f59e0b;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.week-title h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.25rem;
}

.week-dates {
  color: #6b7280;
  font-size: 0.9rem;
  margin-left: 1rem;
}

.week-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.completion-rate {
  font-weight: 600;
  color: #1f2937;
  min-width: 45px;
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.task-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.task-item.complete {
  border-color: #10b981;
  background: #f0fdf4;
}

.task-item.in-progress {
  border-color: #f59e0b;
  background: #fef3c7;
}

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

.task-content {
  flex: 1;
}

.task-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.task-details {
  color: #6b7280;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* KPI Section */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.kpi-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
}

.kpi-card.complete {
  border-color: #10b981;
  background: #f0fdf4;
}

.kpi-card.on-track {
  border-color: #3b82f6;
  background: #eff6ff;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kpi-header h4 {
  margin: 0;
  color: #1f2937;
  font-size: 1rem;
}

.kpi-status {
  font-size: 1.25rem;
}

.kpi-values {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kpi-target,
.kpi-current {
  display: flex;
  justify-content: space-between;
}

.kpi-target .label,
.kpi-current .label {
  color: #6b7280;
  font-size: 0.875rem;
}

.kpi-target .value,
.kpi-current .value {
  font-weight: 600;
  color: #1f2937;
}

/* Strategies Section */
.strategies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.strategy-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
}

.strategy-card.ready {
  border-color: #10b981;
}

.strategy-card.in-development {
  border-color: #f59e0b;
}

.strategy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.strategy-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.1rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.ready {
  background: #10b981;
  color: #ffffff;
}

.status-badge.in-development {
  background: #f59e0b;
  color: #ffffff;
}

.strategy-description {
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.strategy-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.strategy-metrics strong {
  color: #475569;
  font-size: 0.875rem;
}

/* Risk Section */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.risk-card {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
}

.risk-card.mitigated {
  border-color: #10b981;
  background: #f0fdf4;
}

.risk-card.active {
  border-color: #f59e0b;
  background: #fef3c7;
}

.risk-card h3 {
  margin: 0 0 1rem;
  color: #1f2937;
}

.risk-card ul {
  margin: 0;
  padding-left: 1.5rem;
}

.risk-card li {
  color: #475569;
  margin: 0.5rem 0;
  line-height: 1.5;
}

/* Next Steps */
.next-steps {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 2px solid #3b82f6;
}

.steps-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step-item {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid #3b82f6;
}

.step-item.immediate {
  border-left-color: #dc2626;
}

.step-item.short-term {
  border-left-color: #f59e0b;
}

.step-item.medium-term {
  border-left-color: #10b981;
}

.step-item h3 {
  margin: 0 0 1rem;
  color: #1f2937;
  font-size: 1.1rem;
}

.step-item ul {
  margin: 0;
  padding-left: 1.5rem;
}

.step-item li {
  color: #475569;
  margin: 0.5rem 0;
  line-height: 1.5;
}

/* AI Recommendations Styles */
.ai-recommendations {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.recommendations-overview .overview-grid,
.settings-container .overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.overview-card {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.overview-card h3 {
  margin: 0 0 0.75rem;
  color: #475569;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.overview-card .big-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0.5rem 0;
}

.overview-card p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

.quick-wins {
  background: #f0fdf4;
  border: 2px solid #10b981;
}

.section-description {
  color: #6b7280;
  margin: 0.5rem 0 1.5rem;
}

.quick-wins-table table {
  width: 100%;
  border-collapse: collapse;
}

.quick-wins-table th {
  background: #10b981;
  color: #ffffff;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
}

.quick-wins-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.quick-wins-table tbody tr:hover {
  background: #f9fafb;
}

.impact-cell {
  font-weight: 600;
  color: #059669;
}

.effort-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.effort-badge.low {
  background: #10b981;
  color: #ffffff;
}

.effort-badge.medium {
  background: #f59e0b;
  color: #ffffff;
}

.effort-badge.high {
  background: #dc2626;
  color: #ffffff;
}

.recommendation-category {
  background: #ffffff;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.category-badges {
  display: flex;
  gap: 0.75rem;
}

.priority-badge,
.impact-badge {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.priority-badge.high {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.priority-badge.medium {
  background: #fef3c7;
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.impact-badge {
  background: #eff6ff;
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.recommendation-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
}

.recommendation-item h3 {
  margin: 0 0 0.75rem;
  color: #1f2937;
  font-size: 1.15rem;
}

.recommendation-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.recommendation-description {
  color: #475569;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.implementation-box {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.implementation-box strong {
  color: #1e40af;
}

/* Settings Styles */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.settings-section {
  background: #ffffff;
}

.settings-group {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
}

.settings-group h3 {
  margin: 0 0 1.5rem;
  color: #1f2937;
  font-size: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

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

.setting-item label {
  color: #475569;
  font-weight: 500;
}

.setting-control {
  width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #ffffff;
}

.setting-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.setting-item.checkbox {
  justify-content: flex-start;
  gap: 0.75rem;
}

.setting-item.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.settings-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: #3b82f6;
  color: #ffffff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.api-settings {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 2px solid #3b82f6;
}

.api-status {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.status-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}

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

.status-badge.connected {
  color: #10b981;
  font-weight: 600;
}

/* Auth header positioning */
.auth-header {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  padding: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-header .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-header .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.auth-header .role-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
}

.auth-header .logout-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.auth-header .logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Overall Summary Styles */
.overall-summary-header {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border-radius: 8px;
  border: 2px solid #3b82f6;
}

.overall-summary-header h3 {
  margin: 0 0 0.5rem;
  color: #1e40af;
  font-size: 1.25rem;
  font-weight: 600;
}

.overall-summary-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.summary-grid.overall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.summary-tile.highlight {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 2px solid #3b82f6;
  transform: scale(1.02);
}

.summary-tile.warning {
  background: #fef3c7;
  border: 2px solid #f59e0b;
}

.summary-tile.highlight .label {
  color: #1e40af;
  font-weight: 600;
}

.summary-tile.highlight .value {
  color: #1e40af;
  font-size: 1.5rem;
  font-weight: 700;
}

.summary-tile.warning .value {
  color: #d97706;
}
