/* Sign-in, sign-up and admin pages. Tokens and components come from src/ui/brand.css. */

/* ---------- sign-in / sign-up: drawing on the left, form on the right ---------- */

.auth {
    display: grid;
    grid-template-columns: minmax(360px, 5fr) 6fr;
    min-height: 100vh;
    min-height: 100svh;
}

.auth-art {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 24px;
    padding: 32px clamp(28px, 4vw, 56px) 40px;
    background: var(--graphite);
    color: var(--porcelain);
    overflow: hidden;
}
.auth-art .wordmark { color: var(--porcelain); }
.art { align-self: center; justify-self: center; width: min(100%, 520px); margin: 0; color: #7f8a92; }
.art .drawing { width: 100%; height: auto; overflow: visible; }
/* the drawing draws itself once */
@media (prefers-reduced-motion: no-preference) {
    .art .drawing path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 1.6s var(--ease) forwards; }
    .art .drawing g + g path { animation-delay: 0.7s; animation-duration: 1s; }
    .art .drawing text { opacity: 0; animation: appear 0.5s 1.5s forwards; }
    @keyframes draw { to { stroke-dashoffset: 0; } }
    @keyframes appear { to { opacity: 1; } }
}
.auth-tagline { margin: 0; max-width: 26em; color: #b9c1c7; font-size: 16px; line-height: 1.5; }

.auth-main {
    display: grid;
    place-items: center;
    padding: 48px clamp(20px, 5vw, 72px);
}
.auth-card { width: min(420px, 100%); }
.auth-card h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 520;
    letter-spacing: -0.025em;
    line-height: 1.02;
}
.auth-card .lead { margin: 0 0 28px; color: var(--slate); font-size: 16px; }
.auth-card form { margin: 0; }
.auth-card .btn.full { margin-top: 8px; height: 48px; }
.auth-card .hint { margin: 22px 0 0; color: var(--slate); font-size: 14.5px; }
.auth-card .hint a { color: var(--graphite); font-weight: 550; }
.auth-card .switch {
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--hair);
    color: var(--slate);
    font-size: 15px;
}
.auth-card .switch a { color: var(--graphite); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.done-mark {
    width: 44px; height: 44px; margin: 0 0 20px;
    display: grid; place-items: center;
    border-radius: 50%; background: var(--ok-soft); color: var(--ok);
}
.done-mark svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-art { grid-template-rows: auto; padding: 20px; }
    .art, .auth-tagline { display: none; }
    .auth-main { place-items: start center; padding-top: 40px; }
    .field-row { grid-template-columns: 1fr; }
}

/* ---------- admin page ---------- */

.admin { max-width: 1120px; margin: 0 auto; padding: 40px clamp(16px, 3vw, 32px) 80px; }
.admin section { margin: 0 0 48px; }
.admin h2 { margin: 0 0 6px; font-size: 26px; font-weight: 540; }
.admin .lead { margin: 0 0 20px; max-width: 46em; color: var(--slate); }
.panel-box { padding: 20px; border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--paper); }
.add-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 16px; }
.add-row .field { flex: 1 1 200px; margin: 0; }
.add-row .field.narrow { flex: 0 0 140px; }
.secret {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 16px; padding: 14px 16px;
    border-radius: var(--r-s); background: var(--amber-soft); color: var(--amber-ink);
}
.secret code { padding: 4px 10px; border-radius: 4px; background: var(--white); color: var(--graphite); font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.table-wrap { overflow-x: auto; border: 1px solid var(--hair); border-radius: var(--r-m); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { padding: 12px 14px; border-bottom: 1px solid var(--hair); color: var(--slate); font-weight: 520; text-align: left; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--slate); font-size: 13px; }
td select, .setting select { height: 34px; padding: 0 8px; border: 1px solid var(--hair-2); border-radius: var(--r-s); background: var(--white); }
.setting select { min-width: 150px; font: inherit; font-size: 14px; flex: none; }
td .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 999px; background: rgba(29, 34, 38, 0.07); font-size: 13px; }
.chip button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.chip button:hover { background: rgba(29, 34, 38, 0.12); }
.request { display: grid; gap: 6px; }
.request .note { color: var(--slate); font-size: 13.5px; max-width: 36em; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.setting p { margin: 4px 0 0; color: var(--slate); font-size: 14px; }
.switch-btn {
    position: relative; flex: none; width: 46px; height: 26px; border: 0; border-radius: 999px; background: var(--hair-2); cursor: pointer;
}
.switch-btn::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: transform 0.2s var(--ease); }
.switch-btn[aria-checked="true"] { background: var(--graphite); }
.switch-btn[aria-checked="true"]::after { transform: translateX(20px); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--amber); color: var(--graphite); font-size: 12px; font-weight: 700; }

.check.small { align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.check.small input { margin: 0; }

/* Continue with Google, and the line between it and the email form */
.google-btn { gap: 12px; height: 48px; background: var(--white); }
.google-btn img { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--slate); font-size: 13.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.sub-setting { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hair); }
.setting-note { margin: 14px 0 0; color: var(--slate); font-size: 13.5px; }
.g-tag { height: 20px; margin-left: 8px; padding: 0 7px; font-size: 11.5px; vertical-align: 2px; }
.switch-btn:disabled { opacity: 0.45; cursor: default; }

/* workspaces */
.chip-role { height: 22px; padding: 0 2px; border: 0; border-radius: 6px; background: rgba(29, 34, 38, 0.06); font-size: 12px; cursor: pointer; }
.inline-name { display: block; width: 100%; max-width: 260px; height: 32px; padding: 0 8px; margin: 0 0 2px -8px; border: 1px solid transparent; border-radius: var(--r-s); background: transparent; font-weight: 600; font-size: 15px; }
.inline-name:hover { border-color: var(--hair-2); }
.inline-name:focus { outline: none; border-color: var(--graphite); background: var(--white); }
