/* The seller portal: sign-in pages, the dashboard and the account menu. Every value comes
   from tokens.css. */

/* Sign-in pages: one centred card, 400 px wide. */

.auth {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 25rem;
    padding: calc(var(--space-xl) + var(--space-sm));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.auth-card .kicker {
    margin-bottom: var(--space-sm);
}

.auth-card .page-title {
    margin-bottom: var(--space-sm);
}

.auth-card form + form,
.auth-card .page-title + form {
    margin-top: var(--space-lg);
}

.auth-line {
    margin: 0 0 var(--space-xl);
    color: var(--text-secondary);
    font-size: var(--fs-md);
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.auth-status {
    margin: 0;
    font-size: var(--fs-md);
}

.auth-status + form + noscript .auth-line {
    margin: var(--space-sm) 0 0;
}

.auth-notice {
    margin: 0 0 var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: var(--live-bg);
    border: 1px solid var(--live-border);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
}

.auth-notice:empty {
    display: none;
}

.auth-aside {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

.auth-aside form {
    margin: 0;
}

.code-input {
    font-family: var(--mono);
    font-size: var(--fs-lg);
    letter-spacing: 0.3em;
}

/* Dashboard head: company name, chip. */

.dash-head .page-title {
    margin: var(--space-xs) 0 var(--space-md);
}

/* The six stages in one row. Done is filled, the current one is ringed, later ones are grey. */

.stages {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: calc(2 * var(--space-xl)) 0;
    padding: 0;
    list-style: none;
}

.stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: 0 var(--space-xs);
    text-align: center;
}

/* The line from the stage before to this one. */
.stage + .stage::before {
    content: "";
    position: absolute;
    top: 0.75rem;
    right: calc(50% + 1.25rem);
    left: calc(-50% + 1.25rem);
    height: 1px;
    background: var(--border-light);
}

.stage-done + .stage::before {
    background: var(--text-primary);
}

.stage-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: var(--space-xs);
    border: 1px solid var(--border-light);
    border-radius: var(--r-full);
    background: var(--bg);
    color: var(--bg);
}

.stage-dot svg {
    width: 0.875rem;
    height: 0.875rem;
}

.stage-done .stage-dot {
    background: var(--text-primary);
    border-color: var(--text-primary);
}

.stage-current .stage-dot {
    border: 2px solid var(--text-primary);
}

.stage-current .stage-dot::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: var(--r-full);
    background: var(--text-primary);
}

.stage-name {
    font-size: var(--fs-sm);
    font-weight: 500;
}

.stage-later .stage-name {
    color: var(--text-muted);
}

.stage-line {
    color: var(--text-muted);
    font-size: var(--fs-min);
}

.stage-current .stage-line {
    color: var(--text-primary);
}

a.stage-line {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* The Next step card: the page's hero. The text on the left, the one filled button on the
   right. */

.next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(2 * var(--space-xl));
    padding: var(--space-xl) calc(var(--space-xl) + var(--space-sm));
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
}

.next-step-body {
    min-width: 0;
    max-width: 38rem;
}

.next-step-title {
    margin: var(--space-xs) 0 var(--space-sm);
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* A step with no lines ends at its title, with the card's own padding below it. */
.next-step-title:last-child {
    margin-bottom: 0;
}

.next-step-line {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--fs-md);
}

.next-step-progress {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

.next-step-action {
    flex-shrink: 0;
}

.progress {
    width: 8rem;
    height: 0.25rem;
    border: 0;
    border-radius: var(--r-full);
    background: var(--border);
    appearance: none;
    overflow: hidden;
}

.progress::-webkit-progress-bar {
    background: var(--border);
    border-radius: var(--r-full);
}

.progress::-webkit-progress-value {
    background: var(--text-primary);
    border-radius: var(--r-full);
}

.progress::-moz-progress-bar {
    background: var(--text-primary);
}

/* Quiet account cards in two columns. */

.account-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
    margin-top: calc(2 * var(--space-xl));
}

.account-card .kicker {
    margin-bottom: var(--space-lg);
}

.people {
    display: grid;
    gap: var(--space-md);
    margin: 0;
    padding: 0;
    list-style: none;
}

.person {
    display: grid;
    gap: 0.125rem;
    min-width: 0;
}

.person-name {
    font-size: var(--fs-md);
    font-weight: 500;
}

.person-email {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    overflow-wrap: anywhere;
}

.person-you {
    margin-left: var(--space-xs);
    color: var(--text-muted);
    font-size: var(--fs-min);
    font-weight: 400;
}

/* The account menu in the top bar: name, email, sign out. */

.account-menu {
    position: relative;
}

.account-menu-button {
    display: block;
    max-width: 16rem;
    overflow: hidden;
    padding: 0 var(--space-md);
    border: 1px solid var(--border-light);
    border-radius: var(--r-full);
    font-size: var(--fs-sm);
    line-height: calc(2rem - 2px);
    text-overflow: ellipsis;
    white-space: nowrap;
    list-style: none;
    cursor: pointer;
}

.account-menu-button::-webkit-details-marker {
    display: none;
}

.account-menu-button:hover {
    background: var(--bg-card-hover);
}

.account-menu-panel {
    position: absolute;
    top: calc(100% + var(--space-sm));
    right: 0;
    z-index: 10;
    min-width: 16rem;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-2);
}

.account-menu-name {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 500;
}

.account-menu-email {
    margin: 0.125rem 0 var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    overflow-wrap: anywhere;
}

.account-menu-panel form {
    margin: 0;
}


/* ---- The white design (2026-11-15), seller portal. ---- */

.auth {
    padding-top: 6vh;
}

.auth-card {
    max-width: 26rem;
    padding: 2rem;
    box-shadow: var(--shadow-2);
}

.auth-card .page-title {
    font-size: 1.5rem;
}

.dash-head {
    margin-top: var(--space-sm);
}

.dash-head .page-title {
    margin: 0 0 var(--space-md);
    font-size: var(--fs-2xl);
}

/* The stage row: 32 px marks with an icon each. Done is filled, the current one is ringed. */
.stages {
    margin: 2.5rem 0 2.75rem;
}

.stage {
    gap: 0.125rem;
}

.stage + .stage::before {
    top: 1rem;
    right: calc(50% + 1.75rem);
    left: calc(-50% + 1.75rem);
    height: 2px;
    border-radius: 1px;
    background: var(--border);
}

.stage-dot {
    width: 2rem;
    height: 2rem;
    margin-bottom: var(--space-sm);
    border: 1.5px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-muted);
}

.stage-dot svg {
    width: 1rem;
    height: 1rem;
}

.stage-done .stage-dot {
    color: var(--bg);
}

.stage-current .stage-dot {
    color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(var(--ink-rgb), 0.08);
}

.stage-current .stage-dot::after {
    content: none;
}

.stage-name {
    font-size: var(--fs-md);
    font-weight: 550;
}

.stage-later .stage-name {
    font-weight: 500;
}

.stage-line {
    font-size: var(--fs-sm);
}

/* The Next step card: an icon tile, the words, the one filled button. */
.next-step {
    gap: var(--space-xl);
    padding: var(--space-xl);
    border-color: var(--border-light);
    box-shadow: 0 0 0 4px rgba(var(--ink-rgb), 0.04), var(--shadow-1);
}

.next-step-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.next-step-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.next-step {
    justify-content: flex-start;
}

.next-step-body {
    flex: 1 1 auto;
    max-width: none;
}

.next-step-line {
    max-width: 36rem;
}

.next-step-title {
    font-size: 1.125rem;
}

.next-step-line {
    font-size: 0.9375rem;
    line-height: 1.55;
}

.next-step-action {
    min-height: 2.75rem;
    padding: 0 1.25rem;
    font-size: 0.9375rem;
}

.progress {
    width: 10rem;
    height: 0.375rem;
}

.section-heading {
    margin: 3rem 0 var(--space-lg);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.account-cards {
    margin-top: 0;
}

/* The account button is a round mark, as on most signed-in sites. The name is in its menu. */
.account-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    max-width: none;
    padding: 0;
    background: var(--bg-card-hover);
    border-color: transparent;
    color: var(--text-secondary);
}

.account-menu-button svg {
    width: 1rem;
    height: 1rem;
}

.account-menu-button:hover,
.account-menu[open] .account-menu-button {
    background: var(--border);
    color: var(--text-primary);
}


/* ---- Sign-in with Google or Microsoft: the code form first, then a divider and one outlined
   button for each provider. ---- */

.auth-card .page-title + .auth-notice {
    margin-top: var(--space-lg);
}

.auth-card .form-input::placeholder {
    color: var(--text-muted);
}

/* A sign-in that opened no session: plain text in the error tone, as under a field. No box,
   so the card holds no second card. */
.auth-notice-warn {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    color: var(--red);
    font-size: var(--fs-md);
    text-wrap: pretty;
}

.provider-buttons {
    display: grid;
    gap: var(--space-sm);
}

/* Every button in the card is as tall as its 44 px field. */
.auth-card .btn-block {
    min-height: 2.75rem;
}

.btn-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    min-height: 2.75rem;
    padding: 0 var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    color: var(--text-primary);
    font-size: var(--fs-md);
    font-weight: 550;
    letter-spacing: -0.005em;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}

.btn-provider:hover {
    background: var(--bg-th);
    border-color: var(--border-strong);
}

.btn-provider:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text-primary);
}

.provider-mark {
    flex: none;
}

.auth-or {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

.auth-or::before,
.auth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
