/* EventMenu Auth — Rebuilt Modern Design */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-error-bg: #fef2f2;
  --color-error-text: #b91c1c;
  --color-error-border: #fca5a5;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body.auth-v2 {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Hide the showcase section for a simpler, centered modern card look */
.auth-showcase {
  display: none;
}

.auth-main {
  width: 100%;
  max-width: 420px;
}

.auth-panel {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
}

.auth-mobile-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text-main);
}

.auth-mobile-brand .auth-brandmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 900;
  font-size: 1.25rem;
}

/* Show the mobile brand on all screens now that showcase is hidden */
@media (min-width: 0px) {
  .auth-mobile-brand {
    display: flex;
  }
}

.auth-panel-head {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-panel-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--color-text-main);
}

.auth-panel-head p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-field > span:first-child {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-main);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-main);
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.auth-input-wrap.has-toggle input {
  padding-right: 4.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: color 0.15s, background-color 0.15s;
}

.password-toggle:hover {
  color: var(--color-text-main);
  background-color: var(--color-bg);
}

.auth-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.5rem;
}

.auth-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s, transform 0.1s;
}

.auth-submit:hover {
  background-color: var(--color-primary-hover);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-submit .busy {
  display: none;
}

.auth-submit.is-loading .label {
  display: none;
}

.auth-submit.is-loading .busy {
  display: inline;
}

.auth-help {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.auth-help strong {
  font-weight: 600;
  color: var(--color-text-main);
}

.auth-alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-alert.error {
  background-color: var(--color-error-bg);
  color: var(--color-error-text);
  border: 1px solid var(--color-error-border);
}

@media (max-width: 480px) {
  .auth-shell {
    padding: 0;
  }

  .auth-main {
    max-width: 100%;
  }

  .auth-panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
