.auth-shell,
.dashboard-shell {
    display: grid;
    gap: 24px;
    max-width: 980px;
}

.auth-card,
.dashboard-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius-xl);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--pp-shadow-lg);
    padding: clamp(26px, 5vw, 48px);
}

.auth-card::before,
.dashboard-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--pp-gradient);
}

.auth-card-compact {
    max-width: 620px;
    margin: 0 auto;
}

.auth-card h1,
.dashboard-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.auth-lead {
    color: var(--pp-muted);
    line-height: 1.7;
}

.auth-form,
.context-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.auth-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
    color: var(--pp-ink);
    font-weight: 850;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(91, 126, 178, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 14px 16px;
    color: var(--pp-ink);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.field textarea {
    min-height: 132px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 3px solid rgba(106, 214, 247, 0.32);
    border-color: var(--pp-cyan);
}

.field-full {
    grid-column: 1 / -1;
}

.dashboard-form {
    margin-top: 24px;
}

.dashboard-card__intro {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
}

.dashboard-card__intro h1 {
    margin: 0;
}

.profile-toggle-list {
    gap: 10px;
}

.profile-toggle {
    position: relative;
    display: inline-grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    justify-content: start;
    gap: 12px;
    max-width: 420px;
    color: var(--pp-ink);
    cursor: pointer;
    font-weight: 900;
}

.profile-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-toggle__slider {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #dbe7f4;
    box-shadow: inset 0 0 0 1px rgba(91, 126, 178, 0.18);
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.profile-toggle__slider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 5px 12px rgba(17, 43, 74, 0.16);
    transition: transform 0.16s ease;
}

.profile-toggle input:checked + .profile-toggle__slider {
    background: var(--pp-gradient);
    box-shadow: 0 10px 20px rgba(65, 136, 245, 0.18);
}

.profile-toggle input:checked + .profile-toggle__slider::after {
    transform: translateX(20px);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 4px;
}

.form-accordion {
    border: 1px solid rgba(91, 126, 178, 0.18);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(237, 250, 255, 0.78));
    box-shadow: 0 16px 34px rgba(17, 43, 74, 0.06);
    padding: 0;
}

.form-accordion summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    margin: 8px;
    border: 1px solid rgba(106, 214, 247, 0.34);
    border-radius: 18px;
    background:
        linear-gradient(100deg, rgba(106, 214, 247, 0.26), rgba(65, 136, 245, 0.1) 58%, rgba(246, 140, 203, 0.12)),
        rgba(255, 255, 255, 0.72);
    padding: 0 14px 0 18px;
    color: var(--pp-ink);
    cursor: pointer;
    font-weight: 950;
    list-style: none;
    box-shadow: 0 12px 28px rgba(65, 136, 245, 0.08);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.form-accordion summary::-webkit-details-marker {
    display: none;
}

.form-accordion summary::after {
    content: "v";
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--pp-blue);
    font-size: 0.78rem;
    box-shadow: 0 8px 18px rgba(65, 136, 245, 0.12);
    transition: transform 0.18s ease, background 0.16s ease, color 0.16s ease;
}

.form-accordion summary:hover {
    transform: translateY(-1px);
    border-color: rgba(65, 136, 245, 0.48);
    background:
        linear-gradient(100deg, rgba(106, 214, 247, 0.36), rgba(65, 136, 245, 0.16) 58%, rgba(246, 140, 203, 0.16)),
        rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 32px rgba(65, 136, 245, 0.12);
}

.form-accordion summary:hover::after {
    background: var(--pp-gradient);
    color: #fff;
}

.form-accordion[open] summary::after {
    transform: rotate(180deg);
}

.form-accordion__body {
    padding: 8px 18px 18px;
}

.choice-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.choice-group legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: var(--pp-ink);
    font-weight: 900;
}

.choice-pill {
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(91, 126, 178, 0.18);
    border-radius: 16px;
    background: rgba(245, 250, 255, 0.88);
    padding: 13px 14px;
    color: var(--pp-muted);
    font-weight: 900;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.choice-pill span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.choice-pill span::after {
    content: "";
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 1px rgba(91, 126, 178, 0.18);
}

.choice-pill small {
    display: block;
    margin-top: 6px;
    color: var(--pp-muted);
    font-weight: 800;
}

.choice-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.legal-consent {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    border: 1px solid rgba(91, 126, 178, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    padding: 14px 16px;
    color: var(--pp-ink);
    font-weight: 700;
    line-height: 1.5;
}

.legal-consent input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--pp-blue);
}

.legal-consent span {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.legal-consent a {
    color: var(--pp-blue);
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.choice-pill:hover,
.choice-pill-included,
.choice-pill.is-selected,
.choice-pill:has(input:checked) {
    transform: translateY(-1px);
    border-color: rgba(65, 136, 245, 0.55);
    color: var(--pp-blue);
    background: linear-gradient(100deg, rgba(106, 214, 247, 0.24), rgba(65, 136, 245, 0.12));
    box-shadow: 0 14px 24px rgba(65, 136, 245, 0.12);
}

.choice-pill-included {
    cursor: default;
}

.choice-pill.is-selected span::after,
.choice-pill-included span::after,
.choice-pill:has(input:checked) span::after {
    content: "ok";
    color: #fff;
    background: var(--pp-gradient);
    box-shadow: 0 8px 16px rgba(65, 136, 245, 0.18);
}

.form-message {
    position: relative;
    border: 1px solid rgba(91, 126, 178, 0.16);
    border-radius: 16px;
    margin: 0 0 14px;
    padding: 14px 48px 14px 16px;
    background: rgba(222, 252, 239, 0.78);
    color: #166341;
    font-weight: 800;
}

.form-message-close {
    position: absolute;
    top: 50%;
    right: 12px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    transform: translateY(-50%);
}

.form-message-close:hover {
    background: #fff;
}

.form-message-error {
    background: rgba(255, 235, 241, 0.88);
    color: #8b1d45;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.status-grid div,
.mini-pill {
    border: 1px solid rgba(91, 126, 178, 0.16);
    border-radius: 16px;
    background: rgba(245, 250, 255, 0.8);
    padding: 14px 16px;
}

.status-grid strong,
.status-grid span {
    display: block;
}

.status-grid strong {
    margin-bottom: 4px;
}

.status-grid span {
    color: var(--pp-muted);
}

.role-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.role-card {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(91, 126, 178, 0.16);
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(106, 214, 247, 0.14), rgba(255, 255, 255, 0.84));
    padding: 16px 18px;
}

.role-card strong {
    color: var(--pp-ink);
    font-weight: 950;
}

.role-card span {
    color: var(--pp-muted);
    line-height: 1.55;
}

.mini-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 20px;
}

.mini-pill {
    padding: 8px 12px;
    color: var(--pp-blue);
    font-weight: 900;
}

@media (max-width: 760px) {
    .form-grid,
    .choice-group,
    .role-card-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }
}
