/*:root {
    --bg: #f7f9fc;
    --text: #1f2937;
    --card: #ffffff;
    --border: #d6deeb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    max-width: 800px;
    margin: 48px auto;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
*/

/* ============================================================
   CheckoutONE — Design System CSS
   Paleta: #0B3C5D (marca), #1F6AE1 (CTA), #2FBF71 (sucesso)
   Font: Inter
   ============================================================ */

/* --- Reset & Base --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --c1-brand: #0B3C5D;
    --c1-cta: #1F6AE1;
    --c1-cta-hover: #1859C4;
    --c1-success: #2FBF71;
    --c1-success-hover: #26A85F;
    --c1-warning: #F59E0B;
    --c1-danger: #EF4444;
    --c1-danger-hover: #DC2626;

    --c1-text: #0F172A;
    --c1-text-secondary: #475569;
    --c1-text-muted: #64748B;
    --c1-border: #E2E8F0;
    --c1-border-strong: #CBD5E1;
    --c1-bg: #F8FAFC;
    --c1-bg-white: #FFFFFF;
    --c1-bg-dark: #020617;
    --c1-bg-panel: #0F172A;

    --c1-radius-sm: 6px;
    --c1-radius: 8px;
    --c1-radius-md: 10px;
    --c1-radius-lg: 12px;
    --c1-radius-xl: 16px;

    --c1-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --c1-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);
    --c1-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --c1-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
    --c1-shadow-xl: 0 20px 40px rgba(2, 6, 23, 0.12);

    --c1-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --c1-sidebar-width: 260px;
    --c1-header-height: 56px;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--c1-font);
    color: var(--c1-text);
    background: var(--c1-bg);
    line-height: 1.55;
    min-height: 100vh;
}

a {
    color: var(--c1-cta);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--c1-cta-hover);
    text-decoration: underline;
}

img { max-width: 100%; height: auto; }

code, pre {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, monospace;
    font-size: 0.85em;
}

code {
    background: #F1F5F9;
    color: var(--c1-brand);
    padding: 2px 6px;
    border-radius: var(--c1-radius-sm);
}

hr {
    border: none;
    border-top: 1px solid var(--c1-border);
    margin: 24px 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--c1-text);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h1 { font-size: 1.65rem; font-weight: 700; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

/* ============================================================
   LAYOUT: Sidebar + Main Area (Dashboard)
   ============================================================ */

.layout-app {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--c1-sidebar-width);
    background: var(--c1-bg-dark);
    color: #E2E8F0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.25s ease;
}

.sidebar__brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar__brand img {
    height: 28px;
    width: auto;
}

.sidebar__nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.sidebar__section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748B;
    padding: 16px 20px 6px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: #CBD5E1;
    font-size: 0.9rem;
    font-weight: 450;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.sidebar__link:hover {
    background: rgba(255,255,255,0.05);
    color: #F8FAFC;
    text-decoration: none;
}

.sidebar__link.active {
    background: rgba(31,106,225,0.12);
    color: #93C5FD;
    border-left-color: var(--c1-cta);
    font-weight: 500;
}

.sidebar__link svg, .sidebar__link .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar__link.active svg,
.sidebar__link.active .icon { opacity: 1; }

.sidebar__submenu {
    margin: 2px 0 8px 0;
}

.sidebar__link--sub {
    margin-left: 14px;
    padding-left: 16px;
    font-size: 0.84rem;
    border-left: 2px solid rgba(148, 163, 184, 0.35);
}

.sidebar__link--sub.active {
    border-left-color: var(--c1-cta);
}

.sidebar__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem;
}

.sidebar__footer a {
    color: #94A3B8;
    text-decoration: none;
}

.sidebar__footer a:hover {
    color: #E2E8F0;
}

/* --- Main Content Area --- */
.main-area {
    flex: 1;
    margin-left: var(--c1-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--c1-header-height);
    background: var(--c1-bg-white);
    border-bottom: 1px solid var(--c1-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c1-text);
}

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

.topbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--c1-text-secondary);
}

.topbar__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c1-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.main-content {
    flex: 1;
    padding: 28px;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--c1-text);
    cursor: pointer;
    padding: 4px;
}

.sidebar-toggle svg {
    width: 22px;
    height: 22px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.5);
    z-index: 99;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-overlay.is-open {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
    }

    .main-area {
        margin-left: 0;
    }
}

/* ============================================================
   COMPONENTS: Page Header
   ============================================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.45rem;
    margin: 0;
}

.page-header__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--c1-text-muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--c1-text-secondary);
}

.breadcrumb__sep {
    color: var(--c1-border-strong);
}

/* ============================================================
   COMPONENTS: Cards
   ============================================================ */

.card {
    background: var(--c1-bg-white);
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius-lg);
    padding: 24px;
    box-shadow: var(--c1-shadow-sm);
}

.card--flush {
    padding: 0;
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--c1-border);
}

.card__header h2,
.card__header h3 {
    font-size: 1.05rem;
    margin: 0;
}

.card__body {
    padding: 24px;
}

.card__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--c1-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--c1-bg-white);
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius-lg);
    padding: 20px;
    box-shadow: var(--c1-shadow-sm);
}

.stat-card__label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--c1-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.stat-card__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c1-text);
    line-height: 1.2;
}

.stat-card__value--success { color: var(--c1-success); }
.stat-card__value--danger { color: var(--c1-danger); }
.stat-card__value--warning { color: var(--c1-warning); }

/* ============================================================
   COMPONENTS: Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--c1-font);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: var(--c1-radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--c1-cta);
    color: #fff;
    border-color: var(--c1-cta);
}

.btn-primary:hover {
    background: var(--c1-cta-hover);
    border-color: var(--c1-cta-hover);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--c1-cta);
    border-color: var(--c1-cta);
}

.btn-secondary:hover {
    background: rgba(31, 106, 225, 0.06);
}

.btn-success {
    background: var(--c1-success);
    color: #fff;
    border-color: var(--c1-success);
}

.btn-success:hover {
    background: var(--c1-success-hover);
    border-color: var(--c1-success-hover);
    color: #fff;
}

.btn-danger {
    background: var(--c1-danger);
    color: #fff;
    border-color: var(--c1-danger);
}

.btn-danger:hover {
    background: var(--c1-danger-hover);
    border-color: var(--c1-danger-hover);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--c1-text-secondary);
    border-color: var(--c1-border);
}

.btn-ghost:hover {
    background: var(--c1-bg);
    border-color: var(--c1-border-strong);
    color: var(--c1-text);
}

.btn-sm {
    font-size: 0.8rem;
    padding: 6px 12px;
}

.btn-lg {
    font-size: 1rem;
    padding: 12px 24px;
}

.btn-block {
    width: 100%;
}

/* ============================================================
   COMPONENTS: Tables
   ============================================================ */

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

table.data-table thead th {
    background: #F8FAFC;
    color: var(--c1-text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 16px;
    border-bottom: 2px solid var(--c1-border);
    text-align: left;
    white-space: nowrap;
}

table.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--c1-border);
    color: var(--c1-text);
    vertical-align: middle;
}

table.data-table tbody tr:last-child td {
    border-bottom: none;
}

table.data-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.6);
}

table.data-table td a {
    font-weight: 500;
}

/* ============================================================
   COMPONENTS: Status Badges
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.badge--success { background: #DCFCE7; color: #166534; }
.badge--warning { background: #FEF3C7; color: #92400E; }
.badge--danger  { background: #FEE2E2; color: #991B1B; }
.badge--info    { background: #DBEAFE; color: #1E40AF; }
.badge--neutral { background: #F1F5F9; color: #475569; }

/* ============================================================
   COMPONENTS: Forms
   ============================================================ */

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c1-text);
    margin-bottom: 5px;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--c1-text-muted);
    margin-top: 4px;
}

.form-input,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font-family: var(--c1-font);
    font-size: 0.9rem;
    color: var(--c1-text);
    background: var(--c1-bg-white);
    border: 1px solid var(--c1-border-strong);
    border-radius: var(--c1-radius);
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.45;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c1-cta);
    box-shadow: 0 0 0 3px rgba(31,106,225,0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--c1-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 34px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    cursor: pointer;
    margin-bottom: 8px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--c1-cta);
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
}

/* ============================================================
   COMPONENTS: Alerts / Feedback
   ============================================================ */

.alert {
    padding: 12px 16px;
    border-radius: var(--c1-radius);
    font-size: 0.88rem;
    font-weight: 450;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert--success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert--error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert--warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert--info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ============================================================
   COMPONENTS: Empty State
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--c1-text-muted);
}

.empty-state__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    opacity: 0.4;
}

.empty-state__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c1-text-secondary);
    margin-bottom: 4px;
}

.empty-state__text {
    font-size: 0.88rem;
    margin-bottom: 16px;
}

/* ============================================================
   AUTH PAGES (Login / Home)
   ============================================================ */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c1-bg);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--c1-bg-white);
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius-xl);
    padding: 40px 36px;
    box-shadow: var(--c1-shadow-lg);
    text-align: center;
}

.auth-card__logo {
    margin-bottom: 28px;
}

.auth-card__logo img {
    height: 36px;
    width: auto;
}

.auth-card h1 {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.auth-card__subtitle {
    font-size: 0.88rem;
    color: var(--c1-text-secondary);
    margin-bottom: 28px;
}

.auth-card .form-group {
    text-align: left;
}

.auth-card .form-input {
    padding: 11px 14px;
}

.auth-card .btn {
    margin-top: 8px;
}

.auth-card__footer {
    margin-top: 24px;
    font-size: 0.84rem;
    color: var(--c1-text-muted);
}

.auth-card__footer a {
    font-weight: 500;
}

/* ============================================================
   PUBLIC CHECKOUT / ORDER PAGES
   ============================================================ */

.checkout-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.checkout-card {
    width: 100%;
    max-width: 720px;
    background: var(--c1-bg-white);
    border-radius: var(--c1-radius-xl);
    padding: 32px;
    box-shadow: var(--c1-shadow-xl);
}

.checkout-card h1 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 4px;
}

.checkout-card .form-label,
.checkout-card label {
    font-size: 0.85rem;
    display: block;
    margin-top: 14px;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--c1-text);
}

.checkout-card input[type="text"],
.checkout-card input[type="email"],
.checkout-card input[type="tel"],
.checkout-card input[type="url"],
.checkout-card input[type="number"],
.checkout-card textarea,
.checkout-card select {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--c1-font);
    font-size: 0.9rem;
    border: 1px solid var(--c1-border-strong);
    border-radius: var(--c1-radius);
    color: var(--c1-text);
    background: var(--c1-bg-white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.checkout-card input:focus,
.checkout-card textarea:focus,
.checkout-card select:focus {
    outline: none;
    border-color: var(--c1-cta);
    box-shadow: 0 0 0 3px rgba(31,106,225,0.12);
}

.checkout-card button[type="submit"],
.checkout-card .btn-checkout {
    margin-top: 20px;
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: var(--c1-radius-md);
    font-family: var(--c1-font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.checkout-logo {
    text-align: center;
    margin-bottom: 24px;
}

.checkout-logo img {
    height: 32px;
    width: auto;
}

.phone-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px;
    align-items: start;
}

.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.address-grid > div { min-width: 0; }

.template-published { margin: 12px 0 20px; }
.template-published a { color: var(--c1-cta); }

.muted { color: var(--c1-text-secondary); }
.error { color: #991B1B; }
.success { color: #166534; }
.warning { color: #92400E; }

.qr-wrap {
    margin: 16px 0;
    text-align: center;
}

.qr-code {
    width: 260px;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius-lg);
    padding: 10px;
    background: var(--c1-bg-white);
}

.copy-button {
    margin-top: 8px;
    width: auto !important;
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
    border-radius: var(--c1-radius) !important;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.status-pill.pending { background: #FEF3C7; color: #92400E; }
.status-pill.success { background: #DCFCE7; color: #166534; }
.status-pill.warn    { background: #FEE2E2; color: #991B1B; }

@media (max-width: 640px) {
    .address-grid { grid-template-columns: 1fr; }
    .phone-row { grid-template-columns: 1fr; }
    .checkout-card { padding: 24px 20px; }
}

/* --- Trust Seal --- */
.trust-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--c1-border);
    font-size: 0.78rem;
    color: var(--c1-text-muted);
}

.trust-seal img {
    height: 18px;
    width: auto;
    opacity: 0.6;
}

/* --- Payment method radios --- */
.payment-methods {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.payment-method-option {
    flex: 1;
    position: relative;
}

.payment-method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.payment-method-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 14px;
    border: 2px solid var(--c1-border);
    border-radius: var(--c1-radius);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--c1-text-secondary);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    margin: 0;
}

.payment-method-option input[type="radio"]:checked + label {
    border-color: var(--c1-cta);
    color: var(--c1-cta);
    background: rgba(31,106,225,0.04);
}

/* --- Billing mode radios --- */
.billing-modes {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.billing-mode-option {
    flex: 1;
    position: relative;
}

.billing-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.billing-mode-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: 2px solid var(--c1-border);
    border-radius: var(--c1-radius);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--c1-text-secondary);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    margin: 0;
}

.billing-mode-option input[type="radio"]:checked + label {
    border-color: var(--c1-cta);
    color: var(--c1-cta);
    background: rgba(31,106,225,0.04);
}

/* ============================================================
   TEMPLATE EDITOR MODAL (managed by JS)
   ============================================================ */

.template-editor-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    display: none;
    z-index: 9999;
    padding: 10px;
}

.template-editor-modal.is-open { display: block; }

.template-editor-modal__dialog {
    height: 100%;
    background: var(--c1-bg-panel);
    border-radius: var(--c1-radius-md);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto 1fr;
}

.template-editor-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #111827;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

.template-editor-modal__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.template-editor-modal__title strong { font-size: 0.95rem; }
.template-editor-modal__title small { opacity: 0.7; font-size: 0.8rem; }

.template-editor-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.template-editor-modal__actions button {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: var(--c1-radius);
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--c1-font);
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.15s;
}

.template-editor-modal__actions button:hover {
    background: rgba(255,255,255,0.14);
}

.template-editor-modal__status {
    background: #1F2937;
    color: #CBD5E1;
    padding: 8px 16px;
    font-size: 0.8rem;
}

.template-editor-modal__body {
    min-height: 0;
    background: #111827;
}

.template-editor-modal__body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 900px) {
    .template-editor-modal { padding: 0; }
    .template-editor-modal__dialog { border-radius: 0; }
    .template-editor-modal__header { flex-direction: column; align-items: flex-start; }
    .template-editor-modal__actions { width: 100%; }
}

/* ============================================================
   PRODUCT TEMPLATE VIEWS
   ============================================================ */

.template-card-spaced { margin-bottom: 16px; }
.template-card-compact { margin-bottom: 14px; }
.template-publish-form { margin-top: 12px; }
.template-section-title-lg { margin-bottom: 14px; }
.template-section-title-sm { margin-bottom: 12px; }
.template-check-spaced { margin-top: 6px; }
.template-col-label { width: 220px; }
.template-inline-form { display: inline; }
.template-card-zero-margin { margin: 0; }
.template-status-margin { margin-top: 8px; }
.template-frame-wrap { padding: 8px; }
.template-preview-header { margin-bottom: 0; }

.template-editor-iframe {
    width: 100%;
    height: calc(100vh - 250px);
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius);
    background: #fff;
}

.template-preview-iframe {
    width: 100%;
    height: 80vh;
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius);
    background: #fff;
}

/* ============================================================
   INTEGRATIONS
   ============================================================ */

.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.integration-card {
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.integration-card:hover {
    text-decoration: none;
    box-shadow: var(--c1-shadow-md);
    border-color: var(--c1-border-strong);
}

.integration-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.integration-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #E2E8F0;
    color: #0F172A;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.integration-icon--hotzap {
    background: #DCFCE7;
    color: #166534;
}

.integration-icon__img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.integration-icon--fallback {
    font-size: 0.8rem;
    font-weight: 700;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.integration-inline-form {
    display: inline;
}

.integration-pre {
    margin: 0;
    padding: 10px;
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius);
    background: #F8FAFC;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.8rem;
}

.integration-token-wrap {
    position: relative;
}

.integration-token-input {
    padding-right: 44px;
}

.integration-copy-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 1px solid var(--c1-border);
    border-radius: var(--c1-radius-sm);
    background: var(--c1-bg-white);
    color: var(--c1-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.integration-copy-btn:hover {
    border-color: var(--c1-cta);
    color: var(--c1-cta);
}

.integration-copy-btn.is-copied {
    border-color: var(--c1-success);
    color: var(--c1-success);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .sidebar, .topbar, .sidebar-overlay, .sidebar-toggle { display: none !important; }
    .main-area { margin-left: 0 !important; }
}
