/* Inter font fallback */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* CSS Variables for theming - matching frontend (codolex.ai) */
:root {
    --bg-primary: #f9fafb;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #e5e7eb;
    --bg-elevated: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-header: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --text-inverse: #ffffff;
    --border-default: #e5e7eb;
    --border-light: #f3f4f6;
    --border-dark: #d1d5db;
    --interactive-hover: #f3f4f6;
    --interactive-active: #e5e7eb;
    --primary-color: #80d060;
    --primary-hover: #5fa840;
    --primary-light: rgba(128, 208, 96, 0.1);
    --primary-green: #80d060;
    --primary-green-hover: #5fa840;
    --primary-green-light: rgba(128, 208, 96, 0.1);
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-border: #22c55e;
    --success-text: #16a34a;
    --error-bg: rgba(239, 68, 68, 0.1);
    --error-border: #ef4444;
    --error-text: #dc2626;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --warning-border: #f59e0b;
    --warning-text: #d97706;
    --sidebar-width: 240px;
    --header-height: 56px;
}

[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-elevated: #1f2937;
    --bg-sidebar: #111827;
    --bg-header: #0f172a;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --text-inverse: #111827;
    --border-default: #374151;
    --border-light: #1f2937;
    --border-dark: #4b5563;
    --interactive-hover: #1f2937;
    --interactive-active: #374151;
    --primary-color: #80d060;
    --primary-hover: #5fa840;
    --primary-light: rgba(128, 208, 96, 0.15);
    --primary-green: #80d060;
    --primary-green-hover: #5fa840;
    --primary-green-light: rgba(128, 208, 96, 0.15);
    --error-bg: rgba(220, 53, 69, 0.1);
    --error-border: #dc3545;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand a {
    color: #f1f5f9;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-brand .brand-sub {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-brand-logo {
    height: 24px;
    width: auto;
    display: block;
    /* Sidebar is dark; invert het donkere logo */
    filter: brightness(0) invert(1);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section-label {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: background-color 0.15s, color 0.15s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    text-decoration: none;
}

.sidebar-link.active {
    background: rgba(128, 208, 96, 0.15);
    color: #80d060;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #64748b;
}

.sidebar-footer a {
    color: #94a3b8;
    text-decoration: none;
}

.sidebar-footer a:hover {
    color: #e2e8f0;
}

/* Main Content */
.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.admin-header {
    height: var(--header-height);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    font-size: 18px;
    font-weight: 600;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-content {
    padding: 24px;
}

/* Toolbar */
.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* Cards */
.detail-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 20px;
}

.detail-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.detail-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

/* Stats Grid (Dashboard) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 20px;
}

.stat-card .stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.stat-value.healthy { color: var(--success-text); }
.stat-value.unhealthy { color: var(--error-text); }

.stat-card.has-tooltip {
    cursor: help;
    position: relative;
}
.stat-card.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    width: 220px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 10;
}
.stat-card.has-tooltip:hover::after {
    opacity: 1;
}

/* Environment Cards */
.env-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.env-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.env-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.env-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
}

.env-card-header a {
    font-weight: 600;
    font-size: 15px;
}

.env-card-body {
    padding: 16px 20px;
}

.env-card-body dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
}

.env-card-body dt {
    font-size: 12px;
    color: var(--text-secondary);
}

.env-card-body dd {
    font-size: 13px;
    color: var(--text-primary);
}

.env-card-usage {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-default);
    font-size: 12px;
    color: var(--text-secondary);
}

.env-card-customer-link {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.env-card-customer-link:hover {
    color: var(--text-primary);
}

.env-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.env-card-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Section titles */
.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    margin-top: 8px;
}

/* Tables */
.table-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
}

.data-table td {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--interactive-hover);
}

/* Description list */
dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
}

dt {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

dd {
    font-size: 13px;
    color: var(--text-primary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-green {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.badge-red {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.badge-yellow {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
}

.badge-blue {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.4;
}

.btn:hover {
    background: var(--interactive-hover);
    border-color: var(--border-dark);
    text-decoration: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-danger {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

.btn-danger:hover {
    background: var(--error-border);
    color: white;
}

.btn-lg {
    padding: 13px 20px;
    font-size: 15px;
    border-radius: 10px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form-input {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 16px;
}

.tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Log viewer */
.log-viewer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

/* Action buttons group */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Provision form */
.provision-form {
    max-width: 600px;
}

.provision-form h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

/* Login */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.login-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

/* Audit details */
.audit-details {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-border);
}

/* QR code container */
.qr-container img {
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 8px;
    background: white;
}

/* Public signup flow */
.signup-topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-elevated);
}

.signup-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.signup-brand-logo {
    height: 28px;
    width: auto;
    display: block;
}

.signup-meta {
    font-size: 14px;
    color: var(--text-secondary);
}

.signup-meta a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.signup-meta a:hover {
    text-decoration: underline;
}

.signup-page {
    padding: 64px 24px;
    min-height: calc(100vh - 65px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.signup-container {
    width: 100%;
    max-width: 520px;
}

.signup-container.signup-container-wide {
    max-width: 960px;
}

.signup-center-text {
    text-align: center;
}

.signup-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.15;
    color: var(--text-primary);
}

.signup-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.signup-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
}

.signup-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.signup-form .form-group {
    margin-bottom: 18px;
}

.signup-form .form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.signup-form .form-input {
    height: 48px;
    padding: 0 14px;
    font-size: 15px;
    border-radius: 10px;
}

.signup-form .form-checkbox {
    font-size: 14px;
    margin-top: 16px;
}

.signup-terms {
    margin-top: 24px;
    text-align: center;
}

.signup-otp {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.signup-otp input {
    width: 48px;
    height: 56px;
    border: 1px solid var(--border-default);
    border-radius: 10px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-elevated);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.signup-otp input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.signup-resend {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.signup-resend a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.signup-resend a:hover {
    color: var(--text-primary);
}

.signup-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.signup-input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-default);
    border-radius: 10px;
    background: var(--bg-elevated);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.signup-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.signup-input-group .form-input {
    border: none;
    border-radius: 0;
    flex: 1;
    height: 48px;
    background: transparent;
}

.signup-input-group .form-input:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.signup-input-group .suffix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-left: 1px solid var(--border-default);
}

.signup-helper {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    min-height: 18px;
}

.signup-helper.error {
    color: var(--error-text);
}

.signup-helper.ok {
    color: var(--success-text);
}

.signup-helper strong {
    font-weight: 600;
}

.signup-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.signup-meta-row strong {
    color: var(--text-primary);
    font-weight: 600;
}

.signup-meta-row a {
    color: var(--text-secondary);
    text-decoration: underline;
}

.signup-meta-row a:hover {
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .signup-title { font-size: 32px; }
    .signup-page { padding: 40px 16px; }
    .signup-otp input { width: 42px; height: 52px; font-size: 20px; }
    .signup-meta-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .env-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .admin-sidebar,
    .admin-header,
    .no-print {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .detail-card {
        border: 1px solid #ddd;
        box-shadow: none;
        break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }

    .report-total-row {
        background: #f3f4f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Signup confirm page */
.signup-form-grid {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.confirm-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.confirm-value {
  font-weight: 600;
  color: var(--text-primary);
}

.confirm-web-address {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.confirm-web-address > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.signup-slug-primary {
  color: var(--primary-dark, #5fb840);
}

.signup-slug-suffix {
  color: var(--text-tertiary);
  font-weight: 600;
}

.confirm-change-link {
  margin-left: auto;
  font-size: 13px;
}

.confirm-divider {
  border-top: 1px solid var(--border-default);
  margin-top: 20px;
  padding-top: 20px;
}

.confirm-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.confirm-steps li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  align-items: flex-start;
}

.confirm-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.confirm-step-title {
  font-weight: 600;
  color: var(--text-primary);
}

.confirm-step-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.confirm-trial-after {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 16px;
}

.confirm-trial-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.confirm-trial-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.confirm-trial-year {
  font-size: 13px;
  color: var(--text-tertiary);
}

.confirm-trial-divider {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 16px 0;
}

.confirm-trial-terms {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.confirm-submit {
  margin-top: 24px;
}

.confirm-footer-note {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .confirm-grid {
    grid-template-columns: 1fr;
  }
}

/* Signup provisioning page */
.signup-container.signup-container-md {
  max-width: 720px;
}

.provisioning-card {
  padding: 40px;
}

.provisioning-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.provisioning-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--bg-secondary);
  border-top-color: var(--primary-color);
  animation: provisioning-spin 0.9s linear infinite;
  flex-shrink: 0;
}

.provisioning-spinner-done {
  border: 4px solid var(--success-bg);
  border-top-color: var(--success-text);
  animation: none;
}

.provisioning-spinner-stopped {
  animation: none;
  opacity: 0.4;
}

@keyframes provisioning-spin {
  to { transform: rotate(360deg); }
}

.provisioning-title {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--text-primary);
}

.provisioning-explanation {
  margin-top: 16px;
  max-width: 520px;
}

.provisioning-progress-block {
  margin: 24px 0 24px 0;
}

.provisioning-progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}

.provisioning-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color, #80d060), var(--primary-dark, #5fb840));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.provisioning-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.provisioning-steps {
  margin-top: 12px;
}

.provisioning-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-default);
}

.provisioning-step:last-child {
  border-bottom: none;
}

.provisioning-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.provisioning-step-dot.pending {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

.provisioning-step-dot.running {
  background: var(--warning-bg, rgba(245, 158, 11, 0.1));
  color: var(--warning-text, #f59e0b);
}

.provisioning-step-dot.completed {
  background: var(--success-bg);
  color: var(--success-text);
}

.provisioning-step-dot.failed {
  background: var(--error-bg);
  color: var(--error-text);
}

.provisioning-mini-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: var(--warning-text, #f59e0b);
  animation: provisioning-spin 0.9s linear infinite;
}

.provisioning-step-body {
  flex: 1;
  min-width: 0;
}

.provisioning-step-title {
  font-weight: 600;
  color: var(--text-primary);
}

.provisioning-step-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.provisioning-step-time {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.provisioning-step-time.active {
  color: var(--warning-text, #f59e0b);
  font-weight: 600;
}

.provisioning-step-time.done {
  color: var(--success-text);
  font-weight: 600;
}

.provisioning-error {
  margin-top: 24px;
}

.provisioning-error p {
  margin-top: 8px;
}

.provisioning-error-detail {
  margin-top: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Signup ready page */
.ready-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ready-confetti span {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 18px;
  animation: ready-fall 4s linear infinite;
}

@keyframes ready-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

.ready-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.ready-success-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.ready-success-ring-inner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #80d060), var(--primary-dark, #5fb840));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 36px;
  font-weight: 800;
}

.ready-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 16px;
  color: var(--text-primary);
}

.ready-explanation {
  margin: 16px auto 0;
  max-width: 560px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.55;
}


.ready-address-card {
  display: block;
  max-width: 560px;
  margin: 32px auto 0;
  text-align: left;
  text-decoration: none;
}

.ready-address-card:hover {
  text-decoration: none;
  border-color: var(--primary-color, #80d060);
}

.ready-address-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
  color: var(--text-primary);
  word-break: break-all;
}

.ready-cta {
  margin-top: 32px;
}

.ready-footer-hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Billing setup page */
.billing-step {
  width: 100%;
}

.billing-fieldset {
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 12px;
  padding: 20px 24px 24px;
  margin: 0 0 20px;
  background: var(--bg-elevated, #ffffff);
}

.billing-legend {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary, #64748b);
  padding: 0 8px;
}

.billing-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 16px;
}

.billing-plan-card {
  position: relative;
  display: block;
  border: 2px solid var(--border-default, #e2e8f0);
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  background: var(--bg-primary, #ffffff);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.billing-plan-card:hover {
  border-color: var(--primary-color, #80d060);
}

.billing-plan-card input[type="radio"] {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: var(--primary-color, #5fa840);
  cursor: pointer;
}

.billing-plan-card:has(input[type="radio"]:checked) {
  border-color: var(--primary-color, #5fa840);
  background: rgba(128, 208, 96, 0.06);
}

.billing-plan-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.billing-plan-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary-color, #5fa840);
  background: rgba(128, 208, 96, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  margin-bottom: 4px;
}

.billing-plan-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.billing-plan-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
}

.billing-plan-unit {
  font-size: 12px;
  color: var(--text-tertiary, #64748b);
}

.billing-addon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--border-default, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-secondary, #f8fafc);
  font-size: 14px;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
}

.billing-addon input[type="checkbox"] {
  accent-color: var(--primary-color, #5fa840);
  cursor: pointer;
}

.billing-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.billing-row-three {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 16px;
}

.billing-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary, #334155);
  cursor: pointer;
}

.billing-check input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--primary-color, #5fa840);
  cursor: pointer;
}

.billing-check a {
  color: var(--primary-color, #5fa840);
  text-decoration: none;
}

.billing-check a:hover {
  text-decoration: underline;
}

#checkout-container {
  margin-top: 12px;
  min-height: 480px;
}

@media (max-width: 640px) {
  .billing-plan-grid { grid-template-columns: 1fr; }
  .billing-row-two,
  .billing-row-three { grid-template-columns: 1fr; }
  .billing-fieldset { padding: 16px 18px 18px; }
}
