/* ========================================
   GENERAL STYLES
   ======================================== */

:root {
  --primary-color: #3b7ef6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #10b981;
  --accent-color: #3b7ef6;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --success-color: #10b981;
  --text-dark: #0f172a;
  --text-medium: #334155;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --bg-light: #f8fafc;
  --bg-lighter: #f1f5f9;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow: 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);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary-color: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-light: #93c5fd;
  --secondary-color: #34d399;
  --accent-color: #60a5fa;
  --danger-color: #f87171;
  --warning-color: #fbbf24;
  --success-color: #34d399;
  --text-dark: #f1f5f9;
  --text-medium: #cbd5e1;
  --text-light: #94a3b8;
  --text-lighter: #64748b;
  --bg-light: #1e293b;
  --bg-lighter: #0f172a;
  --bg-white: #0f172a;
  --border-color: #334155;
  --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3),
    0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .hero::before {
  background: radial-gradient(
    circle at 20% 50%,
    rgba(16, 185, 129, 0.05) 0%,
    transparent 50%
  );
}

[data-theme="dark"] .footer {
  background-color: #020617;
  border-top: 1px solid #1e293b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-medium);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--bg-light);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.header-left {
  flex: 1;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-circle {
  width: 35px;
  height: 35px;
  border: 3px solid var(--secondary-color);
  border-radius: 50%;
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--secondary-color);
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-nav-link {
  text-decoration: none;
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.header-nav-link:hover {
  background-color: var(--bg-light);
  color: var(--secondary-color);
  border-color: var(--border-color);
}

.header-nav-link.active {
  color: var(--secondary-color);
  font-weight: 600;
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--secondary-color);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background-color: var(--bg-light);
}

.theme-icon {
  position: absolute;
  transition: all 0.3s ease;
  color: var(--text-medium);
}

.sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* User Menu & Avatar */
.user-menu {
  position: relative;
}

.avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdown-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.dropdown-email {
  font-size: 0.85rem;
  color: var(--text-light);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.5rem 0;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  color: var(--text-medium);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.dropdown-item:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.dropdown-logout {
  color: var(--danger-color);
}

.dropdown-logout:hover {
  background-color: #fee2e2;
  color: var(--danger-color);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  line-height: 1.5;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: 0 4px 12px -2px rgba(59, 126, 246, 0.4);
  transform: translateY(-1px);
}

.btn-nav {
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
}

.btn-nav:hover {
  background-color: var(--bg-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

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

.btn-secondary:hover {
  background-color: #059669;
  box-shadow: var(--shadow-lg);
}

.btn-logout {
  background-color: var(--danger-color);
  color: white;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.btn-logout:hover {
  background-color: #dc2626;
}

.btn-large {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  border-radius: 0.625rem;
  font-weight: 600;
}

.btn-small-left {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  font-weight: 600;
  align-self: flex-start;
}

.btn-full {
  width: 100%;
}

/* ========================================
   ALERTS & MESSAGES
   ======================================== */

.messages-container {
  max-width: 1200px;
  padding: 0 2rem;
}

.alert {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s ease;
}

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

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.alert-error {
  background-color: #fee2e2;
  color: #7f1d1d;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background-color: #fef3c7;
  color: #78350f;
  border-left: 4px solid var(--warning-color);
}

.close-alert {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
}

/* ========================================
   LANDING PAGE
   ======================================== */

.landing-page {
  flex: 1;
}

.hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 4rem 2rem 3rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 20% 50%,
    rgba(59, 126, 246, 0.03) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero-right {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.hero-image {
  width: 100%;
  max-width: 550px;
  height: 450px;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  cursor: default;
}

.statistics {
  background-color: var(--bg-lighter);
  padding: 4rem 2rem;
  border-top: 1px solid var(--border-color);
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.stat-card {
  background: #ffffff;
  color: var(--text-medium);
  padding: 2.5rem 2rem;
  border-radius: 1rem;
  text-align: left;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 126, 246, 0.2);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #ef4444;
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-light);
  font-weight: 400;
}

/* ========================================
   AUTH PAGES
   ======================================== */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem;
}

.auth-box {
  background-color: var(--bg-white);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
}

.auth-box h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.auth-subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.form-group input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
  color: var(--text-light);
  font-size: 0.8rem;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: block;
  margin-bottom: 1rem;
}

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

.auth-footer p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

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

/* ========================================
   DASHBOARD
   ======================================== */

/* Dashboard Header with Pills */
.dashboard-header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: sticky;
  top: 74px;
  z-index: 90;
}

.dashboard-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.dashboard-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.nav-pill {
  padding: 0.625rem 1.25rem;
  border-radius: 2rem;
  text-decoration: none;
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background-color: transparent;
}

.nav-pill:hover {
  background-color: var(--bg-light);
  color: var(--secondary-color);
}

.nav-pill.active {
  background-color: var(--secondary-color);
  color: white;
}

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

.dashboard-content {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
}

/* Page Content */
.page-content h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.page-description {
  color: var(--text-light);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.content-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--bg-light);
  border-radius: 1rem;
  border: 2px dashed var(--border-color);
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.content-placeholder h2 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.content-placeholder p {
  color: var(--text-light);
  font-size: 1rem;
}

/* Info Cards */
.info-card {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--primary-color);
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.info-card p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-active {
  background-color: #d1fae5;
  color: #065f46;
}

/* Profile Page */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-card {
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-light);
  border-radius: 1rem;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2.5rem;
  margin: 0 auto 1rem;
}

.profile-card h2 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.profile-email {
  color: var(--text-light);
  font-size: 0.95rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Settings Page */
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.settings-group {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 0.75rem;
}

.settings-group h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--bg-white);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-info {
  flex: 1;
}

.setting-info strong {
  display: block;
  color: var(--text-dark);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.setting-info p {
  color: var(--text-light);
  font-size: 0.85rem;
  margin: 0;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

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

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

/* ========================================
   FOOTER
   ======================================== */

.main-content {
  min-height: calc(100vh - 100px - 150px);
  display: flex;
  flex-direction: column;
}

.footer {
  background-color: #0f172a;
  color: #cbd5e1;
  padding: 2.5rem 2rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-container p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary-light);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .header-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .dashboard-header {
    top: 94px;
  }

  .dashboard-header-container {
    padding: 0 1rem;
  }

  .dashboard-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-pill {
    white-space: nowrap;
  }

  .dashboard-container {
    padding: 1rem;
  }

  .dashboard-content {
    padding: 1.5rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

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

  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dropdown-menu {
    right: -10px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-image {
    max-width: 100%;
    height: 350px;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dashboard-info {
    grid-template-columns: 1fr;
  }

  .auth-box {
    padding: 1.5rem;
  }

  .footer-links {
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }

  .btn-large {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .statistics {
    padding: 2rem 1rem;
  }

  .auth-container {
    min-height: auto;
    padding: 1rem;
  }

  .dashboard-container {
    padding: 1rem;
  }

  .dashboard-content {
    padding: 1rem;
  }

  .dashboard-content h1 {
    font-size: 1.5rem;
  }
}

/* ========================================
   PROFILE PAGE STYLES
   ======================================== */

.profile-header {
  margin-bottom: 2rem;
}

.profile-header h1 {
  margin-bottom: 0.5rem;
}

/* Profile Overview Card */
.profile-overview-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.profile-info-wrapper {
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.profile-avatar-container {
  position: relative;
}

.profile-avatar-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--bg-white);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  border: 4px solid var(--bg-white);
  box-shadow: var(--shadow-lg);
}

.avatar-edit-btn {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: 3px solid var(--bg-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.avatar-edit-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.profile-details {
  flex: 1;
  padding-top: 1rem;
}

.profile-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.profile-username {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.profile-email-display {
  color: var(--text-medium);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.profile-bio {
  color: var(--text-medium);
  line-height: 1.6;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Account Information Card */
.account-info-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

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

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.btn-edit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 500;
}

.text-muted {
  color: var(--text-lighter);
  font-style: italic;
}

/* Danger Zone Card */
.danger-zone-card {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--danger-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

.danger-zone-card .card-header {
  background: rgba(239, 68, 68, 0.05);
  padding: 1.5rem 2rem;
  margin-bottom: 0;
}

.danger-zone-card .card-header h3 {
  color: var(--danger-color);
}

.danger-zone-content {
  padding: 2rem;
}

.danger-zone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.danger-zone-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.danger-zone-info p {
  color: var(--text-medium);
  font-size: 0.9rem;
  line-height: 1.5;
}

.btn-danger {
  padding: 0.75rem 1.5rem;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg-white);
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-light);
  color: var(--text-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--bg-lighter);
  color: var(--text-dark);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-light);
}

/* Form Sections */
.form-section {
  margin-bottom: 2rem;
}

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

.form-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 126, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Profile Picture Edit */
.profile-picture-edit {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.profile-picture-preview {
  flex-shrink: 0;
}

.profile-picture-preview img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
}

.profile-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  border: 3px solid var(--border-color);
}

.profile-picture-actions {
  flex: 1;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-upload:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.75rem;
}

.btn-remove:hover {
  background: var(--danger-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.upload-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Button Styles */
.btn-primary {
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-medium);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--bg-light);
  border-color: var(--text-medium);
  transform: translateY(-2px);
}

.btn-danger-primary {
  padding: 0.75rem 1.5rem;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-danger-primary:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Delete Modal Specific Styles */
.modal-danger .modal-header {
  background: rgba(239, 68, 68, 0.05);
  border-bottom-color: rgba(239, 68, 68, 0.2);
}

.modal-danger .modal-header h3 {
  color: var(--danger-color);
}

.warning-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.warning-banner svg {
  color: var(--danger-color);
  margin-bottom: 1rem;
}

.warning-banner h4 {
  color: var(--danger-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.warning-text {
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.warning-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  background: var(--bg-light);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
}

.warning-list li {
  color: var(--text-medium);
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.warning-list li:before {
  content: "•";
  color: var(--danger-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Responsive Design for Profile Page */
@media (max-width: 768px) {
  .profile-info-wrapper {
    flex-direction: column;
    padding: 0 1.5rem 1.5rem 1.5rem;
  }

  .profile-avatar-container {
    align-self: center;
  }

  .profile-details {
    text-align: center;
    padding-top: 0;
  }

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

  .danger-zone-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .btn-danger {
    width: 100%;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .btn-edit {
    width: 100%;
    justify-content: center;
  }

  .profile-picture-edit {
    flex-direction: column;
    text-align: center;
  }

  .modal-content {
    margin: 1rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .profile-avatar-image,
  .profile-avatar-large {
    width: 80px;
    height: 80px;
  }

  .profile-avatar-large {
    font-size: 2rem;
  }

  .avatar-edit-btn {
    width: 32px;
    height: 32px;
  }

  .avatar-edit-btn svg {
    width: 14px;
    height: 14px;
  }

  .profile-name {
    font-size: 1.5rem;
  }

  .account-info-card,
  .danger-zone-card {
    padding: 1.5rem;
  }

  .danger-zone-content {
    padding: 1.5rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger-primary {
    width: 100%;
  }
}

/* ========================================
   DISCUSSION SIDEBAR STYLES
   ======================================== */

/* Discussion Toggle Button */
.discussion-toggle-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.discussion-toggle-btn:hover {
  background: var(--bg-light) !important;
  border-radius: 0.5rem;
}

.discussion-toggle-btn svg {
  transition: all 0.3s ease;
}

/* Discussion Overlay */
.discussion-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.discussion-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Discussion Sidebar */
.discussion-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.discussion-sidebar.active {
  right: 0;
}

/* Discussion Header */
.discussion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-white);
}

.discussion-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.discussion-header-left svg {
  color: var(--primary-color);
}

.discussion-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.online-count {
  background: var(--success-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.5rem;
}

.discussion-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-light);
  color: var(--text-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.discussion-close-btn:hover {
  background: var(--bg-lighter);
  color: var(--text-dark);
  transform: rotate(90deg);
}

/* Discussion Messages Area */
.discussion-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-light);
}

.discussion-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Message Bubbles */
.discussion-message {
  display: flex;
  gap: 0.75rem;
  animation: messageSlideIn 0.3s ease;
}

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

.discussion-message.own {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
  background: var(--secondary-color);
}

.message-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.message-content {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.discussion-message.own .message-content {
  align-items: flex-end;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.discussion-message.own .message-header {
  flex-direction: row-reverse;
}

.message-username {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: var(--bg-white);
  color: var(--text-dark);
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-shadow: var(--shadow);
  line-height: 1.5;
}

.discussion-message.own .message-bubble {
  background: var(--primary-color);
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.discussion-message:not(.own) .message-bubble {
  border-bottom-left-radius: 0.25rem;
}

/* Empty State */
.discussion-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
}

.discussion-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.discussion-empty h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.discussion-empty p {
  font-size: 0.9rem;
}

/* Discussion Input */
.discussion-input-wrapper {
  border-top: 1px solid var(--border-color);
  background: var(--bg-white);
  padding: 1rem 1.5rem;
}

.discussion-input-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.discussion-input-form textarea {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--bg-light);
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  font-family: inherit;
  transition: all 0.3s ease;
}

.discussion-input-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(59, 126, 246, 0.1);
}

.discussion-input-form textarea::placeholder {
  color: var(--text-lighter);
}

.discussion-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.discussion-send-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.discussion-send-btn:disabled {
  background: var(--border-color);
  cursor: not-allowed;
  transform: scale(1);
}

.char-counter {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 0.5rem;
}

.char-counter.warning {
  color: var(--warning-color);
}

.char-counter.danger {
  color: var(--danger-color);
}

/* Scrollbar Styling for Discussion Messages */
.discussion-messages::-webkit-scrollbar {
  width: 8px;
}

.discussion-messages::-webkit-scrollbar-track {
  background: var(--bg-light);
}

.discussion-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.discussion-messages::-webkit-scrollbar-thumb:hover {
  background: var(--text-lighter);
}

/* Responsive Design for Discussion Sidebar */
@media (max-width: 768px) {
  .discussion-sidebar {
    width: 100%;
    right: -100%;
  }

  .discussion-sidebar.active {
    right: 0;
  }

  .message-content {
    max-width: 80%;
  }

  .discussion-toggle-btn span {
    display: none;
  }
}

@media (max-width: 640px) {
  .discussion-header {
    padding: 1rem;
  }

  .discussion-messages {
    padding: 1rem;
  }

  .discussion-input-wrapper {
    padding: 0.75rem 1rem;
  }

  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .message-bubble {
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
  }
}
