body.login-page, body.page { overflow-y: auto; display: block; }
.login { max-width: 760px; margin: 0 auto; padding: clamp(32px, 10vh, 96px) 16px 48px; text-align: center; }
.login h1 { margin: 0 0 6px; font-size: 26px; }
.login > .muted { margin: 0 0 24px; font-size: 14px; }
.panel { max-width: 380px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; text-align: start; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 8px; }
.panel label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.panel input { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 12px; color: var(--text); }
.panel input:focus { outline: none; border-color: var(--accent); }
.btn.wide { width: 100%; padding: 10px; margin-top: 4px; }
.small { font-size: 12px; }
.center { text-align: center; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 4px 0; }

/* shared by projects + admin pages */
.page-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.page-wrap { max-width: 1040px; margin: 0 auto; padding: 28px 16px 60px; }
.page-wrap h1 { font-size: 24px; margin: 0 0 4px; }
.page-wrap > .muted { margin: 0 0 22px; }
.section-title { font-size: 14px; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pcard { position: relative; border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, border-color .15s; text-align: start; }
.pcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.pcard .av { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; font-weight: 700; color: #fff; background: var(--c, var(--accent)); overflow: hidden; }
.pcard .av img, .mini-av img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.pcard b { font-size: 16px; }
.pcard small { color: var(--muted); font-size: 12px; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.pcard .tag { background: var(--panel-2); border-radius: 6px; padding: 0 7px; }
.pcard .tag.shared { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pcard .menu-btn { position: absolute; top: 10px; inset-inline-end: 10px; }
.pcard.new { border-style: dashed; background: transparent; align-items: center; justify-content: center; min-height: 170px; color: var(--muted); }
.pcard.new .av { background: var(--panel-2); color: var(--muted); font-size: 30px; }
.pcard.current { border-color: var(--accent); }
.empty-note { color: var(--muted); font-size: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.popmenu { position: absolute; z-index: 20; top: 40px; inset-inline-end: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 5px; min-width: 190px; }
.popmenu button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.popmenu button:hover { background: var(--panel-2); }
.popmenu button.danger { color: var(--bad); }
.checks { margin-bottom: 12px; }
.checks .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.check { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; font-size: 14px !important; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 6px !important; cursor: pointer; }
.check input { width: auto !important; margin: 0 !important; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--user); color: var(--user-ink); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 50; font-size: 14px; max-width: calc(100vw - 32px); }
.dlg .err { color: var(--bad); font-size: 13px; min-height: 18px; }

table.users { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 14px; }
table.users th, table.users td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; }
table.users th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--panel-2); }
table.users tr:last-child td { border-bottom: 0; }
table.users code { direction: ltr; display: inline-block; }
.role { font-size: 11px; padding: 1px 8px; border-radius: 6px; background: var(--panel-2); }
.role.admin { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
