:root {
    --primary: #07a4f0;
    --primary-dark: #0282fb;
    --accent: #0ab6ea;
    --bg: #040713;
    --bg-soft: #071024;
    --card: rgba(255, 255, 255, 0.075);
    --card-strong: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: #a8b4d0;
    --muted-strong: #d7def5;
    --border: rgba(255, 255, 255, 0.13);
    --border-blue: rgba(7, 164, 240, 0.34);
    --danger: #ff6b6b;
    --danger-bg: rgba(255, 80, 80, 0.1);
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    --blue-shadow: 0 24px 70px rgba(2, 130, 251, 0.26);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark), var(--accent));
}

* {
    box-sizing: border-box;
}

html {
    min-width: 0;
}

body {
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(7, 164, 240, 0.2), transparent 34%),
        radial-gradient(circle at top right, rgba(2, 130, 251, 0.18), transparent 34%),
        radial-gradient(circle at bottom, rgba(10, 182, 234, 0.12), transparent 30%),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 82px 82px;
    opacity: 0.24;
    mask-image: linear-gradient(to bottom, black 18%, transparent 96%);
}

body::after {
    content: "";
    position: fixed;
    inset: auto 8% 8% auto;
    z-index: -1;
    width: 430px;
    height: 430px;
    max-width: 65vw;
    border-radius: 50%;
    background: rgba(2, 130, 251, 0.24);
    filter: blur(90px);
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

button,
select,
input {
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    padding: 10px 14px;
    color: var(--text);
    border: 1px solid var(--border-blue);
    border-radius: 999px;
    background: rgba(4, 7, 19, 0.96);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.loading-screen {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
}

.loading-screen h1 {
    margin: 0;
    font-size: clamp(2.2rem, 8vw, 4rem);
    line-height: 1;
}

.loading-screen p,
.state-panel p,
.summary-card p,
.action-card p,
.hero-copy p {
    margin: 0;
    color: var(--muted);
}

.loading-mark {
    width: 58px;
    height: 58px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 32px rgba(7, 164, 240, 0.34);
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.app-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 7, 19, 0.72);
    backdrop-filter: blur(18px);
    transition: 0.25s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.brand-logo {
    width: 80%;
    height: 80%;
    object-fit: contain;
    display: block;
}

.brand-text,
.brand-text span,
.brand-text strong {
    display: block;
    min-width: 0;
}

.brand-text strong {
    overflow: hidden;
    font-size: 18px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-text span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.field-label,
.eyebrow,
.summary-card span {
    display: block;
    color: var(--muted-strong);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.header-organization {
    min-width: 0;
}

.selected-organization {
    min-width: 0;
}

.organization-name,
.organization-meta,
.account-name,
.account-email {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-name,
.account-name {
    color: #ffffff;
    font-weight: 850;
}

.organization-meta,
.account-email {
    color: var(--muted);
    font-size: 0.86rem;
}

.organization-selector {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.065);
    outline: none;
}

.organization-selector option {
    color: #ffffff;
    background: var(--bg-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-menu {
    position: relative;
    justify-self: end;
    min-width: 0;
}

.profile-trigger {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 260px;
    padding: 4px 11px 4px 5px;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
    transition: 0.25s ease;
}

.profile-trigger:hover,
.profile-trigger[aria-expanded="true"] {
    background: rgba(7, 164, 240, 0.1);
    border-color: var(--border-blue);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #ffffff;
    background: var(--gradient);
    box-shadow: 0 12px 34px rgba(2, 130, 251, 0.28);
    font-size: 12px;
    font-weight: 950;
}

.avatar-large {
    width: 44px;
    height: 44px;
}

.profile-avatar-icon {
    width: 16px;
    height: 16px;
    position: relative;
    display: block;
}

.profile-avatar-icon::before,
.profile-avatar-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
}

.profile-avatar-icon::before {
    top: 1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.profile-avatar-icon::after {
    bottom: 1px;
    width: 14px;
    height: 7px;
    border-radius: 999px 999px 4px 4px;
}

.profile-label {
    max-width: 120px;
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-badge,
.status-pill,
.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border: 1px solid rgba(7, 164, 240, 0.28);
    border-radius: 999px;
    color: var(--primary);
    background: rgba(7, 164, 240, 0.1);
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.profile-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(300px, calc(100vw - 32px));
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(4, 7, 19, 0.98);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.profile-summary {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 6px;
}

.profile-summary strong,
.profile-summary span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-summary strong {
    font-size: 14px;
}

.profile-summary span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.profile-role-badge {
    width: fit-content;
    margin-top: 9px !important;
    padding: 5px 9px;
    border: 1px solid rgba(7, 164, 240, 0.28);
    border-radius: 999px;
    color: var(--primary) !important;
    background: rgba(7, 164, 240, 0.1);
    font-size: 11px !important;
    font-weight: 900;
}

.profile-dropdown a,
.profile-dropdown button {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    color: var(--muted-strong);
    border: 0;
    border-radius: 12px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: 0.2s ease;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.account-menu-loading,
.account-menu-error {
    min-width: 190px;
    padding: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.account-menu-error {
    color: #ffd0d0;
    border: 1px solid rgba(255, 110, 110, 0.26);
    border-radius: 12px;
    background: rgba(255, 80, 80, 0.09);
    margin-bottom: 8px;
}

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 21px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
    transition: 0.25s ease;
}

.button-primary {
    color: #ffffff;
    background: var(--gradient);
    box-shadow: var(--blue-shadow);
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 80px rgba(2, 130, 251, 0.38);
}

.button-secondary {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.055);
}

.button-secondary:hover {
    border-color: var(--border-blue);
    background: rgba(7, 164, 240, 0.1);
    transform: translateY(-2px);
}

.button-danger {
    color: #ffd6d6;
    border-color: rgba(255, 107, 107, 0.28);
    background: rgba(255, 80, 80, 0.09);
}

.button-danger:hover {
    border-color: rgba(255, 107, 107, 0.48);
    background: rgba(255, 80, 80, 0.14);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

.page-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 58px;
}

.alert-region {
    margin-bottom: 16px;
}

.alert {
    padding: 14px 16px;
    color: #ffd0d0;
    border: 1px solid rgba(255, 110, 110, 0.26);
    border-radius: var(--radius-md);
    background: rgba(255, 80, 80, 0.09);
    font-weight: 800;
}

.dashboard-section,
.state-panel {
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)), rgba(7, 16, 36, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.dashboard-section {
    padding: 30px;
}

.hero-overview {
    position: relative;
    overflow: hidden;
    padding: 38px;
}

.hero-overview::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 12%, rgba(7, 164, 240, 0.24), transparent 34%),
        radial-gradient(circle at 10% 92%, rgba(10, 182, 234, 0.14), transparent 30%);
    pointer-events: none;
}

.hero-overview > * {
    position: relative;
    z-index: 1;
}

.hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: start;
    margin-bottom: 28px;
}

.organization-control {
    max-width: 520px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.hero-copy h1 {
    margin: 0;
    max-width: 880px;
    font-size: clamp(2.3rem, 6vw, 4.7rem);
    line-height: 0.98;
}

.hero-copy p {
    max-width: 720px;
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.75;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading h2,
.state-panel h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    line-height: 1.08;
}

.eyebrow {
    width: fit-content;
    margin: 0 0 14px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted-strong);
    border: 1px solid rgba(7, 164, 240, 0.28);
    border-radius: 999px;
    background: rgba(7, 164, 240, 0.075);
    letter-spacing: 0.08em;
}

.overview-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.overview-list div {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
}

.overview-list dt {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.overview-list dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}

.summary-grid,
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.summary-card,
.action-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    transition: 0.25s ease;
}

.summary-card:hover,
.action-card:hover {
    transform: translateY(-4px);
    border-color: rgba(7, 164, 240, 0.38);
    box-shadow: 0 24px 60px rgba(2, 130, 251, 0.16);
}

.metric-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 15px;
    color: #ffffff;
    background: var(--gradient);
    box-shadow: 0 16px 40px rgba(2, 130, 251, 0.22);
    font-weight: 950;
}

.summary-card strong {
    display: block;
    margin: 7px 0 5px;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    line-height: 1.05;
}

.action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    opacity: 0.82;
}

.action-card h3 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 1.04rem;
}

.action-card button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(7, 164, 240, 0.26);
    border-radius: 999px;
    background: rgba(7, 164, 240, 0.08);
    color: var(--muted-strong);
    font-weight: 900;
}

.state-panel {
    max-width: 780px;
    margin: 34px auto;
    padding: 34px;
    text-align: left;
}

.state-panel h1 {
    margin: 0 0 12px;
}

.state-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 24px;
}

.skeleton-card {
    min-height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0%, rgba(7, 164, 240, 0.12) 50%, rgba(255, 255, 255, 0.055) 100%);
    background-size: 220% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
    to {
        background-position: -220% 0;
    }
}

@media (max-width: 1120px) {
    .summary-grid,
    .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .site-header {
        position: sticky;
        gap: 12px;
        height: 68px;
        padding: 10px 16px;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .brand-text strong {
        font-size: 15px;
    }

    .brand-text span,
    .profile-trigger .role-badge {
        display: none;
    }

    .profile-trigger {
        max-width: 160px;
    }

    .profile-dropdown {
        right: -2px;
    }

    .page-main {
        width: min(100% - 24px, 1180px);
        padding-top: 20px;
    }

    .dashboard-section,
    .hero-overview,
    .state-panel {
        padding: 22px;
        border-radius: 28px;
    }

    .hero-copy,
    .section-heading {
        display: grid;
    }

    .hero-copy h1 {
        font-size: clamp(2.25rem, 12vw, 3.4rem);
    }

    .overview-list,
    .summary-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }

    .action-card {
        align-items: stretch;
        flex-direction: column;
    }

    .action-card button,
    .state-actions,
    .state-actions .button {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .brand-text strong {
        max-width: 148px;
    }

    .profile-label {
        max-width: 76px;
    }

    .profile-dropdown {
        width: calc(100vw - 24px);
    }
}

@media (max-width: 360px) {
    .brand-text {
        display: none;
    }
}

/* =========================================================
   PROJECT ADMINS PAGE
   ========================================================= */

.manage-page {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 60px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding: 28px 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient( 145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035) ), rgba(7, 16, 36, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

    .page-heading h1 {
        margin: 12px 0 8px;
        font-size: 32px;
        line-height: 1.2;
        color: var(--text);
    }

    .page-heading p {
        margin: 0;
        color: var(--muted);
        line-height: 1.6;
    }

.back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

    .back-link:hover {
        color: var(--accent);
        text-decoration: underline;
    }

    .back-link:hover {
        text-decoration: underline;
    }

.content-card {
    background: #ffffff;
    border: 1px solid #e4e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(25, 42, 70, 0.06);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #e8ebf1;
}

    .card-header h2 {
        margin: 0 0 5px;
        font-size: 20px;
        color: #172033;
    }

    .card-header p {
        margin: 0;
        color: #6b7589;
        font-size: 14px;
    }

.card-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.card-filter-input,
.card-filter-select {
    min-height: 40px;
    border: 1px solid #ccd3df;
    border-radius: 8px;
    background: #ffffff;
    color: #293449;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.card-filter-input {
    width: min(260px, 100%);
    padding: 9px 12px;
}

.card-filter-select {
    padding: 9px 34px 9px 12px;
}

.card-filter-input:focus,
.card-filter-select:focus {
    border-color: #0282fb;
    box-shadow: 0 0 0 3px rgba(2, 130, 251, 0.12);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.primary-button {
    min-height: 42px;
    padding: 10px 18px;
    background: #0282fb;
    color: #ffffff;
}

    .primary-button:hover {
        background: #006fd8;
    }

    .primary-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.secondary-button {
    min-height: 42px;
    padding: 10px 18px;
    background: #eef2f7;
    color: #293449;
}

    .secondary-button:hover {
        background: #e2e8f0;
    }

.danger-button {
    min-height: 36px;
    padding: 8px 14px;
    background: #fff0f0;
    color: #c63737;
    border: 1px solid #f2caca;
}

    .danger-button:hover {
        background: #ffe3e3;
    }

    .danger-button:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.icon-button {
    width: 38px;
    height: 38px;
    background: transparent;
    color: #667085;
    font-size: 28px;
    line-height: 1;
}

    .icon-button:hover {
        background: #f1f4f8;
    }

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.manage-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

    .manage-table th,
    .manage-table td {
        padding: 16px 20px;
        text-align: left;
        vertical-align: middle;
        border-bottom: 1px solid #edf0f5;
        white-space: nowrap;
    }

    .manage-table th {
        background: #f8fafc;
        color: #566176;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .manage-table td {
        color: #2f394c;
        font-size: 14px;
    }

    .manage-table tbody tr:hover {
        background: #fafcff;
    }

    .manage-table tbody tr:last-child td {
        border-bottom: 0;
    }

.name-cell {
    font-weight: 700;
    color: #172033 !important;
}

.actions-column {
    text-align: right !important;
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.row-actions .secondary-button,
.row-actions .danger-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    white-space: nowrap;
}

.table-list {
    display: inline-block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

    .status-badge.active {
        background: #e9f8ef;
        color: #198754;
    }

    .status-badge.inactive {
        background: #f1f2f4;
        color: #727b8c;
    }

    .status-badge.unpublished {
        background: #fff7e6;
        color: #b76b00;
    }

    .status-badge.archived {
        background: #f1f2f4;
        color: #526071;
    }

.empty-state {
    padding: 50px 24px;
    text-align: center;
    color: #6b7589;
}

.page-message {
    margin: 18px 24px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
}

    .page-message.error {
        background: #fff0f0;
        color: #b42318;
        border: 1px solid #f5c2c0;
    }

    .page-message.success {
        background: #eaf8ef;
        color: #18794e;
        border: 1px solid #bde5cc;
    }

/* Modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 20, 35, 0.55);
}

    .modal-overlay[hidden] {
        display: none !important;
    }

.modal-card {
    width: min(500px, 100%);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid #e8ebf1;
}

    .modal-header h2 {
        margin: 0 0 6px;
        color: #172033;
        font-size: 21px;
    }

    .modal-header p {
        margin: 0;
        color: #697386;
        font-size: 14px;
        line-height: 1.5;
    }

.modal-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
}

.modal-card label {
    color: #293449;
    font-size: 14px;
    font-weight: 700;
}

.modal-card input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ccd3df;
    border-radius: 8px;
    outline: none;
    font: inherit;
}

    .modal-card input:focus {
        border-color: #0282fb;
        box-shadow: 0 0 0 3px rgba(2, 130, 251, 0.12);
    }

.modal-card .page-message {
    margin: 8px 0 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .manage-page {
        width: min(100% - 24px, 1180px);
        padding-top: 24px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

        .page-heading .primary-button {
            width: 100%;
        }

        .page-heading h1 {
            font-size: 27px;
        }

    .card-header {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .card-tools,
    .card-filter-input,
    .card-filter-select {
        width: 100%;
    }

    .card-tools {
        justify-content: stretch;
    }

    .manage-table th,
    .manage-table td {
        padding: 14px 16px;
    }

    .row-actions {
        align-items: flex-end;
        flex-direction: column;
    }

    .table-list {
        max-width: 220px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

        .modal-actions button {
            width: 100%;
        }
}

.action-card-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

    .action-card-link:hover {
        border-color: #0282fb;
        box-shadow: 0 8px 24px rgba(2, 130, 251, 0.12);
        transform: translateY(-2px);
    }

.action-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 8px;
    background: #0282fb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}
button.action-card-link {
    width: 100%;
    border: 1px solid #e4e8f0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    pointer-events: auto !important;
}

    button.action-card-link * {
        pointer-events: none;
    }

/* Checkout entry */
.checkout-entry { padding: 38px; }
.checkout-hero-copy { margin-bottom: 24px; }
.checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.checkout-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
}
.checkout-plan-card { border-color: rgba(7, 164, 240, 0.3); }
.checkout-label {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.checkout-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.05;
}
.checkout-card p,
.checkout-disclaimer,
.checkout-message {
    color: var(--muted);
    line-height: 1.7;
}
.checkout-detail-list {
    display: grid;
    gap: 12px;
    margin: 22px 0 0;
}
.checkout-detail-list div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
}
.checkout-detail-list dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}
.checkout-detail-list dd {
    margin: 4px 0 0;
    color: #ffffff;
    font-weight: 900;
}
.checkout-feature-list {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}
.checkout-feature-list li {
    padding-top: 10px;
    color: var(--muted-strong);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.checkout-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}
.checkout-disclaimer {
    margin: 18px 0 0;
    font-size: 0.92rem;
}
.checkout-message {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(7, 164, 240, 0.28);
    border-radius: var(--radius-md);
    background: rgba(7, 164, 240, 0.08);
}
@media (max-width: 780px) {
    .checkout-entry { padding: 24px; }
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-actions { flex-direction: column; }
    .checkout-actions .button { width: 100%; }
}

/* Complete checkout */
.checkout-page {
    display: grid;
    gap: 24px;
}

.checkout-status-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)), rgba(7, 16, 36, 0.72);
    box-shadow: var(--shadow);
}

.checkout-status-header h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.02;
}

.checkout-status-header p,
.checkout-section p,
.checkout-muted {
    margin: 0;
    color: var(--muted);
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 22px;
    align-items: start;
}

.checkout-form {
    display: grid;
    gap: 18px;
}

.checkout-section,
.order-summary-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.checkout-section-heading {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.checkout-section-heading h2 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 1.2rem;
}

.checkout-step {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border-blue);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(7, 164, 240, 0.18);
    font-weight: 950;
}

.checkout-fields {
    display: grid;
    gap: 14px;
}

.checkout-fields.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-field.wide {
    grid-column: 1 / -1;
}

.checkout-field label,
.addon-controls label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted-strong);
    font-size: 0.86rem;
    font-weight: 850;
}

.checkout-field input,
.addon-controls input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(4, 7, 19, 0.56);
    outline: none;
}

.checkout-field input:focus,
.addon-controls input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 164, 240, 0.16);
}

.checkout-field input[readonly] {
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.045);
}

.field-error {
    min-height: 18px;
    margin-top: 5px;
    color: #ffb5b5;
    font-size: 0.78rem;
    font-weight: 750;
}

.cycle-selector,
.checkout-check-row,
.terms-list,
.mock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cycle-option,
.checkout-checkbox {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--muted-strong);
    font-weight: 800;
}

.checkout-checkbox {
    width: 100%;
    align-items: flex-start;
}

.checkout-checkbox a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cycle-option:has(input:checked) {
    border-color: var(--border-blue);
    background: rgba(7, 164, 240, 0.13);
}

.checkout-inline-info,
.summary-warning,
.checkout-notice {
    margin-bottom: 16px;
    padding: 13px 14px;
    border: 1px solid rgba(7, 164, 240, 0.28);
    border-radius: 14px;
    color: var(--muted-strong);
    background: rgba(7, 164, 240, 0.08);
}

.checkout-notice {
    margin-bottom: 0;
}

.checkout-notice.error {
    color: #ffd0d0;
    border-color: rgba(255, 110, 110, 0.28);
    background: rgba(255, 80, 80, 0.1);
}

.checkout-notice.warning {
    color: #ffe2a8;
    border-color: rgba(255, 204, 102, 0.3);
    background: rgba(255, 184, 77, 0.1);
}

.is-hidden {
    display: none;
}

.addon-list {
    display: grid;
    gap: 12px;
}

.addon-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.addon-row h3 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 1rem;
}

.addon-row span {
    display: block;
    margin-top: 8px;
    color: var(--muted-strong);
    font-size: 0.84rem;
    font-weight: 800;
}

.addon-controls {
    display: grid;
    gap: 7px;
}

.addon-controls strong {
    color: #ffffff;
    text-align: right;
}

.checkout-summary-panel {
    position: sticky;
    top: 98px;
}

.order-summary-card {
    border-color: rgba(7, 164, 240, 0.24);
    background: linear-gradient(145deg, rgba(7, 164, 240, 0.12), rgba(255, 255, 255, 0.055)), rgba(7, 16, 36, 0.84);
}

.summary-topline span,
.summary-topline strong {
    display: block;
}

.summary-topline span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.summary-topline strong {
    margin-top: 5px;
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1.08;
}

.order-details,
.price-lines,
.checkout-result-list {
    display: grid;
    gap: 11px;
    margin: 22px 0 0;
}

.order-details div,
.price-lines div,
.checkout-result-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.order-details dt,
.price-lines dt,
.checkout-result-list dt {
    color: var(--muted);
    font-weight: 800;
}

.order-details dd,
.price-lines dd,
.checkout-result-list dd {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    text-align: right;
}

.price-total {
    align-items: center;
    border-bottom: 0 !important;
}

.price-total dt {
    color: #ffffff;
    font-size: 1.05rem;
}

.price-total dd {
    color: #ffffff;
    font-size: 1.7rem;
}

.mock-payment-section {
    border-color: rgba(255, 255, 255, 0.18);
}

.success-panel {
    max-width: 840px;
}

@media (max-width: 980px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .checkout-status-header,
    .checkout-fields.two,
    .addon-row {
        grid-template-columns: 1fr;
    }

    .checkout-status-header,
    .checkout-section,
    .order-summary-card {
        padding: 20px;
        border-radius: 20px;
    }

    .mock-actions .button {
        width: 100%;
    }

    .addon-controls strong,
    .order-details dd,
    .price-lines dd,
    .checkout-result-list dd {
        text-align: left;
    }

    .order-details div,
    .price-lines div,
    .checkout-result-list div {
        display: grid;
        gap: 4px;
    }
}

/* Subscription overview */
.subscription-page {
    display: grid;
    gap: 22px;
}

.subscription-hero,
.subscription-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)), rgba(7, 16, 36, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.subscription-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 30px;
}

.subscription-hero h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.02;
}

.subscription-hero p,
.subscription-card p,
.subscription-action-note {
    margin: 0;
    color: var(--muted);
}

.subscription-status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 950;
    white-space: nowrap;
}

.subscription-status.active { color: #9ff5c8; background: rgba(60, 200, 130, 0.14); border-color: rgba(60, 200, 130, 0.3); }
.subscription-status.warning { color: #ffe2a8; background: rgba(255, 184, 77, 0.12); border-color: rgba(255, 184, 77, 0.32); }
.subscription-status.danger { color: #ffc1c1; background: rgba(255, 80, 80, 0.12); border-color: rgba(255, 110, 110, 0.32); }
.subscription-status.canceled { color: #d8def4; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); }
.subscription-status.pending,
.subscription-status.neutral { color: var(--muted-strong); background: rgba(7, 164, 240, 0.08); border-color: var(--border-blue); }

.subscription-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 20px;
    align-items: start;
}

.subscription-layout-single {
    grid-template-columns: minmax(0, 1fr);
}

.subscription-main {
    display: grid;
    gap: 18px;
}

.subscription-card {
    padding: 24px;
}

.subscription-summary-card {
    display: grid;
    gap: 18px;
}

.subscription-summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.subscription-summary-top h2 {
    margin-bottom: 6px;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.subscription-card h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.25rem;
}

.section-heading.compact {
    margin-bottom: 16px;
}

.subscription-facts,
.plan-summary-grid,
.usage-grid {
    display: grid;
    gap: 12px;
}

.subscription-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.subscription-key-row div {
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.subscription-facts div,
.capacity-card,
.usage-card,
.active-addon-card,
.subscription-empty-inline {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
}

.subscription-facts dt,
.active-addon-card dt,
.capacity-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.subscription-facts dd,
.active-addon-card dd {
    margin: 5px 0 0;
    color: #ffffff;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.plan-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subscription-plan-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.capacity-card strong {
    display: block;
    margin: 6px 0 4px;
    color: #ffffff;
    font-size: 1.45rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.subscription-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.subscription-feature-list li {
    padding: 10px 0 0;
    color: var(--muted-strong);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.usage-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.usage-card > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.usage-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.usage-card strong {
    display: block;
    margin: 12px 0;
    color: #ffffff;
    font-size: 1.15rem;
}

.usage-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.usage-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient);
}

.usage-card.warning .usage-bar span { background: #ffbd5b; }
.usage-card.critical .usage-bar span,
.usage-card.reached .usage-bar span { background: #ff6b6b; }

.active-addon-list {
    display: grid;
    gap: 12px;
}

.active-addon-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
}

.active-addon-card h3,
.subscription-empty-inline h3 {
    margin: 0 0 6px;
    color: #ffffff;
}

.active-addon-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted-strong);
    font-size: 0.84rem;
    font-weight: 800;
}

.active-addon-card dl {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    justify-content: flex-end;
}

.active-addon-card dl div {
    min-width: 110px;
}

.subscription-actions {
    display: grid;
    gap: 10px;
}

.subscription-actions .button {
    width: 100%;
}

.subscription-banner {
    margin-bottom: 14px;
    padding: 12px 13px;
    border-radius: 14px;
    color: var(--muted-strong);
    background: rgba(7, 164, 240, 0.08);
    border: 1px solid var(--border-blue);
}

.subscription-banner.warning {
    color: #ffe2a8;
    background: rgba(255, 184, 77, 0.1);
    border-color: rgba(255, 184, 77, 0.28);
}

.subscription-banner.danger {
    color: #ffd0d0;
    background: rgba(255, 80, 80, 0.1);
    border-color: rgba(255, 110, 110, 0.28);
}

.subscription-modal-body {
    display: grid;
    gap: 14px;
    padding: 22px 24px;
}

.modal-field {
    display: grid;
    gap: 7px;
    color: #293449;
    font-weight: 800;
}

.modal-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd3df;
    border-radius: 8px;
    font: inherit;
}

@media (max-width: 1020px) {
    .subscription-layout {
        grid-template-columns: 1fr;
    }

    .subscription-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .subscription-hero,
    .subscription-facts,
    .plan-summary-grid,
    .usage-grid,
    .subscription-feature-list,
    .active-addon-card {
        grid-template-columns: 1fr;
    }

    .subscription-hero,
    .subscription-card {
        padding: 20px;
        border-radius: 22px;
    }

    .active-addon-card dl div {
        display: grid;
        gap: 3px;
    }
}

/* Usage dashboard */
.usage-dashboard-page {
    display: grid;
    gap: 22px;
}

.usage-hero,
.usage-metric-card,
.usage-detail-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)), rgba(7, 16, 36, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.usage-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 30px;
}

.usage-hero h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.02;
}

.usage-hero p,
.usage-metric-card p,
.usage-detail-card p,
.mock-usage-panel p {
    margin: 0;
    color: var(--muted);
}

.usage-hero-actions {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.usage-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.usage-metric-card {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.usage-card-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.usage-card-topline h2,
.usage-detail-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.usage-metric-card strong {
    display: block;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.usage-progress {
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.usage-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient);
}

.usage-metric-card.warning .usage-progress span { background: #ffbd5b; }
.usage-metric-card.critical .usage-progress span,
.usage-metric-card.reached .usage-progress span { background: #ff6b6b; }

.usage-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted-strong);
    font-size: 0.82rem;
    font-weight: 850;
}

.usage-warning-text {
    min-height: 42px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 184, 77, 0.28);
    border-radius: 14px;
    color: #ffe2a8 !important;
    background: rgba(255, 184, 77, 0.1);
    font-weight: 750;
}

.usage-metric-card.critical .usage-warning-text,
.usage-metric-card.reached .usage-warning-text {
    color: #ffd0d0 !important;
    border-color: rgba(255, 110, 110, 0.28);
    background: rgba(255, 80, 80, 0.1);
}

.usage-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

.usage-status.normal { color: #9ff5c8; background: rgba(60, 200, 130, 0.14); border-color: rgba(60, 200, 130, 0.3); }
.usage-status.warning { color: #ffe2a8; background: rgba(255, 184, 77, 0.12); border-color: rgba(255, 184, 77, 0.32); }
.usage-status.critical,
.usage-status.reached { color: #ffc1c1; background: rgba(255, 80, 80, 0.12); border-color: rgba(255, 110, 110, 0.32); }

.usage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 20px;
    align-items: start;
}

.usage-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.usage-detail-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    box-shadow: none;
}

.usage-detail-card > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.usage-detail-list {
    display: grid;
    gap: 9px;
    margin: 0;
}

.usage-detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.usage-detail-list dt {
    color: var(--muted);
    font-weight: 800;
}

.usage-detail-list dd {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    text-align: right;
}

.usage-impact-list {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.usage-impact-list strong {
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.usage-impact-list ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted-strong);
}

.usage-side-panel {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 18px;
}

.mock-usage-panel {
    display: grid;
    gap: 14px;
}

.mock-usage-controls {
    display: grid;
    gap: 10px;
}

.mock-usage-controls .button {
    width: 100%;
}

@media (max-width: 1120px) {
    .usage-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1020px) {
    .usage-layout {
        grid-template-columns: 1fr;
    }

    .usage-side-panel {
        position: static;
    }
}

@media (max-width: 680px) {
    .usage-hero,
    .usage-metric-grid,
    .usage-detail-grid {
        grid-template-columns: 1fr;
    }

    .usage-hero,
    .usage-metric-card,
    .usage-detail-card {
        padding: 20px;
        border-radius: 22px;
    }

    .usage-hero-actions,
    .usage-hero-actions .button {
        width: 100%;
        justify-items: stretch;
    }

    .usage-card-meta,
    .usage-detail-list div {
        display: grid;
        gap: 4px;
    }

    .usage-detail-list dd {
        text-align: left;
    }
}

/* Capacity upgrades */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.capacity-page {
    display: grid;
    gap: 22px;
}

.capacity-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    gap: 22px;
    align-items: start;
}

.capacity-purchase-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.capacity-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.capacity-summary-panel {
    position: sticky;
    top: 98px;
    min-width: 0;
}

.capacity-pending-panel {
    display: grid;
    gap: 16px;
}

.capacity-addon-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.capacity-addon-card {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
    gap: 16px;
    align-items: stretch;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.capacity-addon-card.is-selected {
    border-color: rgba(7, 164, 240, 0.45);
    background: rgba(7, 164, 240, 0.09);
}

.capacity-addon-card.is-decrease-selected {
    border-color: rgba(245, 158, 11, 0.46);
    background: rgba(245, 158, 11, 0.09);
}

.capacity-renewal-notice,
.capacity-empty-note,
.capacity-period-note {
    margin: 0;
    color: var(--muted);
}

.capacity-renewal-notice {
    padding: 14px 16px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.09);
    color: #f8fafc;
    font-weight: 750;
}

.capacity-empty-note {
    padding: 14px 0 0;
    font-weight: 800;
}

.capacity-period-note {
    align-self: end;
    font-size: 0.9rem;
    font-weight: 800;
}

.capacity-pending-grid {
    display: grid;
    gap: 8px;
    margin: 0;
}

.capacity-pending-grid div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.capacity-pending-grid dt {
    color: var(--muted);
    font-weight: 800;
}

.capacity-pending-grid dd {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    text-align: right;
}

.capacity-preview-block {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.capacity-preview-block h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.capacity-preview-block.is-success {
    border-color: rgba(34, 197, 94, 0.34);
    background: rgba(34, 197, 94, 0.08);
}

.capacity-preview-block.is-blocked {
    border-color: rgba(245, 158, 11, 0.36);
    background: rgba(245, 158, 11, 0.08);
}

.capacity-preview-success,
.capacity-rules-list,
.capacity-blocking-list {
    margin: 0;
    color: var(--muted-strong);
}

.capacity-rules-list,
.capacity-blocking-list {
    display: grid;
    gap: 7px;
    padding-left: 18px;
}

.capacity-pending-actions {
    justify-content: flex-start;
}

.capacity-confirm-modal {
    max-width: 620px;
}

.capacity-addon-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.capacity-addon-topline h3,
.capacity-empty-cart h3,
.capacity-mock-section h2 {
    margin: 0 0 6px;
    color: #ffffff;
}

.capacity-addon-topline p,
.capacity-empty-cart p {
    margin: 0;
    color: var(--muted);
}

.capacity-addon-facts,
.capacity-addon-preview {
    display: grid;
    gap: 7px;
    margin: 0;
    align-self: end;
}

.capacity-addon-facts div,
.capacity-addon-preview div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.capacity-addon-facts dt,
.capacity-addon-preview dt {
    color: var(--muted);
    font-weight: 800;
}

.capacity-addon-facts dd,
.capacity-addon-preview dd {
    margin: 0;
    color: #ffffff;
    font-weight: 900;
    text-align: right;
}

.capacity-mode-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.capacity-mode-button {
    min-height: 40px;
    padding: 8px 10px;
}

.capacity-mode-button.is-active {
    border-color: var(--border-blue);
    background: rgba(7, 164, 240, 0.16);
    color: #ffffff;
}

.capacity-mode-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.quantity-control {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.quantity-button,
.quantity-control input {
    width: 100%;
    min-height: 42px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(4, 7, 19, 0.56);
}

.quantity-button {
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 950;
}

.quantity-button:hover {
    border-color: var(--border-blue);
    background: rgba(7, 164, 240, 0.1);
}

.quantity-control input {
    padding: 8px 10px;
    text-align: center;
    outline: none;
}

.quantity-control input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 164, 240, 0.16);
}

.capacity-order-card {
    display: grid;
    gap: 16px;
}

.capacity-meter-value {
    display: block;
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 1rem;
}

.capacity-empty-cart {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
}

.capacity-mock-section {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.capacity-mock-section .mock-actions {
    display: grid;
}

.capacity-mock-section .button {
    width: 100%;
}

@media (max-width: 1020px) {
    .capacity-layout {
        grid-template-columns: 1fr;
    }

    .capacity-summary-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .capacity-addon-grid {
        grid-template-columns: 1fr;
    }

    .capacity-addon-topline,
    .capacity-mode-actions,
    .capacity-addon-facts div,
    .capacity-addon-preview div {
        display: grid;
        gap: 4px;
    }

    .capacity-addon-facts dd,
    .capacity-addon-preview dd,
    .capacity-pending-grid dd {
        text-align: left;
    }

    .capacity-pending-grid div {
        display: grid;
        gap: 4px;
    }

    .capacity-pending-actions {
        display: grid;
    }
}

/* Billing and payments */
.billing-page {
    display: grid;
    gap: 22px;
}

.billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.billing-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(140px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.billing-filters label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--muted-strong);
    font-size: 0.82rem;
    font-weight: 850;
}

.billing-filters input,
.billing-filters select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(4, 7, 19, 0.56);
    outline: none;
}

.billing-filters input:focus,
.billing-filters select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 164, 240, 0.16);
}

.billing-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.billing-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
}

.billing-table th,
.billing-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--muted-strong);
    font-size: 0.86rem;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.billing-table th {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
}

.billing-table tbody tr:hover {
    background: rgba(7, 164, 240, 0.07);
}

.billing-link-button {
    padding: 0;
    color: var(--primary);
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.billing-link-button:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.billing-card-list {
    display: none;
}

.billing-mobile-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.billing-mobile-card > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.billing-mobile-card h3,
.billing-timeline h3 {
    margin: 0;
    color: #ffffff;
}

.billing-details-modal {
    display: flex;
    flex-direction: column;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    background: rgba(4, 7, 19, 0.98);
    border: 1px solid var(--border);
    overflow: hidden;
}

@supports (height: 100dvh) {
    .billing-details-modal {
        max-height: calc(100dvh - 24px);
    }
}

.billing-details-modal .modal-header {
    flex: 0 0 auto;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.billing-details-modal .modal-header h2 {
    color: #ffffff;
}

.billing-details-modal .modal-header p {
    color: var(--muted);
}

.billing-details-body {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    gap: 18px;
    padding: 22px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.billing-modal-footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(4, 7, 19, 0.98);
}

.billing-timeline {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.billing-timeline ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.billing-timeline li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted-strong);
}

.billing-timeline span {
    color: var(--muted);
    text-align: right;
}

@media (max-width: 1120px) {
    .billing-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .billing-summary-grid,
    .billing-filters {
        grid-template-columns: 1fr;
    }

    .billing-table-wrap {
        display: none;
    }

    .billing-card-list {
        display: grid;
        gap: 12px;
    }

    .billing-details-modal {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }

    @supports (height: 100dvh) {
        .billing-details-modal {
            max-height: calc(100dvh - 20px);
        }
    }

    .billing-details-body,
    .billing-details-modal .modal-header {
        padding: 18px;
    }

    .billing-modal-footer {
        flex-wrap: wrap;
        justify-content: stretch;
        padding: 14px 18px 18px;
    }

    .billing-modal-footer .button {
        flex: 1 1 180px;
    }

    .billing-timeline li {
        display: grid;
        gap: 3px;
    }

    .billing-timeline span {
        text-align: left;
    }
}

/* Invoices and receipts */
.documents-page {
    display: grid;
    gap: 22px;
}

.documents-table {
    min-width: 1040px;
}

.documents-table th,
.documents-table td {
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 1.35;
    vertical-align: middle;
}

.documents-table .subscription-status {
    vertical-align: middle;
}

.documents-table .document-list-actions {
    flex-wrap: nowrap;
    align-items: center;
}

.documents-table .document-list-actions .button {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 0.78rem;
    line-height: 1.1;
    white-space: nowrap;
}

.documents-table td:first-child,
.documents-table td:nth-child(9),
.documents-table td:nth-child(11) {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-details-modal {
    width: min(860px, 100%);
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@supports (height: 100dvh) {
    .document-details-modal {
        max-height: calc(100dvh - 20px);
    }
}

.document-details-modal .modal-header {
    flex: 0 0 auto;
}

.document-preview-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.document-preview-actions {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(4, 7, 19, 0.98);
}

.document-lines {
    display: grid;
    gap: 14px;
}

.document-lines h3 {
    margin: 0;
    color: #ffffff;
}

.document-line-table {
    min-width: 720px;
}

.document-line-table td:first-child {
    white-space: normal;
    min-width: 240px;
}

.document-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.document-generation-status {
    margin-right: auto;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

@media (max-width: 780px) {
    .document-details-modal {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }

    @supports (height: 100dvh) {
        .document-details-modal {
            max-height: calc(100dvh - 20px);
        }
    }

    .document-preview-actions {
        padding: 14px 18px 18px;
    }

    .document-list-actions .button {
        flex: 1 1 140px;
    }
}

@media print {
    .site-header,
    .skip-link,
    .loading-screen,
    .usage-hero-actions,
    .billing-filters,
    .modal-actions {
        display: none !important;
    }
}

/* Company settings */
.company-settings-page {
    display: grid;
    gap: 22px;
}

.company-settings-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.company-settings-nav {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
}

.company-settings-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--muted-strong);
    font-weight: 850;
}

.company-settings-nav a:hover,
.company-settings-nav a:focus-visible {
    color: #ffffff;
    background: rgba(7, 164, 240, 0.1);
}

.company-settings-form {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.company-settings-section {
    scroll-margin-top: 96px;
}

.company-warning {
    margin: 0;
    padding: 12px 13px;
    color: #ffe2a8;
    border: 1px solid rgba(255, 184, 77, 0.28);
    border-radius: 14px;
    background: rgba(255, 184, 77, 0.1);
    font-weight: 750;
}

.company-warning.wide {
    grid-column: 1 / -1;
}

.company-logo-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.company-logo-preview {
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    background: rgba(4, 7, 19, 0.56);
}

.company-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-logo-preview span {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 950;
}

.company-logo-actions {
    display: grid;
    gap: 12px;
}

.company-logo-actions p {
    margin: 0;
    color: var(--muted);
}

.company-logo-actions input {
    color: var(--muted-strong);
}

.company-save-bar {
    position: sticky;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(4, 7, 19, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

#dirtyIndicator {
    margin-right: auto;
    color: var(--muted-strong);
    font-weight: 850;
}

@media (max-width: 980px) {
    .company-settings-layout {
        grid-template-columns: 1fr;
    }

    .company-settings-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .company-settings-nav,
    .company-logo-row {
        grid-template-columns: 1fr;
    }

    .company-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    #dirtyIndicator {
        margin-right: 0;
    }

    .company-save-bar .button {
        width: 100%;
    }
}

/* Subscription lifecycle management */
.subscription-management-page {
    display: grid;
    gap: 24px;
}

.lifecycle-status-card {
    display: grid;
    gap: 20px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)), rgba(7, 16, 36, 0.72);
    box-shadow: var(--shadow);
}

.lifecycle-status-card h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.lifecycle-status-card p {
    margin: 0;
    color: var(--muted);
}

.subscription-management-content {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 900px;
    margin-inline: auto;
}

.subscription-management-content > .management-card,
.subscription-management-content > .lifecycle-status-card {
    min-width: 0;
    height: auto;
}

.subscription-management-content > .management-card {
    padding: 24px;
}

.subscription-management-content > .management-card h2 {
    margin-bottom: 18px;
}

.subscription-management-content .usage-detail-list {
    gap: 12px;
}

.auto-renew-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auto-renew-card-content {
    display: grid;
    gap: 14px;
}

.auto-renew-card-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auto-renew-card-footer .button {
    width: 100%;
}

/* Global typography refinement */
body {
    font-size: 15px;
}

.loading-screen h1,
.hero-copy h1,
.state-panel h1,
.checkout-status-header h1,
.subscription-hero h1,
.usage-hero h1,
.page-heading h1 {
    font-size: clamp(1.85rem, 4.7vw, 3.35rem);
}

.section-heading h2,
.subscription-card h2,
.checkout-section-heading h2,
.usage-detail-card h3,
.content-card h2,
.card-header h2,
.modal-header h2 {
    font-size: 1.12rem;
}

.lifecycle-status-card h2 {
    font-size: clamp(1.45rem, 3.6vw, 2.35rem);
}

.summary-card strong,
.summary-topline strong {
    font-size: 1.62rem;
}

.capacity-card strong,
.usage-metric-card strong,
.usage-card strong {
    font-size: 1.22rem;
}

.price-total dd {
    font-size: 1.52rem;
}

.brand-text strong {
    font-size: 17px;
}

.hero-copy p,
.checkout-status-header p,
.subscription-hero p,
.usage-hero p,
.subscription-card p,
.checkout-section p,
.state-panel p,
.page-heading p,
.content-card p,
.modal-header p,
.billing-details-body,
.subscription-modal-body {
    font-size: 0.94rem;
}

.button,
.primary-button,
.secondary-button,
.action-card-button,
.status-pill,
.subscription-status,
.usage-status {
    font-size: 0.86rem;
}

.checkout-field label,
.addon-controls label,
.billing-filters label,
.modal-field,
.field-label,
.usage-detail-list dt,
.subscription-facts dt,
.price-lines dt,
.order-details dt {
    font-size: 0.78rem;
}

.checkout-field input,
.addon-controls input,
.billing-filters input,
.billing-filters select,
.organization-selector,
.card-filter-input,
.card-filter-select,
.modal-field textarea,
.manage-table th,
.manage-table td,
.billing-table th,
.billing-table td {
    font-size: 0.86rem;
}

.eyebrow,
.summary-card span,
.usage-card-topline h2,
.usage-detail-card h3,
.capacity-card span,
.active-addon-card span,
.checkout-muted,
.subscription-action-note,
.company-warning,
.field-error {
    font-size: 0.76rem;
}

.action-card h3,
.capacity-addon-topline h3,
.active-addon-card h3,
.billing-mobile-card h3 {
    font-size: 0.96rem;
}

@media (max-width: 680px) {
    body {
        font-size: 15px;
    }

    .loading-screen h1,
    .hero-copy h1,
    .state-panel h1,
    .checkout-status-header h1,
    .subscription-hero h1,
    .usage-hero h1,
    .page-heading h1 {
        font-size: clamp(1.75rem, 10vw, 3rem);
    }

    .button,
    .primary-button,
    .secondary-button,
    .checkout-field input,
    .addon-controls input,
    .billing-filters input,
    .billing-filters select,
    .card-filter-input,
    .card-filter-select {
        font-size: 0.86rem;
    }
}
