/*
 * BrainSAIT Healthcare Dashboard - Advanced UI
 * BRAINSAIT | MEDICAL | NEURAL | BILINGUAL | AGENT
 */

/* BRAINSAIT Header */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 54, 93, 0.1);
  padding: 0;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-brain {
  color: var(--medical-blue);
  font-weight: 700;
  font-size: 28px;
}

.brand-sait {
  color: var(--signal-teal);
  font-weight: 700;
  font-size: 28px;
}

.brand-subtitle {
  color: var(--professional-gray);
  font-size: 12px;
  font-weight: 500;
  margin-left: 0.5rem;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--professional-gray);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--medical-blue);
  background: rgba(43, 108, 184, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  background: var(--medical-blue);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-toggle:hover {
  background: var(--signal-teal);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-badge {
  background: var(--deep-orange);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.avatar {
  width: 32px;
  height: 32px;
  background: var(--midnight-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* MEDICAL Dashboard Layout */
.dashboard-main {
  display: flex;
  padding-top: 80px;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.sidebar {
  width: 280px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(26, 54, 93, 0.1);
  height: calc(100vh - 80px);
  overflow-y: auto;
}

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

.sidebar-section h3 {
  color: var(--midnight-blue);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  display: block;
  color: var(--professional-gray);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  transition: var(--transition);
  font-size: 14px;
}

.menu-item:hover,
.menu-item.active {
  background: rgba(43, 108, 184, 0.1);
  color: var(--medical-blue);
}

.agent-status {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.agent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.agent.active {
  color: var(--signal-teal);
}

.status {
  font-size: 16px;
}

.agent.active .status {
  color: #10b981;
}

/* NEURAL Content Area */
.content-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.upload-section {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(26, 54, 93, 0.1);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

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

.section-header h2 {
  color: var(--midnight-blue);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--professional-gray);
  margin: 0;
}

.upload-zone {
  border: 2px dashed var(--signal-teal);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  background: rgba(14, 165, 233, 0.05);
  margin-bottom: 2rem;
  transition: var(--transition);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--medical-blue);
  background: rgba(43, 108, 184, 0.05);
}

.upload-content .upload-icon {
  font-size: 48px;
  margin-bottom: 1rem;
}

.upload-content h3 {
  color: var(--midnight-blue);
  margin-bottom: 0.5rem;
}

.upload-content p {
  color: var(--professional-gray);
  margin-bottom: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--medical-blue), var(--signal-teal));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(43, 108, 184, 0.3);
}

.processing-options {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(26, 54, 93, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
}

.processing-options h3 {
  color: var(--midnight-blue);
  margin-bottom: 1rem;
}

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

.option-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(26, 54, 93, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.option-card:hover {
  background: rgba(43, 108, 184, 0.05);
  border-color: var(--medical-blue);
}

.option-card input {
  margin-right: 0.75rem;
}

.card-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-content .icon {
  font-size: 18px;
}

/* AGENT Processing Status */
.processing-status {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(26, 54, 93, 0.1);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.processing-status h3 {
  color: var(--midnight-blue);
  margin-bottom: 1.5rem;
}

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

.status-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(26, 54, 93, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.status-icon {
  font-size: 20px;
}

.status-title {
  color: var(--professional-gray);
  font-size: 14px;
  font-weight: 500;
}

.status-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--midnight-blue);
  margin-bottom: 0.25rem;
}

.status-change {
  color: var(--signal-teal);
  font-size: 12px;
  font-weight: 500;
}

/* BILINGUAL Recent Documents */
.recent-docs {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(26, 54, 93, 0.1);
  border-radius: 16px;
  padding: 2rem;
}

.recent-docs .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn-secondary {
  background: rgba(43, 108, 184, 0.1);
  color: var(--medical-blue);
  border: 1px solid var(--medical-blue);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--medical-blue);
  color: white;
}

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

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: rgba(26, 54, 93, 0.05);
  border-radius: 8px;
  font-weight: 600;
  color: var(--midnight-blue);
  font-size: 14px;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(26, 54, 93, 0.1);
  border-radius: 8px;
  align-items: center;
  transition: var(--transition);
}

.table-row:hover {
  background: rgba(43, 108, 184, 0.05);
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-icon {
  font-size: 20px;
}

.doc-name {
  font-weight: 500;
  color: var(--midnight-blue);
}

.doc-meta {
  font-size: 12px;
  color: var(--professional-gray);
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.processed {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.processing {
  background: rgba(234, 88, 12, 0.1);
  color: var(--deep-orange);
}

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

.btn-icon {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: rgba(43, 108, 184, 0.1);
}

/* Compliance Indicators */
.compliance-indicators {
  position: fixed;
  top: 90px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
}

.indicator {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

.indicator.hipaa {
  background: var(--signal-teal);
}

.indicator.nphies {
  background: var(--deep-orange);
}

.indicator.fhir {
  background: var(--medical-blue);
}

/* RTL Support */
[dir="rtl"] .nav-container {
  flex-direction: row-reverse;
}

[dir="rtl"] .compliance-indicators {
  right: auto;
  left: 20px;
}

[dir="rtl"] .dashboard-main {
  flex-direction: row-reverse;
}

/* Responsive Design */
@media (width <= 768px) {
  .nav-container {
    padding: 1rem;
  }
  
  .main-nav {
    display: none;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  
  .dashboard-main {
    flex-direction: column;
  }
  
  .content-area {
    padding: 1rem;
  }
  
  .status-grid {
    grid-template-columns: 1fr;
  }
  
  .options-grid {
    grid-template-columns: 1fr;
  }
}
