@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #10b981;
  --primary-dark: #047857;
  --secondary: #f59e0b;
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --card-bg: rgba(255, 255, 255, 0.9);
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 16px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

p {
  line-height: 1.5;
  color: var(--text-muted);
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background-color: #f1f5f9;
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-control {
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all 0.2s ease;
  background: white;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* =========================================
   Landing Page (index.html)
   ========================================= */
.landing-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.landing-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(4, 120, 87, 0.95) 100%), url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&q=80');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: white;
  position: relative;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.2);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeIn 1s ease;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
  color: white;
}

.hero-content p {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  max-width: 500px;
}

.landing-form-section {
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: slideUp 0.6s ease-out;
}

.glass-card h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.glass-card p {
  margin-bottom: 32px;
}

.success-message {
  display: none;
  background: #dcfce7;
  color: #166534;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-weight: 500;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

/* =========================================
   Admin Panel (admin.html)
   ========================================= */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  overflow: hidden;
}

.admin-sidebar {
  background: white;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.sidebar-header h2 {
  font-size: 1.25rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu {
  list-style: none;
  padding: 0 16px;
}

.nav-item {
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-link:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.nav-link.active {
  background: #ecfdf5;
  color: var(--primary-dark);
}

.nav-link svg {
  width: 20px;
  height: 20px;
}

.admin-main {
  background: var(--bg-color);
  padding: 32px;
  overflow-y: auto;
}

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

.admin-header h1 {
  font-size: 1.75rem;
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* Cards */
.panel-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.panel-card h3 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

/* Campaign UI */
.campaign-form .image-upload {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s;
}

.campaign-form .image-upload:hover {
  border-color: var(--primary);
  background: #ecfdf5;
}

.image-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  display: none;
  margin-top: 16px;
  border: 1px solid var(--border-color);
}

/* Chat UI */
.chat-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 120px);
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-sidebar {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.chat-search {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.contact-list {
  flex: 1;
  overflow-y: auto;
}

.contact-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}

.contact-item:hover {
  background: #f8fafc;
}

.contact-item.active {
  background: #ecfdf5;
}

.contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
}

.contact-info h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-info p {
  font-size: 0.85rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
}

.chat-header {
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  position: relative;
}

.message.received {
  align-self: flex-start;
  background: white;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.message.sent {
  align-self: flex-end;
  background: #dcf8c6;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  text-align: right;
  margin-top: 4px;
}

.chat-input-area {
  padding: 16px;
  background: white;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 1rem;
}

.chat-input-area input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* Responsive */
@media (max-width: 992px) {
  .landing-wrapper {
    grid-template-columns: 1fr;
  }
  .landing-hero {
    padding: 60px 24px 40px;
    min-height: 40vh;
    height: auto;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1.1rem;
  }
  .landing-form-section {
    padding: 32px 16px;
    align-items: flex-start;
  }
  .glass-card {
    padding: 24px;
  }
  .glass-card h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  .landing-hero {
    padding: 40px 16px 32px;
  }
  .glass-card {
    padding: 20px;
  }
}
