/* KayaHub Shared App Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #E8A838;
  --gold-light: #F5CE6E;
  --deep-plum: #2D1B3D;
  --warm-cream: #FFF8F0;
  --soft-coral: #E8836B;
  --teal: #2A9D8F;
  --teal-dark: #1E7A6E;
  --text-dark: #1A1124;
  --text-muted: #6B5F7B;
  --blush: #F9E8E0;
  --border: rgba(45,27,61,0.08);
  --shadow-sm: 0 2px 8px rgba(45,27,61,0.06);
  --shadow-md: 0 8px 32px rgba(45,27,61,0.08);
  --shadow-lg: 0 20px 60px rgba(45,27,61,0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 100px;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-dark);
  background: var(--warm-cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(45,27,61,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
}

.navbar-brand span {
  color: var(--gold);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: white;
  background: rgba(255,255,255,0.1);
}

.navbar-links .btn-nav {
  background: var(--gold);
  color: var(--deep-plum);
  font-weight: 700;
  padding: 8px 20px;
}

.navbar-links .btn-nav:hover {
  background: var(--gold-light);
  color: var(--deep-plum);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--deep-plum);
}

.navbar-username {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-logout {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  font-family: inherit;
}

.btn-logout:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* Mobile menu */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .navbar-toggle { display: block; }
  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(45,27,61,0.98);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { padding: 12px 16px; width: 100%; }
  .navbar-user { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ===== PAGE LAYOUT ===== */
.page-wrapper {
  padding-top: 64px;
  min-height: 100vh;
}

.page-header {
  background: linear-gradient(165deg, #2D1B3D 0%, #3D2450 35%, #4A2D5E 60%, #5C3A6E 100%);
  padding: 60px 24px 48px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,168,56,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.page-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 600px;
  line-height: 1.6;
}

.page-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--deep-plum);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,168,56,0.3);
}

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

.btn-secondary:hover {
  background: #3D2450;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--deep-plum);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--deep-plum);
  background: rgba(45,27,61,0.04);
}

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

.btn-teal:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}

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

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232,168,56,0.1);
}

.form-input::placeholder {
  color: #B8ADBE;
}

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

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B5F7B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-error {
  color: var(--soft-coral);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-flat {
  transform: none !important;
  box-shadow: none !important;
}

/* ===== AUTH LAYOUT ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
  background: linear-gradient(165deg, #2D1B3D 0%, #3D2450 35%, #4A2D5E 60%, #5C3A6E 100%);
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--deep-plum);
  margin-bottom: 8px;
}

.auth-card .auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
  line-height: 1.5;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

/* ===== ALERT ===== */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
}

.alert.show { display: block; }

.alert-error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.alert-success {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

/* ===== RESOURCE GRID ===== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.resource-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}

.resource-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.resource-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep-plum);
}

.resource-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.resource-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Resource category colors */
.resource-cat-Healthcare { background: rgba(42,157,143,0.1); }
.resource-cat-Financial { background: rgba(232,168,56,0.1); }
.resource-cat-Technology { background: rgba(45,27,61,0.08); }
.resource-cat-Government { background: rgba(232,131,107,0.1); }
.resource-cat-Career { background: rgba(42,157,143,0.15); }
.resource-cat-Business { background: rgba(232,168,56,0.15); }

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--deep-plum);
  color: var(--deep-plum);
}

.filter-tab.active {
  background: var(--deep-plum);
  color: white;
  border-color: var(--deep-plum);
}

/* ===== FORUM ===== */
.forum-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.forum-category-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.forum-category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.forum-category-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forum-category-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--deep-plum);
}

.forum-category-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.forum-category-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.forum-category-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Forum posts list */
.forum-posts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.forum-post-item {
  background: white;
  border: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.forum-post-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.forum-post-item:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.forum-post-item:only-child { border-radius: var(--radius-md); }

.forum-post-item:hover {
  background: var(--blush);
}

.forum-post-replies {
  min-width: 50px;
  text-align: center;
}

.forum-post-replies-count {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--deep-plum);
}

.forum-post-replies-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.forum-post-info {
  flex: 1;
}

.forum-post-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--deep-plum);
  margin-bottom: 4px;
}

.forum-post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.forum-post-pinned {
  background: var(--gold);
  color: var(--deep-plum);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Single post view */
.post-detail {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 36px;
  margin-bottom: 32px;
}

.post-detail h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--deep-plum);
  margin-bottom: 12px;
}

.post-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-detail-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--deep-plum);
}

.post-detail-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dark);
  white-space: pre-wrap;
}

/* Replies */
.replies-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--deep-plum);
  margin-bottom: 20px;
}

.reply-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 12px;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.reply-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--deep-plum);
}

.reply-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reply-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dark);
  white-space: pre-wrap;
}

/* ===== DASHBOARD ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 28px;
}

.stat-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--deep-plum);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.quick-link {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.quick-link:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.quick-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(232,168,56,0.1);
}

.quick-link-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--deep-plum);
}

/* ===== MEMBERSHIP BANNER ===== */
.membership-banner {
  background: linear-gradient(135deg, var(--deep-plum), #4A2D5E);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: white;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.membership-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,168,56,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.membership-banner h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}

.membership-banner p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
  max-width: 500px;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.membership-price {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}

.membership-price-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--deep-plum);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--teal);
}

.breadcrumb span {
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--deep-plum);
  font-weight: 600;
}

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

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

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

/* ===== NEW POST MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26,17,36,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  display: none;
}

.modal-overlay.show { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--deep-plum);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ===== FOOTER ===== */
.app-footer {
  background: var(--deep-plum);
  padding: 40px 24px;
  text-align: center;
}

.app-footer-brand {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.app-footer-tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

@media (max-width: 768px) {
  .page-header { padding: 40px 20px 32px; }
  .page-content { padding: 24px 20px 60px; }
  .auth-card { padding: 32px 24px; }
  .resource-grid { grid-template-columns: 1fr; }
  .forum-category-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .post-detail { padding: 24px; }
  .membership-banner { padding: 28px; }
}
