:root {
  --md-sys-color-primary: #6750A4;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #EADDFF;
  --md-sys-color-on-primary-container: #21005D;
  --md-sys-color-secondary: #625B71;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #E8DEF8;
  --md-sys-color-on-secondary-container: #1D192B;
  --md-sys-color-surface: #FEF7FF;
  --md-sys-color-on-surface: #1C1B1F;
  --md-sys-color-surface-variant: #E7E0EC;
  --md-sys-color-on-surface-variant: #49454F;
  --md-sys-color-outline: #79747E;
  --md-sys-color-outline-variant: #CAC4D0;
  --md-sys-color-error: #B3261E;
  --md-sys-color-on-error: #FFFFFF;
  --md-sys-color-error-container: #F9DEDC;
  --md-sys-color-surface-container-low: #F7F2FA;
  --md-sys-color-surface-container: #F3EDF7;
  --md-sys-color-surface-container-high: #ECE6F0;
  --md-sys-color-surface-container-highest: #E6E0E9;
  --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-elevation-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  min-height: 100vh;
}
/* --- Buttons (shared) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 20px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: background-color, box-shadow, opacity 0.2s ease;
  text-transform: none;
  text-decoration: none;
}
.btn--filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--md-elevation-1);
}
.btn--filled:hover {
  background-color: #5A3E9C;
  box-shadow: var(--md-elevation-2);
}
.btn--filled:active {
  background-color: #4F378B;
}
.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}
.btn .material-icons {
  font-size: 18px;
}
.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
}
.btn--icon:hover {
  background-color: rgba(73, 69, 79, 0.08);
}
.btn--full {
  width: 100%;
  margin-top: 24px;
}
.is-hidden {
  display: none !important;
}
/* --- App Bar (shared by landing, app, auth pages) --- */
.app-bar {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--md-elevation-2);
}
.app-bar__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.app-bar__brand--link {
  color: var(--md-sys-color-on-primary);
  text-decoration: none;
}
.app-bar__brand--link:hover {
  opacity: 0.9;
}
.app-bar__brand .material-icons {
  font-size: 28px;
}
.app-bar__brand h1 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
}
.app-bar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-bar__link {
  color: var(--md-sys-color-on-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 20px;
  transition: background-color 0.2s ease;
}
.app-bar__link:hover {
  background-color: rgba(255, 255, 255, 0.12);
}
/* --- App bar user info (shared by landing + app pages) --- */
.app-bar__user {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  line-height: 1.2;
  min-width: 0;
}
.app-bar__user-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}
.app-bar__user-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.app-bar__user-email {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
@media (max-width: 600px) {
  .app-bar__user {
    margin-left: 0;
    padding-left: 8px;
    gap: 8px;
  }
  .app-bar__user-name,
  .app-bar__user-email {
    max-width: 120px;
  }
  .app-bar__user .btn--text {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    white-space: nowrap;
  }
  .app-bar__user .btn--text .material-icons {
    font-size: 18px;
  }
  .app-bar__user .btn--text .btn__label {
    display: none;
  }
}
.auth-container {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 24px;
}
.auth-card {
  background-color: #FFFFFF;
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--md-elevation-2);
}
.auth-title {
  font-size: 28px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 32px;
  color: var(--md-sys-color-on-surface);
}
.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  border-radius: 24px;
  border: 1px solid var(--md-sys-color-outline);
  background: #FFFFFF;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color, box-shadow 0.2s ease;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
}
.auth-provider-btn:hover {
  background-color: var(--md-sys-color-surface-container-low);
  box-shadow: var(--md-elevation-1);
}
.auth-provider-btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.auth-provider-btn--disabled:hover {
  background-color: #FFFFFF;
  box-shadow: none;
}
.register-info {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.register-info__row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.register-info__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
}
.register-info__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface);
}
.register-disclaimer-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 8px;
}
.disclaimer-box {
  background-color: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 8px;
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 20px;
  white-space: pre-line;
}
.auth-back-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--md-sys-color-primary);
  text-decoration: none;
}
.auth-back-link:hover {
  text-decoration: underline;
}
.error-banner {
  display: none;
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  align-items: center;
  gap: 12px;
}
.error-banner--visible {
  display: flex;
}
.error-banner .material-icons {
  font-size: 20px;
  flex-shrink: 0;
}
