/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --background-color: #f9fafb;
  --card-background: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Login Screen Styles */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-container {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: row;
}

.login-logo {
  flex: 1;
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login-logo i {
  font-size: 4rem;
  margin-bottom: 20px;
}

.login-logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.login-logo p {
  opacity: 0.9;
  font-size: 1rem;
}

.login-form {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.login-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.user-type-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.type-btn {
  flex: 1;
  padding: 15px 10px;
  border: 2px solid var(--border-color);
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.type-btn i {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.type-btn span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.type-btn:hover {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.05);
}

.type-btn.active {
  border-color: var(--primary-color);
  background: rgba(79, 70, 229, 0.1);
}

.type-btn.active i {
  color: var(--primary-color);
}

.type-btn.active span {
  color: var(--primary-color);
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.input-wrapper .form-control {
  padding-left: 45px;
}

.code-hint {
  display: block;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.login-help {
  margin-top: 25px;
  padding: 20px;
  background: var(--background-color);
  border-radius: var(--radius-md);
}

.login-help p {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.login-help ul {
  list-style: none;
  font-size: 0.85rem;
}

.login-help li {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.login-help code {
  background: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}

/* Main App Hidden */
.main-app.hidden {
  display: none;
}

.user-view.hidden {
  display: none;
}

/* Header Styles */
.header {
  background-color: var(--card-background);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo i {
  font-size: 1.8rem;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.user-info i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.user-role {
  font-size: 0.8rem;
  background: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #4b5563;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Stat Cards */
.stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 24px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.9;
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

/* Evaluation Section */
.evaluate-section {
  padding: 80px 0;
  background-color: var(--background-color);
}

.evaluation-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-card {
  background-color: var(--card-background);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.form-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-card h3 i {
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--card-background);
  color: var(--text-primary);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
  color: var(--text-secondary);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Rating Stars */
.criteria-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.criteria-item:last-child {
  border-bottom: none;
}

.criteria-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.criteria-label {
  font-weight: 500;
  color: var(--text-primary);
}

.criteria-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 30px;
  text-align: center;
}

.rating-stars {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.rating-stars i {
  font-size: 1.8rem;
  color: var(--border-color);
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.2s;
}

.rating-stars i:hover {
  transform: scale(1.1);
}

.rating-stars i.active {
  color: var(--warning-color);
}

.criteria-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 32px;
}

/* Status Message */
.status-message {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--warning-color);
  color: var(--warning-color);
  font-size: 0.95rem;
}

.status-message i {
  font-size: 1.2rem;
}

/* Dashboard Section */
.dashboard-section,
.admin-section {
  padding: 100px 0 60px;
  background-color: var(--background-color);
  min-height: 100vh;
}

.dashboard-stats,
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.dashboard-stats .stat-card,
.admin-stats .stat-card {
  background: var(--card-background);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.dashboard-stats .stat-number,
.admin-stats .stat-number {
  color: var(--primary-color);
}

.dashboard-content,
.admin-content {
  display: grid;
  gap: 24px;
}

.rating-breakdown {
  margin-top: 20px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.breakdown-item span:first-child {
  min-width: 100px;
  color: var(--text-secondary);
}

.breakdown-item span:last-child {
  min-width: 30px;
  text-align: right;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-bar {
  flex: 1;
  height: 10px;
  background-color: var(--border-color);
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-light)
  );
  border-radius: 5px;
  transition: width 0.3s ease;
}

/* Comments List */
.comments-list {
  margin-top: 20px;
}

.comment-item {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-author {
  font-weight: 500;
  color: var(--text-primary);
}

.comment-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.comment-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Admin Actions */
.admin-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Data Table */
.table-responsive {
  overflow-x: auto;
  margin-top: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--background-color);
  font-weight: 600;
  color: var(--text-primary);
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:hover {
  background: var(--background-color);
}

/* Footer */
.footer {
  background-color: #1f2937;
  color: white;
  padding: 40px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 12px;
}

.footer-brand p {
  color: #9ca3af;
  font-size: 0.95rem;
}

.footer-contact h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.footer-contact p {
  color: #9ca3af;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact i {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #374151;
}

.footer-bottom p {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--card-background);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon.success {
  background-color: rgba(16, 185, 129, 0.1);
}

.modal-icon.success i {
  font-size: 3rem;
  color: var(--success-color);
}

.modal-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.modal-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 15px 20px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 15px;
    gap: 20px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-card {
    padding: 20px 30px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .form-card {
    padding: 24px;
  }

  .user-type-selector {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .dashboard-stats,
  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .admin-actions {
    flex-direction: column;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    max-width: 450px;
  }

  .login-logo {
    padding: 40px 30px;
  }

  .login-logo i {
    font-size: 3rem;
  }

  .login-logo h1 {
    font-size: 2rem;
  }

  .login-form {
    padding: 30px;
  }
}

@media (max-width: 480px) {
  .header-actions {
    display: none;
  }

  .nav {
    gap: 15px;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 15px;
  }

  .stat-card {
    padding: 20px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  .dashboard-stats,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .login-container {
    margin: 10px;
    flex-direction: column;
  }

  .login-logo {
    padding: 30px 20px;
  }

  .login-logo i {
    font-size: 2.5rem;
  }

  .login-logo h1 {
    font-size: 1.75rem;
  }

  .login-form {
    padding: 20px;
  }
}
