.backbone-content {
    color: #1e293b;
    font-size: 0.94rem;
}

.backbone-content > .container {
    margin-bottom: 2rem !important;
    margin-top: 2rem !important;
}

.backbone-content > .container.py-5 {
    padding-bottom: 2rem !important;
    padding-top: 2rem !important;
}

.backbone-content h1 {
    color: #0f172a;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    letter-spacing: -0.025em;
}

.backbone-content h2 {
    color: #0f172a;
}

.backbone-content .card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.7rem !important;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.05) !important;
}

.backbone-content .card.border-success {
    border-color: #198754 !important;
}

.backbone-content .card.border-danger {
    border-color: #dc3545 !important;
}

.backbone-content .card.border-warning {
    border-color: #ffc107 !important;
}

.backbone-content .card-header {
    border-bottom-color: #e2e8f0;
    padding: 0.65rem 1rem;
}

.backbone-content .card-body {
    padding: 1rem;
}

.backbone-content .alert {
    border-radius: 0.65rem;
    padding: 0.7rem 0.9rem;
}

.backbone-content .table-responsive {
    border-radius: 0.65rem;
}

.backbone-content .table > :not(caption) > * > * {
    padding: 0.45rem 0.55rem;
}

.backbone-content .list-group {
    border-radius: 0.65rem;
    overflow: hidden;
}

.backbone-content .list-group-item {
    padding: 0.65rem 0.85rem;
}

.backbone-content .form-control,
.backbone-content .form-select {
    border-color: #cbd5e1;
    border-radius: 0.45rem;
}

.meta-access-row {
    align-items: start;
    display: grid;
    gap: 0.65rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-access-row > :only-child {
    grid-column: 1 / -1;
}

.meta-access-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.meta-access-field .meta-access-select {
    min-width: 0;
    width: 100%;
}

.meta-access-values {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
}

.meta-access-values .meta-access-select {
    flex: 1 1 9rem;
}

.meta-label-tags-row {
    align-items: start;
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-detail-field {
    min-width: 0;
}

.meta-tags-header {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    margin-bottom: 0.25rem;
    min-height: 1.8rem;
}

.meta-detail-field fieldset:last-child {
    margin-bottom: 0 !important;
}

.meta-tag-fields {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.backbone-content .modal-content {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

body.backbone-shell .footer-bar {
    background:
        radial-gradient(circle at 15% 0%, rgba(59, 130, 246, 0.08), transparent 28%),
        linear-gradient(90deg, #f8fafc, #ffffff 50%, #f8fafc);
    border-top: 1px solid #dbe3ec;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.035);
    color: #64748b;
    min-height: 54px !important;
    padding: 0.55rem 1rem !important;
}

body.backbone-shell .footer-bar .footer-inner {
    align-items: center;
    display: grid;
    gap: 0.65rem 1.25rem;
    grid-template-columns: auto 1fr auto;
    margin: 0 auto;
    max-width: 1320px;
    min-height: 0;
    padding: 0;
    width: 100%;
}

.footer-brand {
    align-items: center;
    color: #334155;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 750;
    gap: 0.45rem;
    white-space: nowrap;
}

.footer-brand-mark {
    align-items: center;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 0.45rem;
    color: #2563eb;
    display: inline-flex;
    height: 1.8rem;
    justify-content: center;
    width: 1.8rem;
}

body.backbone-shell .footer-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    justify-content: center;
}

body.backbone-shell .footer-bar .footer-links a {
    align-items: center;
    border-radius: 0.45rem;
    color: #64748b;
    display: inline-flex;
    font-size: 0.74rem;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
    white-space: nowrap;
}

body.backbone-shell .footer-bar .footer-links a i {
    color: #94a3b8;
    text-align: center;
    width: 0.9rem;
}

body.backbone-shell .footer-bar .footer-links a:hover,
body.backbone-shell .footer-bar .footer-links a:focus {
    background: #eff6ff;
    color: #1d4ed8;
    transform: translateY(-1px);
}

body.backbone-shell .footer-bar .footer-links a:hover i,
body.backbone-shell .footer-bar .footer-links a:focus i {
    color: #2563eb;
}

body.backbone-shell .footer-bar .footer-links .footer-support-link:hover,
body.backbone-shell .footer-bar .footer-links .footer-support-link:focus {
    background: #fff7ed;
    color: #c2410c;
}

body.backbone-shell .footer-bar .footer-links .footer-support-link:hover i,
body.backbone-shell .footer-bar .footer-links .footer-support-link:focus i {
    color: #ea580c;
}

.footer-version {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.65rem;
    line-height: 1;
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
}

.nav-billing-modal {
    border: 1px solid #dbe3ec;
    border-radius: 0.85rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.nav-billing-modal .modal-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.9rem 1rem;
}

.nav-billing-modal .btn-close {
    flex: 0 0 auto;
}

.nav-billing-modal .modal-body {
    background: #f8fafc;
    padding: 1rem;
}

.nav-billing-title {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 0.7rem;
    min-width: 0;
    padding-right: 1rem;
    width: 100%;
}

.nav-billing-title-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: 0.55rem;
    color: #2563eb;
    display: flex;
    flex: 0 0 2.4rem;
    height: 2.4rem;
    justify-content: center;
}

.nav-billing-eyebrow {
    color: #2563eb;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    margin: 0 0 0.1rem;
    text-transform: uppercase;
}

.nav-billing-title .modal-title {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.2;
}

.nav-billing-summary {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.85rem;
}

.nav-billing-stat {
    align-items: center;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 0.65rem;
    color: #1e3a8a;
    display: grid;
    gap: 0 0.55rem;
    grid-template-columns: auto auto 1fr;
    min-height: 58px;
    padding: 0.65rem 0.75rem;
}

.nav-billing-stat.is-allowance {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
    color: #166534;
}

.nav-billing-stat-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    display: flex;
    grid-row: 1;
    height: 1.9rem;
    justify-content: center;
    width: 1.9rem;
}

.nav-billing-stat strong {
    font-size: 1.25rem;
    line-height: 1;
}

.nav-billing-stat > span:last-child {
    font-size: 0.78rem;
    font-weight: 650;
}

.nav-billing-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.nav-billing-section-heading {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
}

.nav-billing-section-heading h3 {
    align-items: center;
    color: #0f172a;
    display: flex;
    font-size: 0.86rem;
    font-weight: 750;
    gap: 0.45rem;
    margin: 0;
}

.nav-billing-section-heading h3 i {
    color: #64748b;
    width: 1rem;
}

.nav-billing-count {
    align-items: center;
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 750;
    height: 1.4rem;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0 0.4rem;
}

.nav-billing-table thead {
    background: #f8fafc;
}

.nav-billing-table th {
    border-bottom-color: #e2e8f0;
    color: #64748b;
    font-size: 0.67rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.8rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-billing-table td {
    border-bottom-color: #f1f5f9;
    color: #334155;
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
}

.nav-billing-table tbody tr:last-child td {
    border-bottom: 0;
}

.nav-billing-organisation {
    align-items: center;
    display: inline-flex;
    font-weight: 650;
    gap: 0.4rem;
    white-space: nowrap;
}

.nav-billing-organisation i {
    color: #94a3b8;
}

.nav-billing-empty {
    align-items: center;
    color: #64748b;
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    gap: 0.4rem;
    justify-content: center;
    min-height: 76px;
    padding: 0.9rem;
}

.nav-billing-empty i {
    color: #cbd5e1;
    font-size: 1.15rem;
}

.organisation-dashboard {
    max-width: 1080px;
}

.organisation-dashboard {
    margin-bottom: 2rem !important;
    margin-top: 2rem !important;
}

.organisation-dashboard .dashboard-header {
    margin-bottom: 1.75rem !important;
}

.organisation-dashboard .row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.dashboard-back-link {
    align-items: center;
    color: #475569;
    display: inline-flex;
    font-size: 0.9rem;
    gap: 0.5rem;
    text-decoration: none;
}

.dashboard-back-link:hover,
.dashboard-back-link:focus {
    color: #0f172a;
}

.dashboard-header {
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.13), transparent 36%),
        #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(1.1rem, 3vw, 1.6rem);
}

.dashboard-header h1 {
    color: #0f172a;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    letter-spacing: -0.03em;
}

.dashboard-header .text-muted {
    font-size: 0.88rem;
}

.dashboard-eyebrow,
.dashboard-section-kicker {
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-role-badge {
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
}

.dashboard-role-badge.is-admin {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.dashboard-header-mark {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.9rem;
    color: #2563eb;
    display: flex;
    flex: 0 0 3.75rem;
    font-size: 1.5rem;
    height: 3.75rem;
    justify-content: center;
    margin-left: 2rem;
    transform: rotate(-3deg);
}

.dashboard-section + .dashboard-section {
    border-top: 1px solid #e2e8f0;
    margin-top: 2.25rem;
    padding-top: 2.25rem;
}

.dashboard-section-heading {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dashboard-section-heading h2 {
    font-size: 1.25rem;
}

.dashboard-section-heading .text-muted {
    font-size: 0.85rem;
}

.dashboard-section-icon {
    align-items: center;
    border-radius: 0.65rem;
    display: flex;
    flex: 0 0 2.5rem;
    font-size: 0.95rem;
    height: 2.5rem;
    justify-content: center;
}

.user-area-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-area-icon {
    background: #ffedd5;
    color: #c2410c;
}

.admin-section .dashboard-section-kicker {
    color: #c2410c;
}

.action-area-icon {
    background: #dcfce7;
    color: #15803d;
}

.action-kicker {
    color: #15803d;
}

.dashboard-tile {
    --tile-accent: #2563eb;
    --tile-accent-soft: #eff6ff;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.05);
    color: #0f172a;
    display: flex;
    gap: 0.8rem;
    height: 100%;
    min-height: 138px;
    overflow: hidden;
    padding: 1.05rem;
    position: relative;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-tile::before {
    background: var(--tile-accent);
    content: "";
    height: 4px;
    inset: 0 0 auto;
    position: absolute;
}

.dashboard-tile:hover,
.dashboard-tile:focus-visible {
    border-color: var(--tile-accent);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    color: #0f172a;
    transform: translateY(-2px);
}

.dashboard-tile:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 3px;
}

.dashboard-tile.admin-tile {
    --tile-accent: #ea580c;
    --tile-accent-soft: #fff7ed;
}

.dashboard-tile.action-tile {
    --tile-accent: #16a34a;
    --tile-accent-soft: #f0fdf4;
}

.dashboard-tile.membership-tile {
    --tile-accent: #7c3aed;
    --tile-accent-soft: #f5f3ff;
}

.organisation-tile {
    min-height: 145px;
}

.dashboard-tile-icon {
    align-items: center;
    background: var(--tile-accent-soft);
    border-radius: 0.6rem;
    color: var(--tile-accent);
    display: flex;
    flex: 0 0 2.5rem;
    font-size: 1rem;
    height: 2.5rem;
    justify-content: center;
}

.dashboard-tile-content {
    align-self: stretch;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.dashboard-tile-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.dashboard-tile-description {
    color: #64748b;
    display: block;
    font-size: 0.84rem;
    line-height: 1.45;
}

.dashboard-tile-meta {
    color: var(--tile-accent);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: auto;
    padding-top: 0.65rem;
    text-transform: uppercase;
}

.dashboard-tile-arrow {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-left: auto;
    margin-top: 1rem;
    transition: color 160ms ease, transform 160ms ease;
}

.dashboard-tile:hover .dashboard-tile-arrow,
.dashboard-tile:focus-visible .dashboard-tile-arrow {
    color: var(--tile-accent);
    transform: translateX(3px);
}

.dashboard-empty-state {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px dashed #cbd5e1;
    border-radius: 0.8rem;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.25rem;
    text-align: center;
}

.dashboard-empty-icon {
    align-items: center;
    background: #f1f5f9;
    border-radius: 0.75rem;
    color: #64748b;
    display: flex;
    font-size: 1.2rem;
    height: 3.25rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 3.25rem;
}

.tools-dashboard {
    max-width: 1080px;
}

.tool-app-section + .tool-app-section {
    border-top: 1px solid #e2e8f0;
    margin-top: 1.7rem;
    padding-top: 1.4rem;
}

.tool-app-section-title {
    color: #475569;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.tool-app-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.tool-app {
    min-width: 0;
}

.tool-app-surface {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    min-height: 68px;
    position: relative;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.tool-app-surface:hover,
.tool-app-surface:focus-within {
    border-color: #cbd5e1;
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.tool-app.is-locked .tool-app-surface {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 3px 10px rgba(71, 85, 105, 0.045);
}

.tool-app.is-locked .tool-app-surface:hover,
.tool-app.is-locked .tool-app-surface:focus-within {
    border-color: #cbd5e1;
    box-shadow: 0 7px 16px rgba(71, 85, 105, 0.08);
}

.tool-app-launch-form {
    height: 100%;
    margin: 0;
}

.tool-app-launch {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0.8rem;
    color: inherit;
    display: flex;
    height: 100%;
    justify-content: flex-start;
    min-height: 68px;
    padding: 0.75rem 3.1rem 0.75rem 0.95rem;
    text-align: left;
    width: 100%;
}

.tool-app-launch:focus-visible,
.tool-app-info:focus-visible,
.tool-version-choice:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

.tool-app-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: 0.6rem;
    color: #2563eb;
    display: flex;
    flex: 0 0 2.35rem;
    font-size: 1.15rem;
    height: 2.35rem;
    justify-content: center;
    margin-right: 0.65rem;
    transition: transform 150ms ease;
    width: 2.35rem;
}

.tool-app-launch:hover .tool-app-icon {
    transform: scale(1.08);
}

.tool-app.is-locked .tool-app-icon {
    background: #f1f5f9;
    color: #64748b;
}

.tool-app-name {
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.25;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.tool-app-info {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    color: #64748b;
    display: flex;
    font-size: 0.58rem;
    height: 1.45rem;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
    width: 1.45rem;
    z-index: 1;
}

.tool-app-info:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-50%) scale(1.06);
}

.tool-dialog {
    max-width: 430px;
}

.tool-dialog-kicker {
    color: #2563eb;
    font-size: 0.69rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tool-access-description {
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.tool-access-notice {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    display: flex;
    gap: 0.8rem;
    padding: 0.9rem;
}

.tool-access-status-icon {
    align-items: center;
    background: #e0e7ff;
    border-radius: 50%;
    color: #4f46e5;
    display: flex;
    flex: 0 0 2rem;
    height: 2rem;
    justify-content: center;
    margin-top: 0.05rem;
    width: 2rem;
}

.tool-access-copy h3 {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.tool-access-copy p {
    color: #334155;
    line-height: 1.5;
    margin-bottom: 0.45rem;
}

.tool-access-copy .tool-access-next-step {
    color: #64748b;
    margin-bottom: 0;
}

.tool-version-list {
    display: grid;
    gap: 0.5rem;
}

.tool-version-list form {
    margin: 0;
}

.tool-version-choice {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    color: #0f172a;
    display: flex;
    font-size: 0.9rem;
    font-weight: 700;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
    width: 100%;
}

.tool-version-choice:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.tool-info-description {
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    margin-bottom: 1.1rem;
    padding-bottom: 1.1rem;
}

.tool-changelog-title {
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.compact-page.billing-page {
    max-width: 1180px;
}

.billing-page .row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.billing-tabs {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    display: inline-flex;
    gap: 0.2rem;
    padding: 0.3rem;
}

.billing-tabs .nav-link {
    border-radius: 0.45rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 650;
    padding: 0.42rem 0.7rem;
}

.billing-tabs .nav-link:hover,
.billing-tabs .nav-link:focus {
    background: #f8fafc;
    color: #0f172a;
}

.billing-tabs .nav-link.active {
    background: #0f172a;
    color: #ffffff;
}

.billing-page .card {
    overflow: hidden;
}

.billing-page .card h2 {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.billing-page .table thead {
    background: #f8fafc;
}

.billing-page .table th {
    color: #475569;
    font-size: 0.72rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.billing-page form p {
    margin-bottom: 0.7rem;
}

.billing-page dl dt,
.billing-page dl dd {
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0;
    padding: 0.4rem 0;
}

.billing-page dl dd:last-child,
.billing-page dl dt:last-of-type {
    border-bottom: 0;
}

.billing-page-header .compact-page-actions {
    gap: 0.6rem;
}

.billing-state-badge {
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #64748b;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 700;
    gap: 0.35rem;
    padding: 0.32rem 0.58rem;
}

.billing-state-badge.is-active {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.billing-state-badge.is-pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.billing-setup-callout {
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: 0.85rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
    color: #ffffff;
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.15rem;
}

.billing-setup-callout > span {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0.7rem;
    display: flex;
    flex: 0 0 2.8rem;
    font-size: 1.1rem;
    height: 2.8rem;
    justify-content: center;
}

.billing-setup-callout > div {
    flex: 1 1 auto;
}

.billing-setup-callout h2 {
    font-size: 1rem;
    margin: 0 0 0.2rem;
}

.billing-setup-callout p {
    color: #cbd5e1;
    font-size: 0.76rem;
    margin: 0;
}

.billing-setup-callout .billing-setup-eyebrow {
    color: #93c5fd;
    font-size: 0.64rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    margin-bottom: 0.12rem;
    text-transform: uppercase;
}

.billing-setup-callout .btn {
    background: #ffffff;
    border-color: #ffffff;
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-setup-card,
.billing-data-card,
.billing-action-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.85rem;
}

.billing-section-intro {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.45;
    margin: -0.3rem 0 0.9rem;
}

.billing-form-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    padding: 0.85rem;
}

.billing-form-panel h3 {
    align-items: center;
    color: #334155;
    display: flex;
    font-size: 0.78rem;
    font-weight: 750;
    gap: 0.4rem;
    margin: 0 0 0.8rem;
}

.billing-form-panel h3 i {
    color: #2563eb;
}

.billing-activation-form label,
.billing-action-form label {
    color: #475569;
    font-size: 0.7rem;
    font-weight: 650;
    margin-bottom: 0.25rem;
}

.billing-activation-form .form-control,
.billing-activation-form .form-select,
.billing-action-form .form-control,
.billing-action-form .form-select {
    font-size: 0.78rem;
}

.billing-form-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 0.9rem;
}

.billing-form-footer p {
    color: #64748b;
    font-size: 0.7rem;
    margin: 0;
}

.billing-form-footer p i {
    color: #16a34a;
    margin-right: 0.25rem;
}

.billing-form-footer .btn {
    font-size: 0.76rem;
    font-weight: 700;
}

.billing-overview-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.billing-overview-card {
    --overview-color: #2563eb;
    --overview-soft: #eff6ff;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    display: flex;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.75rem;
}

.billing-overview-card.is-success {
    --overview-color: #15803d;
    --overview-soft: #f0fdf4;
}

.billing-overview-card.is-violet {
    --overview-color: #6d28d9;
    --overview-soft: #f5f3ff;
}

.billing-overview-card.is-amber {
    --overview-color: #b45309;
    --overview-soft: #fffbeb;
}

.billing-overview-card > span {
    align-items: center;
    background: var(--overview-soft);
    border-radius: 0.55rem;
    color: var(--overview-color);
    display: flex;
    flex: 0 0 2.2rem;
    height: 2.2rem;
    justify-content: center;
}

.billing-overview-card > div {
    min-width: 0;
}

.billing-overview-card small,
.billing-overview-card strong,
.billing-overview-card p {
    display: block;
}

.billing-overview-card small {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 650;
    text-transform: uppercase;
}

.billing-overview-card strong {
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-overview-card p {
    color: #94a3b8;
    font-size: 0.64rem;
    margin: 0.08rem 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-page .billing-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
}

.billing-page .billing-tabs .nav-link {
    align-items: center;
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    width: 100%;
}

.billing-page .billing-tabs .nav-link > span {
    align-items: center;
    background: #e2e8f0;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.58rem;
    height: 1.15rem;
    justify-content: center;
    min-width: 1.15rem;
    padding: 0 0.25rem;
}

.billing-page .billing-tabs .nav-link.active > span {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.billing-card-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.billing-card-heading p {
    color: #2563eb;
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    margin: 0 0 0.1rem;
    text-transform: uppercase;
}

.billing-card-heading h2 {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 750;
    margin: 0;
}

.billing-count-pill,
.billing-status-pill,
.billing-app-label,
.billing-current-label {
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.63rem;
    font-weight: 700;
    padding: 0.24rem 0.45rem;
    white-space: nowrap;
}

.billing-status-pill.is-success {
    background: #dcfce7;
    color: #166534;
}

.billing-current-label {
    background: #dbeafe;
    color: #1d4ed8;
    margin-left: 0.35rem;
}

.billing-app-label {
    background: #eff6ff;
    color: #1d4ed8;
}

.billing-table {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    overflow: hidden;
}

.billing-table thead {
    background: #f8fafc;
}

.billing-table th {
    border-bottom-color: #e2e8f0;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.035em;
    padding: 0.55rem 0.65rem;
    text-transform: uppercase;
}

.billing-table td {
    border-color: #f1f5f9;
    color: #475569;
    font-size: 0.73rem;
    padding: 0.6rem 0.65rem;
}

.billing-table td strong {
    color: #0f172a;
}

.billing-table-empty {
    align-items: center;
    color: #94a3b8;
    display: flex;
    font-size: 0.73rem;
    justify-content: center;
    min-height: 3rem;
    text-align: center;
}

.billing-tab-intro {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.7rem 0.8rem;
}

.billing-tab-intro > div,
.billing-action-heading {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.billing-tab-intro > div > span,
.billing-action-heading > span {
    align-items: center;
    background: #eff6ff;
    border-radius: 0.5rem;
    color: #2563eb;
    display: flex;
    flex: 0 0 2rem;
    height: 2rem;
    justify-content: center;
}

.billing-tab-intro > div > span.is-amber,
.billing-action-heading > span.is-amber {
    background: #fffbeb;
    color: #b45309;
}

.billing-tab-intro > div > span.is-primary {
    background: #eff6ff;
    color: #2563eb;
}

.billing-tab-intro h2 {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 750;
    margin: 0;
}

.billing-tab-intro p {
    color: #64748b;
    font-size: 0.7rem;
    margin: 0.1rem 0 0;
}

.billing-action-heading {
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.billing-action-heading > span.is-success {
    background: #f0fdf4;
    color: #15803d;
}

.billing-action-heading > span.is-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.billing-action-heading h3 {
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 750;
    margin: 0;
}

.billing-action-heading p {
    color: #94a3b8;
    font-size: 0.66rem;
    margin: 0.1rem 0 0;
}

.billing-action-form p {
    margin-bottom: 0.55rem;
}

.billing-action-form .helptext {
    color: #94a3b8;
    display: block;
    font-size: 0.62rem;
    margin-top: 0.2rem;
}

.billing-action-form .btn {
    font-size: 0.73rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.billing-plan-list {
    display: grid;
    gap: 0.4rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.billing-plan-list > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.5rem 0.6rem;
}

.billing-plan-list strong,
.billing-plan-list small {
    display: block;
}

.billing-plan-list strong {
    color: #1e293b;
    font-size: 0.73rem;
}

.billing-plan-list small {
    color: #94a3b8;
    font-size: 0.62rem;
}

.billing-invoice-summary {
    align-items: center;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto auto 1fr;
    padding: 0.8rem 0.9rem;
}

.billing-invoice-summary > div {
    border-right: 1px solid #bfdbfe;
    min-width: 145px;
    padding-right: 0.8rem;
}

.billing-invoice-summary small,
.billing-invoice-summary strong {
    display: block;
}

.billing-invoice-summary small {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 650;
    text-transform: uppercase;
}

.billing-invoice-summary strong {
    color: #0f172a;
    font-size: 1rem;
}

.billing-invoice-summary p {
    color: #64748b;
    font-size: 0.69rem;
    margin: 0;
}

.contract-sign-page {
    max-width: 1180px;
}

.contract-sign-page .card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.85rem;
    overflow: hidden;
}

.contract-sign-page .card-body {
    padding: 1.1rem;
}

.contract-sign-steps {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0 0 1rem;
    padding: 0.35rem;
}

.contract-sign-steps li {
    align-items: center;
    border-radius: 0.55rem;
    color: #94a3b8;
    display: flex;
    gap: 0.65rem;
    min-width: 0;
    padding: 0.6rem 0.75rem;
}

.contract-sign-steps li > span {
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    flex: 0 0 1.8rem;
    font-size: 0.72rem;
    font-weight: 750;
    height: 1.8rem;
    justify-content: center;
}

.contract-sign-steps strong,
.contract-sign-steps small {
    display: block;
    line-height: 1.2;
}

.contract-sign-steps strong {
    font-size: 0.82rem;
}

.contract-sign-steps small {
    font-size: 0.68rem;
    margin-top: 0.15rem;
}

.contract-sign-steps .is-complete {
    color: #15803d;
}

.contract-sign-steps .is-complete > span {
    background: #dcfce7;
    border-color: #bbf7d0;
}

.contract-sign-steps .is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.contract-sign-steps .is-active > span {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.contract-review-notice {
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.75rem;
    color: #78350f;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.8rem 0.9rem;
}

.contract-review-notice > span {
    align-items: center;
    background: #fef3c7;
    border-radius: 0.5rem;
    display: flex;
    flex: 0 0 2rem;
    height: 2rem;
    justify-content: center;
}

.contract-review-notice strong {
    display: block;
    font-size: 0.86rem;
    margin-bottom: 0.12rem;
}

.contract-review-notice p {
    color: #92400e;
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0;
}

.contract-section-heading,
.contract-pricing-header,
.pricing-block-heading,
.subscription-price-card header,
.contract-signature-layout {
    align-items: center;
    display: flex;
}

.contract-section-heading {
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.contract-section-heading > span,
.subscription-price-card header > span {
    align-items: center;
    background: #eff6ff;
    border-radius: 0.55rem;
    color: #2563eb;
    display: flex;
    flex: 0 0 2.2rem;
    height: 2.2rem;
    justify-content: center;
}

.contract-section-heading p,
.contract-pricing-header p {
    color: #2563eb;
    font-size: 0.65rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    margin: 0 0 0.12rem;
    text-transform: uppercase;
}

.contract-section-heading h2,
.contract-pricing-header h2 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 750;
    margin: 0;
}

.contract-profile-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.contract-profile-list > div {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.3fr);
    padding: 0.45rem 0;
}

.contract-profile-list > div + div {
    border-top: 1px solid #f1f5f9;
}

.contract-profile-list dt {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 650;
}

.contract-profile-list dd {
    color: #1e293b;
    font-size: 0.78rem;
    margin: 0;
    overflow-wrap: anywhere;
    text-align: right;
}

.pricing-guide-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-guide-grid > div {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    display: flex;
    gap: 0.55rem;
    padding: 0.6rem;
}

.pricing-guide-grid p {
    color: #475569;
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
}

.pricing-guide-note {
    color: #64748b;
    font-size: 0.72rem;
    margin-top: 0.65rem;
}

.pricing-guide-note i {
    color: #2563eb;
    margin-right: 0.25rem;
}

.contract-pricing-header {
    border-bottom: 1px solid #e2e8f0;
    justify-content: space-between;
    margin: -0.1rem -0.1rem 1rem;
    padding: 0.1rem 0.1rem 0.9rem;
}

.contract-currency {
    background: #f1f5f9;
    border-radius: 999px;
    color: #334155;
    font-size: 0.73rem;
    font-weight: 750;
    padding: 0.35rem 0.65rem;
}

.contract-currency i {
    color: #d97706;
    margin-right: 0.35rem;
}

.pricing-block {
    margin-bottom: 1.1rem;
}

.pricing-block-heading {
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.pricing-block-heading h3 {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 750;
    margin: 0;
}

.pricing-block-heading p {
    color: #64748b;
    font-size: 0.72rem;
    margin: 0.12rem 0 0;
}

.pricing-block-heading > span {
    background: #f1f5f9;
    border-radius: 999px;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

.contract-price-table {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    overflow: hidden;
}

.contract-price-table thead {
    background: #f8fafc;
}

.contract-price-table th {
    border-bottom-color: #e2e8f0;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    padding: 0.55rem 0.7rem;
    text-transform: uppercase;
}

.contract-price-table td {
    border-color: #f1f5f9;
    font-size: 0.76rem;
    padding: 0.65rem 0.7rem;
}

.contract-price-table td > small,
.contract-price-name + small {
    color: #94a3b8;
    display: block;
    font-size: 0.65rem;
    margin-top: 0.12rem;
}

.contract-price-name {
    color: #0f172a;
    display: block;
    font-size: 0.8rem;
}

.contract-standard-price {
    color: #64748b;
    font-size: 0.72rem;
    white-space: nowrap;
}

.contract-standard-price.is-adjusted {
    text-decoration: line-through;
}

.contract-final-price {
    color: #0f172a;
    font-size: 0.9rem;
    white-space: nowrap;
}

.pricing-calculation {
    min-width: 230px;
}

.pricing-calculation-rule,
.pricing-adjustment {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pricing-calculation-rule > span:last-child,
.pricing-adjustment-amount {
    color: #64748b;
    font-size: 0.66rem;
}

.pricing-adjustment {
    margin-top: 0.3rem;
}

.pricing-method-badge,
.pricing-adjustment-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 750;
    line-height: 1;
    padding: 0.28rem 0.45rem;
    white-space: nowrap;
}

.pricing-method-badge.is-fixed {
    background: #e0f2fe;
    color: #0369a1;
}

.pricing-method-badge.is-relative {
    background: #ede9fe;
    color: #6d28d9;
}

.pricing-method-badge.is-combined {
    background: #fef3c7;
    color: #92400e;
}

.pricing-method-badge.is-standard {
    background: #f1f5f9;
    color: #475569;
}

.pricing-adjustment-badge.is-discount {
    background: #dcfce7;
    color: #15803d;
}

.pricing-adjustment-badge.is-surcharge {
    background: #fee2e2;
    color: #b91c1c;
}

.pricing-adjustment-badge.is-neutral {
    background: #f1f5f9;
    color: #64748b;
}

.subscription-price-grid {
    display: grid;
    gap: 0.7rem;
}

.subscription-price-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    overflow: hidden;
}

.subscription-price-card header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
}

.subscription-price-card header > span {
    flex-basis: 1.8rem;
    height: 1.8rem;
    font-size: 0.72rem;
}

.subscription-price-card h4 {
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 750;
    margin: 0;
}

.subscription-price-card header p {
    color: #64748b;
    font-size: 0.68rem;
    margin: 0.1rem 0 0;
}

.subscription-price-card .contract-price-table {
    border: 0;
    border-radius: 0;
}

.contract-empty-state {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0.65rem;
    color: #64748b;
    display: flex;
    font-size: 0.75rem;
    gap: 0.45rem;
    padding: 0.8rem;
}

.contract-document-scroll {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    color: #334155;
    font-size: 0.78rem;
    line-height: 1.55;
    max-height: 380px;
    overflow-y: auto;
    padding: 1rem 1.1rem;
}

.contract-document-scroll:focus-visible {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.2);
}

.contract-document-scroll h1,
.contract-document-scroll h2,
.contract-document-scroll h3,
.contract-document-scroll h4 {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 750;
}

.contract-document-scroll table {
    border-collapse: collapse;
    margin: 0.9rem 0;
    width: 100%;
}

.contract-document-scroll th,
.contract-document-scroll td {
    border: 1px solid #cbd5e1;
    padding: 0.5rem 0.6rem;
    text-align: left;
    vertical-align: top;
}

.contract-document-scroll th {
    background: #eef4fa;
    color: #0f172a;
    font-weight: 700;
}

.contract-document-scroll blockquote {
    border-left: 3px solid #94a3b8;
    color: #475569;
    margin: 0.8rem 0;
    padding: 0.15rem 0 0.15rem 0.8rem;
}

.contract-document-scroll hr {
    border: 0;
    border-top: 1px solid #cbd5e1;
    margin: 1rem 0;
}

.contract-document-hint {
    color: #94a3b8;
    font-size: 0.68rem;
    margin-top: 0.5rem;
}

.contract-document-hint i {
    margin-right: 0.3rem;
}

.contract-signature-card {
    border-color: #bfdbfe !important;
}

.contract-signature-layout {
    gap: 1.25rem;
    justify-content: space-between;
}

.contract-signature-form {
    align-items: flex-start;
    display: flex;
    flex: 0 1 560px;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    justify-content: flex-end;
}

.contract-signature-form .form-check {
    flex: 1 1 290px;
    font-size: 0.76rem;
    margin: 0;
    padding-top: 0.35rem;
}

.contract-signature-form .btn {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.changelog-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.changelog-release + .changelog-release {
    border-top: 1px solid var(--bs-border-color);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.changelog-release-meta {
    align-items: center;
    color: var(--bs-secondary-color);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.profile-dashboard {
    max-width: 1040px;
}

.profile-header .dashboard-header-mark {
    margin-left: 0;
}

.profile-status-badge {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
}

.profile-status-badge.is-active {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.profile-status-badge.is-pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.profile-nav {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    display: flex;
    gap: 0.3rem;
    padding: 0.3rem;
}

.profile-nav .nav-item {
    flex: 1 1 10rem;
}

.profile-nav .nav-link {
    align-items: center;
    border: 0 !important;
    border-radius: 0.45rem;
    color: #475569;
    display: flex;
    font-size: 0.84rem;
    font-weight: 600;
    gap: 0.45rem;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    width: 100%;
}

.profile-nav .nav-link:hover,
.profile-nav .nav-link:focus {
    background: #f1f5f9;
    color: #0f172a;
}

.profile-nav .nav-link.active {
    background: #0f172a;
    color: #ffffff;
}

.profile-dashboard .tab-content {
    padding-top: 0.9rem;
}

.profile-card {
    overflow: hidden;
}

.profile-card-header {
    background: #f8fafc;
    color: #0f172a;
}

.profile-card-title {
    align-items: center;
    display: flex;
    font-size: 1rem;
    font-weight: 700;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.profile-card-title.mb-0 {
    margin-bottom: 0;
}

.profile-card-title-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: 0.45rem;
    color: #2563eb;
    display: inline-flex;
    flex: 0 0 1.8rem;
    font-size: 0.75rem;
    height: 1.8rem;
    justify-content: center;
}

.profile-dashboard dl > dt,
.profile-dashboard dl > dd {
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0;
    padding-bottom: 0.55rem;
    padding-top: 0.55rem;
}

.profile-dashboard dl > dt:last-of-type,
.profile-dashboard dl > dd:last-of-type {
    border-bottom: 0;
}

.profile-activation-card {
    margin-top: 4vh;
}

.profile-activation-card .card-body {
    padding: 1.5rem;
}

.profile-activation-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: 0.75rem;
    color: #2563eb;
    display: inline-flex;
    font-size: 1.25rem;
    height: 3rem;
    justify-content: center;
    margin-bottom: 0.9rem;
    width: 3rem;
}

.compact-page {
    max-width: 1100px;
}

.compact-page-narrow {
    max-width: 780px;
}

.calculations-page {
    max-width: 100%;
}

.compact-page-header {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.05);
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.compact-page-icon {
    align-items: center;
    background: #eff6ff;
    border-radius: 0.55rem;
    color: #2563eb;
    display: flex;
    flex: 0 0 2.5rem;
    font-size: 1rem;
    height: 2.5rem;
    justify-content: center;
}

.compact-page-icon.is-admin {
    background: #fff7ed;
    color: #c2410c;
}

.compact-page-icon.is-success {
    background: #f0fdf4;
    color: #15803d;
}

.compact-page-heading {
    flex: 1 1 auto;
    min-width: 0;
}

.compact-page-heading h1 {
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0;
}

.compact-page-heading > p:last-child {
    color: #64748b;
    font-size: 0.82rem;
    margin: 0.2rem 0 0;
}

.compact-page-eyebrow {
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 0 0.15rem;
    text-transform: uppercase;
}

.compact-page-eyebrow.is-admin {
    color: #c2410c;
}

.compact-page-eyebrow.is-success {
    color: #15803d;
}

.compact-page-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.compact-form-card,
.compact-data-card {
    overflow: hidden;
}

.compact-form-card .card-body {
    padding: 1rem;
}

.compact-data-card .table-responsive {
    border-radius: 0;
}

.compact-data-card .table thead {
    background: #f8fafc;
}

.compact-data-card .table th {
    color: #475569;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.compact-note {
    align-items: flex-start;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 0.55rem;
    color: #1e40af;
    display: flex;
    font-size: 0.82rem;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
}

.subscription-guide {
    max-width: 920px;
}

.subscription-tool-summary {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f4f9ff 52%, #eaf4ff 100%);
    border: 1px solid #d7e9fb;
    border-radius: 0.75rem;
    display: flex;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
    padding: 0.9rem 1rem;
}

.subscription-tool-icon {
    align-items: center;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 0.65rem;
    color: #2563eb;
    display: flex;
    flex: 0 0 2.8rem;
    font-size: 1.1rem;
    height: 2.8rem;
    justify-content: center;
}

.subscription-tool-kicker {
    color: #2563eb;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    margin: 0 0 0.1rem;
    text-transform: uppercase;
}

.subscription-tool-summary h2 {
    font-size: 1.05rem;
    font-weight: 750;
    margin: 0;
}

.subscription-tool-summary div > p:last-child {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0.15rem 0 0;
}

.subscription-steps {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subscription-step {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    display: flex;
    gap: 0.55rem;
    padding: 0.7rem;
}

.subscription-step-number {
    align-items: center;
    background: #dbeafe;
    border-radius: 50%;
    color: #1d4ed8;
    display: flex;
    flex: 0 0 1.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    height: 1.6rem;
    justify-content: center;
}

.subscription-step h3 {
    font-size: 0.82rem;
    font-weight: 750;
    margin: 0 0 0.2rem;
}

.subscription-step p {
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.4;
    margin: 0;
}

.subscription-org-list {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    overflow: hidden;
}

.subscription-org-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
}

.subscription-org-row + .subscription-org-row {
    border-top: 1px solid #e2e8f0;
}

.subscription-org-row > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    min-width: 0;
}

.subscription-org-row small {
    color: #64748b;
    flex-basis: 100%;
}

.subscription-role {
    align-items: center;
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.65rem;
    font-weight: 700;
    gap: 0.3rem;
    padding: 0.2rem 0.45rem;
}

.subscription-role.is-admin {
    background: #fff7ed;
    color: #9a3412;
}

.subscription-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 575.98px) {
    .meta-access-row {
        grid-template-columns: 1fr;
    }

    .meta-access-row > * {
        grid-column: 1;
    }

    .meta-label-tags-row {
        grid-template-columns: 1fr;
    }

    .meta-tag-fields {
        grid-template-columns: 1fr;
    }

    .subscription-steps {
        grid-template-columns: 1fr;
    }

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

    body.backbone-shell .footer-bar {
        padding: 0.7rem 0.75rem !important;
    }

    body.backbone-shell .footer-bar .footer-inner {
        grid-template-columns: 1fr auto;
    }

    body.backbone-shell .footer-links {
        flex-direction: row;
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    body.backbone-shell .footer-bar .footer-links a {
        display: inline-flex;
        padding: 0.35rem 0.45rem;
        width: auto;
    }

    .nav-billing-summary {
        grid-template-columns: 1fr;
    }

    .nav-billing-modal .modal-body {
        padding: 0.75rem;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header-mark {
        display: none;
    }

    .profile-header > .d-flex {
        align-items: flex-start !important;
    }

    .profile-nav .nav-item {
        flex-basis: 100%;
    }

    .compact-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .compact-page-actions {
        justify-content: flex-start;
        padding-left: 3.3rem;
        width: 100%;
    }

    .billing-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .billing-tabs .nav-item,
    .billing-tabs .nav-link {
        width: 100%;
    }

    .billing-page-header .compact-page-actions {
        padding-left: 0;
    }

    .billing-setup-callout,
    .billing-form-footer,
    .billing-tab-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-setup-callout .btn {
        white-space: normal;
        width: 100%;
    }

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

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

    .billing-invoice-summary {
        grid-template-columns: 1fr;
    }

    .billing-invoice-summary > div {
        border-bottom: 1px solid #bfdbfe;
        border-right: 0;
        padding-bottom: 0.55rem;
        padding-right: 0;
    }

    .contract-sign-steps {
        grid-template-columns: 1fr;
    }

    .contract-sign-steps li:not(.is-active):not(.is-complete) {
        display: none;
    }

    .pricing-guide-grid {
        grid-template-columns: 1fr;
    }

    .contract-profile-list > div {
        gap: 0.15rem;
        grid-template-columns: 1fr;
    }

    .contract-profile-list dd {
        text-align: left;
    }

    .contract-signature-layout,
    .contract-signature-form {
        align-items: stretch;
        flex-direction: column;
    }

    .contract-signature-form {
        flex-basis: auto;
    }

    .contract-signature-form .form-check {
        flex-basis: auto;
    }

    .contract-signature-form .btn {
        white-space: normal;
        width: 100%;
    }

    .dashboard-tile {
        min-height: 132px;
        padding: 1rem;
    }
}
