/* Kaiser Demo V2 - Modern Redesigned Stylesheet */

:root {
  --kaiser-blue-dark: #1E3A8A;
  --kaiser-blue: #2563EB;
  --kaiser-blue-light: #3B82F6;
  
  --status-approved: #10B981;
  --status-approved-bg: #D1FAE5;
  --status-pending: #F59E0B;
  --status-pending-bg: #FEF3C7;
  --status-denied: #EF4444;
  --status-denied-bg: #FEE2E2;
  
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  
  --bg-primary: #F9FAFB;
  --bg-white: #FFFFFF;
  --bg-light-blue: #F0F5FF;
  --border-color: #E5E7EB;
  --border-light: #F3F4F6;
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Clean Header */
.clean-header {
  background: var(--kaiser-blue);
  color: white;
  padding: 1.25rem 0;
}

.header-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.claim-count {
  font-size: 0.9375rem;
  opacity: 0.9;
}

/* Logout Button */
.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.logout-btn:active {
  transform: translateY(0);
}

.logout-btn svg {
  opacity: 0.9;
}

/* Status Tabs with Colors */
.status-tabs-section {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.status-tabs-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0.75rem;
}

.status-tab {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-primary);
}

.status-tab .tab-label {
  color: var(--text-secondary);
}

.status-tab .tab-count {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

/* All Tab */
.all-tab {
  background: var(--bg-primary);
}
.all-tab .tab-count {
  background: #E5E7EB;
  color: var(--text-secondary);
}
.all-tab.active,
.all-tab:hover {
  background: var(--bg-light-blue);
  border-color: var(--kaiser-blue);
}
.all-tab.active .tab-label,
.all-tab:hover .tab-label {
  color: var(--kaiser-blue);
}
.all-tab.active .tab-count {
  background: var(--kaiser-blue);
  color: white;
}

/* Pending Tab */
.pending-tab {
  background: var(--bg-primary);
}
.pending-tab .tab-count {
  background: var(--status-pending-bg);
  color: var(--status-pending);
}
.pending-tab.active,
.pending-tab:hover {
  background: var(--status-pending-bg);
  border-color: var(--status-pending);
}
.pending-tab.active .tab-label,
.pending-tab:hover .tab-label {
  color: #B45309;
}
.pending-tab.active .tab-count {
  background: var(--status-pending);
  color: white;
}

/* Approved Tab */
.approved-tab {
  background: var(--bg-primary);
}
.approved-tab .tab-count {
  background: var(--status-approved-bg);
  color: var(--status-approved);
}
.approved-tab.active,
.approved-tab:hover {
  background: var(--status-approved-bg);
  border-color: var(--status-approved);
}
.approved-tab.active .tab-label,
.approved-tab:hover .tab-label {
  color: #047857;
}
.approved-tab.active .tab-count {
  background: var(--status-approved);
  color: white;
}

/* Denied Tab */
.denied-tab {
  background: var(--bg-primary);
}
.denied-tab .tab-count {
  background: var(--status-denied-bg);
  color: var(--status-denied);
}
.denied-tab.active,
.denied-tab:hover {
  background: var(--status-denied-bg);
  border-color: var(--status-denied);
}
.denied-tab.active .tab-label,
.denied-tab:hover .tab-label {
  color: #B91C1C;
}
.denied-tab.active .tab-count {
  background: var(--status-denied);
  color: white;
}

/* Search Section */
.search-section {
  background: var(--bg-white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.search-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: var(--bg-primary);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--kaiser-blue);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.patient-select {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 160px;
}

.patient-select:focus {
  outline: none;
  border-color: var(--kaiser-blue);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.reset-btn {
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.reset-btn:hover {
  border-color: var(--status-denied);
  color: var(--status-denied);
  background: var(--status-denied-bg);
}

/* Claims Grid */
.claims-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.claims-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 1.25rem;
}

.claim-card {
  background: var(--bg-white);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.claim-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--kaiser-blue);
  opacity: 0;
  transition: opacity 0.2s;
}

.claim-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--kaiser-blue-light);
}

.claim-card:hover::before {
  opacity: 1;
}

.claim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.claim-id {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--kaiser-blue-dark);
  letter-spacing: -0.025em;
}

.status-badge {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-approved {
  background-color: var(--status-approved-bg);
  color: var(--status-approved);
}

.status-pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending);
}

.status-denied {
  background-color: var(--status-denied-bg);
  color: var(--status-denied);
}

.claim-card-body {
  display: grid;
  gap: 0.875rem;
}

.claim-field {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
}

.claim-label {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.claim-value {
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 500;
}

.claim-value.diagnosis {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.claim-value.amount {
  color: var(--kaiser-blue);
  font-size: 1.125rem;
  font-weight: 700;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state-text {
  font-size: 0.9375rem;
}

/* Claim Detail Page */
.detail-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.detail-header .header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  opacity: 0.9;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.back-link:hover {
  opacity: 1;
  transform: translateX(-3px);
}

.header-status {
  display: flex;
  align-items: center;
}

/* Claim Info Bar */
.claim-info-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.claim-info-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.info-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.info-value.amount {
  color: var(--kaiser-blue);
  font-size: 1.125rem;
}

/* Detail Container */
.detail-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.detail-section {
  background: var(--bg-white);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.section-heading {
  color: var(--kaiser-blue);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--bg-light-blue);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.data-app-placeholder {
  min-height: 150px;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 0.9375rem;
}

/* Action Buttons */
.action-buttons-section {
  max-width: 1400px;
  margin: 2rem auto 3rem;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.approve-btn {
  background: var(--status-approved);
  color: white;
}

.approve-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.deny-btn {
  background: var(--status-denied);
  color: white;
}

.deny-btn:hover {
  background: #DC2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.modal-body {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.modal-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-btn {
  background: var(--kaiser-blue);
  color: white;
  border: none;
}

.confirm-btn:hover {
  background: var(--kaiser-blue-dark);
}

.cancel-btn {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .status-tabs-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }
  
  .status-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .dashboard-title {
    font-size: 1.25rem;
  }
  
  .status-tabs-wrapper {
    gap: 0.5rem;
  }
  
  .status-tab {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
  
  .search-wrapper {
    flex-direction: column;
  }
  
  .search-box {
    width: 100%;
  }
  
  .patient-select,
  .reset-btn {
    width: 100%;
  }
  
  .claims-grid {
    grid-template-columns: 1fr;
  }
  
  .claim-field {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .action-buttons-section {
    flex-direction: column;
  }
  
  .btn-approve,
  .btn-deny {
    width: 100%;
  }
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-secondary);
}

.spinner {
  border: 3px solid var(--border-color);
  border-top-color: var(--kaiser-blue);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-right: 1rem;
}

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

/* Data App Containers - Patient Info and Patient History */
patient-info {
  display: block;
  min-height: 480px;
}

patient-info iframe {
  width: 100% !important;
  height: 480px !important;
  min-height: 480px !important;
  border: none !important;
}

patient-history {
  display: block;
  min-height: 500px;
}

patient-history iframe {
  width: 100% !important;
  height: 500px !important;
  min-height: 500px !important;
  border: none !important;
}

policy-comparison {
  display: block;
  min-height: 650px;
}

policy-comparison iframe {
  width: 100% !important;
  height: 650px !important;
  min-height: 650px !important;
  border: none !important;
}

ai-analysis {
  display: block;
  min-height: 650px;
}

ai-analysis iframe {
  width: 100% !important;
  height: 650px !important;
  min-height: 650px !important;
  border: none !important;
}
