/* Sign-in, invite, project list and admin pages (hosted mode). Same visual
   language as the coding view: system font, white cards on #fafafa, #1a73e8
   for the one primary action. */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: #fafafa;
  color: #222;
  padding: 48px 16px;
}
a { color: #1a65ad; }
.wordmark {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: #888; font-weight: 600; margin-bottom: 14px;
}
.card {
  max-width: 380px; margin: 0 auto; background: #fff;
  border: 1px solid #e0e0e0; border-radius: 8px; padding: 28px 28px 24px;
}
.card.wide { max-width: 960px; }
h1 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
h2 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: #888; font-weight: 600; margin: 28px 0 10px;
}
.lede { color: #555; margin-bottom: 20px; }
.muted { color: #737d87; font-size: 12px; }
label { display: block; font-size: 12px; font-weight: 600; color: #444; margin: 14px 0 4px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; font: inherit; border: 1px solid #ccc; border-radius: 4px; padding: 8px 10px;
  background: #fff; color: inherit;
}
input:focus-visible, button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid #1a73e8; outline-offset: 1px;
}
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: #222; margin: 6px 0; }
.check input { width: auto; }
button {
  font: inherit; border: 1px solid #ccc; border-radius: 4px; background: #fff;
  padding: 6px 12px; cursor: pointer; color: inherit;
}
button:hover { background: #f1f3f5; }
button.primary {
  background: #1a73e8; border-color: #1a73e8; color: #fff; font-weight: 600;
  padding: 9px 14px; margin-top: 20px; width: 100%;
}
button.primary:hover { background: #1257b0; border-color: #1257b0; }
button.inline { width: auto; margin-top: 12px; }
button:disabled { opacity: 0.5; cursor: default; }
button.danger { color: #a32e2e; }
button.danger:hover { background: #fcecec; }
.error {
  margin-top: 14px; padding: 8px 10px; border-radius: 4px;
  background: #fcecec; color: #a32e2e; font-size: 13px;
}
.notice {
  margin-top: 14px; padding: 10px 12px; border-radius: 4px;
  background: #e8f0fe; color: #174ea6; font-size: 13px;
}
.foot { margin-top: 18px; color: #737d87; font-size: 12px; }

/* project list */
[data-page=projects] { padding: 0; background: #f8f9fb; color: #192331; }
[data-page=projects] .muted { color: #546273; }
.projects-wrap { max-width: 960px; margin: 0 auto; padding-inline: 24px; }
.projects-bar { border-bottom: 1px solid #dce2e9; background: #fff; }
.projects-bar-inner, .projects-account, .projects-heading, .sandbox-heading {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
}
.projects-bar-inner, .projects-heading, .sandbox-heading { justify-content: space-between; }
.projects-bar-inner { min-height: 60px; padding-block: 10px; }
.projects-account { font-size: 12px; overflow-wrap: anywhere; }
.projects-account button { border-color: #dce2e9; }
.projects-brand { font-size: 15px; font-weight: 700; }
.projects-main { padding-block: 36px; }
.projects-heading h1 { margin: 0; font-size: clamp(24px, 5vw, 32px); letter-spacing: -0.025em; }
.projects-heading button, .project-dialog-actions button { margin: 0; width: auto; border-radius: 7px; }
.projects-heading button span { margin-right: 4px; }
.projects-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.52fr); gap: 20px; margin-top: 20px; }
.projects { display: grid; gap: 8px; list-style: none; }
.project-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 62px; padding: 10px 16px; border: 1px solid #dce2e9; border-radius: 8px;
  background: #fff; text-decoration: none; color: inherit; font-weight: 600; overflow-wrap: anywhere;
}
.project-row:hover { border-color: #1a73e8; background: #f6f9fe; }
.project-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: #edf4ff; color: #1a65ad; }
.project-folder { position: relative; width: 16px; height: 12px; border: 1.5px solid; border-radius: 2px; }
.project-folder::before {
  content: ''; position: absolute; top: -4px; left: -1.5px; width: 7px; height: 3px;
  border: 1.5px solid; border-bottom: 0; border-radius: 2px 2px 0 0;
}
.project-arrow { width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.project-row .project-arrow { color: #546273; margin-right: 3px; }
.projects-empty { border: 1px dashed #ccd6e2; border-radius: 8px; padding: 18px 16px; }
.project-members { margin: 6px 12px 4px; font-size: 13px; }
.project-members summary { cursor: pointer; width: fit-content; color: #555; }
.project-members .muted { margin-top: 6px; }
.project-members .members li span { overflow-wrap: anywhere; min-width: 0; }
.project-members .add-member input { min-width: 0; }
.sandbox-card { align-self: start; padding: 18px; border: 1px solid #d6e5fa; border-radius: 9px; background: #edf4ff; }
.sandbox-heading h2, #new-project-dialog h2 { margin: 0; color: inherit; font-size: 18px; text-transform: none; letter-spacing: normal; }
.sandbox-card p { margin-top: 4px; }
.sandbox-actions { display: grid; justify-items: start; gap: 6px; margin-top: 14px; }
.sandbox-actions a { font-weight: 600; padding-block: 4px; }
#try-coding {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px;
  border: 1px solid #c8d9f3; border-radius: 7px; background: #fff; text-decoration: none;
}
#try-coding:hover { border-color: #1a73e8; background: #f6f9fe; }
#new-project-dialog {
  width: min(380px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; padding: 22px;
  border: 1px solid #dce2e9; border-radius: 9px; color: inherit;
}
#new-project-dialog::backdrop { background: rgb(18 30 46 / 40%); }
#new-project-dialog input { font-size: 16px; }
.project-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@media (max-width: 620px) {
  .projects-wrap { padding-inline: 16px; }
  .projects-main { padding-block: 24px; }
  .projects-layout { grid-template-columns: 1fr; }
}

/* admin */
.topline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: #666; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid #e0e0e0; }
td { padding: 7px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
td.actions { white-space: nowrap; text-align: right; }
td.actions button { padding: 3px 8px; font-size: 12px; margin-left: 4px; }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 3px; background: #eef1f4; color: #555; }
.tag.off { background: #fcecec; color: #a32e2e; }
.link-box { display: flex; gap: 6px; margin-top: 8px; }
.link-box input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.project { border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
.project-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.project code { font-size: 12px; color: #555; word-break: break-all; }
.project-storage { color: #737d87; font-size: 12px; margin-top: 4px; }
.project-form-note { margin-top: 6px; overflow-wrap: anywhere; }
.register-project { border-top: 1px solid #e0e0e0; margin-top: 18px; padding-top: 12px; }
.project-storage summary, .register-project summary { cursor: pointer; width: fit-content; }
.members { list-style: none; margin: 8px 0; }
.members li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; }
.members li button { padding: 2px 8px; font-size: 12px; }
.add-member { display: flex; gap: 6px; margin-top: 6px; }
.add-member input { padding: 5px 8px; }
fieldset { border: 0; }
legend { font-size: 12px; font-weight: 600; color: #444; margin: 14px 0 4px; }
