/* Projects-only portal (app.scad.events) — SCAD Maps website palette,
   light + dark. Independent of styles.css, which is the full portal's. */
@font-face { font-family: Manrope; src: url('/assets/manrope-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #f6f5ef; --panel: #fffef9; --panel-2: #eef0e7; --line: #d9dfd1;
  --text: #233e34; --muted: #627063; --accent: #204e3d; --accent-hover: #32664f; --on-accent: #fff;
  --dot: #81994a; --danger: #b42318; --shadow: rgba(30, 72, 55, .35); --hover: rgba(32, 78, 61, .05);
  --badge-admin: #8a5a14; --badge-group: #5b3fa0; --badge-user: #1f5f86;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0f1a16; --panel: #16241f; --panel-2: #1c2d27; --line: #2a3d35;
  --text: #e6ecdf; --muted: #9aab9c; --accent: #dbea9b; --accent-hover: #e8f2bd; --on-accent: #173026;
  --dot: #dbea9b; --danger: #f97066; --shadow: rgba(0, 0, 0, .6); --hover: rgba(219, 234, 155, .06);
  --badge-admin: #f2c078; --badge-group: #c4b1f5; --badge-user: #9ccbea;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.5 Manrope, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--dot); outline-offset: 3px; }
.muted { color: var(--muted); }
.center { text-align: center; padding: 60px 0; }

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(960px, calc(100% - 36px)); margin: 0 auto; height: 76px;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -1px; white-space: nowrap; }
.brand span { color: var(--dot); }
.bar-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 7px; border: 1px solid var(--line);
  background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); min-height: 48px; font-size: 14px; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: .7; cursor: default; }
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 7px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 17px; line-height: 1; color: var(--accent);
}
.icon-btn:hover { background: var(--panel-2); }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 10px 0 0; font-size: 13px; }
.linkbtn:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

main { width: min(960px, calc(100% - 36px)); margin: 0 auto; padding: 36px 0 64px; }
h1 { font-weight: 600; letter-spacing: -1.4px; line-height: 1.15; margin: 0; }

/* sign in */
.login {
  max-width: 380px; margin: 28px auto 0; padding: 34px 30px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px -40px var(--shadow);
}
.login img { margin: 0 auto 14px; display: block; }
.login h1 { font-size: 30px; }
.login p { margin: 6px 0 22px; font-size: 14px; }
#loginform, .forgot { display: flex; flex-direction: column; gap: 11px; text-align: left; }
.forgot { margin-top: 12px; }
input {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); font-size: 15px;
}
input:focus { outline: none; border-color: var(--accent); }
.err { color: var(--danger); font-size: 13px; min-height: 18px; text-align: center; }

/* projects */
.title { font-size: clamp(30px, 5vw, 42px); margin-bottom: 26px; }
.group { margin-bottom: 28px; }
.group h2 { margin: 0 0 10px; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.projects { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.project {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background .15s;
}
.project:last-child { border-bottom: 0; }
.project:hover { background: var(--hover); }
.project-name { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.go { color: var(--accent); font-size: 18px; transition: transform .15s; }
.project:hover .go { transform: translateX(3px); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badge.admin { color: var(--badge-admin); }
.badge.user_admin { color: var(--badge-group); }
.badge.user { color: var(--badge-user); }
.empty { text-align: center; padding: 60px 0; }
.empty h1 { font-size: 30px; margin-bottom: 8px; }

@media (max-width: 520px) {
  .bar { height: 64px; }
  .brand { font-size: 19px; }
  .brand img { width: 26px; height: 26px; }
  .who { display: none; }
  main { padding-top: 26px; }
  .login { padding: 28px 20px; margin-top: 8px; }
  .project { padding: 15px 16px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
