/* ===============================
   CAMPUS SYNC - PRODUCTION UI
   SaaS, High-Converting Aesthetic
   =============================== */

:root {
  /* Light Theme Colors (SaaS Clean) */
  --bg-primary: #fcfcfc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f4f5;
  --text-primary: #09090b;
  --text-secondary: #71717a;
  --text-tertiary: #a1a1aa;
  
  --accent-primary: #000000;
  --accent-hover: #27272a;
  --accent-light: #f4f4f5;
  
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-light: #eff6ff;
  
  --error: #ef4444;
  --success: #10b981;

  --border-color: #e4e4e7;
  --border-active: #a1a1aa;
  
  /* Depth & Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-floating: 0 0 0 1px rgba(0,0,0,0.03), 0 2px 10px rgba(0,0,0,0.08), 0 16px 32px rgba(0,0,0,0.08);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme='dark'] {
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-tertiary: #27272a;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #52525b;
  
  --accent-primary: #ffffff;
  --accent-hover: #e4e4e7;
  --accent-light: #27272a;
  
  --brand: #3b82f6;
  --brand-hover: #60a5fa;
  --brand-light: rgba(59, 130, 246, 0.15);
  
  --border-color: #27272a;
  --border-active: #52525b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.8);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.9);
  --shadow-floating: 0 0 0 1px rgba(255,255,255,0.1), 0 16px 32px rgba(0,0,0,0.8);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }



/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

p {
  color: var(--text-secondary);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: rgba(var(--bg-secondary), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a.nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-links a.nav-link:hover, .nav-links a.nav-link.active {
  color: var(--text-primary);
}

/* Base Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--accent-light);
}

.btn-danger {
  background-color: var(--error);
  color: white;
}
.btn-danger:hover {
  background-color: #dc2626;
}

/* Google Button specifically */
.btn-google {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
}
.btn-google:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--border-active);
}

.btn-icon-absolute {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 100;
}
.btn-icon-absolute:hover {
  background: var(--accent-light);
}

/* Cards */
.card, .auth-container, .form-card, .event-card, .stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

/* Specific Event Card logic */
.event-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative; /* For the absolute delete badge */
}

.event-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.event-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.event-card-content {
  padding: 1.5rem;
  display: flex; flex-direction: column; flex: 1;
}

.event-card-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.event-card-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}

/* Form Elements */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block; font-size: 0.875rem; font-weight: 500;
  margin-bottom: 0.5rem; color: var(--text-primary);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit; font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--brand);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--brand); /* sharp outline */
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='var(--border-active)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; border-bottom: 1px solid var(--border-color);
}
.auth-divider:not(:empty)::before { margin-right: 1rem; }
.auth-divider:not(:empty)::after { margin-left: 1rem; }

/* Dashboard structural logic */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column;
  padding: 1.5rem;
  z-index: 900;
}

.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500; font-size: 0.9rem;
  margin-bottom: 0.25rem;
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  background: var(--accent-light);
  color: var(--text-primary);
}

.main-content {
  margin-left: 260px;
  padding: 3rem;
  max-width: 1400px;
}

/* Dashboard Stat Cards */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem; margin-bottom: 3rem;
}
.stat-card {
  padding: 1.5rem; display: flex; align-items: center; gap: 1.25rem;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.stat-info h3 { font-size: 1.5rem; margin-bottom: 0.1rem; }
.stat-info p { font-size: 0.85rem; color: var(--text-secondary); margin:0; }

.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.events-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Badges for Event Actions */
.badge-admin {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(var(--bg-secondary), 0.9);
  backdrop-filter: blur(4px);
  padding: 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--error);
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.badge-admin:hover {
  background: var(--error); color: white; border-color: var(--error);
}

/* Image Upload Specifics */
.image-upload {
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-primary);
}
.image-upload:hover { border-color: var(--brand); background: var(--brand-light); }

/* Utility Animations */
.animate-fade-in { opacity: 0; animation: fadeIn 0.4s ease-out forwards; }
.animate-slide-up { opacity: 0; transform: translateY(15px); animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
