/**
 * Management Pages Styles
 * Styles for Profile, Users, and Vehicles management pages
 */

/* Management Panel Overlay */
.mgmt-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.mgmt-panel-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

/* Panel Header */
.mgmt-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 2px solid #00555F;
  background: #f8f9fa;
}

.mgmt-panel-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #00555F;
}

.mgmt-panel-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mgmt-panel-close:hover {
  background: #e0e0e0;
  color: #333;
}

/* Panel Body */
.mgmt-panel-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

/* Form Styles */
.mgmt-form-group {
  margin-bottom: 20px;
}

.mgmt-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.mgmt-form-group input,
.mgmt-form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mgmt-form-group input:focus,
.mgmt-form-group select:focus {
  outline: none;
  border-color: #00555F;
  box-shadow: 0 0 0 3px rgba(0, 85, 95, 0.1);
}

.mgmt-form-group input:read-only {
  background: #f5f5f5;
  cursor: not-allowed;
}

/* Info Display */
.mgmt-info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.mgmt-info-label {
  font-weight: 600;
  color: #555;
}

.mgmt-info-value {
  color: #333;
}

/* Buttons */
.mgmt-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mgmt-btn-primary {
  background: #00555F;
  color: white;
}

.mgmt-btn-primary:hover {
  background: #003d45;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 85, 95, 0.3);
}

.mgmt-btn-secondary {
  background: #6c757d;
  color: white;
}

.mgmt-btn-secondary:hover {
  background: #5a6268;
}

.mgmt-btn-success {
  background: #28a745;
  color: white;
}

.mgmt-btn-success:hover {
  background: #218838;
}

.mgmt-btn-danger {
  background: #dc3545;
  color: white;
}

.mgmt-btn-danger:hover {
  background: #c82333;
}

.mgmt-btn-small {
  padding: 8px 12px;
  font-size: 14px;
  gap: 0;
  min-width: auto;
}

.mgmt-btn-small i {
  margin: 0;
}

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

.mgmt-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Table Styles */
.mgmt-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.mgmt-table th,
.mgmt-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.mgmt-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #00555F;
}

.mgmt-table tr:hover {
  background: #f5f5f5;
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-online {
  background: #d4edda;
  color: #155724;
}

.status-offline {
  background: #f8d7da;
  color: #721c24;
}

.role-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.role-admin {
  background: #d1ecf1;
  color: #0c5460;
}

.role-mobile {
  background: #fff3cd;
  color: #856404;
}

.public-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #d4edda;
  color: #155724;
  margin-left: 10px;
}

/* Error/Success Messages */
.mgmt-message {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.mgmt-message-error {
  background: #fff3f3;
  border: 1px solid #ffcccb;
  color: #d32f2f;
}

.mgmt-message-success {
  background: #f0f9f4;
  border: 1px solid #c3e6cb;
  color: #28a745;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state i {
  font-size: 64px;
  color: #ddd;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 20px;
  color: #555;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 14px;
  color: #888;
  margin-bottom: 30px;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
}

.loading-spinner i {
  font-size: 40px;
  color: #00555F;
  animation: spin 1s linear infinite;
}

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

/* API Documentation Styles */
.api-docs-panel .mgmt-panel-content {
  max-width: 1200px;
}

.api-docs-intro {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid #00555F;
}

.api-docs-intro p {
  margin: 8px 0;
  line-height: 1.6;
}

.api-docs-intro code {
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #d63384;
}

.api-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
}

.api-section:last-child {
  border-bottom: none;
}

.api-section h3 {
  color: #00555F;
  margin-bottom: 20px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-section h3 i {
  font-size: 18px;
}

.api-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 10px 0;
}

.api-method {
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  min-width: 60px;
  text-align: center;
}

.api-method.get {
  background: #d4edda;
  color: #155724;
}

.api-method.post {
  background: #cce5ff;
  color: #004085;
}

.api-method.put {
  background: #fff3cd;
  color: #856404;
}

.api-method.delete {
  background: #f8d7da;
  color: #721c24;
}

.api-path {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #495057;
}

.api-description {
  color: #666;
  margin: 10px 0;
  line-height: 1.6;
}

.api-example {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 15px;
  margin: 15px 0;
}

.api-example h4 {
  color: #00555F;
  font-size: 14px;
  margin: 10px 0 8px 0;
  font-weight: 600;
}

.api-example pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 8px 0;
}

.api-example code {
  font-family: 'Courier New', Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.api-notes {
  list-style: none;
  padding: 0;
}

.api-notes li {
  padding: 10px;
  margin: 8px 0;
  background: #f8f9fa;
  border-left: 3px solid #00555F;
  border-radius: 4px;
}

.api-notes li::before {
  content: "→ ";
  color: #00555F;
  font-weight: bold;
  margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mgmt-panel-content {
    width: 95%;
    max-height: 95vh;
  }

  .mgmt-panel-header {
    padding: 20px;
  }

  .mgmt-panel-header h2 {
    font-size: 20px;
  }

  .mgmt-panel-body {
    padding: 20px;
  }

  .mgmt-table {
    font-size: 14px;
  }

  .mgmt-table th,
  .mgmt-table td {
    padding: 8px;
  }

  .api-endpoint {
    flex-direction: column;
    align-items: flex-start;
  }

  .api-path {
    font-size: 14px;
  }

  .api-example pre {
    font-size: 12px;
  }
}
