/* StickyMen Phase 1: Auth UI, Header Profile Dropdown & Account Dashboard */
.sm-auth-header-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sm-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.sm-signin-btn:hover {
  border-color: #ea580c;
  color: #ea580c;
  background: #fff7ed;
}

.sm-avatar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid #fed7aa;
  background: #fff7ed;
  color: #ea580c;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.sm-avatar-btn:hover,
.sm-avatar-btn[aria-expanded="true"] {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14);
}

.sm-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sm-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: 248px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  padding: 8px;
  text-align: left;
}

.sm-account-menu[hidden] {
  display: none !important;
}

.sm-account-menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}

.sm-account-menu-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-account-menu-email {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.sm-account-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.sm-account-menu-item:hover {
  background: #fff7ed;
  color: #ea580c;
}

.sm-account-menu-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 6px 0;
}

.sm-account-menu-signout {
  color: #b91c1c;
}

.sm-account-menu-signout:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* Official Google Sign-In Button */
.sm-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #1f2937;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.sm-google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.09);
}

.sm-google-btn:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

/* Auth Modal */
.sm-auth-dialog {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 0;
  width: min(420px, calc(100vw - 28px));
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.sm-auth-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
}

.sm-auth-alt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.sm-auth-btn-primary,
.sm-auth-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.sm-auth-btn-primary {
  background: #ea580c;
  color: #ffffff;
  border: 1px solid #ea580c;
}

.sm-auth-btn-primary:hover {
  background: #c2410c;
}

.sm-auth-btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.sm-auth-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.sm-auth-btn-cancel {
  width: 100%;
  margin-top: 10px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.sm-auth-btn-cancel:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.sm-auth-card {
  position: relative;
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sm-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sm-auth-close:hover {
  background: #f8fafc;
  color: #0f172a;
}

.sm-auth-logo {
  height: 38px;
  width: auto;
  margin-bottom: 16px;
}

.sm-auth-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.sm-auth-subtitle {
  margin: 0 0 20px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #64748b;
}

.sm-auth-error {
  width: 100%;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: left;
}

.sm-auth-legal {
  margin: 18px 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #64748b;
}

.sm-auth-legal a {
  color: #ea580c;
  text-decoration: none;
  font-weight: 600;
}

.sm-auth-legal a:hover {
  text-decoration: underline;
}

/* Standalone /login & /account pages */
.sm-auth-page-wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  background: #fafafa;
}

.sm-login-panel {
  width: min(440px, 100%);
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(9, 9, 11, 0.06);
}
.sm-auth-tabs,
#authPanelLogin,
#authPanelSignup {
  width: 100%;
}

.sm-account-main {
  min-height: calc(100vh - 68px);
  background: #f8fafc;
  padding: 40px 16px 64px;
}

.sm-account-container {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sm-account-header-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.sm-account-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.sm-account-avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  border: 2px solid #fed7aa;
  background: #fff7ed;
  color: #ea580c;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sm-account-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sm-account-name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.sm-account-email {
  margin: 3px 0 8px;
  font-size: 0.9rem;
  color: #64748b;
}

.sm-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.sm-account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sm-account-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  background: #ea580c;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #ea580c;
  transition: background 0.16s ease;
}

.sm-account-btn-primary:hover {
  background: #c2410c;
}

.sm-account-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}

.sm-account-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.sm-account-details-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 24px;
}

.sm-account-section-title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.sm-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sm-account-field {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.sm-account-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
}

.sm-account-field-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-all;
}

@media (max-width: 640px) {
  .sm-account-grid {
    grid-template-columns: 1fr;
  }
  .sm-account-header-card {
    padding: 18px;
  }
}

.sm-auth-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sm-auth-divider::before,
.sm-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.sm-auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.sm-auth-form[hidden] {
  display: none !important;
}

.sm-form-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.sm-form-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.sm-form-input:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14);
}

.sm-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sm-pw-wrap .sm-form-input {
  padding-right: 60px;
}

.sm-pw-toggle {
  position: absolute;
  right: 8px;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.sm-pw-meter {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.sm-pw-meter-fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s ease, background 0.2s ease;
}

.sm-pw-hint {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 400;
}

.sm-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

.sm-checkbox-row a,
.sm-auth-link {
  color: #ea580c;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
}

.sm-auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sm-auth-success {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: left;
}
