/* Global Styles for CBC Monitoring Tool */

:root {
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #28a745;
  --accent-color: #17a2b8;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --border-radius: 0.5rem;
  --transition: all 0.3s ease;
  --sidebar-width: 250px;
  --header-height: 70px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f5f7fb;
  font-size: 16px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
.main-header {
  background-color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 15px;
}

.logo h1 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav ul li {
  margin-left: 1.5rem;
}

.main-nav ul li a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  background-color: var(--primary-color);
  color: white;
}

.main-nav ul li a i {
  font-size: 1.1em;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
}

.mobile-menu-toggle:hover {
  background-color: var(--light-color);
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--dark-color);
  margin: 3px 0;
  transition: 0.3s;
}

/* Main Content */
main {
  padding: 30px 0;
}

.admin-dashboard {
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
  font-size: 1.8rem;
  color: var(--dark-color);
  font-weight: 600;
}

.province-header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px 20px;
  text-align: center;
  margin-bottom: 20px;
  border-radius: 8px;
}

.province-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.user-welcome {
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
}

/* Stat Cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 25px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 10px 0;
  line-height: 1.2;
}

.stat-label {
  color: var(--gray-color);
  font-size: 1rem;
  font-weight: 500;
}

/* Action Cards */
.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.action-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.action-card h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.action-card p {
  color: var(--gray-color);
  margin-bottom: 20px;
}

.action-btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  margin-top: 15px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  width: 100%;
  max-width: 200px;
}

.action-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.action-btn i {
  margin-right: 8px;
}

/* Section Cards */
.reports-section, .users-table, .form-details, .form-history, .export-options, .export-filters {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 25px;
  margin-bottom: 30px;
}

.reports-section h2, .users-table h2, .form-details h2, .form-history h2, .export-options h2, .export-filters h2 {
  margin-top: 0;
  color: var(--dark-color);
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.section-header h2 {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Form Styles */
.form-section {
  margin-bottom: 25px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.form-section h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-color);
  font-size: 1.3rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-color);
  font-size: 0.95rem;
}

.form-control {
  background: #fdfdfd;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 15px;
  width: 100%;
  font-size: 16px;
  transition: var(--transition);
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-control[readonly] {
  background-color: var(--light-color);
  cursor: not-allowed;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-success {
  background-color: var(--secondary-color);
  color: white;
}

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

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

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

.btn-danger-outline {
  background-color: transparent;
  border: 2px solid var(--danger-color);
  color: var(--danger-color);
  padding: 8px 16px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 0.875rem;
  transition: var(--transition);
}

.btn-danger-outline:hover {
  background-color: var(--danger-color);
  color: white;
}

.btn-secondary {
  background-color: var(--gray-color);
  color: white;
}

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

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background-color: transparent;
}

th, td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--border-color);
}

th {
  background-color: var(--light-color);
  font-weight: 600;
  color: var(--dark-color);
  border-top: none;
}

tr:nth-of-type(even) {
  background-color: rgba(0,0,0,0.02);
}

tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

/* Status Badges */
.status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

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

.status.inactive {
  background-color: #fff3cd;
  color: #856404;
}

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

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

.status.in-progress {
  background-color: #fff3cd;
  color: #856404;
}

.status.pending {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* Filter Styles */
.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--dark-color);
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: var(--transition);
  box-sizing: border-box;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.filter-btn {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-right: 10px;
  transition: var(--transition);
}

.filter-btn:hover {
  background-color: var(--primary-hover);
}

/* Export Card */
.export-card {
  background: var(--light-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 15px;
  transition: var(--transition);
}

.export-card:hover {
  border-color: var(--primary-color);
  background: white;
}

.export-card h3 {
  margin-top: 0;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.export-card h3 i {
  margin-right: 10px;
}

.export-description {
  color: var(--gray-color);
  margin: 10px 0;
}

.export-format {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}

.format-option {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 15px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.format-option:hover {
  background: #e9ecef;
}

.format-option.selected {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.export-btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  border: none;
  cursor: pointer;
  margin-top: 15px;
  transition: var(--transition);
  width: 100%;
  max-width: 250px;
}

.export-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Charts */
.chart-container {
  height: 400px;
  margin: 20px 0;
  position: relative;
}

/* History Items */
.history-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.history-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.history-user {
  font-weight: bold;
  color: var(--primary-color);
}

.history-date {
  color: var(--gray-color);
  font-size: 0.9rem;
}

.history-action {
  color: var(--gray-color);
  margin-bottom: 5px;
  font-weight: 500;
}

.history-details {
  background: var(--light-color);
  border-radius: var(--border-radius);
  padding: 12px 15px;
  font-size: 0.9rem;
  font-family: monospace;
}

/* Footer Styles */
.main-footer {
  background-color: var(--dark-color);
  color: white;
  padding: 25px 0;
  margin-top: 40px;
}

.main-footer .container {
  text-align: center;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  
  .admin-dashboard {
    padding: 15px 10px;
  }
  
  .main-header .container {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    position: relative;
    padding: 10px;
  }
  
  .logo {
    order: 1;
    text-align: center;
    margin: 15px 0;
  }
  
  .logo h1 {
    font-size: 1.3rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
    position: absolute;
    top: 20px;
    right: 20px;
  }
  
  .main-nav {
    order: 3;
    width: 100%;
  }
  
  .main-nav ul {
    display: none;
    flex-direction: column;
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-top: 10px;
    border: 1px solid var(--border-color);
  }
  
  .main-nav ul.show {
    display: flex;
  }
  
  .main-nav ul li {
    margin: 5px 0;
  }
  
  .main-nav ul li a {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .user-welcome {
    align-self: flex-end;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .admin-actions {
    grid-template-columns: 1fr;
  }
  
  .action-card {
    padding: 20px;
  }
  
  .action-btn {
    max-width: 100%;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .filter-row {
    grid-template-columns: 1fr;
  }
  
  .export-format {
    justify-content: center;
  }
  
  .export-btn {
    max-width: 100%;
  }
  
  /* Adjust table for mobile */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .chart-container {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .admin-header h1 {
    font-size: 1.4rem;
  }
  
  .reports-section, .users-table, .form-details, .form-history, .export-options, .export-filters {
    padding: 20px 15px;
  }
  
  .action-card, .stat-card {
    padding: 20px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .form-control {
    padding: 10px;
  }
  
  .export-card {
    padding: 15px;
  }
}

/* Form-specific styles - added for CBC Monitoring Forms */

/* CBC Form Container */
.form-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 30px;
}

.form-container h1 {
    font-size: 1.6rem;
    color: #1f2937;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

/* Progress Bar Enhancement */
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin: 25px 0 35px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #10b981);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Stage Indicator */
.stage-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 45px;
    position: relative;
    padding: 0 15px;
}

.stage-indicator::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 50px;
    right: 50px;
    height: 4px;
    background: #e5e7eb;
    z-index: 0;
    border-radius: 2px;
}

.stage-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.stage-dot {
    width: 40px;
    height: 40px;
    background-color: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #9ca3af;
    transition: all 0.3s ease;
    border: 3px solid #f9fafb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stage-dot.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: scale(1.15);
}

.stage-dot.completed {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.stage-dot.completed i {
    font-size: 12px;
}

.stage-label {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    text-align: center;
    white-space: nowrap;
}

.stage-dot.active + .stage-label,
.stage-dot.completed + .stage-label {
    color: #374151;
}

/* Form Sections */
.form-section {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 8px 35px rgba(0,0,0,0.12);
}

.form-section h2 {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 18px;
    border-bottom: 3px solid #6366f1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.form-section h2 i {
    color: #6366f1;
}

.form-section > p {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.7;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 8px;
    color: #6366f1;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 4px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
    color: #374151;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.full-width {
    grid-column: 1 / -1;
}

/* Domain Section */
.domain-section {
    margin-bottom: 40px;
    padding: 28px;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.domain-section h3 {
    color: #6366f1;
    font-size: 1.15rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #6366f1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.domain-section h3 i {
    font-size: 1.1rem;
}

/* Rating Scale Display */
.rating-scale {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
    padding: 0 10px;
}

/* Indicator Rows */
.indicator-row {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.indicator-row:hover {
    background: rgba(99, 102, 241, 0.03);
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 10px;
}

.indicator-row:last-child {
    border-bottom: none;
}

.indicator-text {
    flex: 2;
    padding-right: 25px;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
}

.rating-options {
    flex: 1;
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.rating-options label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin: 0;
    font-size: 0;
    font-weight: 600;
}

.rating-options label:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.rating-options input[type="radio"] {
    display: none;
}

.rating-options input[type="radio"] + span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #6b7280;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.rating-options input[type="radio"]:checked + span {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: scale(1.1);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f3f4f6;
}

.form-navigation .btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.form-navigation .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    border: none;
}

.form-navigation .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

.form-navigation .btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.form-navigation .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.form-navigation .btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    border: none;
}

.form-navigation .btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    border-top-color: #8b5cf6;
    animation: spin 0.9s linear infinite;
}

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

/* Engagement & Achievement Badges */
.engagement-badge,
.achievement-message,
.progress-milestone {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 20px 28px;
    border-radius: 14px;
    text-align: center;
    margin: 25px 0;
    font-weight: 600;
    font-size: 1rem;
    animation: fadeIn 0.4s ease;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
    display: none;
}

.engagement-badge i,
.achievement-message i {
    margin-right: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stats Display */
.stats-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stats-display .stat-card {
    background: white;
    padding: 24px 36px;
    border-radius: 16px;
    text-align: center;
    min-width: 160px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.stats-display .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.stats-display .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-display .stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 8px;
    font-weight: 500;
}

/* Completion Badge */
.completion-badge {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    color: white;
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 12px 50px rgba(139, 92, 246, 0.45);
}

.completion-badge .badge-icon {
    font-size: 64px;
    margin-bottom: 18px;
    display: block;
    animation: bounce 1.2s infinite alternate;
}

.completion-badge .badge-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.completion-badge .badge-desc {
    font-size: 1.05rem;
    opacity: 0.95;
    line-height: 1.6;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

/* Review Summary */
.review-summary {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px solid #a7f3d0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.review-summary .summary-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px dashed #d1d5db;
}

.review-summary .summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-summary .summary-label {
    font-weight: 800;
    color: #059669;
    font-size: 1.05rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-summary .summary-value {
    color: #374151;
    line-height: 1.9;
    font-size: 0.95rem;
}

.review-summary .summary-value div {
    margin-bottom: 6px;
}

/* Observation Table */
.observation-table {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.observation-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.observation-table th,
.observation-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.observation-table th {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.observation-table td input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
}

.observation-table td input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.observation-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.observation-table tr:hover {
    background-color: #f1f5f9;
}

/* Monitored By Grid */
.monitored-by-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 25px;
}

.monitored-by-item {
    display: flex;
    flex-direction: column;
}

.monitored-by-item label {
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.monitored-by-item input {
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.monitored-by-item input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
    background: white;
}

/* Interview Questions */
.interview-questions .form-group {
    background: #f8fafc;
    padding: 25px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.interview-questions .form-group:hover {
    border-color: #6366f1;
}

.interview-questions label {
    color: #4f46e5;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Progress Milestone */
.progress-milestone {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #bae6fd;
    color: #0369a1;
    box-shadow: 0 6px 20px rgba(3, 105, 161, 0.15);
    display: block;
}

.progress-milestone .emoji-animation {
    font-size: 42px;
    margin-bottom: 10px;
}

.progress-milestone .milestone-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0369a1;
}

.progress-milestone .milestone-desc {
    color: #0c4a6e;
    font-size: 0.95rem;
}

/* Responsive Design for Forms */
@media (max-width: 768px) {
    .form-container {
        padding: 15px;
    }
    
    .form-container h1 {
        font-size: 1.3rem;
    }
    
    .stage-indicator {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .stage-indicator::before {
        display: none;
    }
    
    .stage-label {
        font-size: 11px;
    }
    
    .stage-dot {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .indicator-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
    
    .indicator-text {
        padding-right: 0;
    }
    
    .rating-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .rating-scale {
        display: none;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 18px;
    }
    
    .form-navigation .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-display {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-display .stat-card {
        width: 100%;
        max-width: 220px;
    }
    
    .form-section {
        padding: 24px;
    }
    
    .domain-section {
        padding: 20px;
    }
    
    .monitored-by-grid {
        grid-template-columns: 1fr;
    }
    
    .review-summary {
        padding: 20px;
    }
    
    .completion-badge {
        padding: 25px;
    }
}


.mb-20 {
  margin-bottom: 20px;
}

.mt-20 {
  margin-top: 20px;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.w-100 {
  width: 100%;
}

/* Animation for interactive elements */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-element {
  animation: fadeIn 0.5s ease-out;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: white;
  margin: 5vh auto;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  color: var(--dark-color);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-content h2 i {
  color: var(--primary-color);
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--gray-color);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.close:hover,
.close:focus {
  color: var(--danger-color);
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

.loading-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--gray-color);
}

.loading-overlay::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

/* Table Improvements */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.users-table table {
  min-width: 800px;
}

.table-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* Role Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.role-badge.admin {
  background-color: #e8e5ff;
  color: #5b57ff;
}

.role-badge.monitor {
  background-color: #e5f7ff;
  color: #17a2b8;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-color);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 10px;
  color: var(--dark-color);
}

/* Search Improvements */
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.search-wrapper input {
  padding-right: 40px;
}

.search-wrapper .clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-color);
  cursor: pointer;
  padding: 5px;
  display: none;
}

.search-wrapper .clear-search.visible {
  display: block;
}

.search-wrapper .clear-search:hover {
  color: var(--danger-color);
}

/* Pagination Improvements */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 25px;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--dark-color);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: var(--transition);
  background: white;
}

.pagination a:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination .current {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination .disabled {
  color: var(--gray-color);
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination-info {
  text-align: center;
  color: var(--gray-color);
  font-size: 0.9rem;
  margin-top: 15px;
}

/* Score Caption */
.score-caption {
  background: #f8f9fa;
  border-left: 4px solid var(--primary-color);
  padding: 15px 20px;
  margin-top: 20px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.score-caption h4 {
  margin: 0 0 10px 0;
  color: var(--dark-color);
  font-size: 1rem;
}

.score-caption ul {
  margin: 0;
  padding-left: 20px;
}

.score-caption li {
  margin-bottom: 8px;
  color: var(--gray-color);
  font-size: 0.9rem;
}

.score-caption ul ul {
  margin-top: 8px;
}

.score-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.score-high {
  background-color: #d4edda;
  color: #155724;
}

.score-medium {
  background-color: #fff3cd;
  color: #856404;
}

.score-low {
  background-color: #f8d7da;
  color: #721c24;
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-item {
  background: white;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.stat-item .stat-info {
  display: flex;
  flex-direction: column;
}

.stat-item .stat-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark-color);
}

.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--gray-color);
}

/* ============================================
   AUTHENTICATION PAGES (Login/Register)
   ============================================ */

/* Auth Page Layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: pulse 15s infinite linear;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.auth-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* Auth Card */
.auth-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 40px 30px;
  text-align: center;
}

.auth-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 15px;
}

.auth-header .logo-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-header .logo-icon i {
  font-size: 28px;
  color: white;
}

.auth-header h1 {
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

.auth-header p {
  color: rgba(255, 255, 255, 0.85);
  margin: 10px 0 0;
  font-size: 0.95rem;
}

/* Auth Form */
.auth-form-container {
  padding: 40px;
}

.auth-form .form-group {
  margin-bottom: 24px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-color);
  font-size: 0.9rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-color);
  font-size: 1rem;
  transition: var(--transition);
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: var(--transition);
  background: #f8f9fa;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-wrapper input:focus + i,
.input-wrapper:focus-within i {
  color: #667eea;
}

.input-wrapper .password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--gray-color);
  transition: var(--transition);
  background: none;
  border: none;
  padding: 0;
}

.input-wrapper .password-toggle:hover {
  color: var(--dark-color);
}

/* Submit Button */
.auth-form .btn-submit {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.auth-form .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.auth-form .btn-submit:active {
  transform: translateY(0);
}

.auth-form .btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-form .btn-submit .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  padding: 0 15px;
  color: var(--gray-color);
  font-size: 0.85rem;
}

/* Social Login */
.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: white;
  color: var(--dark-color);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  border-color: var(--dark-color);
  background: var(--light-color);
}

/* Auth Links */
.auth-links {
  text-align: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid var(--border-color);
}

.auth-links p {
  color: var(--gray-color);
  font-size: 0.9rem;
  margin: 0;
}

.auth-links a {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.auth-links a:hover {
  text-decoration: underline;
}

/* Error Message */
.auth-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.auth-error i {
  font-size: 1.1rem;
}

/* Success Message */
.auth-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

/* Remember Me */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
  cursor: pointer;
}

.remember-me label {
  margin: 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray-color);
}

.forgot-password {
  font-size: 0.9rem;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* Footer */
.auth-footer {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  margin: 0;
  color: var(--gray-color);
  font-size: 0.85rem;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-header {
    padding: 30px 25px 25px;
  }
  
  .auth-form-container {
    padding: 30px 25px;
  }
  
  .auth-header h1 {
    font-size: 1.4rem;
  }
  
  .social-login {
    grid-template-columns: 1fr;
  }
  
  .auth-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}