﻿:root {
    --hb-bg: #f5f7fb;
    --hb-surface: #ffffff;
    --hb-border: #dfe3ec;
    --hb-text: #1e2433;
    --hb-muted: #667085;
    --hb-primary: #6f4ad6;
    --hb-success: #16a34a;
    --hb-warning: #d48a00;
    --hb-danger: #dc2626;
}

body {
    font-family: "Inter", "Segoe UI", sans-serif;
    background: var(--hb-bg);
    color: var(--hb-text);
}

.hb-shell {
    min-height: 100vh;
    background: var(--hb-bg);
}

.hb-header {
    background: var(--hb-surface);
    border-bottom: 1px solid var(--hb-border);
    padding: 14px 32px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.hb-brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.hb-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 2px solid #ff6a00;
    color: #ff6a00;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: lowercase;
    flex-shrink: 0;
}

.hb-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hb-subtitle {
    margin: 4px 0 0;
    color: var(--hb-muted);
    font-size: 13px;
}

.hb-header-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hb-pill {
    border-radius: 999px;
    border: 1px solid var(--hb-border);
    padding: 5px 12px;
    font-size: 12px;
    background: #fff;
    color: #4b5565;
    font-weight: 500;
}

.hb-pill-success {
    border-color: #b3ebc5;
    background: #ebf9ef;
    color: var(--hb-success);
}

.hb-pill-muted {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #6b7280;
}

.hb-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.hb-tabs {
    display: flex;
    gap: 4px;
    padding: 0 32px;
    border-bottom: 1px solid var(--hb-border);
    background: var(--hb-surface);
    overflow-x: auto;
}

.hb-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #4b5565;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 10px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.hb-tab svg {
    opacity: 0.6;
    flex-shrink: 0;
}
.hb-tab.active svg,
.hb-tab:hover svg {
    opacity: 1;
}

.hb-tab.active,
.hb-tab:hover {
    color: var(--hb-primary);
    border-bottom-color: var(--hb-primary);
}

.hb-main {
    padding: 24px 20px 36px;
}

.hb-content-wrap {
    max-width: 980px;
}

.settings-page-wrap {
    max-width: 760px;
}

.settings-account-panel {
    border-radius: 12px;
}

.settings-card-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.settings-form-group {
    margin-bottom: 10px;
}

.settings-form-group .font-weight-bold {
    font-size: 15px;
    margin-bottom: 6px;
}

.settings-form-group .form-control.form-control-solid {
    border-radius: 10px;
    min-height: 42px;
}

.settings-success {
    border: 1px solid #95e3b2;
    border-radius: 10px;
    background: #ebf9ef;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.settings-success-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1a7a4a;
}

.settings-success-note {
    margin-top: 4px;
    font-size: 14px;
    color: #2a7f4f;
}

.settings-next-step {
    margin-top: 16px;
    border: 1px solid #8d7ae5;
    background: #efeaff;
    border-radius: 10px;
    color: #5d49b7;
    font-size: 15px;
    padding: 14px 16px;
}

.settings-next-step strong {
    font-weight: 700;
}

.panel {
    border: 1px solid var(--hb-border);
    border-radius: 14px;
    background: var(--hb-surface);
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.panel + .panel,
.panel + .row,
.row + .panel {
    margin-top: 18px;
}

.panel-header {
    border-bottom: 1px solid var(--hb-border);
    padding: 20px 24px 14px;
}

.panel-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.panel-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--hb-muted);
}

.panel-body {
    padding: 18px 24px 24px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    border: 1px solid var(--hb-border);
    border-radius: 12px;
    background: #fff;
    padding: 14px 18px;
    min-height: 86px;
    position: relative;
    overflow: hidden;
}

.metric-card-accent-success::before,
.metric-card-accent-danger::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.metric-card-accent-success::before {
    background: #22c55e;
}

.metric-card-accent-danger::before {
    background: #ef4444;
}

.metric-label {
    color: #6b7280;
    font-size: 13px;
}

.metric-value {
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    margin-top: 6px;
}

.metric-value.success { color: var(--hb-success); }
.metric-value.warning { color: var(--hb-warning); }
.metric-value.danger { color: var(--hb-danger); }

.sync-metric-card {
    min-height: 96px;
    padding-bottom: 10px;
}

.sync-metric-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sync-metric-total-icon {
    color: #9aa3b2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sync-metric-track {
    margin-top: 8px;
    width: 52px;
    height: 4px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.sync-metric-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.sync-metric-fill-primary { background: #6f4ad6; }
.sync-metric-fill-success { background: #16a34a; }
.sync-metric-fill-danger { background: #dc2626; }
.sync-metric-fill-warning { background: #d48a00; }

.sync-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.sync-status-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sync-status-label svg {
    flex-shrink: 0;
}

.hb-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.hb-page-btn:hover { background: #f4f2ff; border-color: #d6c7ff; }
.hb-page-btn-active { background: #5b4ac7; border-color: #5b4ac7; color: #fff; cursor: default; }
.hb-page-btn-active:hover { background: #5b4ac7; }
.hb-page-btn-disabled { opacity: 0.4; cursor: default; pointer-events: none; }

.table-clean {
    width: 100%;
    border-collapse: collapse;
}

.table-clean thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--hb-border);
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 14px;
}

.table-clean tbody td {
    border-bottom: 1px solid #ebeff5;
    padding: 14px;
    font-size: 14px;
}

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

.sync-log-table thead th {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9aa3b2;
    background: #f8fafc;
}

.sync-log-table tbody td {
    font-size: 13px;
    vertical-align: middle;
}

.sync-log-table tbody td:first-child {
    display: flex;
    align-items: center;
    min-height: 44px;
}

.sync-detail-card {
    border: 1px solid #e7ecf4;
    border-radius: 10px;
    background: #fbfdff;
    margin-bottom: 10px;
    overflow: hidden;
}

.sync-detail-head {
    background: #f3f7ff;
    border-bottom: 1px solid #e3eaf8;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 10px;
}

.sync-detail-body {
    padding: 10px;
}

.sync-detail-line {
    font-size: 12px;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: break-word;
}

.sync-detail-line:last-child {
    margin-bottom: 0;
}

.sync-detail-json {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #0f172a;
    padding: 2px 6px;
    font-size: 11px;
}

.sync-severity {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.sync-severity-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.sync-severity-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.sync-severity-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.hb-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid;
}

.hb-badge-success { color: var(--hb-success); border-color: #86efac; background: #edfdf2; }
.hb-badge-warning { color: var(--hb-warning); border-color: #f8d17c; background: #fffbeb; }
.hb-badge-danger { color: var(--hb-danger); border-color: #f6b6b6; background: #fef2f2; }
.hb-badge-primary { color: var(--hb-primary); border-color: #d6c7ff; background: #f5f1ff; }
.hb-badge-info { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
.hb-badge-secondary { color: #475569; border-color: #cbd5e1; background: #f8fafc; }

.sync-filters-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) minmax(200px, 1fr) minmax(220px, 1fr);
    gap: 16px;
    align-items: end;
}

.sync-filter-group {
    min-width: 0;
}

.sync-filter-label {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #64748b;
}

.sync-filter-search-wrap {
    position: relative;
}

.sync-filter-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94a3b8;
}

.sync-filter-input,
.sync-filter-select {
    width: 100%;
    height: 40px;
    border: 1px solid #cfd6e4;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.2;
    padding: 0 12px;
    outline: none;
}

.sync-filter-input {
    padding-left: 38px;
}

.sync-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sync-filter-input:focus,
.sync-filter-select:focus {
    border-color: #a9b8d2;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

@media (max-width: 992px) {
    .sync-filters-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.soft-block {
    border: 1px solid var(--hb-border);
    border-radius: 12px;
    background: #fff;
    padding: 16px;
}

.soft-block.success { background: #eefbf2; border-color: #a4ebbe; }
.soft-block.primary { background: #f4f2ff; border-color: #d9ccff; }

.btn-hb-primary {
    background: var(--hb-primary);
    border: 1px solid var(--hb-primary);
    color: #fff;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
}

.btn-hb-outline {
    background: #fff;
    border: 1px solid #cdd5e2;
    color: #344054;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
}

.btn-hb-primary:hover,
.btn-hb-outline:hover {
    text-decoration: none;
    color: inherit;
}

.form-control.form-control-solid {
    background: #fff;
    border: 1px solid #cfd6e4;
    border-radius: 10px;
}

.helper-text {
    font-size: 13px;
    color: var(--hb-muted);
    margin-top: 6px;
}

.hb-section-head {
    margin-bottom: 18px;
}

.setup-page {
    max-width: 1048px;
    margin: 0 auto;
}

.hb-section-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hb-section-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--hb-muted);
}

.setup-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
}

.setup-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.setup-panel-note {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--hb-muted);
}

.setup-panel-body {
    padding-top: 14px;
}

.setup-list-block {
    border: 1px solid #edf1f7;
    border-radius: 12px;
    overflow: hidden;
}

.setup-category-head {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 28px minmax(320px, 1.08fr) auto;
    align-items: center;
    gap: 18px;
    padding: 10px 18px;
    border-bottom: 1px solid #edf1f7;
    background: #fafbfd;
    color: #9aa3b2;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.setup-category-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 28px minmax(320px, 1.08fr) auto;
    align-items: center;
    gap: 18px;
    padding: 10px 18px;
    border-bottom: 1px solid #edf1f7;
}

.setup-category-row-deletable {
    grid-template-columns: minmax(200px, 1fr) 28px minmax(280px, 1.08fr) auto 28px;
}

.setup-category-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #e0e4ec;
    border-radius: 7px;
    background: #fff;
    color: #9aa3b2;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.setup-category-delete:hover {
    color: var(--hb-danger);
    border-color: #f6b6b6;
    background: #fef2f2;
}

.setup-category-row-last {
    border-bottom: none;
}

.setup-category-caption {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9aa3b2;
    margin-bottom: 2px;
}

.setup-category-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    line-height: 1.4;
}

.setup-category-meta,
.setup-category-marketplace,
.setup-category-status {
    min-width: 0;
}

.setup-category-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #98a2b3;
    opacity: 0.85;
}

.setup-category-status {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.setup-inline-input {
    width: 100%;
    min-height: 36px;
    font-size: 13px;
    padding: 6px 12px;
    color: #344054;
}

.setup-inline-input.is-missing {
    border-color: #f7a5a5 !important;
    background-color: #fff;
}

select.setup-inline-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}

.setup-add-row {
    width: 100%;
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px dashed #cdd5e2;
    border-radius: 10px;
    background: #fff;
    color: #667085;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.setup-mini-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    min-width: 62px;
    font-size: 11px;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.setup-mini-pill-success {
    color: #16a34a;
    background: #edfdf2;
    border-color: #bbf7d0;
}

.setup-mini-pill-warning {
    color: #ea580c;
    background: #fff7ed;
    border-color: #fed7aa;
}

.setup-mini-pill-danger {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.setup-mini-pill-neutral {
    color: #667085;
    background: #f8fafc;
    border-color: #dbe4ee;
}

.setup-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-accordion-item {
    border: 1px solid #edf1f7;
    border-radius: 12px;
    overflow: hidden;
}

.setup-accordion-toggle {
    width: 100%;
    border: none;
    background: #fff;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.setup-accordion-leading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.setup-accordion-chevron {
    color: #98a2b3;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.setup-accordion-route {
    font-size: 12px;
    color: #344054;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
}

.setup-accordion-route span {
    color: #98a2b3;
    margin: 0 6px;
}

.setup-accordion-body {
    display: none;
    border-top: 1px solid #edf1f7;
    background: #fbfcfe;
    padding: 8px 16px 12px;
}

.setup-accordion-body.is-open {
    display: block;
}

.setup-accordion-item.is-open .setup-accordion-chevron {
    transform: rotate(90deg);
}

.setup-attribute-table thead th {
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.setup-attribute-table tbody td {
    font-size: 12px;
    vertical-align: middle;
}

.setup-attribute-table tbody tr.is-missing td {
    background: #fff4f4;
}

.setup-variation-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.setup-variation-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6366f1;
    font-size: 14px;
    line-height: 1;
}

.setup-variation-icon::before {
    content: '◆';
}

.setup-variation-tag {
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 3px;
    padding: 3px 7px;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.06);
}

.setup-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.setup-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #344054;
    margin-bottom: 8px;
}

.setup-toggle-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    margin: 0;
}

.setup-toggle-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #344054;
}

.setup-toggle-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--hb-muted);
}

.setup-switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
}

.setup-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.setup-switch-ui {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d0d5dd;
    transition: background 0.2s ease;
}

.setup-switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18);
    transition: transform 0.2s ease;
}

.setup-switch input:checked + .setup-switch-ui {
    background: var(--hb-primary);
}

.setup-switch input:checked + .setup-switch-ui::after {
    transform: translateX(16px);
}

.setup-choice-list {
    display: grid;
    gap: 10px;
}

.setup-choice {
    margin: 0;
    cursor: pointer;
    position: relative;
    display: block;
}

.setup-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.setup-choice-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 11px 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.setup-choice.is-selected .setup-choice-body {
    border-color: #7aa2ff;
    background: #edf4ff;
    box-shadow: inset 0 0 0 1px #7aa2ff;
}

.setup-choice-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.setup-choice-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--hb-muted);
}

.setup-choice-count {
    font-size: 12px;
    color: #6f4ad6;
    font-weight: 600;
    white-space: nowrap;
}

.setup-filter-panel {
    margin-top: 10px;
    border-top: 1px solid #edf1f7;
    padding-top: 10px;
}

.setup-filter-title {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.setup-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.setup-filter-toolbar .setup-filter-title {
    margin-bottom: 0;
}

.setup-add-filter-btn {
    font-size: 12px;
    padding: 7px 12px;
}

.setup-filter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setup-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.setup-filter-row-actions {
    display: flex;
    align-items: center;
}

.setup-remove-filter-btn {
    font-size: 12px;
    padding: 7px 12px;
    min-width: 74px;
}

.setup-filter-empty {
    font-size: 12px;
    color: #8a95a8;
    padding: 6px 0;
}

.setup-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.setup-filter-label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

.setup-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.orders-metric-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;
    gap: 12px;
}

.orders-metric-info {
    flex: 1;
    min-width: 0;
}

.orders-metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.orders-metric-icon-neutral  { background: #f3f4f6; color: #6b7280; }
.orders-metric-icon-success   { background: #dcfce7; color: #16a34a; }
.orders-metric-icon-processing { background: #fff7ed; color: #f97316; }
.orders-metric-icon-pending   { background: #fefce8; color: #d48a00; }

.orders-detail-link {
    color: var(--hb-primary);
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
}
.orders-detail-link:hover { text-decoration: underline; }

/* ─── Order Detail Drawer ─────────────────────────────── */

.order-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.order-drawer-overlay.open { opacity: 1; visibility: visible; }

.order-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.10);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.order-drawer.open { transform: translateX(0); }

.order-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 16px;
}
.order-drawer-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--hb-text);
}
.order-drawer-header .drawer-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--hb-muted);
}
.order-drawer-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}
.order-drawer-close:hover { background: #f3f4f6; color: #111; }

.order-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}

.drawer-section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--hb-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hb-border);
    margin-bottom: 12px;
}

.drawer-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}
.drawer-info-label { color: var(--hb-muted); }
.drawer-info-value { font-weight: 500; color: var(--hb-text); }

.drawer-product-card {
    border: 1px solid var(--hb-border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.drawer-product-card:last-child { margin-bottom: 0; }

.drawer-product-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.drawer-product-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--hb-text);
}
.drawer-product-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--hb-text);
    white-space: nowrap;
    margin-left: 12px;
}
.drawer-product-qty {
    font-size: 13px;
    color: var(--hb-muted);
    margin-top: 2px;
}

.drawer-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    margin-top: 8px;
    border-top: 1px solid var(--hb-border);
}
.drawer-total-label { font-size: 15px; font-weight: 700; color: var(--hb-text); }
.drawer-total-value { font-size: 15px; font-weight: 700; color: var(--hb-text); }

.drawer-info-note {
    margin-top: 20px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}
.drawer-info-note strong {
    font-weight: 700;
}

.orders-table thead th {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9aa3b2;
    background: #f8fafc;
}

.orders-table tbody td {
    font-size: 13px;
}

.license-plan-card {
    border: 2px solid #e8ecf2;
    border-radius: 14px;
    padding: 28px;
    height: 100%;
    background: #fff;
}

.license-plan-card-pro {
    border-color: #6f4ad6;
    background: linear-gradient(135deg, #f8f5ff 0%, #ede7ff 100%);
    position: relative;
    overflow: hidden;
}

.license-plan-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.license-plan-heading-pro {
    margin-bottom: 6px;
}

.license-plan-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.license-plan-icon-free {
    background: #eefbf2;
    color: #16a34a;
}

.license-plan-icon-pro {
    background: rgba(111, 74, 214, 0.12);
    color: var(--hb-primary);
}

.license-plan-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.license-plan-copy {
    color: #7a8499;
    font-size: 13px;
    margin-bottom: 20px;
}

.license-plan-copy-pro {
    color: #7a64c8;
}

.license-plan-price-row {
    margin-bottom: 20px;
}

.license-plan-price {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
}

.license-plan-price-pro {
    color: var(--hb-primary);
}

.license-plan-period {
    color: #9aa3b2;
    font-size: 14px;
}

.license-plan-period-pro {
    color: #9c88d8;
}

.license-plan-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--hb-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .5px;
}

.license-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    font-size: 13px;
}

.license-feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f6f9;
    color: #4b5565;
}

.license-feature-list li:last-child {
    border-bottom: none;
}

.license-feature-list-pro li {
    color: #3b2a8a;
    border-bottom-color: #ddd6f5;
}

.license-feature-list li.is-muted {
    color: #c0c8d8;
}

.license-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.license-feature-icon.is-success {
    color: #22c55e;
}

.license-feature-icon.is-muted {
    color: #c0c8d8;
}

.license-feature-icon.is-pro {
    color: var(--hb-primary);
}

.license-plan-button {
    width: 100%;
    justify-content: center;
}

.license-plan-actions {
    gap: 10px;
}

.license-plan-button-primary {
    flex: 1;
    justify-content: center;
}

.license-plan-button-secondary {
    background: #fff;
}

.license-table-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.license-compare-table thead th {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9aa3b2;
}

.license-table-indicator.is-success {
    color: #16a34a;
}

.license-table-indicator.is-pro {
    color: var(--hb-primary);
}

.license-table-indicator.is-muted {
    color: #c0c8d8;
}

.license-support-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.license-support-copy {
    display: flex;
    align-items: center;
    gap: 12px;
}

.license-support-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f4f2ff;
    color: var(--hb-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.license-support-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
}

.license-support-text {
    color: #7a8499;
    font-size: 13px;
    margin: 0;
}

.license-page {
    max-width: 860px;
    margin: 0 auto;
}

.license-top-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.license-top-card {
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    min-height: 128px;
}

.license-top-card-pro {
    background: #e9e0ff;
    border-color: #d7c7ff;
}

.license-top-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.license-top-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.license-top-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.license-top-title-pro {
    font-size: 20px;
    color: #3f2f74;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.license-top-copy {
    margin: 4px 0 6px;
    font-size: 12px;
    color: #677189;
}

.license-chip-active {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 6px;
    background: #dce8ff;
    color: #4a67b1;
    font-size: 10px;
    font-weight: 700;
}

.license-pro-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #6f4ad6;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.license-top-price-row {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.license-top-price {
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
    color: #1c2534;
}

.license-top-period {
    color: #6b7280;
    font-size: 12px;
}

.license-top-limit-wrap {
    margin-top: 12px;
    text-align: right;
}

.license-top-limit-label {
    display: block;
    font-size: 11px;
    color: #8a95a8;
}

.license-top-limit-value {
    font-size: 27px;
    line-height: 1.1;
    color: #1f2937;
}

.license-top-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.license-top-actions .btn-hb-primary,
.license-top-actions .btn-hb-outline {
    min-height: 34px;
    border-radius: 8px;
    font-size: 12px;
    padding: 7px 10px;
}

.license-compare-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.license-compare-v2 thead th {
    font-size: 11px;
    color: #8a95a8;
    text-transform: none;
    letter-spacing: 0;
}

.license-compare-v2 tbody td {
    font-size: 13px;
    padding: 10px 14px;
    vertical-align: middle;
}

.license-feature-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.license-feature-desc {
    margin-top: 2px;
    font-size: 12px;
    color: #8a95a8;
}

.license-pro-head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6f4ad6;
}

.license-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.license-dot-success {
    color: #16a34a;
    background: #e9f9ee;
    border: 1px solid #89d7a6;
}

.license-dot-pro {
    color: #6f4ad6;
    background: #f1ecff;
    border: 1px solid #c9b8ff;
}

.license-dot-lock {
    color: #a0a8b8;
    background: #f3f4f6;
    border: 1px solid #d9dde5;
}

.license-pro-feature-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.license-pro-feature-card {
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
    min-height: 76px;
    display: flex;
    flex-direction: column;
}

.license-pro-feature-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.license-pro-feature-chip {
    font-size: 10px;
    font-weight: 700;
    color: #8065d8;
    background: #ece4ff;
    border-radius: 5px;
    padding: 2px 7px;
}

.license-pro-feature-lock {
    color: #b4bccb;
    display: inline-flex;
    align-items: center;
}

.license-pro-feature-card h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.license-pro-feature-desc {
    margin: 6px 0 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.license-pro-feature-btn {
    font-size: 13px;
    padding: 7px 14px;
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    width: auto;
}

.license-contact-panel {
    margin-top: 14px;
}

.license-contact-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.license-contact-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.license-contact-desc {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.license-contact-btn {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 16px;
}

.table-hover tbody tr.clickable-row {
    cursor: pointer;
}

.table-hover tbody tr.clickable-row:hover td {
    background-color: #f3f6fb;
}

.table-hover tbody tr.clickable-row.selected td {
    background-color: #f0ebff !important;
}

#job-status-box {
    min-height: 90px;
    white-space: pre-wrap;
    font-size: 13px;
    color: #3f4254;
}

.sync-item-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1f2937;
    font-weight: 500;
}

.sync-item-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sync-item-sku {
    font-size: 10px;
    color: #8a9ab5;
    margin-top: 2px;
    padding-left: 22px;
}

#capability-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f3f6f9;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#capability-list li:last-child {
    border-bottom: none;
}

#capability-list li.enabled::before {
    content: "\2713";
    color: #1bc5bd;
    font-weight: 700;
}

#capability-list li.disabled::before {
    content: "\2717";
    color: #f64e60;
    font-weight: 700;
}

.toast-host {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 9999;
    display: grid;
    gap: 8px;
}

.toast-item {
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 0.42rem;
    padding: 10px 14px;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    font-size: 13px;
    color: #3f4254;
    animation: toastIn 220ms ease both;
}

.toast-item.success { border-left: 4px solid #1bc5bd; }
.toast-item.error { border-left: 4px solid #f64e60; }
.toast-item.info { border-left: 4px solid #3699ff; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes hb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cat-select-list {
    height: 320px;
    overflow-y: auto;
    border-top: 1px solid #f3f6f9;
}

.cat-row {
    padding: 10px 16px;
    border-bottom: 1px solid #f3f6f9;
    cursor: pointer;
    transition: background 150ms;
}

.cat-row:hover {
    background: #f3f6f9;
}

.cat-row-selected {
    background: #ede8ff !important;
    border-left: 3px solid var(--hb-primary);
}

@media (max-width: 1199.98px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .setup-page {
        max-width: 100%;
    }

    .setup-category-head {
        display: none;
    }

    .setup-category-row {
        grid-template-columns: 1fr;
    }

    .setup-category-arrow,
    .setup-category-status {
        justify-content: flex-start;
    }

    .setup-two-col {
        grid-template-columns: 1fr;
    }

    .setup-filter-grid {
        grid-template-columns: 1fr;
    }

    .setup-filter-row {
        grid-template-columns: 1fr;
    }

    .setup-filter-row-actions {
        justify-content: flex-start;
    }

    .setup-accordion-toggle {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .hb-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .license-top-grid,
    .license-pro-feature-grid {
        grid-template-columns: 1fr;
    }

    .license-top-actions {
        grid-template-columns: 1fr;
    }

    .license-top-title {
        font-size: 18px;
    }

    .license-top-price {
        font-size: 30px;
    }

    .license-top-limit-value {
        font-size: 22px;
    }

    .license-pro-feature-card h4 {
        font-size: 20px;
    }

    .hb-tabs {
        padding: 0 10px;
    }

    .hb-main {
        padding: 16px 8px 24px;
    }

    .panel-header,
    .panel-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .panel-title {
        font-size: 30px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

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

    .setup-category-row {
        gap: 8px;
        padding: 12px;
    }

    .setup-add-row {
        font-size: 12px;
    }

    .setup-accordion-toggle,
    .setup-accordion-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .license-plan-card {
        padding: 20px;
    }

    .license-support-copy {
        align-items: flex-start;
    }
}
