@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/inter-400.woff2") format("woff2");
}

/* Account-owned collaborators, application licenses and invitations. */
.team-page { display: grid; gap: 24px; }
.license-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.license-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--border-color, #e4e7ec); border-radius: 16px; background: var(--surface, #fff); }
.license-card > div { min-width: 0; flex: 1; }
.license-card strong, .license-card p { display: block; margin: 0; }
.license-card p { margin-top: 4px; color: var(--text-muted, #667085); font-size: .86rem; }
.license-count { white-space: nowrap; font-size: .78rem; font-weight: 700; color: var(--primary, #6d3df5); }
.team-layout { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(460px, 1.18fr); gap: 22px; align-items: start; }
.team-invite-form, .team-directory > section, .invitation-link-card { padding: 24px; border: 1px solid var(--border-color, #e4e7ec); border-radius: 18px; background: var(--surface, #fff); }
.team-invite-form { display: grid; gap: 20px; }
.team-invite-form h2, .team-invite-form p, .invitation-link-card h2, .invitation-link-card p { margin: 0; }
.team-invite-form > div > p:last-child, .invitation-link-card p { margin-top: 6px; color: var(--text-muted, #667085); }
.application-picker { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.application-picker legend { margin-bottom: 10px; font-weight: 700; }
.application-picker .option-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border-color, #e4e7ec); border-radius: 12px; }
.application-picker .option-card span { display: grid; gap: 2px; }
.application-picker .option-card small { color: var(--text-muted, #667085); }
.team-directory { display: grid; gap: 18px; }
.team-directory-full { grid-template-columns: 1fr; }
.team-create-page { display: grid; gap: 24px; max-width: 860px; }
.team-create-page .team-invite-form { padding: 28px; border: 1px solid var(--border-color, #e4e7ec); border-radius: 18px; background: var(--surface, #fff); }
.team-modal-page { max-width: none; min-height: calc(100vh - 96px); }
.add-user-modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 22px; background: var(--surface, #fff); box-shadow: 0 28px 80px rgba(16, 24, 40, .24); }
.add-user-modal[open] { display: grid; gap: 0; }
.add-user-modal::backdrop { background: rgba(16, 24, 40, .58); backdrop-filter: blur(3px); }
.add-user-modal-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 24px; padding: 26px 28px 20px; border-bottom: 1px solid var(--border-color, #e4e7ec); background: var(--surface, #fff); }
.add-user-modal-header h1, .add-user-modal-header p { margin: 0; }
.add-user-modal-header > div > p:last-child { margin-top: 6px; color: var(--text-muted, #667085); }
.add-user-modal .team-invite-form { border: 0; border-radius: 0; }
.modal-close { display: inline-grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border-color, #e4e7ec); border-radius: 12px; color: inherit; }
.team-invite-form [hidden] { display: none !important; }
.field-help { grid-column: 1 / -1; margin: 0; color: var(--text-muted, #667085); font-size: .9rem; line-height: 1.5; }
.corporate-email-field { grid-column: 1 / -1; align-content: start; }
.corporate-email-preview { display: block; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border-color, #e4e7ec); border-radius: 10px; background: var(--surface-muted, #f8fafc); color: var(--text-muted, #667085); font-size: .9rem; overflow-wrap: anywhere; }
.corporate-email-preview strong { color: var(--text-color, #101828); }
.corporate-email-preview select { width: auto; min-width: 12rem; margin: 0; padding: 4px 28px 4px 7px; border: 0; background-color: transparent; color: inherit; font: inherit; font-weight: 700; }
.corporate-password-fields { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.password-copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.password-copy-button { min-height: 44px; padding-inline: 14px; }
.password-copy-status { min-height: 1.4em; }
@media (max-width: 700px) { .password-copy-row { grid-template-columns: 1fr 1fr; } .password-copy-row input { grid-column: 1 / -1; } }
.mailbox-access-picker { margin-top: 20px; }
.management-grid.existing-account-fields { grid-template-columns: minmax(0, 1fr); }
.onboarding-mode-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.onboarding-mode-picker legend { grid-column: 1 / -1; margin-bottom: 2px; font-weight: 700; }
.onboarding-mode-picker .option-card { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #e4e7ec); border-radius: 14px; cursor: pointer; }
.onboarding-mode-picker .option-card:has(input:checked) { border-color: #6d3df5; background: #f7f4ff; }
.onboarding-mode-picker .option-card.disabled { cursor: not-allowed; opacity: .58; }
.onboarding-mode-picker .option-card span { display: grid; gap: 5px; }
.onboarding-mode-picker .option-card small { color: var(--text-muted, #667085); line-height: 1.45; }
.invitation-link-standalone { grid-template-columns: 1fr; }
.team-list { display: grid; gap: 2px; margin-top: 14px; }
.team-list article { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border-color, #e4e7ec); }
.team-list article > div { flex: 1; min-width: 0; }
.team-list strong, .team-list p, .team-list small { display: block; margin: 0; }
.team-list p, .team-list small { margin-top: 3px; color: var(--text-muted, #667085); }
.member-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #eee9ff; color: #6d3df5; }
.member-avatar.pending { background: #fff4dd; color: #b76b00; }
.member-avatar svg { width: 19px; }
.team-empty { padding: 18px 0; color: var(--text-muted, #667085); }
.invitation-link-card { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.3fr); gap: 20px; align-items: end; border-color: #b7e4cb; background: #f4fff8; }
.invitation-link-card label { display: grid; gap: 7px; font-weight: 700; }
.invitation-link-card input { width: 100%; padding: 12px; border: 1px solid #a7d8bc; border-radius: 10px; background: #fff; }
.form-error { padding: 12px; border-radius: 10px; background: #fff2f0; }
.invitation-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.invitation-shell { width: min(620px, 100%); display: grid; gap: 22px; }
.invitation-card { padding: clamp(24px, 6vw, 44px); border: 1px solid var(--border-color, #e4e7ec); border-radius: 24px; background: var(--surface, #fff); text-align: center; box-shadow: 0 18px 55px rgba(25, 32, 56, .08); }
.invitation-card h1 { margin: 8px 0; }
.invitation-card > p:not(.eyebrow) { color: var(--text-muted, #667085); }
.invitation-hero-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 18px; background: #eee9ff; color: #6d3df5; }
.invitation-hero-icon.invalid { background: #fff0ed; color: #c73b2f; }
.invitation-summary { display: grid; gap: 0; margin: 24px 0; text-align: left; border: 1px solid var(--border-color, #e4e7ec); border-radius: 14px; overflow: hidden; }
.invitation-summary div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border-color, #e4e7ec); }
.invitation-summary div:first-child { border-top: 0; }
.invitation-summary dt { color: var(--text-muted, #667085); }
.invitation-summary dd { margin: 0; font-weight: 700; }
.invitation-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.invitation-card form .primary-button { width: 100%; justify-content: center; }

@media (max-width: 900px) {
  .team-layout, .invitation-link-card { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .onboarding-mode-picker { grid-template-columns: 1fr; }
  .team-list article { align-items: flex-start; flex-wrap: wrap; }
  .team-list article form { margin-left: 52px; }
  .invitation-summary div { grid-template-columns: 1fr; gap: 3px; }
}

/* Profile and organization management */
.management-page {
    min-height: 100vh;
    background: var(--surface, #f5f6f8);
    color: var(--ink, #20242b);
}

.management-header {
    align-items: center;
    background: var(--paper, #fff);
    border-bottom: 1px solid var(--line, #dfe3e8);
    display: flex;
    justify-content: space-between;
    padding: 18px clamp(20px, 5vw, 72px);
}

.management-brand {
    align-items: center;
    color: inherit;
    display: flex;
    gap: 12px;
    text-decoration: none;
}

.management-brand span:last-child,
.management-brand strong,
.management-brand small {
    display: block;
}

.management-brand small {
    color: var(--muted, #667085);
    margin-top: 2px;
}

.management-layout {
    margin: 0 auto;
    max-width: 980px;
    padding: 54px 24px 80px;
}

.management-layout.wide {
    max-width: 1120px;
}

.mail-server-page > .management-card,
.service-plan-page > .management-card {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 18px;
    background: var(--paper, #fff);
}
.mail-server-page article.management-card {
    padding: 18px 0;
    border-bottom: 1px solid var(--line, #dfe3e8);
    overflow-wrap: anywhere;
}
.mail-server-page article.management-card:last-child { border-bottom: 0; }
.mail-server-page details { margin: 16px 0; }
.mail-server-page .server-table-wrap { overflow-x: auto; }
.mail-server-page .server-table { width: 100%; text-align: left; border-collapse: collapse; }
.mail-server-page .server-table th,
.mail-server-page .server-table td { padding: 16px 12px; border-bottom: 1px solid var(--border, #e2e8f0); vertical-align: top; }
.mail-server-page .server-table th { font-size: 13px; color: var(--muted, #64748b); }
.mail-server-page .server-table td { overflow-wrap: anywhere; min-width: 160px; }
.mail-server-page .server-table td:last-child { min-width: 280px; }
.mail-server-page .server-table form { display: grid; gap: 8px; }
.mail-server-page summary { cursor: pointer; color: var(--accent, #234e70); font-weight: 600; }
.mail-server-page details .management-form { margin-top: 16px; }
.mail-server-page .management-form.management-card + .management-form.management-card { margin-top: 24px; }
@media (max-width: 640px) {
    .mail-server-page > .management-card,
    .service-plan-page > .management-card { padding: 18px; }
}

.management-intro {
    margin-bottom: 28px;
}

.profile-notice {
    margin: 0 0 18px;
}

.profile-photo-panel {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding: 20px;
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 16px;
    background: var(--paper, #fff);
    box-shadow: 0 10px 30px rgb(15 23 42 / 5%);
}

.profile-photo-preview {
    display: grid;
    width: 72px;
    height: 72px;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 999px;
    background: var(--primary, #24272e);
    color: var(--primary-content, #fff);
    font-size: 20px;
    font-weight: 750;
}

.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-copy h2,
.profile-photo-copy p {
    margin: 0;
}

.profile-photo-copy h2 {
    font-size: 1rem;
}

.profile-photo-copy p {
    margin-top: 5px;
    color: var(--muted, #667085);
    font-size: .8rem;
    line-height: 1.55;
}

.profile-photo-copy .field-error {
    display: block;
    margin-top: 7px;
}

.profile-photo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-photo-actions .primary-button,
.profile-photo-actions .secondary-button {
    min-height: 40px;
}

.profile-photo-picker {
    cursor: pointer;
}

.profile-photo-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.management-intro h1,
.verification-panel h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -.04em;
    margin: 8px 0 12px;
}

.management-intro > p:last-child,
.verification-panel > p {
    color: var(--muted, #667085);
    font-size: 1.04rem;
    line-height: 1.7;
    max-width: 720px;
}

.organizations-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.organizations-heading .primary-button {
    flex: 0 0 auto;
}

.organizations-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

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

.organization-management-card,
.organizations-empty {
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 18px;
    background: var(--paper, #fff);
    box-shadow: 0 12px 34px rgb(15 23 42 / 6%);
}

.organization-management-card {
    display: grid;
    gap: 22px;
    padding: 24px;
}

.organization-card-top,
.organization-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.organization-card-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--accent, #234e70) 12%, var(--paper, #fff));
    color: var(--accent, #234e70);
}

.organization-card-icon.has-logo {
    overflow: hidden;
    border: 1px solid var(--line, #dfe3e8);
    background: #fff;
}

.organization-card-icon.has-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.organization-status-pill {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.organization-status-pill.active {
    background: #ecfdf3;
    color: #067647;
}

.organization-status-pill.inactive {
    background: #f2f4f7;
    color: #475467;
}

.organization-status-pill.inactive .status-dot {
    background: #98a2b3;
    box-shadow: 0 0 0 4px rgb(152 162 179 / 15%);
}

.organization-card-top .organization-status-pill {
    margin-top: 0;
}

.organization-card-copy h2,
.organization-card-copy p {
    margin: 0;
}

.organization-card-copy h2 {
    font-size: 1.18rem;
}

.organization-card-copy p {
    overflow: hidden;
    margin-top: 5px;
    color: var(--muted, #667085);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-card-copy > span {
    display: inline-block;
    margin-top: 14px;
    color: var(--accent, #234e70);
    font-size: .78rem;
    font-weight: 700;
}

.organization-card-actions {
    align-items: flex-start;
    justify-content: flex-start;
    border-top: 1px solid var(--line, #dfe3e8);
    padding-top: 18px;
}

.organization-card-actions form {
    margin: 0;
}

.organization-status-confirmation {
    position: relative;
}

.organization-status-confirmation summary {
    list-style: none;
    cursor: pointer;
}

.organization-status-confirmation summary::-webkit-details-marker {
    display: none;
}

.organization-status-confirmation > div {
    position: absolute;
    z-index: 3;
    top: calc(100% + 10px);
    left: 0;
    width: min(320px, 80vw);
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--error, #b42318) 24%, var(--line, #dfe3e8));
    border-radius: 12px;
    background: var(--paper, #fff);
    box-shadow: 0 18px 45px rgb(15 23 42 / 16%);
}

.organization-status-confirmation p {
    margin: 7px 0 14px;
    color: var(--muted, #667085);
    font-size: .8rem;
    line-height: 1.5;
}

.organization-readonly-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted, #667085);
    font-size: .8rem;
}

.organization-readonly-note svg {
    width: 16px;
    height: 16px;
}

.organizations-empty {
    display: grid;
    justify-items: center;
    padding: 54px 24px;
    text-align: center;
}

.organizations-empty > span {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent, #234e70) 12%, var(--paper, #fff));
    color: var(--accent, #234e70);
}

.organizations-empty h2 {
    margin: 20px 0 8px;
}

.organizations-empty p {
    margin: 0 0 22px;
    color: var(--muted, #667085);
}

.management-form {
    display: grid;
    gap: 22px;
}

.management-form fieldset {
    background: var(--paper, #fff);
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgb(15 23 42 / 6%);
    margin: 0;
    padding: 26px;
}

.management-form legend {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0;
}

.management-form legend > span:first-child,
.verification-icon {
    align-items: center;
    background: color-mix(in srgb, var(--accent, #234e70) 12%, var(--paper, #fff));
    border-radius: 12px;
    color: var(--accent, #234e70);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.management-form legend strong,
.management-form legend small {
    display: block;
}

.management-form legend small {
    color: var(--muted, #667085);
    font-weight: 400;
    margin-top: 3px;
}

.management-grid {
    display: grid;
    gap: 20px;
}

.management-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.management-grid.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.management-grid label,
.verification-form label {
    display: grid;
    gap: 8px;
}

.management-grid label > span,
.verification-form label > span {
    font-size: .9rem;
    font-weight: 650;
}

.management-grid label b {
    color: #dc2626;
}

.management-grid input,
.management-grid select,
.management-grid textarea,
.verification-form input {
    background: var(--paper, #fff);
    border: 1px solid #cbd1d9;
    border-radius: 10px;
    color: inherit;
    font: inherit;
    width: 100%;
}

.management-grid input,
.management-grid select,
.verification-form input {
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
}

.management-grid textarea {
    min-height: 120px;
    padding: 11px 13px;
    line-height: 1.55;
    resize: vertical;
}

.management-grid input:focus,
.management-grid select:focus,
.management-grid textarea:focus,
.verification-form input:focus {
    border-color: var(--accent, #234e70);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #234e70) 16%, transparent);
    outline: none;
}

.management-grid input:disabled {
    background: #eff1f4;
    color: var(--muted, #667085);
}

.management-grid label > small:not(.field-error) {
    color: var(--muted, #667085);
}

.management-grid .full-width {
    grid-column: 1 / -1;
}

.management-logo-preview {
    padding: 12px;
    background: var(--surface, #f4f5f7);
}

.management-logo-preview img {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
}

.management-logo-preview strong {
    font-size: .9rem;
}

.management-logo-preview small {
    font-size: .78rem;
}

.banking-list {
    display: grid;
    gap: 16px;
}

.banking-row {
    position: relative;
    padding: 18px;
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 12px;
    background: var(--surface, #f4f5f7);
}

.banking-row-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.banking-row-heading strong {
    color: var(--ink, #101828);
    font-size: .9rem;
}

.banking-row-heading small {
    color: var(--muted, #667085);
    font-size: .75rem;
}

.banking-remove-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--error, #b42318);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 650;
}

.banking-remove-button svg {
    width: 16px;
    height: 16px;
}

.banking-remove-button:disabled {
    visibility: hidden;
}

.banking-add-button {
    margin-top: 16px;
}

.banking-save-hint {
    margin: 10px 0 0;
    color: var(--muted, #667085);
    font-size: .78rem;
}

.organization-save-notice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.organization-save-notice svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.banking-list-error {
    display: block;
    margin: -8px 0 16px;
}

.management-actions {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 4px;
}

.success-alert {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 12px;
    color: #067647;
    padding: 14px 16px;
}

.verification-panel {
    background: var(--paper, #fff);
    border: 1px solid var(--line, #dfe3e8);
    border-radius: 20px;
    box-shadow: 0 18px 60px rgb(15 23 42 / 10%);
    margin: 10vh auto;
    max-width: 520px;
    padding: 36px;
}

.verification-panel .verification-icon {
    height: 52px;
    margin-bottom: 24px;
    width: 52px;
}

.verification-form {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.verification-form input {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .3em;
    text-align: center;
}

.verification-form > a {
    color: var(--text-muted, #667085);
    text-align: center;
}

@media (max-width: 720px) {
    .management-header {
        align-items: flex-start;
        gap: 16px;
    }

    .management-header .secondary-button {
        font-size: 0;
        min-width: 44px;
    }

    .management-header .secondary-button svg {
        margin: 0;
    }

    .management-grid.two-columns,
    .management-grid.three-columns {
        grid-template-columns: 1fr;
    }

    .organizations-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-management-grid {
        grid-template-columns: 1fr;
    }

    .management-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .management-actions > * {
        justify-content: center;
        width: 100%;
    }

    .profile-photo-panel {
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 18px;
    }

    .profile-photo-preview {
        width: 64px;
        height: 64px;
    }

    .profile-photo-actions {
        grid-column: 1 / -1;
    }

    .profile-photo-actions > * {
        flex: 1;
    }
}

.management-form .management-actions .primary-button,
.management-form .management-actions .secondary-button,
.verification-form .primary-button {
    min-height: 40px;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/fonts/inter-500.woff2") format("woff2");
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/assets/fonts/inter-600.woff2") format("woff2");
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/inter-700.woff2") format("woff2");
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("/assets/fonts/inter-800.woff2") format("woff2");
}

:root {
    color-scheme: light;
    --primary: #24272e;
    --primary-hover: #111318;
    --primary-content: #ffffff;
    --secondary: #4b5563;
    --accent: #234e70;
    --neutral: #20242b;
    --ink: #20242b;
    --muted: #667085;
    --paper: #ffffff;
    --surface: #f4f5f7;
    --line: #dfe3e8;
    --success: #176b47;
    --warning: #93620b;
    --error: #b42318;
    --info: #234e70;
    --radius-field: 8px;
    --radius-box: 12px;
    --shadow-soft: 0 12px 35px rgb(15 23 42 / 8%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --primary: #d9534a;
    --primary-hover: #e66a62;
    --primary-content: #201613;
    --secondary: #d9a25c;
    --accent: #4a9baa;
    --neutral: #eae3dc;
    --ink: #f7f3ef;
    --muted: #c8bbb4;
    --paper: #201613;
    --surface: #2b211d;
    --line: #3a2e28;
    --success: #48bb78;
    --warning: #d9a25c;
    --error: #f56565;
    --info: #4a9baa;
    --shadow-soft: 0 12px 35px rgb(0 0 0 / 22%);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
a {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
    outline-offset: 2px;
}

svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.brand-icon {
    --logo-size: 44px;
    position: relative;
    display: block;
    width: var(--logo-size);
    height: var(--logo-size);
    flex: 0 0 var(--logo-size);
    overflow: hidden;
    border-radius: calc(var(--logo-size) * 0.2);
}

.brand-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-icon-32 {
    --logo-size: 32px;
}

.brand-icon-40 {
    --logo-size: 40px;
}

.brand-icon-44 {
    --logo-size: 44px;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 16%, transparent);
}

.eyebrow,
.brand-eyebrow {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--accent);
}

.icon-button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.icon-button:hover {
    border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
    color: var(--primary);
}

.icon-button svg {
    width: 16px;
    height: 16px;
}

/* Login */

.login-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(560px, 1.05fr) minmax(440px, 0.95fr);
}

.brand-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(34px, 4vw, 58px);
    background: #2b211d;
    color: #fbf4ec;
    isolation: isolate;
}

.brand-panel::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image: radial-gradient(rgb(251 244 236 / 11%) 1px, transparent 1px);
    background-size: 22px 22px;
    content: "";
    mask-image: linear-gradient(to bottom, black, transparent 78%);
    pointer-events: none;
}

.brand-glow {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(110px);
    pointer-events: none;
}

.brand-glow-primary {
    top: -150px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: rgb(178 58 46 / 30%);
}

.brand-glow-secondary {
    bottom: -160px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: rgb(201 138 62 / 16%);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-name {
    display: grid;
    gap: 4px;
    line-height: 1.1;
}

.brand-name strong {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.brand-name small,
.mobile-brand small {
    color: rgb(251 244 236 / 58%);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.protocol-badge {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    border: 1px solid rgb(251 244 236 / 14%);
    border-radius: 999px;
    background: rgb(251 244 236 / 7%);
    padding: 0 12px;
    color: rgb(251 244 236 / 72%);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.brand-copy {
    width: min(620px, 100%);
    margin: auto 0;
    padding: 56px 0 42px;
}

.brand-eyebrow {
    color: #d9a25c;
}

.brand-copy h1 {
    margin: 18px 0 0;
    font-size: clamp(46px, 4.6vw, 68px);
    font-weight: 800;
    line-height: 1.01;
    letter-spacing: -0.055em;
}

.brand-copy h1 span {
    color: #d9534a;
}

.brand-copy > p:not(.brand-eyebrow) {
    max-width: 500px;
    margin: 22px 0 0;
    color: rgb(251 244 236 / 68%);
    font-size: 14px;
    line-height: 1.75;
}

.suite-dock {
    display: grid;
    max-width: 470px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 30px;
}

.suite-tile {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgb(251 244 236 / 10%);
    border-radius: 10px;
    background: rgb(251 244 236 / 6%);
    color: rgb(251 244 236 / 84%);
}

.suite-tile svg {
    width: 19px;
    height: 19px;
}

.suite-tile small {
    font-size: 9px;
    font-weight: 500;
}

.trust-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
}

.trust-avatars {
    display: flex;
    padding-left: 8px;
}

.trust-avatars span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    margin-left: -8px;
    border: 2px solid #2b211d;
    border-radius: 999px;
    background: #b23a2e;
    color: #fbf4ec;
    font-size: 9px;
    font-weight: 700;
}

.trust-avatars span:nth-child(2) {
    background: #c98a3e;
    color: #2b211d;
}

.trust-avatars span:nth-child(3) {
    background: #2b6e7a;
}

.trust-strip > div:last-child {
    display: grid;
    gap: 3px;
}

.trust-strip strong {
    font-size: 11px;
}

.trust-strip small {
    color: rgb(251 244 236 / 52%);
    font-size: 10px;
}

.brand-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgb(251 244 236 / 48%);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-panel {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: var(--surface);
    padding: 72px 42px;
}

.theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
}

.login-card {
    width: min(390px, 100%);
}

.mobile-brand {
    display: none;
}

.login-card h2 {
    margin: 8px 0 0;
    font-size: 27px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.intro {
    margin: 10px 0 28px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.primary-action,
.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: var(--radius-field);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary-action {
    width: 100%;
    min-height: 48px;
    justify-content: space-between;
    background: var(--primary);
    padding: 0 16px;
    color: var(--primary-content);
    border: 0;
    cursor: pointer;
}

.login-start-form {
    display: grid;
    gap: 14px;
}

.remember-choice {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-field);
    background: var(--surface);
    cursor: pointer;
}

.remember-choice input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.remember-choice > svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.remember-choice span,
.remember-choice strong,
.remember-choice small {
    display: block;
}

.remember-choice strong {
    font-size: 12px;
}

.remember-choice small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.primary-action:hover,
.primary-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.primary-action svg {
    width: 17px;
    height: 17px;
}

.primary-action > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.protocol-note {
    margin: 11px 0 22px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
    text-align: center;
}

.error-alert {
    margin: 0 0 18px;
    border: 1px solid color-mix(in srgb, var(--error) 35%, var(--line));
    border-radius: 9px;
    background: color-mix(in srgb, var(--error) 8%, var(--paper));
    padding: 11px 13px;
    color: var(--error);
    font-size: 12px;
    line-height: 1.5;
}

.demo-credentials {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    padding: 13px;
}

.demo-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 10%, var(--paper));
    color: var(--accent);
}

.demo-icon svg {
    width: 16px;
    height: 16px;
}

.demo-credentials > div {
    min-width: 0;
}

.demo-credentials strong {
    display: block;
    font-size: 11px;
}

.demo-credentials p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.demo-credentials code {
    font-family: Inter, sans-serif;
    font-weight: 500;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 10px;
}

.security-note svg {
    width: 14px;
    height: 14px;
}

.legal-links {
    position: absolute;
    right: 30px;
    bottom: 22px;
    left: 30px;
    display: flex;
    justify-content: center;
    gap: 18px;
    color: var(--muted);
    font-size: 9px;
}

/* Workstation */

.workspace-shell {
    min-width: 320px;
    background: var(--surface);
}

.app-rail {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    width: 64px;
    align-items: center;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: var(--paper);
    padding: 12px 0;
}

.rail-logo {
    display: block;
    margin-bottom: 16px;
}

.rail-apps,
.rail-utility {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
}

.rail-apps {
    flex: 1;
}

.rail-item {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 10px;
    color: color-mix(in srgb, var(--muted) 82%, transparent);
    text-decoration: none;
    transition: color 140ms ease, background 140ms ease;
}

.rail-item:hover {
    background: var(--surface);
    color: var(--ink);
}

.rail-item.active {
    background: color-mix(in srgb, var(--primary) 10%, var(--paper));
    color: var(--primary);
}

.rail-item svg {
    width: 18px;
    height: 18px;
}

.rail-item::after {
    position: absolute;
    z-index: 60;
    left: calc(100% + 10px);
    padding: 7px 9px;
    border-radius: 7px;
    background: var(--ink);
    color: var(--paper);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transform: translateX(-4px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.rail-item:hover::after,
.rail-item:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
}

.rail-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border: 2px solid var(--paper);
    border-radius: 999px;
    background: var(--primary);
}

.workspace-frame {
    min-height: 100vh;
    margin-left: 64px;
}

.workspace-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    height: 64px;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    padding: 0 24px;
    backdrop-filter: blur(16px);
}

.organization-switcher {
    position: relative;
    flex: 0 0 auto;
}

.organization-control {
    display: flex;
    min-width: 230px;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
    list-style: none;
    transition: background 140ms ease;
}

.organization-control:hover,
.organization-switcher[open] .organization-control {
    background: var(--surface);
}

.organization-control::-webkit-details-marker {
    display: none;
}

.organization-control > svg {
    width: 14px;
    height: 14px;
    color: var(--muted);
    transition: transform 140ms ease;
}

.organization-switcher[open] .organization-control > svg {
    transform: rotate(180deg);
}

.organization-avatar {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--primary);
    color: var(--primary-content);
    font-size: 11px;
    font-weight: 700;
}

.organization-avatar.has-logo,
.organization-option-avatar.has-logo {
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
}

.organization-avatar.has-logo img,
.organization-option-avatar.has-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.organization-name {
    max-width: 150px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-badge,
.metric-tag,
.application-state,
.verified-badge,
.live-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 650;
}

.workspace-badge {
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 4px 8px;
    color: var(--muted);
}

.organization-dropdown {
    position: absolute;
    z-index: 50;
    top: calc(100% + 10px);
    left: 0;
    width: min(350px, calc(100vw - 28px));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: 0 22px 55px rgb(15 23 42 / 18%);
}

.organization-dropdown-heading {
    display: grid;
    gap: 4px;
    padding: 16px 18px 12px;
}

.organization-dropdown-heading strong {
    font-size: 13px;
}

.organization-dropdown-heading small {
    color: var(--muted);
    font-size: 10px;
}

.organization-dropdown-options {
    display: grid;
    gap: 3px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px 8px 10px;
}

.organization-dropdown-options form {
    margin: 0;
}

.organization-dropdown-option {
    display: grid;
    width: 100%;
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.organization-dropdown-option:hover:not(:disabled) {
    background: var(--surface);
}

.organization-dropdown-option.current {
    background: color-mix(in srgb, var(--success) 9%, var(--paper));
}

.organization-dropdown-option:disabled {
    cursor: default;
    opacity: 1;
}

.organization-option-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 12%, var(--paper));
    color: var(--accent);
}

.organization-option-avatar svg {
    width: 17px;
    height: 17px;
}

.organization-dropdown-option > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.organization-dropdown-option strong,
.organization-dropdown-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-dropdown-option strong {
    font-size: 12px;
}

.organization-dropdown-option small {
    color: var(--muted);
    font-size: 9px;
}

.organization-dropdown-option > svg {
    width: 15px;
    height: 15px;
    color: var(--muted);
}

.organization-dropdown-option.current > svg {
    color: var(--success);
}

.organization-dropdown-manage {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 0 18px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.organization-dropdown-manage svg {
    width: 14px;
    height: 14px;
}

.mobile-rail-logo {
    display: none;
}

.global-search {
    position: relative;
    width: min(440px, 38vw);
    margin: 0 auto;
}

.global-search > svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 15px;
    height: 15px;
    color: var(--muted);
    transform: translateY(-50%);
}

.global-search input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    padding: 0 58px 0 36px;
    color: var(--ink);
    font-size: 11px;
}

.global-search input:focus {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
    background: var(--paper);
    outline: 0;
}

.global-search kbd {
    position: absolute;
    top: 50%;
    right: 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper);
    padding: 2px 5px;
    color: var(--muted);
    font-family: Inter, sans-serif;
    font-size: 8px;
    transform: translateY(-50%);
}

.topbar-actions,
.user-chip {
    display: flex;
    align-items: center;
}

.topbar-actions {
    margin-left: auto;
    gap: 9px;
}

.notification-button {
    position: relative;
}

.notification-button > span {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border: 2px solid var(--paper);
    border-radius: 999px;
    background: var(--primary);
}

.topbar-divider {
    width: 1px;
    height: 24px;
    margin: 0 2px;
    background: var(--line);
}

.user-chip {
    gap: 8px;
}

.user-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-content);
    font-size: 10px;
    font-weight: 700;
    object-fit: cover;
}

.user-copy {
    display: grid;
    min-width: 100px;
    gap: 2px;
}

.user-copy strong {
    max-width: 140px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-copy small {
    color: var(--muted);
    font-size: 9px;
}

.topbar-actions form {
    margin: 0;
}

.logout-button {
    display: inline-flex;
    height: 34px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    padding: 0 10px;
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 650;
}

.logout-button:hover {
    border-color: color-mix(in srgb, var(--primary) 60%, var(--line));
    color: var(--primary);
}

.logout-button svg {
    width: 14px;
    height: 14px;
}

.workspace-content {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 34px clamp(22px, 3vw, 42px) 44px;
}

.dashboard-notice {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent) 7%, var(--paper));
    padding: 8px 10px;
    color: var(--ink);
}

.dashboard-notice > span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 14%, var(--paper));
    color: var(--accent);
}

.dashboard-notice svg {
    width: 15px;
    height: 15px;
}

.dashboard-notice p {
    flex: 1;
    margin: 0;
    font-size: 12px;
}

.dashboard-notice > a {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    color: var(--muted);
}

.dashboard-notice > a:hover {
    background: var(--surface);
    color: var(--primary);
}

.welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.welcome-row h1 {
    margin: 7px 0 0;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.045em;
}

.welcome-row > div:first-child > p:last-child {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.welcome-row > div:first-child > p:last-child strong {
    color: var(--ink);
}

.welcome-actions {
    display: flex;
    gap: 9px;
}

.primary-button,
.secondary-button {
    min-height: 38px;
    padding: 0 13px;
}

.primary-button {
    border: 1px solid var(--primary);
    background: var(--primary);
    box-shadow: 0 6px 14px rgb(15 23 42 / 14%);
    color: var(--primary-content);
}

.secondary-button {
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
}

.secondary-button:hover {
    border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
    background: var(--surface);
}

.primary-button svg,
.secondary-button svg {
    width: 15px;
    height: 15px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-top: 28px;
}

.metric-card,
.application-card,
.detail-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: var(--paper);
}

.metric-card {
    padding: 17px;
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.metric-icon,
.application-icon {
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.metric-icon {
    width: 36px;
    height: 36px;
}

.metric-icon svg,
.application-icon svg {
    width: 18px;
    height: 18px;
}

.primary {
    background: color-mix(in srgb, var(--primary) 10%, var(--paper));
    color: var(--primary);
}

.secondary {
    background: color-mix(in srgb, var(--secondary) 12%, var(--paper));
    color: var(--secondary);
}

.accent {
    background: color-mix(in srgb, var(--accent) 10%, var(--paper));
    color: var(--accent);
}

.success {
    background: color-mix(in srgb, var(--success) 10%, var(--paper));
    color: var(--success);
}

.warning {
    background: color-mix(in srgb, var(--warning) 11%, var(--paper));
    color: var(--warning);
}

.info {
    background: color-mix(in srgb, var(--info) 10%, var(--paper));
    color: var(--info);
}

.neutral {
    background: color-mix(in srgb, var(--ink) 9%, var(--paper));
    color: var(--ink);
}

.metric-tag {
    border: 1px solid var(--line);
    padding: 4px 7px;
    color: var(--muted);
}

.metric-tag.success,
.metric-tag.warning {
    border: 0;
}

.metric-card > strong {
    display: block;
    margin-top: 14px;
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.metric-card > p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.applications-section {
    margin-top: 34px;
}

.services-section {
    margin-top: 34px;
}

.services-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: var(--paper);
}

.services-empty-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--primary) 11%, var(--paper));
    color: var(--primary);
}

.services-empty-icon svg {
    width: 21px;
    height: 21px;
}

.services-empty h3,
.services-empty p {
    margin: 0;
}

.services-empty h3 {
    font-size: 14px;
}

.services-empty p {
    max-width: 620px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.security-page,
.services-page {
    width: min(100% - 40px, 1020px);
    margin: 0 auto;
    padding: 42px 0 70px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.security-hero,
.services-catalogue-hero {
    margin-top: 32px;
}

.security-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}

.security-hero-icon,
.mfa-setup-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 15px;
    background: color-mix(in srgb, var(--primary) 12%, var(--paper));
    color: var(--primary);
}

.security-hero-icon {
    width: 58px;
    height: 58px;
}

.security-hero-icon svg {
    width: 27px;
    height: 27px;
}

.security-hero h1,
.services-catalogue-hero h1 {
    margin: 5px 0 0;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -.045em;
}

.security-hero p:last-child,
.services-catalogue-hero > p:last-child {
    max-width: 660px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.mfa-setup-card,
.security-help-card,
.catalogue-empty {
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: var(--paper);
}

.mfa-setup-card {
    margin-top: 32px;
    padding: 28px;
}

.mfa-setup-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mfa-setup-icon {
    width: 44px;
    height: 44px;
}

.mfa-setup-icon svg {
    width: 20px;
    height: 20px;
}

.mfa-setup-heading h2 {
    margin: 4px 0 0;
    font-size: 18px;
}

.mfa-status {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}

.mfa-status.active {
    background: #ecfdf3;
    color: #067647;
}

.mfa-status.recommended {
    background: #fffaeb;
    color: #b54708;
}

.mfa-setup-card > p {
    max-width: 680px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.security-help-card,
.catalogue-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 16px 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.security-help-card svg,
.catalogue-notice svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--primary);
}

.security-help-card p,
.catalogue-notice p {
    margin: 0;
}

.services-catalogue-hero + .catalogue-notice {
    margin-top: 28px;
}

.catalogue-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    margin-top: 28px;
    padding: 26px;
}

.catalogue-empty > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--primary) 11%, var(--paper));
    color: var(--primary);
}

.catalogue-empty h2,
.catalogue-empty p {
    margin: 0;
}

.catalogue-empty h2 {
    font-size: 16px;
}

.catalogue-empty p {
    max-width: 650px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.catalogue-preview {
    margin-top: 38px;
}

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

.catalogue-preview-grid article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: var(--paper);
}

.catalogue-preview-grid h3 {
    margin: 15px 0 0;
    font-size: 14px;
}

.catalogue-preview-grid p {
    min-height: 38px;
    margin: 7px 0 14px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.catalogue-preview-grid article > span:last-child {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}

.section-heading,
.detail-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h2,
.detail-heading h2 {
    margin: 5px 0 0;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.section-heading > span {
    color: var(--muted);
    font-size: 10px;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.application-card {
    position: relative;
    min-height: 154px;
    padding: 16px;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.application-card:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.application-icon {
    width: 40px;
    height: 40px;
}

.application-state {
    position: absolute;
    top: 17px;
    right: 15px;
    background: color-mix(in srgb, var(--success) 10%, var(--paper));
    padding: 4px 7px;
    color: var(--success);
}

.application-state.muted {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
}

.application-card > strong {
    display: block;
    margin-top: 16px;
    font-size: 12px;
}

.application-card > p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.55;
}

.details-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 16px;
    margin-top: 34px;
}

.detail-card {
    padding: 19px;
}

.detail-heading {
    align-items: flex-start;
}

.live-badge {
    gap: 8px;
    border: 1px solid var(--line);
    padding: 6px 9px;
    color: var(--muted);
}

.verified-badge {
    background: color-mix(in srgb, var(--success) 10%, var(--paper));
    padding: 6px 9px;
    color: var(--success);
}

.security-list {
    display: grid;
    gap: 0;
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
}

.security-list li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 11px;
    border-top: 1px solid var(--line);
    padding: 12px 0;
}

.security-list li > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    background: color-mix(in srgb, var(--success) 9%, var(--paper));
    color: var(--success);
}

.security-list li > span svg,
.security-list li > svg {
    width: 15px;
    height: 15px;
}

.security-list li > svg {
    color: var(--success);
}

.security-list strong {
    font-size: 10px;
}

.security-list p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.security-actions,
.logout-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.logout-modes {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.logout-modes form {
    margin: 0;
}

.danger-button {
    min-height: 38px;
    border: 1px solid color-mix(in srgb, #c0392b 35%, var(--line));
    border-radius: 9px;
    padding: 0 13px;
    background: color-mix(in srgb, #c0392b 7%, var(--paper));
    color: #a93226;
    cursor: pointer;
    font: inherit;
    font-weight: 650;
}

.account-details,
.account-details dd {
    margin: 0;
}

.account-details {
    margin-top: 15px;
}

.account-details > div {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 11px 0;
}

.account-details dt,
.account-details dd {
    font-size: 9px;
}

.account-details dt {
    color: var(--muted);
}

.account-details dd {
    overflow: hidden;
    font-weight: 650;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-footer {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding: 0 clamp(22px, 3vw, 42px);
    color: var(--muted);
    font-size: 9px;
}

@media (max-width: 1120px) {
    .user-copy,
    .workspace-badge {
        display: none;
    }

    .organization-control {
        min-width: 190px;
    }

    .applications-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .login-layout {
        grid-template-columns: minmax(480px, 1fr) minmax(390px, 0.9fr);
    }

    .protocol-badge,
    .trust-strip {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .global-search {
        display: none;
    }

    .workspace-topbar {
        justify-content: space-between;
    }

    .applications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-empty {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .services-empty .secondary-button {
        grid-column: 2;
        justify-self: start;
    }

    .catalogue-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .login-layout {
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .login-panel {
        padding: 72px 24px 84px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 11px;
        margin-bottom: 38px;
    }

    .mobile-brand > span:last-child {
        display: grid;
        gap: 3px;
    }

    .mobile-brand strong {
        font-size: 13px;
    }

    .mobile-brand small {
        color: var(--muted);
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .app-rail {
        display: none;
    }

    .workspace-frame {
        margin-left: 0;
    }

    .mobile-rail-logo {
        display: block;
    }

    .organization-avatar,
    .organization-control > svg,
    .organization-name {
        display: none;
    }

    .organization-control {
        min-width: 0;
    }

    .workspace-topbar {
        padding: 0 14px;
    }

    .welcome-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .welcome-actions {
        width: 100%;
    }

    .welcome-actions a {
        flex: 1;
    }

    .logout-button span,
    .topbar-divider,
    .user-chip {
        display: none;
    }

    .logout-button {
        width: 36px;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 520px) {
    .login-card h2 {
        font-size: 24px;
    }

    .demo-credentials p span,
    .demo-credentials p code:last-child {
        display: none;
    }

    .workspace-content {
        padding: 26px 16px 36px;
    }

    .metrics-grid,
    .applications-grid {
        grid-template-columns: 1fr;
    }

    .applications-grid {
        gap: 10px;
    }

    .services-empty {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 14px;
    }

    .services-empty .secondary-button {
        grid-column: auto;
    }

    .security-page,
    .services-page {
        width: min(100% - 32px, 1020px);
        padding-top: 28px;
    }

    .security-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .catalogue-empty {
        grid-template-columns: 1fr;
    }

    .mfa-setup-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .mfa-status {
        margin-left: 58px;
    }

    .application-card {
        min-height: 138px;
    }

    .section-heading > span {
        display: none;
    }

    .workspace-footer {
        justify-content: center;
    }

    .workspace-footer span:last-child {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Account registration */
.registration-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--secondary) 14%, transparent), transparent 28rem),
        radial-gradient(circle at 88% 76%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 30rem),
        var(--surface);
}

.registration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1160px, calc(100% - 40px));
    min-height: 82px;
    margin: 0 auto;
    border-bottom: 1px solid var(--line);
}

.registration-header p {
    color: var(--muted);
    font-size: 14px;
}

.registration-header a,
.registration-prompt a,
.terms-choice a,
.resend-form button,
.back-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.registration-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ink) !important;
}

.registration-brand > span:last-child {
    display: grid;
    gap: 2px;
}

.registration-brand strong {
    font-size: 14px;
}

.registration-brand small {
    color: var(--muted);
    font-size: 11px;
}

.registration-shell {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(480px, 690px);
    gap: clamp(42px, 7vw, 100px);
    align-items: start;
    width: min(1100px, calc(100% - 40px));
    margin: 64px auto 80px;
}

.registration-intro {
    position: sticky;
    top: 40px;
    padding-top: 18px;
}

.registration-intro h1,
.verification-card h1 {
    margin: 8px 0 14px;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.registration-intro > p:not(.eyebrow),
.verification-card > p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.7;
}

.registration-steps {
    position: relative;
    display: grid;
    gap: 18px;
    margin: 38px 0 0;
    padding: 0;
    isolation: isolate;
    list-style: none;
    view-transition-name: registration-journey;
}

.registration-steps li {
    position: relative;
    display: flex;
    gap: 13px;
    align-items: center;
    color: var(--muted);
    opacity: 0;
    animation: journey-step-arrive 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(90ms + (var(--step-order) * 75ms));
}

.registration-steps .step-order-0 {
    --step-order: 0;
}

.registration-steps .step-order-1 {
    --step-order: 1;
}

.registration-steps .step-order-2 {
    --step-order: 2;
}

.registration-steps .step-order-3 {
    --step-order: 3;
}

.registration-steps li:not(:last-child)::after {
    position: absolute;
    z-index: -1;
    top: 31px;
    left: 16px;
    width: 2px;
    height: calc(100% + 21px);
    border-radius: 999px;
    background: var(--line);
    content: "";
}

.registration-steps li.completed:not(:last-child)::after {
    background: linear-gradient(180deg, var(--success), color-mix(in srgb, var(--success) 34%, var(--line)));
}

.registration-steps li.active:not(:last-child)::after {
    background: linear-gradient(180deg, var(--primary) 0 32%, var(--line) 68% 100%);
    background-size: 100% 220%;
    animation: journey-path-flow 2.4s ease-in-out infinite;
}

.registration-steps .step-marker {
    position: relative;
    display: grid;
    z-index: 1;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 0 0 5px var(--surface);
    font-size: 12px;
    font-weight: 800;
    transition: border-color 260ms ease, background 260ms ease, color 260ms ease, transform 260ms ease;
}

.registration-steps .step-marker svg {
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: 0;
    transform: scale(0.55) rotate(-12deg);
    transition: opacity 240ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.registration-steps .step-number {
    transition: opacity 180ms ease, transform 260ms ease;
}

.registration-steps li.active .step-marker {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-content);
    box-shadow: 0 0 0 5px var(--surface), 0 8px 20px color-mix(in srgb, var(--primary) 28%, transparent);
    transform: scale(1.08);
}

.registration-steps li.active .step-marker::after {
    position: absolute;
    inset: -7px;
    border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
    border-radius: inherit;
    content: "";
    animation: journey-marker-breathe 2.2s ease-out infinite;
}

.registration-steps li.completed .step-marker {
    border-color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, var(--paper));
    color: var(--success);
}

.registration-steps li.active .step-marker svg,
.registration-steps li.completed .step-marker svg {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.registration-steps li.active .step-number,
.registration-steps li.completed .step-number {
    opacity: 0;
    transform: scale(0.55);
}

.registration-steps .step-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.registration-steps strong {
    color: var(--ink);
    font-size: 14px;
    transition: color 240ms ease;
}

.registration-steps small {
    font-size: 12px;
}

.registration-steps li.active strong {
    color: var(--primary);
}

@keyframes journey-step-arrive {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes journey-marker-breathe {
    0% {
        opacity: 0.75;
        transform: scale(0.82);
    }
    70%,
    100% {
        opacity: 0;
        transform: scale(1.35);
    }
}

@keyframes journey-path-flow {
    0%,
    100% {
        background-position: 0 0;
    }
    50% {
        background-position: 0 80%;
    }
}

.registration-card,
.verification-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    animation: registration-chapter-arrive 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
    view-transition-name: registration-chapter;
}

body[data-step-direction="forward"] .registration-card,
body[data-step-direction="forward"] .verification-card {
    animation-name: registration-chapter-forward;
}

body[data-step-direction="backward"] .registration-card,
body[data-step-direction="backward"] .verification-card {
    animation-name: registration-chapter-backward;
}

@keyframes registration-chapter-arrive {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes registration-chapter-forward {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes registration-chapter-backward {
    from {
        opacity: 0;
        transform: translateX(-24px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.registration-card {
    padding: clamp(24px, 5vw, 44px);
}

.compact-registration-shell {
    margin-top: 48px;
}

.registration-card.compact-card {
    max-width: 640px;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: var(--surface);
}

.profile-summary > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--success) 12%, var(--paper));
    color: var(--success);
}

.profile-summary > span svg {
    width: 18px;
    height: 18px;
}

.profile-summary > div {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
}

.profile-summary strong,
.profile-summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-summary strong {
    font-size: 13px;
}

.profile-summary small {
    color: var(--muted);
    font-size: 11px;
}

.profile-summary a {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.registration-form {
    display: grid;
    gap: 30px;
}

.registration-form fieldset {
    display: grid;
    gap: 17px;
    margin: 0;
    padding: 0 0 28px;
    border: 0;
    border-bottom: 1px solid var(--line);
}

.registration-form legend {
    margin-bottom: 18px;
    font-size: 16px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    gap: 15px;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registration-form label:not(.option-card, .terms-choice),
.verification-form {
    display: grid;
    gap: 8px;
}

.registration-form label > span:first-child,
.verification-form label {
    font-size: 13px;
    font-weight: 700;
}

.registration-form input:not([type="checkbox"], [type="radio"]),
.registration-form select,
.registration-form textarea,
.code-input {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-field);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.registration-form input:not([type="checkbox"], [type="radio"], [type="hidden"]),
.registration-form select {
    height: 40px;
    min-height: 40px;
}

.registration-form input:focus,
.registration-form select:focus,
.registration-form textarea:focus,
.code-input:focus {
    border-color: var(--accent);
    outline: 3px solid color-mix(in srgb, var(--accent) 14%, transparent);
}

.registration-form textarea.agt-private-key-input {
    min-height: 96px;
    padding: 11px 13px;
    resize: vertical;
    line-height: 1.45;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}

.field-hint,
.field-error {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.validation-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 9px 11px;
    border-radius: var(--radius-field);
    background: color-mix(in srgb, var(--error) 8%, var(--paper));
    color: var(--error);
    font-size: 12px;
    font-weight: 700;
}

.validation-summary svg {
    width: 16px;
    height: 16px;
}

.field-hint {
    color: var(--muted);
}

.field-error {
    color: var(--error);
    font-weight: 600;
}

.phone-input {
    display: flex;
    align-items: center;
    height: 40px;
    min-height: 40px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-field);
    background: var(--surface);
}

.phone-input > span {
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 0 12px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.phone-input input {
    height: 40px !important;
    min-height: 40px !important;
    border: 0 !important;
    outline: 0 !important;
}

.channel-choice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.channel-choice p {
    width: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.channel-choice label input {
    position: absolute;
    opacity: 0;
}

.channel-choice label span {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    color: var(--muted);
    font-size: 13px;
}

.channel-choice label input:checked + span {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--paper));
    color: var(--primary);
}

.channel-choice svg {
    width: 16px;
    height: 16px;
}

.option-card,
.terms-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.option-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: var(--surface);
}

.option-card > span {
    display: grid;
    gap: 4px;
}

.option-card strong {
    font-size: 14px;
}

.option-card small,
.terms-choice {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.organization-fields {
    display: grid;
    gap: 15px;
}

.organization-fields[hidden],
.agt-key-fields[hidden] {
    display: none !important;
}

.optional-label {
    margin-left: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.organization-extras {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: color-mix(in srgb, var(--surface) 70%, var(--paper));
}

.organization-extras summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 16px;
    cursor: pointer;
    list-style: none;
}

.organization-extras summary::-webkit-details-marker {
    display: none;
}

.organization-extras summary > span,
.agt-key-heading > span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.organization-extras summary svg,
.agt-key-heading svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.organization-extras summary strong {
    font-size: 13px;
}

.organization-extras summary small {
    color: var(--muted);
    font-size: 10px;
}

.organization-extras[open] summary {
    border-bottom: 1px solid var(--line);
}

.organization-extras-content {
    display: grid;
    gap: 17px;
    padding: 17px;
}

.registration-form .file-field input[type="file"] {
    height: 40px;
    min-height: 40px;
    padding: 4px 6px;
    cursor: pointer;
    color: var(--muted);
    font-size: 11px;
}

.registration-form .file-field input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 10%, var(--paper));
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
}

.logo-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-box);
    background: var(--paper);
}

.logo-preview[hidden] {
    display: none !important;
}

.logo-preview img {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 10px;
    background: var(--surface);
    object-fit: contain;
}

.logo-preview > div {
    display: grid;
    flex: 1;
    gap: 3px;
    min-width: 0;
}

.logo-preview strong {
    font-size: 12px;
}

.logo-preview small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-preview button {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: color-mix(in srgb, var(--error) 8%, var(--paper));
    color: var(--error);
    cursor: pointer;
}

.logo-preview button:hover {
    background: color-mix(in srgb, var(--error) 14%, var(--paper));
}

.logo-preview button svg {
    width: 15px;
    height: 15px;
}

.invoicing-toggle-card {
    padding: 14px;
    background: var(--paper);
}

.agt-key-fields {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px dashed color-mix(in srgb, var(--accent) 38%, var(--line));
    border-radius: var(--radius-box);
    background: color-mix(in srgb, var(--accent) 4%, var(--paper));
}

.agt-key-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.agt-key-heading strong {
    font-size: 12px;
}

.agt-key-heading a {
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.secret-caption {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.secret-caption svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: var(--success);
}

.organization-step-form {
    gap: 22px;
}

.organization-step-form .organization-fieldset {
    padding-bottom: 22px;
}

.organization-toggle-card {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.personal-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -5px 2px 0;
    color: var(--muted);
    font-size: 12px;
}

.personal-option svg {
    width: 15px;
    height: 15px;
}

.registration-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.registration-actions .back-link {
    flex: 0 0 auto;
    margin: 0;
}

.registration-actions .primary-action {
    flex: 1;
}

.terms-choice input,
.option-card input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.security-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: -14px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.security-caption svg {
    width: 15px;
    height: 15px;
    color: var(--success);
}

.registration-prompt {
    margin: 18px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.verification-shell {
    display: grid;
    place-items: start center;
    width: min(100% - 32px, 560px);
    margin: 62px auto 80px;
}

.verification-progress {
    width: 100%;
    margin-bottom: 22px;
}

.verification-progress .registration-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

.verification-progress .registration-steps li {
    align-items: flex-start;
    gap: 7px;
}

.verification-progress .registration-steps li:not(:last-child)::after {
    top: 13px;
    left: 27px;
    width: calc(100% - 20px);
    height: 2px;
}

.verification-progress .registration-steps .step-marker {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    box-shadow: 0 0 0 4px var(--surface);
}

.verification-progress .registration-steps strong {
    font-size: 10px;
}

.verification-progress .registration-steps small {
    display: none;
}

.verification-card {
    width: 100%;
    padding: clamp(28px, 7vw, 54px);
    text-align: center;
}

.verification-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--primary) 10%, var(--paper));
    color: var(--primary);
    animation: verification-icon-arrive 700ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.verification-icon::before {
    position: absolute;
    inset: -9px;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 24px;
    content: "";
    animation: verification-halo 3s ease-in-out infinite;
}

.verification-icon.success {
    background: color-mix(in srgb, var(--success) 11%, var(--paper));
    color: var(--success);
}

.verification-icon svg {
    width: 30px;
    height: 30px;
}

@keyframes verification-icon-arrive {
    from {
        opacity: 0;
        transform: translateY(12px) rotate(-5deg) scale(0.76);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0) scale(1);
    }
}

@keyframes verification-halo {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.94);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.04);
    }
}

.verification-form {
    margin-top: 28px;
    text-align: left;
}

.code-input {
    min-height: 58px;
    text-align: center;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0.35em;
}

.verification-form .primary-action {
    margin-top: 14px;
}

.resend-form {
    margin-top: 18px;
}

.resend-form button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 25px;
    color: var(--muted);
    font-size: 12px;
}

.back-link svg {
    width: 15px;
    height: 15px;
}

.restart-form {
    margin: 0;
}

.restart-form .back-link {
    margin-top: 25px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.success-alert {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: var(--radius-field);
    background: color-mix(in srgb, var(--success) 10%, var(--paper));
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.development-secret {
    display: grid;
    gap: 6px;
    margin: 18px 0;
    padding: 14px;
    border: 1px dashed var(--warning);
    border-radius: var(--radius-box);
    background: color-mix(in srgb, var(--warning) 8%, var(--paper));
}

.development-secret span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.development-secret strong {
    font-size: 24px;
    letter-spacing: 0.18em;
}

.development-secret.credential strong {
    overflow-wrap: anywhere;
    font-size: 18px;
    letter-spacing: 0.06em;
}

.next-step {
    display: flex;
    gap: 13px;
    margin: 25px 0;
    padding: 16px;
    border-radius: var(--radius-box);
    background: var(--surface);
    text-align: left;
}

.next-step svg {
    flex: 0 0 auto;
    color: var(--accent);
}

.next-step p {
    display: grid;
    gap: 5px;
    margin: 0;
}

.next-step strong {
    font-size: 13px;
}

.next-step span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.link-action {
    text-decoration: none;
}

.help-shell {
    width: min(100% - 32px, 720px);
    margin: 34px auto 80px;
}

.help-shell > .back-link {
    margin: 0 0 18px;
    text-decoration: none;
}

.help-card {
    padding: clamp(28px, 6vw, 52px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
}

.help-card .verification-icon {
    margin: 0 0 22px;
}

.help-card h1 {
    margin: 8px 0 14px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.help-lead {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.help-steps {
    display: grid;
    gap: 0;
    margin: 30px 0;
    padding: 0;
    list-style: none;
}

.help-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    padding-bottom: 22px;
}

.help-steps li:last-child {
    padding-bottom: 0;
}

.help-steps li:not(:last-child)::after {
    position: absolute;
    top: 34px;
    bottom: 0;
    left: 16px;
    width: 2px;
    background: var(--line);
    content: "";
}

.help-steps li > span {
    display: grid;
    z-index: 1;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 10%, var(--paper));
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.help-steps strong {
    font-size: 13px;
}

.help-steps p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.security-note {
    display: flex;
    gap: 13px;
    padding: 16px;
    border-radius: var(--radius-box);
    background: color-mix(in srgb, var(--success) 8%, var(--paper));
}

.security-note > svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--success);
}

.security-note p {
    display: grid;
    gap: 4px;
    margin: 0;
}

.security-note strong {
    font-size: 12px;
}

.security-note span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.help-actions {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.quiet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.quiet-link svg {
    width: 14px;
    height: 14px;
}

@view-transition {
    navigation: auto;
}

::view-transition-old(registration-chapter) {
    animation: registration-view-out 220ms ease both;
}

::view-transition-new(registration-chapter) {
    animation: registration-view-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes registration-view-out {
    to {
        opacity: 0;
        transform: translateX(-14px) scale(0.99);
    }
}

@keyframes registration-view-in {
    from {
        opacity: 0;
        transform: translateX(18px) scale(0.99);
    }
}

@media (max-width: 860px) {
    .registration-shell {
        grid-template-columns: 1fr;
        max-width: 680px;
        margin-top: 34px;
    }

    .registration-intro {
        position: static;
        padding: 0;
    }

    .registration-steps {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-top: 24px;
    }

    .registration-steps li {
        align-items: flex-start;
    }

    .registration-intro .registration-steps li:not(:last-child)::after {
        top: 16px;
        left: 32px;
        width: calc(100% - 24px);
        height: 2px;
    }

    .registration-steps small {
        display: none;
    }
}

@media (max-width: 580px) {
    .registration-header {
        width: min(100% - 28px, 1160px);
    }

    .registration-header p {
        display: none;
    }

    .registration-shell {
        width: min(100% - 24px, 680px);
        gap: 28px;
        margin-bottom: 40px;
    }

    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .registration-steps li div {
        display: none;
    }

    .registration-steps {
        display: flex;
    }

    .registration-steps li {
        flex: 1 1 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .registration-card,
    .verification-card,
    .registration-steps li,
    .registration-steps li.active:not(:last-child)::after,
    .registration-steps li.active .step-marker::after,
    .verification-icon,
    .verification-icon::before {
        opacity: 1;
        animation: none;
        transform: none;
    }

    ::view-transition-old(registration-chapter),
    ::view-transition-new(registration-chapter) {
        animation: none;
    }
}

/* Notifications open in the top layer, anchored to the header bell. */
.notification-button { position: relative; }
.notification-button > .notification-count { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--paper); border-radius: 999px; background: var(--primary); color: var(--primary-content); font-size: .62rem; font-weight: 700; line-height: 1; }
.notifications-popup { position: fixed; inset: auto; top: var(--notifications-top, 76px); left: var(--notifications-left, auto); right: 24px; width: min(400px, calc(100vw - 32px)); max-height: var(--notifications-max-height, calc(100dvh - 96px)); margin: 0; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 16px 48px rgba(0, 0, 0, .18); }
.notifications-popup-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.notifications-popup-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.notifications-popup-header p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.notifications-popup-header .icon-button { width: 32px; height: 32px; }
.notifications-popup-header .icon-button svg { width: 16px; height: 16px; }
.notification-invitation { display: flex; align-items: flex-start; gap: 12px; padding: 20px; }
.notification-invitation + .notification-invitation { border-top: 1px solid var(--line); }
.notification-invitation-icon, .notifications-empty > span { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--surface); color: var(--primary); }
.notification-invitation-icon svg { width: 20px; height: 20px; }
.notification-invitation > div { min-width: 0; }
.notification-kind { color: var(--muted); font-size: .7rem; }
.notification-invitation h3 { margin: 5px 0 0; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.notification-invitation p { margin: 5px 0 12px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.notification-accept { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: .8rem; font-weight: 600; text-decoration: none; }
.notification-accept:hover { text-decoration: underline; }
.notification-accept svg { width: 15px; height: 15px; }
.notifications-empty { display: grid; justify-items: center; gap: 12px; padding: 32px 24px; text-align: center; }
.notifications-empty strong { font-size: .9rem; }
.notifications-empty p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }

.team-member-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.team-list article > .team-member-actions { flex: 0 0 auto; }
.team-member-actions .danger-button { gap: 6px; }
.team-member-actions .danger-button svg { width: 16px; height: 16px; }
.member-mailbox-access { position: relative; }
.member-mailbox-access summary { cursor: pointer; list-style: none; }
.member-mailbox-access summary::-webkit-details-marker { display: none; }
.member-mailbox-access .management-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: min(360px, calc(100vw - 48px)); max-height: 420px; overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 12px 36px rgb(0 0 0 / 16%); }
.member-mailbox-access .terms-choice { align-items: center; overflow-wrap: anywhere; }
.member-mailbox-access .management-form small { display: block; }
@media (max-width: 640px) { .team-list article .member-mailbox-access form { margin-left: 0; } }
.remove-member-modal { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 28px; overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 64px rgb(0 0 0 / 24%); }
.remove-member-modal::backdrop { background: rgb(15 23 42 / 50%); backdrop-filter: blur(3px); }
.remove-member-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); color: var(--error); }
.remove-member-modal h2 { margin: 20px 0 12px; font-size: 1.25rem; }
.remove-member-modal p { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--muted); }
.remove-member-modal .management-actions { margin-top: 24px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) { .team-member-actions { flex-direction: column; align-items: flex-end; gap: 8px; } }

.dns-record-form { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; }
.dns-record-form label { display: grid; gap: 6px; min-width: 150px; flex: 1 1 180px; }
.dns-record-form label:has(input[name="content"]) { flex: 2 1 300px; }
.dns-record-form input, .dns-record-form select { width: 100%; }
.dns-record-form small { color: var(--muted); }
.dns-record-list article { align-items: flex-start; }
.dns-record-list article > div { min-width: 0; flex: 1; }
.dns-record-content { overflow-wrap: anywhere; }
.dns-record-list details { min-width: min(100%, 460px); }
.dns-record-list details > form { margin-top: 12px; }

/* Client domain cards and DNS console. */
.domain-hub { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line, #e2e8f0); border-radius: 20px; background: var(--paper, #fff); box-shadow: 0 12px 35px rgb(15 23 42 / 4%); }
.domain-hub-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.domain-hub-heading h2 { margin: 4px 0 6px; font-size: 1.36rem; letter-spacing: -.035em; }
.domain-hub-heading p:last-child { margin: 0; color: var(--muted, #667085); font-size: .88rem; line-height: 1.5; }
.domain-hub-count { padding: 8px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 999px; color: var(--muted, #667085); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.domain-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.domain-card { display: flex; flex-direction: column; min-height: 210px; overflow: hidden; border: 1px solid var(--line, #e2e8f0); border-radius: 16px; background: var(--paper, #fff); transition: border-color .2s, box-shadow .2s, transform .2s; }
.domain-card:hover { border-color: #c7b9f4; box-shadow: 0 14px 28px rgb(52 36 116 / 9%); transform: translateY(-2px); }
.domain-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 18px 18px 0; }
.domain-card-icon, .domain-overview-icon, .dns-summary-icon { display: grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #eee9ff; color: #6941c6; }
.domain-card-icon svg, .domain-overview-icon svg, .dns-summary-icon svg { width: 20px; height: 20px; }
.domain-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; font-size: .7rem; font-weight: 750; white-space: nowrap; }
.domain-status > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.domain-status.is-active { background: #e9f8ef; color: #16784a; }
.domain-status.is-pending { background: #fff3d9; color: #a56112; }
.domain-card-body { flex: 1; padding: 20px 18px 18px; }
.domain-card-body h3 { margin: 4px 0 7px; font-size: 1.1rem; letter-spacing: -.025em; overflow-wrap: anywhere; }
.domain-card-body > p:last-child { margin: 0; color: var(--muted, #667085); font-size: .8rem; }
.domain-card-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line, #e2e8f0); color: var(--primary, #6941c6); font-size: .82rem; font-weight: 750; text-decoration: none; }
.domain-card-link:hover { background: #faf8ff; }
.domain-card-link span { display: inline-flex; align-items: center; gap: 9px; }
.domain-card-link svg { width: 16px; height: 16px; }
.domain-hub-empty { display: grid; justify-items: center; gap: 8px; grid-column: 1 / -1; padding: 38px 20px; border: 1px dashed var(--line, #e2e8f0); border-radius: 14px; text-align: center; }
.domain-hub-empty > svg { width: 24px; height: 24px; color: var(--muted, #667085); }
.domain-hub-empty p { margin: 0; color: var(--muted, #667085); font-size: .84rem; }

.domain-console { display: grid; gap: 22px; max-width: 1240px !important; padding-top: 30px; }
.domain-breadcrumb { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--muted, #667085); font-size: .8rem; }
.domain-breadcrumb a { color: inherit; text-decoration: none; }
.domain-breadcrumb a:hover { color: var(--primary, #6941c6); }
.domain-breadcrumb svg { width: 14px; height: 14px; }
.domain-breadcrumb span { color: var(--ink, #20242b); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-overview { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line, #e2e8f0); border-radius: 20px; background: var(--paper, #fff); box-shadow: 0 12px 36px rgb(15 23 42 / 4%); }
.domain-overview-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.domain-overview-icon { width: 58px; height: 58px; border-radius: 16px; }
.domain-overview-icon svg { width: 27px; height: 27px; }
.domain-overview h1 { margin: 4px 0 6px; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.domain-overview p:last-child { margin: 0; color: var(--muted, #667085); font-size: .88rem; line-height: 1.5; }
.dns-pending-note { display: flex; gap: 12px; padding: 16px 18px; border: 1px solid #f3d68b; border-radius: 14px; background: #fffaed; color: #8a5711; }
.dns-pending-note > svg { flex: none; width: 20px; height: 20px; }
.dns-pending-note p { margin: 4px 0 0; font-size: .82rem; line-height: 1.5; }
.dns-summary-grid { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(320px, 1.3fr); gap: 14px; }
.dns-summary-card { display: flex; align-items: flex-start; gap: 14px; min-height: 112px; padding: 20px; border: 1px solid var(--line, #e2e8f0); border-radius: 16px; background: var(--paper, #fff); }
.dns-summary-card > div { display: grid; gap: 3px; min-width: 0; }
.dns-summary-card small { color: var(--muted, #667085); font-size: .73rem; font-weight: 700; }
.dns-summary-card strong { font-size: 1.45rem; letter-spacing: -.035em; overflow-wrap: anywhere; }
.dns-summary-card span:not(.dns-summary-icon) { color: var(--muted, #667085); font-size: .77rem; }
.dns-nameservers strong { font-size: .89rem; font-weight: 700; letter-spacing: 0; }
.dns-panel { overflow: hidden; border: 1px solid var(--line, #e2e8f0); border-radius: 18px; background: var(--paper, #fff); box-shadow: 0 12px 36px rgb(15 23 42 / 4%); }
.dns-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 26px; }
.dns-panel-heading h2 { margin: 4px 0 5px; font-size: 1.3rem; letter-spacing: -.035em; }
.dns-panel-heading p:last-child { margin: 0; color: var(--muted, #667085); font-size: .82rem; }
.dns-panel-heading .primary-button svg { width: 17px; height: 17px; }
.dns-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 26px; border-top: 1px solid var(--line, #e2e8f0); border-bottom: 1px solid var(--line, #e2e8f0); background: var(--surface, #f8fafc); }
.dns-search { position: relative; flex: 1; max-width: 360px; }
.dns-search svg { position: absolute; top: 50%; left: 13px; width: 17px; height: 17px; color: var(--muted, #667085); transform: translateY(-50%); }
.dns-search input, .dns-type-filter select { width: 100%; min-height: 39px; border: 1px solid var(--line, #dfe3e8); border-radius: 9px; background: var(--paper, #fff); color: var(--ink, #20242b); font: inherit; font-size: .82rem; }
.dns-search input { padding: 8px 12px 8px 39px; }
.dns-type-filter { width: 160px; }
.dns-type-filter select { padding: 8px 12px; }
.dns-visible-count { margin-left: auto; color: var(--muted, #667085); font-size: .77rem; white-space: nowrap; }
.dns-table-scroll { overflow-x: auto; }
.dns-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.dns-table th { padding: 12px 16px; border-bottom: 1px solid var(--line, #e2e8f0); color: var(--muted, #667085); font-size: .7rem; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.dns-table th:nth-child(1) { width: 84px; }
.dns-table th:nth-child(2) { width: 23%; }
.dns-table th:nth-child(3) { width: auto; }
.dns-table th:nth-child(4) { width: 108px; }
.dns-table th:nth-child(5) { width: 112px; }
.dns-table th:nth-child(6) { width: 112px; }
.dns-table td { height: 64px; padding: 12px 16px; border-bottom: 1px solid var(--line, #e2e8f0); vertical-align: middle; font-size: .82rem; }
.dns-table tr:last-child td { border-bottom: 0; }
.dns-table tbody tr:hover { background: var(--surface, #f8fafc); }
.dns-type-badge { display: inline-flex; justify-content: center; min-width: 48px; padding: 5px 7px; border: 1px solid #dcd4f7; border-radius: 6px; background: #f5f1ff; color: #6941c6; font-size: .72rem; font-weight: 800; }
.dns-cell-name, .dns-cell-content { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dns-cell-name { font-weight: 700; }
.dns-cell-content { color: var(--muted, #667085); }
.dns-proxy-state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dns-proxy-state svg { width: 16px; height: 16px; color: #d18b27; }
.dns-muted { color: var(--muted, #667085); white-space: nowrap; }
.dns-actions { white-space: nowrap; text-align: right; }
.dns-actions form { display: inline; }
.dns-icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted, #667085); cursor: pointer; }
.dns-icon-button:hover { border-color: var(--line, #e2e8f0); background: var(--surface, #f8fafc); color: var(--primary, #6941c6); }
.dns-icon-button.is-danger:hover { color: #c73b2f; }
.dns-icon-button svg, .dns-protected svg { width: 16px; height: 16px; }
.dns-protected { display: inline-grid; place-items: center; width: 34px; height: 34px; color: #9aa3b2; }
.dns-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; text-align: center; }
.dns-empty[hidden], .dns-table tr[hidden] { display: none; }
.dns-empty > svg { width: 25px; height: 25px; color: var(--muted, #667085); }
.dns-empty p { margin: 0; color: var(--muted, #667085); font-size: .82rem; }
.dns-panel-footer { display: flex; align-items: center; gap: 8px; padding: 14px 26px; border-top: 1px solid var(--line, #e2e8f0); color: var(--muted, #667085); font-size: .75rem; }
.dns-panel-footer svg { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.dns-record-dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line, #e2e8f0); border-radius: 18px; background: var(--paper, #fff); color: var(--ink, #20242b); box-shadow: 0 28px 80px rgb(15 23 42 / 24%); }
.dns-record-dialog::backdrop { background: rgb(15 23 42 / 55%); backdrop-filter: blur(3px); }
.dns-record-dialog .management-form { display: block; padding: 0; }
.dns-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 24px 26px; border-bottom: 1px solid var(--line, #e2e8f0); }
.dns-dialog-heading h2 { margin: 4px 0 6px; font-size: 1.3rem; }
.dns-dialog-heading p:last-child { margin: 0; color: var(--muted, #667085); font-size: .82rem; }
.dns-dialog-fields { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 24px 26px 12px; }
.dns-dialog-fields label { display: grid; align-content: start; gap: 7px; font-size: .82rem; font-weight: 700; }
.dns-dialog-fields label small { color: var(--muted, #667085); font-size: .72rem; font-weight: 400; }
.dns-dialog-fields input, .dns-dialog-fields select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line, #dfe3e8); border-radius: 9px; background: var(--paper, #fff); color: var(--ink, #20242b); font: inherit; font-weight: 400; }
.dns-dialog-fields .dns-value-field { grid-column: 1 / -1; }
.dns-dialog-help { display: flex; align-items: center; gap: 9px; margin: 8px 26px 24px; padding: 11px 12px; border-radius: 9px; background: var(--surface, #f8fafc); color: var(--muted, #667085); font-size: .76rem; line-height: 1.4; }
.dns-dialog-help svg { flex: none; width: 16px; height: 16px; }
.dns-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 26px; border-top: 1px solid var(--line, #e2e8f0); }
@media (max-width: 720px) {
  .domain-overview, .dns-panel-heading { flex-direction: column; align-items: flex-start; }
  .dns-summary-grid { grid-template-columns: 1fr; }
  .dns-panel-heading .primary-button { width: 100%; justify-content: center; }
  .dns-table { min-width: 850px; }
}
@media (max-width: 520px) {
  .domain-hub-heading, .dns-toolbar { flex-wrap: wrap; }
  .domain-overview-main { align-items: flex-start; }
  .domain-overview-icon { width: 46px; height: 46px; }
  .dns-search { max-width: none; flex-basis: 100%; }
  .dns-type-filter { flex: 1; }
  .dns-dialog-fields { grid-template-columns: 1fr; }
  .dns-dialog-fields .dns-value-field { grid-column: auto; }
}
