 :root {
    --brand: #1a7a4c;
    --brand-dark: #14603b;
    --brand-soft: #eaf7f0;
    --ink: #1f2333;
    --muted: #6b7280;
    --line: #eceef1;
    --bg-soft: #f6f8f7;
  }
 
  * { box-sizing: border-box; }
 
  body {
    font-family: 'Poppins', sans-serif;
    color: var(--ink);
    background: #fff;
    margin: 0;
  }
 
  a { text-decoration: none; }
 
  /* ===== Navbar ===== */
  .navbar {
    padding: 0.85rem 0;
    background: #fff;
    box-shadow: 0 2px 12px rgba(17, 17, 17, 0.06);
  }
 
  .navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--ink) !important;
    letter-spacing: -0.02em;
  }
 
  .navbar-brand span {
    color: var(--brand);
  }
 
  .navbar-nav .nav-link {
    font-weight: 500;
    color: var(--ink) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
  }
 
  .navbar-nav .nav-link.active {
    color: var(--brand) !important;
  }
 
  @media (min-width: 992px) {
    .navbar-nav .nav-link::after {
      content: "";
      position: absolute;
      left: 1rem;
      right: 1rem;
      bottom: 0.25rem;
      height: 2px;
      background: var(--brand);
      transform: scaleX(0);
      transition: transform 0.25s ease;
      transform-origin: left;
    }
    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
      transform: scaleX(1);
    }
  }
 
  .btn-brand {
    background: var(--brand);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .btn-brand:hover {
    background: var(--brand-dark);
    color: #fff;
    transform: translateY(-1px);
  }
 
  .navbar-toggler {
    border: none;
    padding: 0.35rem 0.5rem;
  }
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 122, 76, 0.25);
  }
 
  @media (max-width: 991.98px) {
    .navbar-collapse {
      margin-top: 0.85rem;
      padding-top: 0.85rem;
      border-top: 1px solid #eee;
    }
    .navbar-nav .nav-link {
      padding: 0.65rem 0.25rem !important;
    }
    .btn-brand {
      width: 100%;
      margin-top: 0.5rem;
      text-align: center;
    }
  }
 
  /* ===== Hero ===== */
  .hero {
    position: relative;
    background: var(--bg-soft);
    padding: 4.5rem 0 3.5rem;
    text-align: left;
    overflow: hidden;
  }
  .hero__pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
  }
  .hero .container {
    position: relative;
    z-index: 1;
  }
  .hero h1 {
    font-weight: 700;
    font-size: 2.4rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
  }
  .hero p {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 580px;
    margin-bottom: 0;
  }
 
  /* ===== Events section ===== */
  .events-section {
    padding: 3.5rem 0;
  }
  .events-section__head {
    margin-bottom: 2rem;
  }
  .events-section__head h2 {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
  }
  .events-section__head p {
    color: var(--muted);
    margin-bottom: 0;
  }
 
  /* ===== Event Card ===== */
  .event-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(17, 17, 17, 0.1);
  }
 
  .event-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0;
  }
 
  .event-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
  }
  .event-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .event-logo i {
    color: var(--brand);
    font-size: 1.5rem;
  }
 
  .badge-type {
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: #fdeee0;
    color: #b8560a;
    white-space: nowrap;
  }
  .badge-type.gobar {
    background: var(--brand-soft);
    color: var(--brand-dark);
  }
 
  .event-card__body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
 
  .event-title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 0 0 0.85rem;
    letter-spacing: -0.01em;
    min-height: 2.9rem;
  }
 
  .event-info {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
  }
  .event-info:last-of-type {
    margin-bottom: 0;
  }
 
  .event-info i {
    color: var(--brand);
    width: 18px;
    text-align: center;
    margin-top: 0.2rem;
    font-size: 0.95rem;
  }
 
  .event-info__label {
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
 
  .event-info__value {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
  }
 
  .event-divider {
    border-top: 1px dashed var(--line);
    margin: 1rem 0;
  }
 
  .btn-join {
    background: var(--brand);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    width: 100%;
    margin-top: auto;
    transition: background 0.2s ease, transform 0.15s ease;
  }
  .btn-join:hover {
    background: var(--brand-dark);
    color: #fff;
    transform: translateY(-1px);
  }
  .btn-join i {
    margin-left: 0.4rem;
  }
 
  /* ===== Past Events section ===== */
  .past-events-section {
    padding: 0 0 3.5rem;
    background: var(--bg-soft);
  }
  .past-events-section .events-section__head {
    padding-top: 3.5rem;
  }
 
  .event-card.is-past {
    background: #fbfbfb;
  }
  .event-card.is-past .event-logo {
    background: #eef0ef;
  }
  .event-card.is-past .event-logo i {
    color: var(--muted);
  }
  .event-card.is-past .event-title {
    color: #4b5160;
  }
 
  .badge-type.done {
    background: #eef0ef;
    color: var(--muted);
  }
 
  .btn-leaderboard {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    width: 100%;
    margin-top: auto;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .btn-leaderboard:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-dark);
  }
  .btn-leaderboard i {
    margin-left: 0.4rem;
    color: var(--brand);
  }
 
    /* ===== Section Divider ===== */
  .section-divider {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
  }

  /* ===== Footer ===== */
  footer {
    background: var(--bg-soft);
    padding: 1.75rem 0;
    border-top: 1px solid var(--line);
  }
  footer .container {
    color: var(--muted);
    font-size: 0.9rem;
  }

/* ===== Modal: Buat Event ===== */
  .modal-content {
    border: none;
    border-radius: 18px;
    overflow: hidden;
  }
  .modal-header {
    border-bottom: 1px solid var(--line);
    padding: 1.25rem 1.5rem;
  }
  .modal-header .modal-title {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
  }
  .modal-body {
    padding: 1.5rem;
  }
  .modal-footer {
    border-top: 1px solid var(--line);
    padding: 1.1rem 1.5rem;
  }
 
  .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
  }
  .form-label .optional-tag {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: none;
    letter-spacing: 0;
  }
  .form-hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.35rem;
  }
 
  .form-control,
  .form-select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-size: 0.92rem;
  }
  .form-control:focus,
  .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(26, 122, 76, 0.15);
  }
 
  .input-group-text {
    background: var(--brand-soft);
    border: 1px solid var(--line);
    border-right: none;
    color: var(--brand-dark);
  }
 
  /* Upload logo dropzone */
  .logo-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .logo-preview {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px dashed #b9ddc7;
  }
  .logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .logo-preview i {
    color: var(--brand);
    font-size: 1.4rem;
  }
  .logo-upload__actions {
    flex-grow: 1;
  }
  .btn-upload {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
  }
  .btn-upload:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
    background: var(--brand-soft);
  }
 
  .btn-outline-brand {
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    background: #fff;
  }
  .btn-outline-brand:hover {
    background: #f4f5f6;
    color: var(--ink);
  }  

  .auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 2.25rem 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
  }

  .auth-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
  }
  .auth-logo i {
    color: var(--brand);
    font-size: 1.6rem;
  }

  .auth-card h1 {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
  }
  .auth-card p {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 1.75rem;
  }

  #googleSignInBtn {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  .auth-status {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--brand-soft);
    display: none;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }
  .auth-status.show {
    display: flex;
  }
  .auth-status img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .auth-status__name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ink);
  }
  .auth-status__email {
    font-size: 0.8rem;
    color: var(--muted);
  }

  .auth-hint {
    margin-top: 1.5rem;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
  }

.nav-auth__btn {
  display: flex;
}

.nav-auth__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.nav-auth__toggle:hover {
  background: var(--brand-soft, #eaf7f0);
}

/* Foto profil: bulat dan dikecilkan */
.nav-auth__toggle img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-auth__menu-head img{
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-auth__toggle .bi-chevron-down {
  font-size: 0.7rem;
  color: var(--muted, #6b7280);
}

/* Rapikan di mobile, sejajar dengan menu lain */
@media (max-width: 991.98px) {
  .nav-auth {
    margin-top: 0.5rem;
  }
  .nav-auth__toggle {
    width: 100%;
    justify-content: flex-start;
  }
  .nav-auth__name {
    display: inline !important;
  }
}