/* ============ ALERTS & EMPTY STATE ============ */
.alert {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.5;
}
.alert-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.alert-success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(48px, 8vw, 76px) clamp(20px, 4vw, 40px);
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: inset 0 0 0 1px rgba(22, 69, 210, 0.12);
}
.empty-state h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
}
.empty-state p {
  margin: 0 0 24px;
  max-width: 440px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============ FORM & INPUTS ============ */
.event-form { padding: clamp(20px, 4vw, 36px); }
.event-form fieldset {
  padding: 0 0 24px;
  margin: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--border);
}
.event-form legend {
  margin-bottom: 16px;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 900;
  color: var(--text);
}
.form-grid {
  display: grid;
  gap: 16px;
}
.two-col { grid-template-columns: 1fr; }
.three-col { grid-template-columns: 1fr; }
.four-col { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.field-full { grid-column: 1 / -1; }
.field label { display: block; margin: 0 0 6px; font-weight: 800; font-size: 0.9rem; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 3px solid #fed7aa;
  border-color: var(--accent);
}
.field textarea { resize: vertical; }
.field small, .field-note { display: block; margin-top: 5px; color: var(--muted); font-size: 0.8rem; }
.color-field input { height: 48px; padding: 4px; cursor: pointer; }
.faq-fields { display: grid; gap: 15px; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.92rem; }
.toggle input { width: 18px; height: 18px; cursor: pointer; }

/* ============ AUTH / LOGIN PAGE ============ */
.login-body {
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(16px, 2.35vh, 24px);
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
  box-sizing: border-box;
}

.auth-card {
  background: #ffffff;
  width: min(100%, clamp(430px, 47vw, 676px));
  min-height: clamp(470px, 59.2vh, 606px);
  padding: clamp(40px, 6.65vh, 68px) clamp(32px, 3.75vw, 54px) clamp(38px, 5.1vh, 52px);
  border-radius: clamp(32px, 3.5vw, 50px);
  border: 2px solid #dadada;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(28px, 4.4vh, 45px);
  width: 100%;
}

.auth-logo {
  width: clamp(190px, 18.75vw, 270px);
  max-width: 100%;
  height: auto;
  display: block;
}

.auth-alert {
  width: 100%;
  margin: -20px 0 24px;
  padding: 12px 18px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
}

.auth-form {
  width: 100%;
  max-width: 564px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(26px, 4.4vh, 45px);
}

.auth-form .form-group {
  position: relative;
  width: 100%;
  margin: 0;
}

.auth-input {
  width: 100%;
  height: clamp(56px, 6.95vh, 71px);
  padding: 0 clamp(22px, 1.95vw, 28px);
  background: #f1f1f1;
  border: 1px solid #dadada;
  border-radius: 50px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 400;
  color: #111111;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
  color: #000;
  opacity: 0.62;
}

.auth-input:focus {
  background: #fff;
  border-color: #f17827;
  box-shadow: 0 0 0 4px rgba(241, 120, 39, 0.14);
}

.password-field .auth-input {
  padding-right: clamp(64px, 5.3vw, 76px);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: clamp(14px, 1.6vw, 23px);
  width: clamp(40px, 3.05vw, 44px);
  height: clamp(40px, 3.05vw, 44px);
  padding: 8px;
  display: grid;
  place-items: center;
  color: #626262;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover {
  color: #f17827;
  background: rgba(241, 120, 39, 0.1);
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(241, 120, 39, 0.3);
  outline-offset: 2px;
}

.password-eye {
  width: clamp(23px, 1.95vw, 28px);
  height: clamp(23px, 1.95vw, 28px);
}

.password-eye-hide,
.password-toggle.is-visible .password-eye-show {
  display: none;
}

.password-toggle.is-visible .password-eye-hide {
  display: block;
}

.btn-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0;
}

.btn-submit {
  width: min(clamp(180px, 16.5vw, 237px), 100%);
  height: clamp(58px, 7.8vh, 80px);
  background: #f17827;
  color: #ffffff;
  border: 1px solid #f19778;
  border-radius: 50px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-submit:hover {
  background-color: #d96519;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(241, 120, 39, 0.24);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:focus-visible {
  outline: 3px solid rgba(241, 120, 39, 0.3);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .login-body {
    padding: 18px;
  }

  .auth-card {
    min-height: 0;
    padding: 42px 24px;
    border-radius: 34px;
  }

  .logo-wrapper {
    margin-bottom: 32px;
  }

  .auth-logo {
    width: 220px;
  }

  .auth-alert {
    margin: -10px 0 20px;
  }

  .auth-form {
    gap: 24px;
  }

  .auth-input {
    height: 60px;
    padding: 0 24px;
    font-size: 17px;
  }

  .password-field .auth-input {
    padding-right: 66px;
  }

  .password-toggle {
    right: 14px;
  }

  .btn-submit {
    height: 62px;
    font-size: 20px;
  }
}

@media (max-width: 380px) {
  .login-body {
    padding: 12px;
  }

  .auth-card {
    padding: 34px 18px;
    border-radius: 28px;
  }

  .auth-logo {
    width: 190px;
  }
}

/* ============ CLICK LOGS ============ */
.click-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 16px;
  align-items: end;
  padding: 20px;
  margin-bottom: 18px;
}
.click-filter .field input,
.click-filter .field select {
  min-height: 46px;
}
.click-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.click-filter-actions .button-outline { margin-top: 0; }
.click-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.click-table table { min-width: 1500px; }
.click-table td { vertical-align: top; }
.truncate-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.truncate-cell-wide { max-width: 280px; }
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}
.pagination a {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}
.pagination span { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 1100px) {
  .click-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .click-filter { grid-template-columns: 1fr; }
  .click-filter-actions { align-items: stretch; flex-direction: column; }
  .click-filter-actions .button { width: 100%; }
}
