/* Role-based Dashboard Styles */

/* Common dashboard styles */
.dashboard-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #2c3e50;
}

.dashboard-header {
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.8rem;
}

.dashboard-header h1 i {
  margin-right: 0.5rem;
  color: #667eea;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logout-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.logout-btn:hover {
  background: #c0392b;
}

.dashboard-content {
  padding: 2rem;
}

/* Dashboard grid and cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dashboard-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-icon {
  font-size: 2.5rem;
  color: #667eea;
}

.card-content h3 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1rem;
}

.card-value {
  font-size: 2rem;
  font-weight: bold;
  color: #27ae60;
}

/* Control panels */
.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.control-panel {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.control-panel h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 0.5rem;
}

/* Status indicators */
.status-indicator {
  padding: 0.25rem 0.5rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
}

.status-indicator.online {
  background: #d5f4e6;
  color: #27ae60;
}

.status-indicator.offline {
  background: #fadbd8;
  color: #e74c3c;
}

.status-indicator.warning {
  background: #fdeaa7;
  color: #f39c12;
}

/* Activity and timeline */
.activity-list {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-left: 3px solid #3498db;
  margin-bottom: 0.5rem;
  background: #f8f9fa;
  border-radius: 5px;
}

.activity-item i {
  color: #3498db;
}

/* Map-specific styles */
.map-interface {
  display: flex;
  height: calc(100vh - 120px);
  gap: 1rem;
}

.map-sidebar {
  width: 300px;
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.map-display {
  flex: 1;
  background: white;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.map-canvas {
  width: 100%;
  height: calc(100% - 60px);
  background: #ecf0f1;
  position: relative;
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.map-toolbar {
  height: 60px;
  background: #34495e;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
}

.toolbar-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.toolbar-btn:hover {
  background: #2980b9;
}

/* Flight operations styles */
.operations-dashboard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-row {
  display: flex;
  gap: 2rem;
}

.ops-panel {
  flex: 1;
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ops-panel.wide {
  flex: 2;
}

.flight-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.flight-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 5px;
  border-left: 4px solid #3498db;
}

.flight-number {
  font-weight: bold;
  color: #2c3e50;
}

.flight-destination {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.status {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.status.on-time {
  background: #d5f4e6;
  color: #27ae60;
}

.status.delayed {
  background: #fadbd8;
  color: #e74c3c;
}

/* Access denied styles */
.access-denied-container {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Role assignment styles */
.roles-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1rem;
}

.role-section {
  flex: 1;
  min-width: 200px;
}

.role-section h5 {
  color: #2c3e50;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #ecf0f1;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.role-checkbox:hover {
  background: #f8f9fa;
}

.role-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.role-checkbox span {
  color: #2c3e50;
  font-weight: 500;
}

/* Profile styles matching ticket interface */
.profile-info {
  text-align: center;
  padding: 15px;
}

.profile-info p {
  margin: 12px 0;
  font-size: 1rem;
}

.profile-pic {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #eee;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.profile-actions {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.upload-btn {
  background: #667eea;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.upload-btn:hover {
  background: #5a6fdb;
}

.progress-container {
  width: 100%;
  max-width: 300px;
  margin: 10px 0;
}

.progress-container progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
}

.progress-container p {
  margin: 5px 0;
  font-size: 12px;
  color: #666;
}

.error-message {
  color: #e74c3c;
  font-size: 14px;
  margin: 10px 0;
}

.role-checkbox input[type="checkbox"]:checked + span {
  color: #667eea;
  font-weight: 600;
}

/* User details and info styling */
.user-details {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.user-info-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.role-assignment {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #ecf0f1;
}

.info-text {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .control-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-row {
    flex-direction: column;
  }
  
  .map-interface {
    flex-direction: column;
    height: auto;
  }
  
  .map-sidebar {
    width: 100%;
  }
  
  .roles-checkboxes {
    flex-direction: column;
    gap: 1rem;
  }
  
  .role-section {
    min-width: auto;
  }
}

/* POS Activation Dashboard Styles */
.pos-activation-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #667eea;
}

.pos-activation-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.success-btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.success-btn:hover {
  background: #219a52;
}

.pos-table-container {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  overflow-x: auto;
}

.pos-activation-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.pos-activation-table th,
.pos-activation-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

.pos-activation-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #ecf0f1;
}

.pos-activation-table tbody tr:hover {
  background: #f8f9fa;
}

.pos-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.pos-checkbox:hover {
  background: #f1f3f4;
}

.pos-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.pos-checkbox span {
  color: #2c3e50;
  font-weight: 500;
  font-size: 0.9rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.status-badge.status-pending {
  background: #ffeaa7;
  color: #d63031;
}

.status-badge.status-acknowledged {
  background: #81ecec;
  color: #00b894;
}

.status-badge.status-active {
  background: #d5f4e6;
  color: #27ae60;
}

.status-badge.status-expired {
  background: #fadbd8;
  color: #e74c3c;
}

.loading-state,
.no-data-state {
  text-align: center;
  padding: 2rem;
  color: #7f8c8d;
  font-size: 1.1rem;
}

.loading-state i {
  margin-right: 0.5rem;
  color: #667eea;
}

.no-data-state i {
  margin-right: 0.5rem;
  color: #95a5a6;
}

/* Responsive POS Table */
@media (max-width: 768px) {
  .pos-activation-controls {
    flex-direction: column;
  }

  .pos-activation-table {
    font-size: 0.9rem;
  }

  .pos-activation-table th,
  .pos-activation-table td {
    padding: 8px;
  }
}