/* ==========================================================================
   ROOT VARIABLES
   ========================================================================== */
:root {
  --primary: #00b4d8;
  --secondary: #0077b6;
  --success: #38c172;
  --danger: #e3342f;
  --warning: #f6993f;
  --info: #3490dc;
  --light: #f8fafc;
  --dark: #2d3748;
  --white: #ffffff;
  --gray: #6c757d;
}

/* ==========================================================================
   LOGIN PAGE STYLES
   ========================================================================== */
/* Login Container and Card */
.login-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem 1rem;
}

.login-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  color: var(--primary);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.login-header p {
  color: #666;
  font-size: 0.95rem;
  margin-top: 0;
}

/* Login Methods and Buttons */
.login-methods {
  margin: 1.5rem 0;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  width: 100%;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.google-login-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.google-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
}

/* Login Footer and Error Messages */
.login-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 2rem;
}

.error-message {
  background: #fdeded;
  border-left: 4px solid var(--danger);
  color: var(--danger);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.error-message i {
  margin-right: 0.5rem;
}

/* ==========================================================================
   DASHBOARD PAGE STYLES
   ========================================================================== */
/* Main Dashboard Layout */
.dashboard-page {
  background-color: #f0f8ff;
  min-height: 100vh;
}

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Logo and User Actions */
.logo {
  display: flex;
  align-items: center;
}

.user-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* ==========================================================================
   BUTTON STYLES
   ========================================================================== */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Button Variations */
.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.btn-outline-primary {
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-outline-info {
  color: var(--info);
  border: 1px solid var(--info);
}

.btn-outline-info:hover {
  background: var(--info);
  color: white;
}

.btn-outline-danger {
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
}

/* ==========================================================================
   STATS AND METRICS
   ========================================================================== */
/* Stats Grid Layout */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

/* Stats Card Components */
.stats-card-body {
  display: flex;
  flex-direction: column;
}

.stats-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* Trend Indicators */
.stats-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.trend-up {
  color: var(--success);
}

.trend-down {
  color: var(--danger);
}


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  .stats-grid-container {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    justify-content: center;
    text-align: center;
  }

  .user-actions {
    align-items: center;
  }
}

@media (max-width: 576px) {
  .achievements-card {
    padding: 1.5rem 1rem;
  }

  .achievement-header h2 {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 2rem;
}

/* ==========================================================================
   OTHER STYLES
   ========================================================================== */
/* Dashboard Page Styles */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.welcome-text {
  font-weight: 500;
  margin-right: 1rem;
  color: #333;
}

.nav-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .dashboard-content {
    grid-template-columns: 1fr 2fr;
  }
}

.stats-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.stats-card:hover {
  transform: translateY(-2px);
}

.card-title {
  color: var(--gray);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.recent-scans {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray);
}

.empty-state i {
  font-size: 3rem;
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.dashboard-btn {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.dashboard-btn i {
  margin-right: 0.5rem;
}

.dashboard-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-footer {
  text-align: center;
  margin-top: 2.5rem;
  color: #666;
  font-size: 0.875rem;
}

.support-link {
  color: #00b4d8;
  text-decoration: none;
  font-weight: 500;
}

.support-link:hover {
  text-decoration: underline;
}

.country-flag {
  width: 20px;
  height: auto;
  margin-right: 8px;
}

/* Achievement-centered dashboard */
.achievement-centered {
  display: block !important;
  max-width: 700px;
  margin: 0 auto;
}

.achievements-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.achievement-header {
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
}

.achievement-header h2 {
  color: #00b4d8;
  font-size: 1.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.trophy-icon {
  font-size: 1.5rem;
  display: inline-block;
  margin-right: 0.25rem;
}

.achievement-stats {
  margin-bottom: 2rem;
  width: 100%;
}

.achievement-highlight {
  background-color: #e6f7fc;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.highlight-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 180, 216, 0.2);
  position: relative;
}

.star-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.achievement-text {
  text-align: left;
}

.achievement-text h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  color: #00b4d8;
  font-weight: 600;
}

.achievement-text p {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
}

.achievement-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
}

@media (min-width: 600px) {
  .achievement-badges {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 400px) {
  .achievement-badges {
    grid-template-columns: 1fr;
  }
}

.maia-master-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 2rem;
}

.badge {
  background: white;
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  border: 1px solid #eee;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.badge.maia-master {
  max-width: 220px;
  padding: 1rem;
  margin: 0 auto;
  background: linear-gradient(to right, #f9f9f9, #e6f7fc);
}

.badge.earned {
  border: 1px solid #e0f7fa;
  background-color: #e6f7fc;
}

.badge.locked {
  opacity: 0.5;
  filter: grayscale(0.8);
}

/* Colorful badge icons */
.badge.first-look .badge-icon {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
}

.badge.apprentice .badge-icon {
  background: linear-gradient(135deg, #38b000, #70e000);
}

.badge.health-explorer .badge-icon {
  background: linear-gradient(135deg, #ff5400, #ff9e00);
}

.badge.maia-expert .badge-icon {
  background: linear-gradient(135deg, #7209b7, #560bad);
}

.badge.ai-enthusiast .badge-icon {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
}

.badge.health-advocate .badge-icon {
  background: linear-gradient(135deg, #f72585, #b5179e);
}

.badge.maia-master .badge-icon {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00b4d8;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.badge-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
}

.badge-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.badge-desc {
  font-size: 0.75rem;
  color: #666;
}

.analyze-button-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.analyze-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #00b4d8;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 180, 216, 0.3);
}

.analyze-btn:hover {
  background-color: #0097b2;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 180, 216, 0.4);
}

.analyze-btn i {
  font-size: 1.2rem;
}

.dashboard-actions {
  margin-top: 2rem;
  justify-items: center;
}

.dashboard-actions .dashboard-btn {
  margin-top: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 116, 178, 0.2);
}

.flex-row {
  display: flex;
  flex-direction: row;
  list-style: none;
  /* Remove default list styling */
  padding: 0;
  /* Remove default padding */
  margin: 0;
  /* Remove default margin */
  gap: 1rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.img-thumbnail {
  border: 1px solid #dee2e6;
  /* Light gray border */
  border-radius: 0.25rem;
  /* Rounded corners */
  padding: 0.25rem;
  /* Padding around the image */
  max-width: 100%;
  /* Responsive width */
  height: 50%;
  /* Maintain aspect ratio */
  transition: transform 0.2s;
  /* Smooth scaling effect */
}

.detailed-report {
  white-space: normal;
  /* Preserve whitespace and wrap text */
  word-wrap: break-all;
  /* Break long words if necessary */
  overflow-wrap: break-all;
  /* Break words at the end of the line */
  max-height: 400px;
  /* Optional: Set a max height for the report */
  overflow-y: auto;
  /* Optional: Add vertical scroll if content exceeds max height */
  padding: 1rem;
  /* Optional: Add padding for better spacing */
  background: #f8f9fa;
  /* Optional: Light background for better readability */
  border-radius: 8px;
  /* Optional: Rounded corners */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* Optional: Add shadow for depth */
}

.inline-label {
  display: inline;
  margin-left: 0.5rem;
  /* Space between label and value */
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.page-item {
  display: inline-flex;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--dark);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
}

.page-item.active .page-link {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.page-link:hover {
  background: var(--light);
  border-color: var(--primary);
  color: var(--primary);
}

.page-link i {
  font-size: 0.875rem;
}

/* Utility Classes */
.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 2rem;
}

.text-center {
  text-align: center;
}

/* Table Styles */
.table-container {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background: #f8fafc;
  padding: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--gray);
  border-bottom: 2px solid #e2e8f0;
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: var(--dark);
}

.table tr:last-child td {
  border-bottom: none;
}

.table-striped tbody tr:nth-child(odd) {
  background: #f8fafc;
}

.stats-grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.stats-grid-item {
  min-width: 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.metric-item {
  background: var(--surface-card);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.metric-item h4 {
  color: var(--text-color-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.metric-number {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

@media (max-width: 768px) {
  .stats-grid-container {
    grid-template-columns: 1fr;
  }
}

.fixed-height-section {
  height: 400px;
  /* Adjust this value as needed */
}

.h-100 {
  height: 100%;
}

.metrics-grid {
  flex: 1;
  overflow-y: auto;
}


/* Feedback Details Styling */
.feedback-info-section {
  background: linear-gradient(145deg, #f3f4f6, #ffffff);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.feedback-user-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.feedback-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 180, 216, 0.3);
}

.feedback-details {
  flex: 1;
}

.feedback-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 0.25rem 0;
}

.feedback-email {
  color: var(--gray);
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}

.feedback-rating {
  display: flex;
  gap: 0.25rem;
}

.feedback-rating i {
  color: #fbbf24;
  font-size: 1.1rem;
}

.feedback-comment-box {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  border-left: 4px solid var(--primary);
}

.feedback-comment-box h4 {
  color: var(--primary);
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.feedback-comment-box p {
  color: var(--dark);
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Update existing detailed-report class */
.detailed-report {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

/* Update existing scan-details class */
.scan-details {
  background: linear-gradient(145deg, #ffffff, #f3f4f6);
  border-radius: 15px;
  padding: 1.5rem;
}

@media (max-width: 480px) {
  .highlight-icon {
    width: 45px;
    height: 45px;
  }

  .star-icon {
    font-size: 22px;
  }
}