/* LMS Workspace — sign-in, account and workspace-choice pages */
:root {
  --text: #0f1729; --text-2: #4b5565; --muted: #6b7380; --border: #e3e7ee; --border-strong: #cfd6e0;
  --surface: #fff; --page: #f8f9fb; --primary: #0b63e6; --primary-hover: #0852c2; --primary-soft: #e7effd; --danger: #b42318;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex: none; }
:focus-visible { outline: 3px solid rgba(11, 99, 230, .5); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 10px 14px; border-radius: 8px; background: #fff; }
.skip:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header & footer */
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 86px; padding: 0 48px; background: #fff; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--text); font-size: 26px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .brand-mark { color: var(--primary); }
.brand strong { white-space: nowrap; }
.brand-org { min-width: 0; padding-left: 22px; border-left: 1.5px solid var(--border-strong); color: var(--text-2); font-size: 22px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-header-right { display: flex; align-items: center; gap: 14px; }
.help-link { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; }
.auth-footer { display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding: 22px 48px; border-top: 1px solid var(--border); color: #a2a9b4; font-size: 16px; }
.auth-footer a { color: var(--text-2); }
.auth-footer.center { justify-content: center; gap: 28px; }
.auth-footer.center a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; }
.auth-footer form { margin: 0; }
.auth-footer button.linkish { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--text); font-size: 18px; cursor: pointer; }

/* layout */
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-messages { width: 100%; max-width: 680px; margin: 0 auto 18px; }
.auth-message { margin: 0 0 8px; padding: 12px 16px; border-radius: 10px; background: #eef3fd; color: #1f3b70; }
.auth-message.error { background: #fef3f2; color: var(--danger); }
.auth-message.success { background: #ecf8f0; color: #157a3c; }

/* card */
.auth-card { width: 100%; max-width: 676px; padding: 48px 50px; background: #fff; border: 1.5px solid var(--border); border-radius: 22px; box-shadow: 0 14px 40px rgba(15, 23, 41, .04); }
.auth-card.center { text-align: center; }
.auth-card h1 { font-size: 46px; line-height: 1.1; font-weight: 800; letter-spacing: -.035em; }
.auth-card .subtitle { margin: 10px 0 30px; color: var(--text-2); font-size: 21px; line-height: 1.45; }
.auth-card.center .subtitle { margin-bottom: 34px; }
.auth-card .eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.auth-card .card-icon { display: grid; place-items: center; margin: 0 auto 22px; color: var(--text); }
.auth-card .card-icon.ok { width: 76px; height: 76px; border-radius: 50%; background: #e7f6ec; color: #16a34a; }
.success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 8px auto 24px; border-radius: 50%; background: #e7f6ec; color: #16a34a; font-size: 30px; }

/* fields */
.field { margin: 0 0 22px; text-align: left; }
.field > label, .field-label { display: block; margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.field input:not([type=checkbox]), .field select { width: 100%; height: 58px; padding: 0 20px; border: 1.5px solid var(--border-strong); border-radius: 12px; background: #fff; font-size: 20px; }
.field input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(11, 99, 230, .14); }
.field input::placeholder { color: #8a92a0; }
.field.has-error input { border-color: #d92d20; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 64px !important; }
.reveal { position: absolute; top: 50%; right: 12px; display: grid; place-items: center; width: 42px; height: 42px; margin-top: -21px; border: 0; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; }
.reveal[aria-pressed=true] { color: var(--primary); }
.hint, .field-help { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.hint ul { margin: 4px 0; padding-left: 18px; }
.error, .field-error, .errorlist { margin: 8px 0 0; padding: 0; color: var(--danger); font-size: 15px; list-style: none; }
.alert, .form-alert { margin: 0 0 22px; padding: 14px 16px; border-radius: 10px; background: #fef3f2; color: var(--danger); text-align: left; }
.alert p, .form-alert p { margin: 0; }
.alert ul { margin: 0; padding: 0; list-style: none; }
.forgot { display: block; margin: -8px 0 28px; text-align: right; font-size: 18px; }
.check-row { display: flex; align-items: center; gap: 14px; margin: 4px 0 24px; color: var(--text-2); font-size: 18px; text-align: left; cursor: pointer; }
.check-row input { width: 24px; height: 24px; margin: 0; accent-color: var(--primary); flex: none; }
.check-row a { text-decoration: underline; }

/* buttons */
.primary, .btn-primary-lg { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 60px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font-size: 21px; font-weight: 600; cursor: pointer; text-decoration: none; }
.primary:hover, .btn-primary-lg:hover { background: var(--primary-hover); text-decoration: none; }
.primary span { display: none; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; height: 58px; border: 1.5px solid var(--border-strong); border-radius: 12px; background: #fff; color: var(--text); font-size: 21px; font-weight: 500; }
.google-btn:hover { background: #f8f9fb; text-decoration: none; }
.divider { display: flex; align-items: center; gap: 18px; margin: 30px 0; color: var(--muted); font-size: 19px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.switch { margin: 26px 0 0; color: var(--text-2); font-size: 20px; text-align: center; }
.after-note { margin: 18px 0 0; color: var(--text-2); font-size: 17px; text-align: center; }
.back-link { display: inline-block; margin-top: 28px; font-size: 20px; font-weight: 500; }
.secondary { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 20px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text); font-size: 17px; font-weight: 600; cursor: pointer; }
.secondary:hover { background: #f6f8fb; text-decoration: none; }

/* workspace chooser */
.chooser { width: 100%; max-width: 1340px; }
.chooser-head { text-align: center; }
.chooser-head h1 { font-size: 56px; line-height: 1.08; font-weight: 800; letter-spacing: -.035em; }
.chooser-head p { margin: 12px 0 0; color: var(--text-2); font-size: 24px; }
.chooser-search { display: flex; align-items: center; gap: 14px; height: 64px; margin: 46px 0 32px; padding: 0 22px; border: 1.5px solid var(--border-strong); border-radius: 14px; background: #fff; color: var(--muted); }
.chooser-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(11, 99, 230, .12); }
.chooser-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 21px; }
.ws-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.ws-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, .9fr) auto; align-items: center; padding: 20px 20px 20px 30px; background: #fff; border: 1.5px solid var(--border); border-radius: 18px; }
.ws-row.is-current { border-color: #b9cdf5; }
.ws-main { display: flex; align-items: center; gap: 36px; min-width: 0; }
.ws-letter { display: grid; place-items: center; width: 72px; height: 72px; flex: none; border-radius: 12px; background: #dfeafb; color: #2d3b4f; font-size: 34px; font-weight: 600; overflow: hidden; }
.ws-letter img { width: 100%; height: 100%; object-fit: cover; }
.ws-name { min-width: 0; }
.ws-name strong { display: block; font-size: 28px; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-name span { display: block; color: var(--text-2); font-size: 21px; }
.ws-cell { display: flex; align-items: center; gap: 16px; height: 64px; padding-left: 44px; border-left: 1.5px solid var(--border); color: var(--text); font-size: 21px; }
.ws-cell svg { color: var(--text-2); }
.ws-row form { margin: 0; }
.ws-open { height: 52px; padding: 0 30px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font-size: 20px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ws-open:hover { background: var(--primary-hover); }
.ws-create { display: flex; align-items: center; justify-content: center; gap: 18px; height: 88px; margin-top: 30px; border: 2px dashed var(--border-strong); border-radius: 18px; color: var(--primary); font-size: 24px; font-weight: 500; }
.ws-create:hover { background: #fff; text-decoration: none; }
.ws-empty { margin: 0; padding: 26px; color: var(--text-2); text-align: center; }

/* user menu (chooser header) */
.user-chip { position: relative; }
.user-chip summary { display: flex; align-items: center; gap: 14px; list-style: none; cursor: pointer; }
.user-chip summary::-webkit-details-marker { display: none; }
.user-chip .avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #e8ecf2; color: #2d3b4f; font-size: 19px; font-weight: 600; }
.user-chip .who { font-size: 20px; font-weight: 500; }
.user-chip .menu-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; min-width: 240px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 41, .12); }
.user-chip .menu-panel a, .user-chip .menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font-size: 16px; text-align: left; cursor: pointer; }
.user-chip .menu-panel a:hover, .user-chip .menu-panel button:hover { background: #f1f3f6; text-decoration: none; }
.user-chip form { margin: 0; }

/* two-step verification */
.setup-steps { margin: 0 0 22px; padding-left: 22px; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.setup-steps li + li { margin-top: 12px; }
.setup-steps strong { display: block; color: var(--text); }
.setup-key { display: block; margin: 10px 0; padding: 12px 16px; border-radius: 10px; background: #f1f3f6; color: var(--text); font: 600 20px/1.4 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; word-break: break-all; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0 0 24px; padding: 18px 22px 18px 42px; border-radius: 12px; background: #f6f8fb; }
.backup-codes code { font: 600 19px ui-monospace, Menlo, Consolas, monospace; }

/* account & content pages */
.page-card { width: 100%; max-width: 760px; padding: 40px 44px; background: #fff; border: 1.5px solid var(--border); border-radius: 22px; }
.page-card h1 { font-size: 38px; font-weight: 800; letter-spacing: -.03em; }
.page-card h2 { margin: 30px 0 10px; font-size: 22px; }
.page-card p, .page-card li { color: var(--text-2); font-size: 17px; line-height: 1.6; }
.page-card .note { padding: 12px 16px; border-radius: 10px; background: #fff6e5; color: #8a5300; font-size: 15px; }
.page-card .row-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.page-card .ws-mini { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.page-card .ws-mini li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.faq dt { margin-top: 22px; font-size: 18px; font-weight: 700; }
.faq dd { margin: 6px 0 0; color: var(--text-2); font-size: 17px; line-height: 1.6; }

@media (max-width: 1100px) {
  .ws-row { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; }
  .ws-main { grid-column: 1 / -1; }
  .ws-cell { height: auto; padding-left: 0; border-left: 0; font-size: 18px; }
  .ws-row form { grid-column: 1 / -1; }
  .ws-open { width: 100%; }
}
@media (max-width: 640px) {
  .auth-header { height: 68px; padding: 0 16px; }
  .brand { gap: 10px; font-size: 20px; }
  .brand-org { padding-left: 12px; font-size: 16px; }
  .help-link span, .user-chip .who { display: none; }
  .auth-main { justify-content: flex-start; padding: 24px 16px; }
  .auth-card, .page-card { padding: 28px 20px; border-radius: 16px; }
  .auth-card h1 { font-size: 32px; }
  .auth-card .subtitle { font-size: 17px; margin-bottom: 24px; }
  .field > label { font-size: 16px; }
  .field input:not([type=checkbox]) { height: 52px; font-size: 17px; }
  .primary, .google-btn { height: 54px; font-size: 18px; }
  .forgot, .switch, .back-link, .divider, .check-row { font-size: 16px; }
  .chooser-head h1 { font-size: 34px; }
  .chooser-head p { font-size: 18px; }
  .chooser-search { height: 54px; margin: 28px 0 20px; }
  .chooser-search input { font-size: 17px; }
  .ws-row { padding: 16px; }
  .ws-main { gap: 16px; }
  .ws-letter { width: 56px; height: 56px; font-size: 26px; }
  .ws-name strong { font-size: 21px; }
  .ws-name span, .ws-cell { font-size: 16px; }
  .ws-create { height: 68px; font-size: 19px; }
  .auth-footer { justify-content: center; padding: 16px; }
  .auth-footer.center { gap: 18px; }
  .auth-footer.center a, .auth-footer button.linkish { font-size: 16px; }
}
