@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --navy: #0a0f2e;
  --navy-mid: #13004a;
  --navy-light: #1e1b6e;
  --gold: #ffd129;
  --gold-dark: #e6b800;
  --gold-soft: #fff3b0;
  --white: #ffffff;
  --off-white: #f8f7f2;
  --gray-100: #f0eff8;
  --gray-200: #dddcef;
  --gray-400: #9896b8;
  --gray-600: #5c5a7a;
  --red: #d63031;
  --green: #00b894;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 4px rgba(10,15,46,0.08);
  --shadow-md: 0 4px 16px rgba(10,15,46,0.12);
  --shadow-lg: 0 8px 32px rgba(10,15,46,0.18);
  --transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--navy);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ── Typography ── */
h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  letter-spacing: 3px;
  color: var(--gold);
  text-align: center;
  line-height: 1;
}
h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy-mid);
  text-align: center;
  margin-top: 4px;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-mid);
}

/* ── Page header ── */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 32px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,209,41,0.07);
  pointer-events: none;
}
.page-header h1 { color: var(--gold); }
.page-header h2 { color: rgba(255,255,255,0.8); font-weight: 400; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin: 16px auto;
  max-width: 460px;
  border: 1px solid rgba(10,15,46,0.06);
}

/* ── Inputs ── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  margin-bottom: 12px;
  transition: var(--transition);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3px rgba(19,0,74,0.08);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
textarea { height: 100px; resize: vertical; }

/* ── Buttons ── */
button, .btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary {
  background: var(--navy-mid);
  color: var(--white);
  width: 100%;
  padding: 14px;
}
.btn-primary:hover { background: var(--navy); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  width: 100%;
  padding: 14px;
}
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--navy-mid);
  border: 1.5px solid var(--gray-200);
  padding: 10px 18px;
}
.btn-ghost:hover { border-color: var(--navy-mid); background: var(--gray-100); }

.btn-danger {
  background: var(--red);
  color: var(--white);
}
.btn-danger:hover { opacity: 0.88; }

.btn-sm {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
}

/* ── Back button ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 12px;
  transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.back-btn:hover { background: rgba(255,255,255,0.18); color: var(--white); }

/* ── Home Grid ── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px;
  max-width: 460px;
  margin: 0 auto;
}
.home-tile {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(10,15,46,0.07);
  padding: 20px 12px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.home-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--navy-mid); }
.home-tile-icon {
  width: 48px; height: 48px;
  background: var(--navy);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.home-tile-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-mid);
}

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-line { height: 16px; margin-bottom: 10px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.med { width: 80%; }

/* ── Event card ── */
.event-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(10,15,46,0.07);
  padding: 20px;
  margin: 12px auto;
  max-width: 460px;
  box-shadow: var(--shadow-sm);
}
.event-card h2 { text-align: left; font-size: 1.1rem; color: var(--navy); margin-bottom: 6px; }
.event-card p { font-size: 14px; color: var(--gray-600); line-height: 1.6; }
.event-meta { font-size: 13px; color: var(--gray-400); margin-top: 8px; display: flex; align-items: center; gap: 6px; }

/* ── Countdown ── */
.countdown-grid {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.countdown-block {
  flex: 1;
  background: var(--navy);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}
.countdown-num { font-family: 'Bebas Neue', sans-serif; font-size: 28px; color: var(--gold); line-height: 1; display: block; }
.countdown-label { font-size: 10px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; }
.countdown.past { color: var(--gray-400); font-style: italic; font-size: 14px; margin-top: 10px; }

/* ── RSVP bar ── */
.rsvp-bar { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.rsvp-btn { flex: 1; padding: 10px; font-size: 13px; font-weight: 600; border-radius: var(--radius-sm); border: 1.5px solid var(--gray-200); background: var(--white); color: var(--navy-mid); cursor: pointer; transition: var(--transition); font-family: 'DM Sans', sans-serif; }
.rsvp-btn.going { background: var(--navy-mid); color: var(--white); border-color: var(--navy-mid); }
.rsvp-btn:hover:not(.going) { border-color: var(--navy-mid); background: var(--gray-100); }
.rsvp-count { font-size: 13px; color: var(--gray-400); white-space: nowrap; }

/* ── Actions row ── */
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions button { flex: 1; }

/* ── Directory ── */
.company-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(10,15,46,0.07);
  margin: 10px auto;
  max-width: 460px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.company-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  background: var(--navy);
  color: var(--white);
  transition: var(--transition);
}
.company-header:hover { background: var(--navy-light); }
.company-header h3 { color: var(--white); font-size: 15px; }
.company-chevron { font-size: 18px; transition: transform 0.2s; color: var(--gold); }
.company-chevron.open { transform: rotate(180deg); }

.members-container { padding: 10px 12px; display: none; }
.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.member-card:hover { background: var(--gray-100); border-color: var(--gray-200); }
.member-pic {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy);
  flex-shrink: 0;
}
.member-info h4 { font-size: 14px; font-weight: 600; color: var(--navy); }
.member-info span { font-size: 12px; color: var(--gray-400); }
.details {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
}
.details p { color: var(--gray-600); }
.details strong { color: var(--navy); }

/* ── Search bar ── */
.search-wrap {
  padding: 16px 20px 0;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}
.search-wrap input {
  padding-left: 40px;
  margin-bottom: 0;
  background: var(--white);
}
.search-icon {
  position: absolute;
  left: 34px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
  pointer-events: none;
}

/* ── News / Posts ── */
.post {
  border-bottom: 1px solid var(--gray-100);
  padding: 18px 0;
}
.post:last-child { border-bottom: none; }
.post img { width: 100%; border-radius: var(--radius-md); margin-bottom: 12px; }
.post h2 { text-align: left; font-size: 1.05rem; margin-bottom: 6px; }
.post p { font-size: 14px; color: var(--gray-600); line-height: 1.6; }
.post-meta { font-size: 12px; color: var(--gray-400); margin-top: 8px; }

/* ── Budget ── */
.budget-total-card {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 16px auto;
  max-width: 460px;
  text-align: center;
}
.budget-total-label { font-size: 13px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.budget-total-amount { font-family: 'Bebas Neue', sans-serif; font-size: 3.2rem; color: var(--gold); letter-spacing: 2px; }
.budget-notes { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 6px; }

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.history-item:last-child { border-bottom: none; }
.history-amount { font-size: 1.1rem; font-weight: 600; color: var(--navy); }
.history-meta { font-size: 12px; color: var(--gray-400); margin-top: 3px; }

/* ── Profile ── */
.profile-pic-preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--navy-mid);
  display: block;
  margin: 0 auto 16px;
}
.completeness-bar-wrap { margin: 0 0 16px; }
.completeness-label { font-size: 13px; color: var(--gray-600); margin-bottom: 6px; display: flex; justify-content: space-between; }
.completeness-track { height: 8px; background: var(--gray-200); border-radius: 99px; overflow: hidden; }
.completeness-fill { height: 8px; background: linear-gradient(90deg, var(--navy-mid), var(--gold)); border-radius: 99px; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.badge-admin { background: var(--gold-soft); color: var(--navy); }
.badge-past { background: var(--gray-100); color: var(--gray-400); }

/* ── Error / success ── */
.error-msg { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }
.success-msg { color: var(--green); font-size: 13px; margin-top: 8px; }

/* ── Footer ── */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  text-align: center;
  padding: 12px;
  z-index: 100;
}

/* ── Divider ── */
hr { border: none; border-top: 1px solid var(--gray-100); margin: 8px 20px; }

/* ── Util ── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.fw-600 { font-weight: 600; }

/* ── Mobile ── */
@media (max-width: 500px) {
  .card, .event-card, .company-card, .budget-total-card { margin-left: 16px; margin-right: 16px; }
  .home-grid { padding: 12px 16px; gap: 10px; }
  .search-wrap { padding: 12px 16px 0; }
  h1 { font-size: 2.2rem; }
  .budget-total-amount { font-size: 2.6rem; }
}
