:root {
    --app-bg: #f6f7f9;
    --surface: #ffffff;
    --border: #e6e8ec;
    --text: #20232a;
    --text-muted: #5c6570;
    --primary: #187a48;
    --primary-strong: #14683e;
    --primary-soft: #e7f6ee;
    --success: #187a48;
    --success-soft: #e7f6ee;
    --warning: #8a5a00;
    --warning-soft: #fff6e5;
    --danger: #9d2430;
    --danger-soft: #fdecee;
    --info: #243044;
    --info-soft: #f4f7fb;
    --sidebar: 240px;
    --header: 68px;
    --radius: 10px;
    --radius-sm: 8px;
    --shadow: none;
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --ec-bg: var(--app-bg);
    --ec-surface: var(--surface);
    --ec-ink: var(--text);
    --ec-muted: var(--text-muted);
    --ec-line: var(--border);
    --ec-primary: var(--primary);
    --ec-primary-soft: var(--primary-soft);
    --ec-success: var(--success);
    --ec-success-soft: var(--success-soft);
    --ec-warning: var(--warning);
    --ec-warning-soft: var(--warning-soft);
    --ec-danger: var(--danger);
    --ec-danger-soft: var(--danger-soft);
    --ec-sidebar: var(--sidebar);
    --ec-header: var(--header);
    --ec-radius: var(--radius);
    --ec-shadow: var(--shadow);
    --ec-font: var(--font);
    --icon-dashboard: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4zm9 0h7v7h-7zM4 13h7v7H4zm9 0h7v7h-7z'/%3E%3C/svg%3E");
    --icon-affiliates: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 11a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm7.5 1.2a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM2.5 19.5c.4-3 2.8-5 6.5-5s6.1 2 6.5 5v1.5h-13zm12.2-4.2c2.4.3 4.2 1.6 4.8 4.2v1.5H22v-1.2c-.4-2.6-2.2-4.2-5.1-4.6-.7 0-1.4.1-2.2.1z'/%3E%3C/svg%3E");
    --icon-links: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.1.1l1.4-1.5a5 5 0 0 0-7-7.1L10 6M14 11a5 5 0 0 0-7.1-.1L5.5 12.4a5 5 0 0 0 7 7.1L14 18'/%3E%3C/svg%3E");
    --icon-tracking: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h3l2-6 4 12 2-6h5'/%3E%3C/svg%3E");
    --icon-orders: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M6 7h12l-1 13H7L6 7z'/%3E%3Cpath d='M9 7V5a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E");
    --icon-commissions: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M19 5 5 19'/%3E%3Ccircle cx='7.5' cy='7.5' r='2.2'/%3E%3Ccircle cx='16.5' cy='16.5' r='2.2'/%3E%3C/svg%3E");
    --icon-refunds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7'/%3E%3Cpath d='M3 4v6h6'/%3E%3C/svg%3E");
    --icon-payouts: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
    --icon-reports: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 19V5h10l6 6v8H4z'/%3E%3Cpath d='M14 5v6h6'/%3E%3C/svg%3E");
    --icon-risk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 6v6c0 5-3.4 7.6-8 9-4.6-1.4-8-4-8-9V6l8-3z'/%3E%3C/svg%3E");
    --icon-integration: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 8v8M15 8v8M8 12h8'/%3E%3Cpath d='M7 8H5a2 2 0 0 0 0 4h2M17 12h2a2 2 0 0 1 0 4h-2'/%3E%3C/svg%3E");
    --icon-audit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E");
    --icon-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4'/%3E%3C/svg%3E");
    --icon-profile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E");
    --icon-clicks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 3h2.2l1.2 6.2 2.2 1.2 4.8 8.2-1.8 1L12 12.2l-2.4 2.2L8 3z'/%3E%3C/svg%3E");
    --icon-conversion: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 16l5-5 3 3 8-8'/%3E%3Cpath d='M14 6h6v6'/%3E%3C/svg%3E");
}

body.ec-app,
body.ec-guest {
    margin: 0;
    background: var(--app-bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.45;
}

.ec-shell {
    min-height: 100vh;
}

.ec-sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar);
    height: 100vh;
    flex: 0 0 var(--sidebar);
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 16px 12px 12px;
    overflow: auto;
}

.ec-brand {
    padding: 0 10px 16px;
}

.ec-brand-mark {
    display: block;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    text-transform: none;
}

.ec-brand-name {
    display: block;
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.ec-nav-group {
    margin: 14px 0 4px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b93a0;
}

.ec-sidebar .nav-link,
.ec-offcanvas .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 2px 0;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    color: #3a4150;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.ec-sidebar .nav-link::before,
.ec-offcanvas .nav-link::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background: currentColor;
    -webkit-mask: var(--ec-icon) center / contain no-repeat;
    mask: var(--ec-icon) center / contain no-repeat;
    opacity: 0.72;
}

.ec-sidebar .nav-link[data-icon="dashboard"],
.ec-offcanvas .nav-link[data-icon="dashboard"] { --ec-icon: var(--icon-dashboard); }
.ec-sidebar .nav-link[data-icon="affiliates"],
.ec-offcanvas .nav-link[data-icon="affiliates"] { --ec-icon: var(--icon-affiliates); }
.ec-sidebar .nav-link[data-icon="links"],
.ec-offcanvas .nav-link[data-icon="links"] { --ec-icon: var(--icon-links); }
.ec-sidebar .nav-link[data-icon="tracking"],
.ec-offcanvas .nav-link[data-icon="tracking"] { --ec-icon: var(--icon-tracking); }
.ec-sidebar .nav-link[data-icon="orders"],
.ec-offcanvas .nav-link[data-icon="orders"] { --ec-icon: var(--icon-orders); }
.ec-sidebar .nav-link[data-icon="commissions"],
.ec-offcanvas .nav-link[data-icon="commissions"] { --ec-icon: var(--icon-commissions); }
.ec-sidebar .nav-link[data-icon="refunds"],
.ec-offcanvas .nav-link[data-icon="refunds"] { --ec-icon: var(--icon-refunds); }
.ec-sidebar .nav-link[data-icon="payouts"],
.ec-offcanvas .nav-link[data-icon="payouts"] { --ec-icon: var(--icon-payouts); }
.ec-sidebar .nav-link[data-icon="reports"],
.ec-offcanvas .nav-link[data-icon="reports"] { --ec-icon: var(--icon-reports); }
.ec-sidebar .nav-link[data-icon="risk"],
.ec-offcanvas .nav-link[data-icon="risk"] { --ec-icon: var(--icon-risk); }
.ec-sidebar .nav-link[data-icon="integration"],
.ec-offcanvas .nav-link[data-icon="integration"] { --ec-icon: var(--icon-integration); }
.ec-sidebar .nav-link[data-icon="audit"],
.ec-offcanvas .nav-link[data-icon="audit"] { --ec-icon: var(--icon-audit); }
.ec-sidebar .nav-link[data-icon="settings"],
.ec-offcanvas .nav-link[data-icon="settings"] { --ec-icon: var(--icon-settings); }
.ec-sidebar .nav-link[data-icon="profile"],
.ec-offcanvas .nav-link[data-icon="profile"] { --ec-icon: var(--icon-profile); }

.ec-sidebar .nav-link:hover,
.ec-offcanvas .nav-link:hover {
    background: #f3f6f4;
    color: var(--text);
}

.ec-sidebar .nav-link.active,
.ec-offcanvas .nav-link.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.ec-sidebar .nav-link.active::before,
.ec-offcanvas .nav-link.active::before {
    opacity: 1;
}

.ec-main {
    min-width: 0;
    flex: 1 1 auto;
}

.ec-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header);
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.ec-menu-btn {
    min-height: 40px;
}

.ec-topbar-product {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ec-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ec-topbar-actions .form-select {
    min-height: 36px;
    width: auto;
}

.ec-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 4px 8px 4px 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
}

.ec-user:hover {
    background: #f3f5f7;
}

.ec-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.ec-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.ec-user-name {
    font-size: 13px;
    font-weight: 700;
}

.ec-user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.ec-account-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.ec-account-links a,
.ec-account-links button {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-size: 14px;
    text-align: left;
    text-decoration: none;
}

.ec-account-links a:hover,
.ec-account-links button:hover {
    background: #f3f6f4;
}

.ec-content {
    padding: 24px 28px 40px;
}

.ec-pagehead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.ec-pagehead h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ec-subtitle {
    max-width: 42rem;
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.ec-content > h2,
.ec-content > .d-flex > h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ec-panel,
.ec-app .card,
.ec-guest .card,
.ec-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
}

.ec-panel {
    height: auto;
    padding: 16px 18px 18px;
    overflow: visible;
}

.ec-panel > h3,
.ec-panel-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.ec-stat {
    height: 100%;
    padding: 16px;
}

.ec-stat h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.ec-stat-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
}

.ec-stat-icon::before {
    content: "";
    width: 16px;
    height: 16px;
    background: var(--primary);
    -webkit-mask: var(--ec-icon) center / contain no-repeat;
    mask: var(--ec-icon) center / contain no-repeat;
}

.ec-stat-icon[data-kpi="sales"],
.ec-stat-icon[data-kpi="paid"],
.ec-stat-icon[data-kpi="payable"],
.ec-stat-icon[data-kpi="balance"] { --ec-icon: var(--icon-payouts); }
.ec-stat-icon[data-kpi="net"],
.ec-stat-icon[data-kpi="original"],
.ec-stat-icon[data-kpi="adjustments"] { --ec-icon: var(--icon-commissions); }
.ec-stat-icon[data-kpi="orders"] { --ec-icon: var(--icon-orders); }
.ec-stat-icon[data-kpi="conversion"] { --ec-icon: var(--icon-conversion); }
.ec-stat-icon[data-kpi="clicks"] { --ec-icon: var(--icon-clicks); }
.ec-stat-icon[data-kpi="visitors"],
.ec-stat-icon[data-kpi="affiliates"],
.ec-stat-icon[data-kpi="active"] { --ec-icon: var(--icon-affiliates); }
.ec-stat-icon[data-kpi="review"],
.ec-stat-icon[data-kpi="negative"] { --ec-icon: var(--icon-risk); }
.ec-stat-icon[data-kpi="position"] { --ec-icon: var(--icon-reports); }

.ec-kpi .h4,
.ec-kpi .h5,
.ec-money,
.ec-stat .h4,
.ec-stat .h5 {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.ec-stat .h4,
.ec-stat .h5,
.ec-stat .ec-money {
    font-size: 28px;
}

.ec-stat-note,
.ec-stat .small {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.ec-chart-svg {
    display: block;
    width: 100%;
    height: 320px;
    color: var(--primary);
}

.ec-empty {
    display: grid;
    min-height: 220px;
    place-items: center;
    align-content: center;
    padding: 24px 12px;
    text-align: center;
}

.ec-empty-title {
    margin: 0;
    font-weight: 700;
}

.ec-empty-hint {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.ec-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.ec-legend span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 99px;
    background: var(--swatch, var(--primary));
    vertical-align: 1px;
}

.ec-swatch-original { --swatch: #187a48; }
.ec-swatch-adjustment { --swatch: #c2414a; }
.ec-swatch-net { --swatch: #1d4e89; }

.ec-content .table-responsive {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.ec-app .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: #eef0f3;
    margin-bottom: 0;
}

.ec-app .table > :not(caption) > * > * {
    padding: 13px 14px;
    box-shadow: none;
}

.ec-app .table thead th {
    background: #f4f6f8;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.ec-app .table td {
    border-bottom: 1px solid #eef0f3;
    vertical-align: middle;
}

.ec-app .table tbody tr:last-child td {
    border-bottom: 0;
}

.ec-app .table tbody tr:hover td {
    background: #f7faf8;
}

td:has(.ec-money) {
    text-align: right;
}

.ec-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f4f6f8;
}

.ec-report-card {
    height: 100%;
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease;
}

.ec-report-card:hover {
    border-color: #b7e0c9;
    color: inherit;
}

.ec-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: auto;
    padding: 12px;
}

.ec-settings-nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

.ec-settings-nav a:hover {
    background: #f3f6f4;
}

.ec-panel > h2 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.ec-settings-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.ec-settings-warning {
    margin: 8px 0 0;
    color: #7a4b00;
    font-size: 13px;
}

.ec-settings-save {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ec-dash-row {
    --bs-gutter-y: 1.5rem;
    margin-bottom: 1.5rem;
}

.ec-dash-row > [class*="col-"] {
    min-width: 0;
}

.ec-locale {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.ec-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.ec-fact {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}

.ec-fact dt {
    margin: 0 0 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.ec-fact dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ec-flag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    background: #f3f5f7;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.ec-flag.is-on {
    background: var(--primary-soft);
    color: var(--primary);
}

.ec-health-healthy { color: var(--primary); }
.ec-health-stale { color: var(--warning); }
.ec-health-missing { color: var(--text-muted); }

.ec-app .btn {
    min-height: 40px;
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.ec-app .btn-sm,
.ec-guest .btn-sm {
    min-height: 34px;
}

.ec-app .btn-primary,
.ec-guest .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.ec-app .btn-primary:hover,
.ec-guest .btn-primary:hover {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.ec-app .btn-outline-primary,
.ec-app .btn-outline-secondary,
.ec-guest .btn-outline-secondary {
    background: #fff;
    border-color: #d7dbe2;
    color: var(--text);
}

.ec-app .btn-outline-primary:hover,
.ec-app .btn-outline-secondary:hover,
.ec-guest .btn-outline-secondary:hover {
    background: #f3f6f4;
    border-color: #c5cbd4;
    color: var(--text);
}

.ec-app .btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.ec-content form:not(.row):not(.ec-inline) {
    max-width: 46rem;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.ec-content form.row {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.form-label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.ec-app .form-control,
.ec-app .form-select,
.ec-guest .form-control,
.ec-guest .form-select {
    min-height: 44px;
    border-color: #d7dbe2;
    border-radius: var(--radius-sm);
}

.form-text {
    color: var(--text-muted);
}

.ec-app .alert,
.ec-guest .alert {
    border-radius: var(--radius-sm);
}

.alert-success {
    background: var(--success-soft);
    border-color: #c9ead8;
    color: #0f5c34;
}

.alert-warning {
    background: var(--warning-soft);
    border-color: #f3e0c2;
    color: #7a4b00;
}

.alert-danger {
    background: var(--danger-soft);
    border-color: #f5d0d4;
    color: #8d2430;
}

.alert-info,
.alert-secondary {
    background: var(--info-soft);
    border-color: #e1e7f0;
    color: var(--info);
}

.ec-app .list-group {
    border: 0;
}

.ec-app .list-group-item {
    padding: 12px 0;
    background: transparent;
    border-width: 0 0 1px;
    border-color: var(--border);
}

.ec-content dl.row dt {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.page-link {
    color: var(--text);
    border-color: var(--border);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

.btn:focus-visible,
.nav-link:focus-visible,
.form-control:focus,
.form-select:focus,
.page-link:focus,
.ec-user:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: none;
}

.dropdown-menu {
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(32, 35, 42, 0.08);
}

.dropdown-item {
    display: flex;
    align-items: center;
    min-height: 40px;
    border-radius: 8px;
}

.dropdown-item:hover {
    background: #f3f6f4;
}

.ec-guest-main {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 16px;
}

.ec-guest-card {
    width: min(100%, 440px);
}

.ec-guest-card h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.ec-offcanvas {
    width: min(280px, 88vw);
    background: #fff;
}

.ec-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 360px) {
    .ec-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .ec-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .ec-settings-nav {
        position: sticky;
        top: 16px;
    }
}

@media (max-width: 991.98px) {
    .ec-settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (min-width: 1400px) {
    .ec-facts {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .ec-chart-svg {
        height: 280px;
    }
}

@media (max-width: 991.98px) {
    .ec-content {
        padding: 16px;
    }

    .ec-topbar {
        padding-inline: 12px;
    }

    .ec-pagehead h1 {
        font-size: 22px;
    }
}

@media (max-width: 767.98px) {
    .ec-chart-svg {
        height: 240px;
    }

    .ec-stat .h4,
    .ec-stat .h5,
    .ec-stat .ec-money {
        font-size: 24px;
    }

    .ec-pagehead {
        flex-direction: column;
    }

    .ec-pagehead-actions,
    .ec-pagehead-actions .btn {
        width: 100%;
    }

    .table-responsive {
        overflow: visible;
        background: transparent;
        border: 0;
    }

    .table-responsive table {
        min-width: 0;
    }

    .table-responsive thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .table-responsive table,
    .table-responsive tbody,
    .table-responsive tr,
    .table-responsive td {
        display: block;
        width: 100%;
    }

    .table-responsive tr {
        margin-bottom: 12px;
        padding: 12px 14px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
    }

    .table-responsive td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 6px 0;
        border: 0;
        text-align: right;
        background: transparent;
    }

    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
    }

    .table-responsive td[colspan] {
        display: block;
        text-align: left;
    }

    .table-responsive td[colspan]::before {
        content: none;
    }

    .table-responsive tbody tr:hover td {
        background: transparent;
    }
}

@media (max-width: 430px) {
    .ec-guest-card > .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

@media (max-width: 359.98px) {
    .ec-content {
        padding: 12px;
    }

    .ec-kpi > [class*="col-"] {
        width: 100%;
    }
}

.ec-pay-form .ec-pay-holder,
.ec-pay-form .ec-pay-iban,
.ec-pay-form .ec-pay-paypal,
.ec-pay-form .ec-pay-note {
    display: none;
}

.ec-pay-form.is-bank .ec-pay-holder,
.ec-pay-form.is-bank .ec-pay-iban,
.ec-pay-form.is-bank .ec-pay-note,
.ec-pay-form.is-paypal .ec-pay-paypal,
.ec-pay-form.is-paypal .ec-pay-note,
.ec-pay-form.is-other .ec-pay-holder,
.ec-pay-form.is-other .ec-pay-note,
.ec-pay-form:has(#method option[value="BANK_TRANSFER"]:checked) .ec-pay-holder,
.ec-pay-form:has(#method option[value="BANK_TRANSFER"]:checked) .ec-pay-iban,
.ec-pay-form:has(#method option[value="BANK_TRANSFER"]:checked) .ec-pay-note,
.ec-pay-form:has(#method option[value="PAYPAL"]:checked) .ec-pay-paypal,
.ec-pay-form:has(#method option[value="PAYPAL"]:checked) .ec-pay-note,
.ec-pay-form:has(#method option[value="OTHER"]:checked) .ec-pay-holder,
.ec-pay-form:has(#method option[value="OTHER"]:checked) .ec-pay-note {
    display: block;
}

@media (max-width: 767.98px) {
    .ec-panel form > .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

@media (min-width: 992px) {
    .ec-shell {
        display: flex;
    }
}

@media (min-width: 1440px) {
    .ec-content {
        padding: 28px 32px 48px;
    }
}
