/* Full-screen sheets for login / signup / settings embedded in the workspace (index). */
.workspace-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 45000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(15, 15, 18, 0.45);
  backdrop-filter: blur(10px);
}
.workspace-sheet-overlay[hidden] {
  display: none !important;
}
.workspace-sheet-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100vh - 28px);
  overflow: visible;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}
.workspace-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #333;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.workspace-sheet-close:hover {
  background: rgba(0, 0, 0, 0.1);
}
.workspace-sheet-close .material-symbols-rounded {
  font-size: 22px;
}

body.workspace-account-modal-open {
  overflow: hidden;
}

.workspace-sheet-panel .workspace-login-sheet,
.workspace-sheet-panel .workspace-signup-sheet {
  --auth-control-width: min(100%, 340px);
  --brand-primary: #111111;
  --brand-primary-soft: rgba(0, 0, 0, 0.08);
  --brand-hover: #000000;
  --text-high: #111111;
  --text-med: #444444;
  --text-low: #777777;
  --white: #ffffff;
  --radius-xl: 30px;
  --radius-md: 16px;
  --transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  width: 100%;
  background: #ffffff;
  padding: 22px 30px 30px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 1);
  color: var(--text-high);
  font-family: "Google Sans", sans-serif;
}

.workspace-sheet-panel .workspace-signup-sheet {
  padding-top: 18px;
  padding-bottom: 24px;
}

.workspace-sheet-panel .workspace-login-sheet *,
.workspace-sheet-panel .workspace-login-sheet *::before,
.workspace-sheet-panel .workspace-login-sheet *::after,
.workspace-sheet-panel .workspace-signup-sheet *,
.workspace-sheet-panel .workspace-signup-sheet *::before,
.workspace-sheet-panel .workspace-signup-sheet *::after {
  box-sizing: border-box;
}

.workspace-sheet-panel .workspace-login-sheet .internal-nav,
.workspace-sheet-panel .workspace-signup-sheet .internal-nav {
  display: none !important;
}

.workspace-sheet-panel .workspace-login-sheet header,
.workspace-sheet-panel .workspace-signup-sheet header {
  text-align: center;
  margin-bottom: 20px;
}

.workspace-sheet-panel .workspace-signup-sheet header {
  margin-bottom: 14px;
}

.workspace-sheet-panel .workspace-login-sheet .logo-mark,
.workspace-sheet-panel .workspace-signup-sheet .logo-mark {
  display: block;
  margin-bottom: 2px;
  color: var(--brand-primary);
  font-size: 2rem;
  font-weight: 595;
  letter-spacing: 0;
}

.workspace-sheet-panel .workspace-login-sheet h2,
.workspace-sheet-panel .workspace-signup-sheet h2 {
  color: var(--text-high);
  font-size: 1.45rem;
  font-weight: 595;
  letter-spacing: 0;
  line-height: 1.1;
}

.workspace-sheet-panel .google-signin-slot {
  width: var(--auth-control-width);
  min-height: 44px;
  margin: 0 auto 12px;
  display: flex;
  justify-content: center;
}

.workspace-sheet-panel .google-signin-slot > div,
.workspace-sheet-panel .google-signin-slot iframe {
  width: 100% !important;
}

.workspace-sheet-panel .auth-divider {
  width: var(--auth-control-width);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-low);
  font-size: 0.76rem;
  font-weight: 595;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workspace-sheet-panel .auth-divider::before,
.workspace-sheet-panel .auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e7e7e7;
}

.workspace-sheet-panel .form-stack {
  width: var(--auth-control-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.workspace-sheet-panel .workspace-signup-sheet .form-stack {
  gap: 10px;
}

.workspace-sheet-panel .form-group label {
  display: block;
  margin-bottom: 6px;
  padding-left: 4px;
  color: var(--text-med);
  font-size: 0.82rem;
  font-weight: 510;
}

.workspace-sheet-panel .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.workspace-sheet-panel .input-wrapper > .material-symbols-rounded {
  position: absolute;
  left: 18px;
  color: var(--text-low);
  font-size: 21px;
  pointer-events: none;
}

.workspace-sheet-panel input {
  width: 100%;
  min-height: 50px;
  padding: 13px 18px 13px 52px;
  border: 1.5px solid #dddddd;
  border-radius: var(--radius-md);
  background: #fafafa;
  color: var(--text-high);
  font: inherit;
  font-size: 0.98rem;
  transition: var(--transition);
}

.workspace-sheet-panel input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--brand-primary-soft);
}

.workspace-sheet-panel .btn-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 595;
  transition: var(--transition);
}

.workspace-sheet-panel .btn-submit:hover:not(:disabled) {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.workspace-sheet-panel .btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.workspace-sheet-panel .policy-agreement {
  margin-top: 0;
  color: var(--text-low);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.workspace-sheet-panel .policy-agreement a {
  color: var(--brand-primary);
  font-weight: 510;
}

.workspace-sheet-panel .footer-link {
  margin-top: 20px;
  color: var(--text-med);
  font-size: 0.92rem;
  text-align: center;
}

.workspace-sheet-panel .workspace-signup-sheet .footer-link {
  margin-top: 14px;
}

.workspace-sheet-panel .footer-link button {
  border: none;
  background: none;
  color: var(--brand-primary);
  cursor: pointer;
  font: inherit;
  font-weight: 595;
  padding: 0;
}

@media (max-height: 760px) {
  .workspace-sheet-panel .workspace-login-sheet,
  .workspace-sheet-panel .workspace-signup-sheet {
    padding: 16px 28px 20px;
  }

  .workspace-sheet-panel .workspace-login-sheet header,
  .workspace-sheet-panel .workspace-signup-sheet header {
    margin-bottom: 12px;
  }

  .workspace-sheet-panel .workspace-login-sheet .logo-mark,
  .workspace-sheet-panel .workspace-signup-sheet .logo-mark {
    font-size: 1.65rem;
  }

  .workspace-sheet-panel .workspace-login-sheet h2,
  .workspace-sheet-panel .workspace-signup-sheet h2 {
    font-size: 1.24rem;
  }

  .workspace-sheet-panel .form-stack,
  .workspace-sheet-panel .workspace-signup-sheet .form-stack {
    gap: 8px;
  }

  .workspace-sheet-panel input {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .workspace-sheet-panel .btn-submit {
    min-height: 48px;
  }

  .workspace-sheet-panel .footer-link,
  .workspace-sheet-panel .workspace-signup-sheet .footer-link {
    margin-top: 10px;
  }
}

/* Signup email verification (stacked above signup sheet) */
.workspace-verify-overlay {
  position: fixed;
  inset: 0;
  z-index: 46000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}
.workspace-verify-overlay[hidden] {
  display: none !important;
}
