/* User Page - Modern, Clean Design Matching Dashboard Theme */

/* Container */
.user-page-container {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Section Headers */
.user-section-header {
  margin-bottom: 1.5rem;
}

.user-section-header h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.25rem;
}

.section-description {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0;
}

/* Status Grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Status Cards */
.user-status-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.user-status-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Card Content */
.user-card-content {
  display: flex;
  flex-direction: column;
}

/* Card Header */
.user-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid #dee2e6;
}

.user-card-icon {
  width: 40px;
  height: 40px;
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-color);
  font-size: 1.125rem;
}

.user-card-title {
  flex: 1;
}

.user-card-title h6 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-color);
  margin: 0 0 0.375rem 0;
}

/* Status Indicator */
.user-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.user-status-indicator i {
  font-size: 0.9rem;
}

.user-status-indicator.user-status-disconnected {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.user-status-indicator.user-status-connected {
  background-color: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.user-status-indicator.user-status-connected i {
  color: #22c55e;
}

/* Card Footer */
.user-card-footer {
  padding: 1.25rem 1.5rem;
  background-color: #f8f9fa;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* User Action Buttons inside cards */
.btn-user-action {
  flex: 1;
  min-width: 140px;
  font-weight: 500;
  padding: 0.625rem 1rem;
}

/* Account Actions Grid */
.account-actions-grid {
  display: grid;
  gap: 1rem;
}

/* Action Buttons */
.user-action-button {
  width: 100%;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
}

.user-action-button:hover {
  background-color: #f8f9fa;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-action-button > i:first-child {
  font-size: 1.5rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.user-action-button.logout-button > i:first-child {
  color: #dc3545;
}

.action-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.action-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-color);
}

.action-subtitle {
  font-size: 0.85rem;
  color: #6c757d;
}

.action-arrow {
  font-size: 0.9rem;
  color: #adb5bd;
  transition: transform 0.2s ease;
}

.user-action-button:hover .action-arrow {
  transform: translateX(4px);
  color: var(--primary-color);
}

.user-action-button.logout-button:hover .action-arrow {
  color: #dc3545;
}

/* Terms Modal */
.user-terms-modal {
  max-width: 900px;
}

.user-terms-body {
  max-height: 60vh;
  overflow-y: auto;
}

.terms-content {
  padding: 0;
}

.terms-section {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
}

.terms-section:last-child {
  margin-bottom: 0;
}

.terms-section h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.terms-section p {
  color: var(--dark-color);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.terms-section p:last-child {
  margin-bottom: 0;
}

/* Custom Scrollbar */
.user-terms-body::-webkit-scrollbar {
  width: 8px;
}

.user-terms-body::-webkit-scrollbar-track {
  background: #f1f3f5;
  border-radius: 4px;
}

.user-terms-body::-webkit-scrollbar-thumb {
  background: #adb5bd;
  border-radius: 4px;
}

.user-terms-body::-webkit-scrollbar-thumb:hover {
  background: #6c757d;
}

/* PDF Viewer Styles */
.pdf-viewer-body {
  padding: 0;
  overflow: hidden;
}

.pdf-viewer-container {
  width: 100%;
  height: 65vh;
  min-height: 500px;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
}

.pdf-viewer-object {
  width: 100%;
  height: 100%;
  border: none;
}

.pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 3rem;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.pdf-fallback h5 {
  color: #495057;
  margin-bottom: 0.5rem;
}

.pdf-fallback p {
  max-width: 400px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-page-container {
    padding: 1rem 0.75rem;
  }

  .status-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .user-card-header {
    padding: 1.25rem;
  }

  .user-card-footer {
    padding: 1rem 1.25rem;
    flex-direction: column;
  }

  .btn-user-action {
    width: 100%;
  }

  .user-action-button {
    padding: 1rem 1.25rem;
  }

  .user-section-header h4 {
    font-size: 1.1rem;
  }
}
