@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700&display=swap');

:root {
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f3f4f6;
    --panel: #ffffff;
    --accent: #0f766e;
    --accent-hover: #0d9488;
    --accent-soft: #ccfbf1;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --ok: #059669;
    --ok-bg: #ecfdf5;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
    --radius: 14px;
    --sidebar: 260px;
    --font: "Inter", system-ui, sans-serif;
    --display: "Outfit", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink);
    min-height: 100vh;
    background: #f7f8fa;
    position: relative;
    overflow-x: hidden;
}

/* Soft two-color blur blobs — top & bottom only, not full screen */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(72px);
    pointer-events: none;
    z-index: 0;
}
body::before {
    top: -140px;
    left: -100px;
    background: rgba(45, 212, 191, 0.45);
}
body::after {
    bottom: -160px;
    right: -110px;
    background: rgba(251, 146, 60, 0.4);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== Sidebar: soft white / green / orange blur ===== */
.sidebar {
    width: var(--sidebar);
    flex-shrink: 0;
    margin: 12px 0 12px 12px;
    border-radius: 24px;
    color: #134e4a;
    padding: 1.15rem .95rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    position: sticky;
    top: 12px;
    height: calc(100vh - 24px);
    overflow: auto;
    background:
        radial-gradient(280px 220px at 10% 0%, rgba(52, 211, 153, 0.55), transparent 70%),
        radial-gradient(260px 240px at 100% 100%, rgba(251, 146, 60, 0.5), transparent 70%),
        radial-gradient(220px 180px at 80% 20%, rgba(255, 255, 255, 0.85), transparent 65%),
        linear-gradient(165deg, #ffffff 0%, #ecfdf5 45%, #fff7ed 100%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 14px 36px rgba(15, 23, 40, 0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: .15rem .15rem 1rem;
    border-bottom: 1px solid rgba(15, 118, 110, 0.12);
}
.brand-logo {
    display: block;
    width: 100%;
    max-width: 210px;
    height: auto;
    object-fit: contain;
    background: transparent;
    border-radius: 12px;
    padding: .2rem;
}
.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.28);
    display: grid;
    place-items: center;
}
.brand-mark svg {
    width: 18px; height: 18px;
    stroke: #fff; fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.brand-name {
    font-family: var(--display);
    font-size: 1.08rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.02em;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

/* Glass white nav buttons */
.nav a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .78rem .95rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    color: #115e59;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 12px rgba(15, 23, 40, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: .15s ease;
}
.nav a svg {
    width: 20px;
    height: 20px;
    stroke: #0f766e;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.nav a:hover {
    background: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    color: #0f766e;
}
.nav a.active {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.18);
}
.nav a.active svg { stroke: #0f766e; }

.sidebar-foot {
    border-top: 1px solid rgba(15, 118, 110, 0.12);
    padding-top: 1rem;
    display: grid;
    gap: .7rem;
}
.user-chip { display: grid; gap: .12rem; padding: 0 .25rem; }
.user-chip strong { color: #134e4a; font-size: .95rem; }
.user-chip span { color: #5b6b80; font-size: .78rem; }

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .78rem .95rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: .92rem;
    color: #9a3412;
    background: rgba(255, 237, 213, 0.85);
    border: 1px solid rgba(254, 215, 170, 0.9);
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(249, 115, 22, 0.1);
    backdrop-filter: blur(12px);
    transition: .15s ease;
}
.btn-logout svg {
    width: 18px; height: 18px;
    stroke: #ea580c; fill: none; stroke-width: 1.75;
    stroke-linecap: round; stroke-linejoin: round;
}
.btn-logout:hover {
    background: #fff7ed;
    text-decoration: none;
    color: #9a3412;
}

.main {
    flex: 1;
    padding: 1.5rem 1.75rem 2.5rem;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.panel,
.form-block,
.stat-card,
.person-card,
.pf-login-card {
    background: #fff;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.page-head h1 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink);
}
.page-head p {
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .95rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: .65rem 1rem;
    font: inherit;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
    transition: .15s ease;
}
.btn:hover { text-decoration: none; }
.btn svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: #f9fafb; color: var(--ink); }
.btn-accent {
    background: linear-gradient(90deg, #f97316, #f43f5e);
    color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}
.btn-accent:hover {
    filter: brightness(1.05);
    color: #fff;
}
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.btn-sm { padding: .4rem .7rem; font-size: .8rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon {
    width: 34px; height: 34px; padding: 0;
    border-radius: 8px;
}
.actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

.alert {
    padding: .8rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-size: .92rem;
}
.alert-success, .alert-ok { background: var(--ok-bg); border-color: #a7f3d0; color: var(--ok); }
.alert-error { background: var(--danger-bg); border-color: #fecaca; color: var(--danger); }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.form-grid.one { grid-template-columns: 1fr; }
.form-grid .full { grid-column: 1 / -1; }

label { display: grid; gap: .35rem; font-weight: 600; font-size: .88rem; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="time"], input[type="tel"],
input[type="file"], select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .7rem .8rem;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.checkbox-row, .switch { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.checkbox-row input, .switch input { width: auto; accent-color: var(--accent); }
.muted { color: var(--muted); }
.tiny { font-size: .8rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .78rem; }

/* ===== Simple form blocks ===== */
.blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.form-block {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: .15s ease;
}
.form-block:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
.form-block-bar {
    height: 4px;
    background: var(--block-color, var(--accent));
}
.form-block-body {
    padding: 1.15rem 1.2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    flex: 1;
}
.form-block h3 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.01em;
}
.form-block .desc {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.form-block-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    padding: .22rem .55rem;
    font-size: .75rem;
    font-weight: 600;
}
.pill.live { background: var(--ok-bg); color: var(--ok); }
.pill.draft { background: #fff7ed; color: #c2410c; }
.pill svg {
    width: 12px; height: 12px;
    stroke: currentColor; fill: none; stroke-width: 2;
}

.form-block-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .85rem 1.2rem 1.1rem;
    border-top: 1px solid var(--line);
    background: #fafafa;
}
.form-block-actions .btn { flex: 0 0 auto; }

a.form-block-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}
a.form-block-link:hover { text-decoration: none; }
.form-block-link .form-block-actions {
    margin-top: auto;
}
.form-block-cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--accent);
    font-weight: 600;
    font-size: .9rem;
}
.form-block-cta svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none; stroke-width: 2;
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1.15rem;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .95rem 1.05rem;
    box-shadow: var(--shadow);
}
a.stat-card {
    text-decoration: none;
    color: inherit;
    transition: .15s ease;
}
a.stat-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
.stat-card strong {
    display: block;
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
}
.stat-card span { color: var(--muted); font-size: .8rem; font-weight: 500; }

/* Tables */
.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}
table.data {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    background: #fff;
}
table.data th, table.data td {
    padding: .7rem .8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    font-size: .9rem;
}
table.data th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    position: sticky;
    top: 0;
}
table.data tr:hover td { background: #f9fafb; }
table.data td.wrap { white-space: normal; max-width: 260px; }

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .7rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.filters .filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.stat { font-weight: 600; color: var(--muted); font-size: .9rem; }

.field-list { display: grid; gap: .55rem; }
.field-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: .7rem;
    align-items: center;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.field-item .ord {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: .8rem;
}
.field-item strong { display: block; font-size: .95rem; }
.field-item span { color: var(--muted); font-size: .8rem; }

.split {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 1rem;
    align-items: start;
}

/* People page layout */
.people-layout {
    display: grid;
    gap: 1rem;
}
.people-create {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}
.people-create .panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.people-create .panel form {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    flex: 1;
}
.people-create .panel .btn {
    margin-top: auto;
}
.people-list {
    display: grid;
    gap: .65rem;
}
.person-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1.2fr) auto;
    gap: 1rem;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .9rem 1rem;
    box-shadow: var(--shadow);
}
.person-card-edit {
    grid-template-columns: 44px minmax(0, 1.2fr) auto;
}
.person-edit {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: .75rem;
    margin-top: .15rem;
}
.person-edit > summary {
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    color: var(--brand, #0f766e);
    list-style: none;
    user-select: none;
}
.person-edit > summary::-webkit-details-marker { display: none; }
.person-edit > summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform .15s ease;
}
.person-edit[open] > summary::before {
    transform: rotate(90deg);
}
.person-edit-form {
    margin-top: .75rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.person-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem .85rem;
}
.person-edit-grid label {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
}
.person-edit-grid input,
.person-edit-grid select {
    font-weight: 500;
    color: inherit;
}
.person-active-check {
    flex-direction: row !important;
    align-items: center;
    gap: .5rem !important;
    margin-top: 1.55rem;
}
.person-active-check input {
    width: auto;
}
.person-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}
.person-avatar.user {
    background: linear-gradient(135deg, #ea580c, #db2777);
}
.person-info h3 {
    margin: 0;
    font-size: .98rem;
    font-weight: 600;
    font-family: var(--display);
}
.person-info p {
    margin: .15rem 0 0;
    color: var(--muted);
    font-size: .8rem;
}
.person-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    justify-content: flex-end;
}
.person-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    margin: 0;
}
.person-actions input[type="password"] {
    width: 120px;
    padding: .4rem .55rem;
    font-size: .8rem;
    border-radius: 8px;
}
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 999px;
}
.status-dot.on { background: var(--ok-bg); color: var(--ok); }
.status-dot.off { background: #f3f4f6; color: #6b7280; }
.status-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.section-title {
    margin: .4rem 0 .65rem;
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 700;
}

@media (max-width: 960px) {
    .app-shell { flex-direction: column; }
    .sidebar {
        width: auto;
        height: auto;
        position: static;
        margin: 10px;
    }
    .nav { flex-direction: row; flex-wrap: wrap; }
    .split { grid-template-columns: 1fr; }
    .people-create { grid-template-columns: 1fr; }
    .person-card {
        grid-template-columns: 44px 1fr;
    }
    .person-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .person-edit-grid {
        grid-template-columns: 1fr;
    }
    .person-active-check {
        margin-top: .25rem;
    }
}

.empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
}

.loading-overlay {
    position: absolute; inset: 0;
    background: rgba(255,255,255,.65);
    display: none;
    place-items: center;
    border-radius: 12px;
}
.loading-overlay.show { display: grid; }

.color-swatches { display: flex; gap: .4rem; flex-wrap: wrap; }
.color-swatches label {
    width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; display: block;
}
.color-swatches input { display: none; }
.color-swatches input:checked + span {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
.color-swatches span {
    display: block; width: 100%; height: 100%; border-radius: 50%;
}

code {
    background: #f3f4f6;
    padding: .1rem .35rem;
    border-radius: 4px;
    font-size: .85em;
}

/* ===== Auth: white + corner blur blobs ===== */
.pf-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: #f7f8fa;
    position: relative;
    z-index: 1;
}
.pf-login {
    width: min(400px, 100%);
    position: relative;
    z-index: 1;
}
.pf-login-brand {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-bottom: 1.1rem;
}
.pf-login-brand-logo {
    flex-direction: column;
    align-items: flex-start;
    gap: .55rem;
}
.login-logo {
    display: block;
    width: min(300px, 100%);
    height: auto;
    object-fit: contain;
    background: transparent;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 40, 0.12));
}
.pf-login-brand-logo {
    align-items: center !important;
    text-align: center;
    width: 100%;
}
.pf-login-brand-logo span {
    width: 100%;
    text-align: center;
}
.pf-login-brand .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: none;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 42%, transparent 43%),
                linear-gradient(315deg, #38bdf8, #2563eb);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}
.pf-login-brand .brand-mark svg {
    display: none;
}
.pf-login-brand strong {
    display: block;
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}
.pf-login-brand span { color: var(--muted); font-size: .88rem; }
.pf-login-card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 23, 40, 0.08);
}
.pf-form { display: grid; gap: .9rem; }
.pf-form h1 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}
.pf-form .muted { margin: 0; }
.pf-switch { margin: 0; text-align: center; font-size: .88rem; color: var(--muted); }

/* Google Forms–like fill */
.gform-shell { max-width: 720px; margin: 0 auto; }
.gform-banner {
    height: 8px;
    border-radius: 12px 12px 0 0;
    background: var(--accent);
}
.gform-title-card {
    border-radius: 0 0 12px 12px;
    border-top: 0;
}
.gform-title-card h2 {
    margin: 0 0 .35rem;
    font-family: var(--display);
    font-size: 1.5rem;
}
.gform-questions { display: grid; gap: .75rem; }
.gform-q {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}
.gform-q-title { font-weight: 600; margin-bottom: .5rem; }
.gform-q .req { color: var(--danger); }
.gform-help { color: var(--muted); font-size: .85rem; margin: -.25rem 0 .5rem; }
.option-stack { display: grid; gap: .4rem; }
.option-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 1rem;
    align-items: start;
}
@media (max-width: 980px) {
    .builder-layout { grid-template-columns: 1fr; }
}
.builder-canvas { max-width: 720px; width: 100%; }
.builder-side { position: sticky; top: 1rem; }
.builder-toolbar { display: flex; flex-direction: column; gap: .55rem; }
.q-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: .7rem;
    box-shadow: var(--shadow);
}
.q-card.selected { border-left: 4px solid var(--accent); }
.q-card-top {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    align-items: flex-start;
    margin-bottom: .65rem;
}
.q-type-badge {
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    white-space: nowrap;
}
.q-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .75rem;
    padding-top: .7rem;
    border-top: 1px solid var(--line);
}
.type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .35rem;
}
.type-grid label {
    font-size: .75rem;
    padding: .5rem .4rem;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid var(--line);
    cursor: pointer;
    text-align: center;
    font-weight: 600;
}
.type-grid input { display: none; }
.type-grid label:has(input:checked) {
    background: var(--accent-soft);
    border-color: #99f6e4;
    color: var(--accent);
}

/* ===== Google Forms–style builder ===== */
.gf-shell {
    max-width: 780px;
    margin: 0 auto;
    display: grid;
    gap: .75rem;
}
.gf-topbar {
    height: 10px;
    border-radius: 12px 12px 0 0;
    margin-bottom: -.75rem;
}
.gf-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow);
}
.gf-card-edit {
    border-left: 6px solid var(--accent);
}
.gf-card-view:hover {
    border-color: #d1d5db;
}
.gf-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.gf-card-link:hover { text-decoration: none; }
.gf-form-title {
    margin: 0 0 .35rem;
    font-family: var(--display);
    font-size: 1.7rem;
}
.gf-form-title-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    font-family: var(--display);
    font-size: 1.7rem;
    font-weight: 700;
    padding: .25rem 0;
    background: transparent;
}
.gf-form-title-input:focus {
    border-bottom-color: var(--accent);
    box-shadow: none;
}
.gf-form-desc-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    min-height: 56px;
    padding: .4rem 0;
    background: transparent;
    resize: vertical;
}
.gf-form-desc-input:focus {
    border-bottom-color: var(--accent);
    box-shadow: none;
}
.gf-settings-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1rem;
    margin-top: .85rem;
}
@media (max-width: 700px) {
    .gf-settings-row { grid-template-columns: 1fr; }
}
.gf-card-head {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: .75rem;
    align-items: start;
    margin-bottom: .65rem;
}
@media (max-width: 640px) {
    .gf-card-head { grid-template-columns: 1fr; }
}
.gf-card-head-view {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
    margin-bottom: .55rem;
}
.gf-question-input {
    width: 100%;
    border: 0;
    border-bottom: 2px solid var(--line);
    border-radius: 0;
    font-size: 1.05rem;
    font-weight: 600;
    padding: .55rem 0;
    background: #f9fafb;
    padding-left: .65rem;
    padding-right: .65rem;
}
.gf-question-input:focus {
    border-bottom-color: var(--accent);
    box-shadow: none;
    background: #fff;
}
.gf-type-select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .6rem .7rem;
    font-weight: 600;
    background: #fff;
}
.gf-help-input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: .4rem 0;
    margin-bottom: .85rem;
    background: transparent;
    color: var(--muted);
    font-size: .9rem;
}
.gf-help-input:focus {
    border-bottom-color: var(--accent);
    box-shadow: none;
}
.gf-q-title {
    font-weight: 600;
    font-size: 1.05rem;
}
.gf-underline {
    border-bottom: 1px dotted #9ca3af;
    padding: .55rem 0;
    color: var(--muted);
    font-size: .92rem;
}
.gf-dropdown-demo {
    width: 100%;
    max-width: 320px;
    margin-bottom: .55rem;
}
.gf-option-mini {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .8rem;
    color: var(--muted);
    font-size: .82rem;
}
.gf-options-list {
    display: grid;
    gap: .45rem;
    margin-bottom: .65rem;
}
.gf-option-row {
    display: grid;
    grid-template-columns: 28px 1fr 32px;
    gap: .45rem;
    align-items: center;
}
.gf-option-row input {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: .45rem .2rem;
    background: transparent;
}
.gf-option-row input:focus {
    border-bottom-color: var(--accent);
    box-shadow: none;
}
.gf-option-bullet {
    color: var(--muted);
    text-align: center;
    font-size: 1rem;
}
.gf-opt-remove {
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
    padding: .2rem;
}
.gf-opt-remove:hover {
    background: #fef2f2;
    color: var(--danger);
}
.gf-card-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .65rem;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--line);
}
.gf-add-bar {
    position: sticky;
    bottom: 12px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: .7rem;
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
    backdrop-filter: blur(10px);
}
.gf-add-forms {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
