:root {
    --bg: #f4f7f8;
    --surface: #ffffff;
    --surface-2: #f8fafb;
    --text: #172026;
    --muted: #6d7c84;
    --border: #dce5e8;
    --dark: #10191d;
    --teal: #52d2c8;
    --teal-dark: #1a9f99;
    --orange: #ff6b35;
    --orange-dark: #db4d1d;
    --danger: #d94452;
    --success: #168f64;
    --warning: #a86a10;
    --shadow: 0 16px 40px rgba(21, 39, 47, .08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 100% 0, rgba(82,210,200,.12), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #111b1f 0%, #0b1215 100%);
    color: #eaf3f4;
    z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 28px; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand span { display: grid; gap: 1px; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { color: #8fa4ac; font-size: 12px; }
.sidebar-nav { display: grid; gap: 7px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 12px;
    color: #aebdc2;
    transition: .2s ease;
}
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.06); transform: translateX(2px); }
.sidebar-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(82,210,200,.18), rgba(82,210,200,.06)); box-shadow: inset 3px 0 var(--teal); }
.nav-icon { width: 24px; text-align: center; color: var(--teal); font-size: 18px; }
.nav-label { padding: 22px 12px 5px; color: #60757d; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.sidebar-user {
    margin-top: auto;
    padding: 13px;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 26px;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
}
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), #ff9a56); color: white; font-weight: 800; }
.sidebar-user-copy { min-width: 0; display: grid; }
.sidebar-user-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.sidebar-user-copy span { color: #869ba2; font-size: 11px; }
.logout-link { color: #789097; font-size: 19px; }
.logout-link:hover { color: var(--orange); }

.main-content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    min-height: 94px;
    padding: 21px clamp(20px, 4vw, 42px);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,.84);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(220,229,232,.85);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.035em; }
.eyebrow { margin: 0 0 2px; color: var(--teal-dark); font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.topbar-badge { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #527078; font-size: 12px; font-weight: 700; }
.topbar-badge span { width: 8px; height: 8px; border-radius: 50%; background: #31c47e; box-shadow: 0 0 0 5px rgba(49,196,126,.14); }
.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.content-wrap { width: min(1480px, 100%); margin: 0 auto; padding: 30px clamp(18px, 4vw, 42px) 42px; flex: 1; }
.app-footer { padding: 20px clamp(18px, 4vw, 42px); display: flex; justify-content: space-between; gap: 20px; color: #829198; border-top: 1px solid var(--border); font-size: 12px; }

.alert { margin-bottom: 18px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-radius: 13px; font-weight: 650; box-shadow: 0 8px 24px rgba(24,38,44,.07); }
.alert button { border: 0; background: transparent; font-size: 20px; color: inherit; }
.alert-success { color: #0f704e; background: #ddf6eb; border: 1px solid #bfead8; }
.alert-danger { color: #a52c39; background: #ffe9ec; border: 1px solid #f7c9cf; }
.alert-warning { color: #80510e; background: #fff3d9; border: 1px solid #f3dfad; }
.alert-info { color: #196f76; background: #e2f7f6; border: 1px solid #bfe9e7; }

.page-actions { margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.page-actions .action-group { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
    min-height: 42px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 750;
    font-size: 13px;
    transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(22,38,44,.12); }
.btn-primary { background: linear-gradient(135deg, var(--orange), #ff8655); color: white; }
.btn-primary:hover { background: linear-gradient(135deg, var(--orange-dark), var(--orange)); }
.btn-secondary { background: var(--dark); color: white; }
.btn-outline { background: white; color: #32464e; border-color: var(--border); }
.btn-teal { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); color: #052f31; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c9cd; }
.btn-sm { min-height: 34px; padding: 7px 11px; border-radius: 9px; font-size: 12px; }
.btn-icon { width: 38px; padding: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.stat-card::after { content: ''; position: absolute; width: 95px; height: 95px; right: -33px; top: -40px; border-radius: 50%; background: rgba(82,210,200,.13); }
.stat-card.orange::after { background: rgba(255,107,53,.12); }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-value { margin: 7px 0 1px; font-size: clamp(24px, 3vw, 34px); font-weight: 850; letter-spacing: -.04em; }
.stat-note { color: #91a0a5; font-size: 11px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 20px; }
.card-header { padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 22px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #e8eef0; vertical-align: middle; }
th { color: #71838a; background: #fafcfc; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
td { font-size: 13px; }
tbody tr:hover { background: #fbfdfd; }
tbody tr:last-child td { border-bottom: 0; }
.product-cell { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.product-thumb { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 11px; object-fit: cover; background: #edf3f4; border: 1px solid var(--border); }
.product-thumb.placeholder { display: grid; place-items: center; color: #8ca0a7; font-weight: 800; }
.product-cell strong { display: block; }
.product-cell span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.badge-teal { color: #12736f; background: #dff7f5; }
.badge-orange { color: #aa451e; background: #fff0e9; }
.badge-gray { color: #65777e; background: #eef3f4; }
.badge-danger { color: #a92e3a; background: #ffe8eb; }

.filter-bar { margin-bottom: 18px; padding: 14px; display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px,1fr) minmax(160px,1fr) auto; gap: 10px; background: white; border: 1px solid var(--border); border-radius: 15px; box-shadow: 0 8px 24px rgba(23,43,51,.05); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.form-group { min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; color: #31464e; font-size: 12px; font-weight: 750; }
label .optional { color: #91a0a5; font-weight: 500; }
.input, input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid #cfdbdf;
    border-radius: 11px;
    outline: none;
    transition: .16s ease;
}
textarea { min-height: 125px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 4px rgba(82,210,200,.14); }
.help { margin: 6px 0 0; color: #819096; font-size: 11px; }
.error-list { margin: 0 0 20px; padding: 15px 18px 15px 38px; color: #a52d39; background: #fff0f2; border: 1px solid #f4ccd1; border-radius: 13px; }
.error-list li + li { margin-top: 4px; }

.section-title { margin: 2px 0 16px; display: flex; align-items: center; gap: 11px; }
.section-title .number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #e4f8f6; color: var(--teal-dark); font-size: 12px; font-weight: 850; }
.section-title h2 { margin: 0; font-size: 17px; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.form-section { padding: 23px; }
.form-section + .form-section { border-top: 1px solid var(--border); }
.form-actions { padding: 20px 23px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; background: #fafcfc; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-card { position: relative; min-width: 110px; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid #cfdbdf; border-radius: 11px; background: white; font-size: 13px; font-weight: 700; }
.radio-card input:checked + span { color: #086560; border-color: var(--teal-dark); background: #e8faf8; box-shadow: 0 0 0 3px rgba(82,210,200,.12); }


.package-section { background: linear-gradient(180deg, #fcfefe 0%, #f8fcfc 100%); }
.package-hint { margin: -2px 0 17px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; color: #45626a; background: #eef8f8; border: 1px solid #d8eeee; border-radius: 12px; }
.package-hint > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; color: var(--teal-dark); background: white; border: 1px solid #d5e8e8; border-radius: 10px; font-size: 17px; }
.package-hint strong, .package-hint small { display: block; }
.package-hint strong { font-size: 12px; }
.package-hint small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.field-with-unit { position: relative; }
.field-with-unit input { padding-right: 48px; }
.field-unit { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #73868d; font-size: 11px; font-weight: 800; pointer-events: none; }
.package-summary { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.package-summary > div { padding: 12px 13px; background: #f7fafa; border: 1px solid var(--border); border-radius: 11px; }
.package-summary span, .package-summary strong { display: block; }
.package-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.package-summary strong { margin-top: 3px; font-size: 13px; }

.upload-zone { position: relative; min-height: 118px; padding: 18px; display: grid; place-items: center; text-align: center; border: 1.5px dashed #bfcdd1; border-radius: 14px; background: #fafcfc; transition: .18s ease; }
.upload-zone:hover { border-color: var(--teal-dark); background: #f3fbfb; }
.upload-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone strong { display: block; margin-bottom: 3px; font-size: 13px; }
.upload-zone span { color: var(--muted); font-size: 11px; }
.preview-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 10px; }
.preview-item { position: relative; min-height: 110px; padding: 7px; background: #f6f9fa; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.preview-item img { width: 100%; height: 92px; object-fit: cover; border-radius: 8px; }
.preview-item video { width: 100%; height: 92px; object-fit: cover; border-radius: 8px; background: #111; }
.preview-name { margin-top: 5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.existing-media { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 10px; }
.media-card { padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: #fafcfc; }
.media-card img, .media-card video { width: 100%; height: 118px; object-fit: cover; border-radius: 8px; background: #10191d; }
.media-card label { margin: 7px 0 0; display: flex; align-items: center; gap: 7px; font-size: 11px; }

.empty-state { padding: 55px 25px; text-align: center; }
.empty-state .empty-icon { width: 68px; height: 68px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 22px; background: #e9f8f7; color: var(--teal-dark); font-size: 30px; }
.empty-state h3 { margin: 0 0 5px; }
.empty-state p { margin: 0 auto 18px; max-width: 520px; color: var(--muted); }

.pagination { margin-top: 18px; display: flex; justify-content: center; gap: 7px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: white; border: 1px solid var(--border); font-size: 12px; font-weight: 750; }
.pagination .active { color: white; background: var(--dark); border-color: var(--dark); }

.product-detail-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(310px,.7fr); gap: 20px; }
.gallery-main { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #f3f7f8; border-radius: 16px; border: 1px solid var(--border); }
.gallery-thumbs { margin-top: 10px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.gallery-thumbs img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.detail-list { display: grid; gap: 0; }
.detail-row { padding: 12px 0; display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 12px; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.detail-row dd { margin: 0; font-size: 13px; font-weight: 650; word-break: break-word; }
.description-box { white-space: pre-wrap; color: #42565e; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px,.82fr) minmax(0,1.18fr); background: #10191d; }
.login-panel { padding: clamp(28px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; background: white; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 50px; }
.login-brand img { width: 58px; height: 58px; }
.login-brand strong { display: block; font-size: 17px; }
.login-brand span { display: block; color: var(--muted); font-size: 12px; }
.login-box { width: min(430px,100%); }
.login-box h1 { margin: 0 0 8px; font-size: clamp(30px,4vw,44px); letter-spacing: -.05em; }
.login-box > p { margin: 0 0 28px; color: var(--muted); }
.login-box .form-group { margin-bottom: 15px; }
.login-box .btn { width: 100%; margin-top: 6px; min-height: 48px; }
.login-visual { position: relative; overflow: hidden; display: grid; place-items: center; padding: 50px; background: radial-gradient(circle at 30% 30%, rgba(82,210,200,.2), transparent 30rem), linear-gradient(145deg,#10191d,#172a30); color: white; }
.login-visual::before, .login-visual::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); }
.login-visual::before { width: 620px; height: 620px; right: -240px; bottom: -270px; }
.login-visual::after { width: 420px; height: 420px; left: -210px; top: -120px; }
.visual-copy { position: relative; z-index: 1; max-width: 600px; }
.visual-copy .pill { display: inline-flex; padding: 7px 11px; border-radius: 999px; color: var(--teal); background: rgba(82,210,200,.1); border: 1px solid rgba(82,210,200,.2); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.visual-copy h2 { margin: 18px 0 14px; font-size: clamp(36px,5vw,68px); line-height: 1.02; letter-spacing: -.06em; }
.visual-copy h2 em { color: var(--orange); font-style: normal; }
.visual-copy p { color: #a8b9bf; font-size: 16px; max-width: 520px; }

.installer-page { min-height: 100vh; padding: 40px 20px; display: grid; place-items: center; background: radial-gradient(circle at 10% 10%, rgba(82,210,200,.18), transparent 25rem), #10191d; }
.installer-card { width: min(780px,100%); overflow: hidden; background: white; border-radius: 24px; box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.installer-head { padding: 30px; display: flex; align-items: center; gap: 16px; color: white; background: linear-gradient(135deg, #15262c, #0d171b); }
.installer-head img { width: 58px; height: 58px; }
.installer-head h1 { margin: 0; font-size: 25px; }
.installer-head p { margin: 3px 0 0; color: #9eb0b7; font-size: 12px; }
.installer-body { padding: 30px; }
.check-list { display: grid; gap: 9px; margin: 20px 0; }
.check-item { padding: 12px 14px; display: flex; justify-content: space-between; gap: 15px; background: #f7fafb; border: 1px solid var(--border); border-radius: 11px; font-size: 13px; }
.status-ok { color: var(--success); font-weight: 800; }
.status-bad { color: var(--danger); font-weight: 800; }
.code-box { padding: 13px 15px; overflow-x: auto; color: #d8e5e7; background: #10191d; border-radius: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.user-grid { display: grid; grid-template-columns: minmax(320px,.7fr) minmax(0,1.3fr); gap: 20px; align-items: start; }
.user-card { padding: 15px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.user-card:last-child { border-bottom: 0; }
.user-card-copy { min-width: 0; flex: 1; }
.user-card-copy strong, .user-card-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-copy span { color: var(--muted); font-size: 11px; }

.notice { padding: 14px 16px; color: #43616a; background: #edf8f8; border: 1px solid #d0eeee; border-radius: 12px; font-size: 12px; }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.inline-form { display: inline; }

@media (max-width: 1120px) {
    .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .product-detail-grid, .user-grid { grid-template-columns: 1fr; }
    .form-grid.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .filter-bar .btn { width: 100%; }
}

@media (max-width: 820px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-102%); transition: .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: grid; place-items: center; }
    .topbar { min-height: 80px; }
    .topbar-badge { display: none; }
    .card-grid, .form-grid, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; }
}

@media (max-width: 560px) {
    .stats-grid, .filter-bar { grid-template-columns: 1fr; }
    .content-wrap { padding-top: 20px; }
    .card-body, .form-section { padding: 17px; }
    .card-header { padding: 16px 17px; }
    .form-actions { padding: 17px; }
    .form-actions .btn { width: 100%; }
    .page-actions { align-items: stretch; }
    .page-actions > *, .page-actions .action-group, .page-actions .btn { width: 100%; }
    .detail-row { grid-template-columns: 1fr; gap: 3px; }
    .package-summary { grid-template-columns: 1fr; }
    .app-footer { flex-direction: column; }
}

/* Marketplace exports and structured product form */
.advanced-block { margin-top: 20px; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.advanced-block summary { padding: 15px 17px; display: flex; justify-content: space-between; gap: 14px; align-items: center; cursor: pointer; font-weight: 800; list-style: none; }
.advanced-block summary::-webkit-details-marker { display: none; }
.advanced-block summary::after { content: '+'; color: var(--teal-dark); font-size: 20px; line-height: 1; }
.advanced-block[open] summary::after { content: '−'; }
.advanced-block summary span { color: var(--muted); font-size: 11px; font-weight: 500; }
.advanced-content { padding: 18px; border-top: 1px solid var(--border); background: white; }
.marketplace-section { background: linear-gradient(180deg, rgba(82,210,200,.035), transparent 240px); }
.marketplace-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.marketplace-card { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: white; box-shadow: 0 8px 22px rgba(21,39,47,.045); }
.marketplace-card-head { padding: 16px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--border); }
.marketplace-card-head h3 { margin: 0; font-size: 15px; }
.marketplace-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.marketplace-card-body { padding: 16px; display: grid; gap: 14px; }
.marketplace-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: white; font-weight: 900; }
.ml-card .marketplace-mark { background: #f1c40f; color: #172026; }
.shopee-card .marketplace-mark { background: #ee4d2d; }
.amazon-card .marketplace-mark { background: #172026; color: #ff9900; }
.repeatable-block, .variation-area { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.repeatable-head { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.repeatable-head h3, .variation-toggle h3 { margin: 0; font-size: 15px; }
.repeatable-head p, .variation-toggle p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.repeatable-row { position: relative; margin-top: 10px; padding: 14px 52px 14px 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; border: 1px solid var(--border); border-radius: 13px; background: white; }
.variation-row { grid-template-columns: repeat(4,minmax(0,1fr)); }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: white; font-size: 19px; }
.repeatable-row > .icon-button { position: absolute; top: 13px; right: 12px; }
.icon-button.danger { color: var(--danger); border-color: rgba(217,68,82,.25); }
.icon-button.danger:hover { color: white; background: var(--danger); }
.variation-toggle { margin-top: 20px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 16px; border: 1px solid var(--border); background: white; }
.detail-video { width: 100%; aspect-ratio: 3/4; object-fit: contain; background: #10191d; border-radius: 16px; }
.marketplace-summary-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.marketplace-summary-grid > div { padding: 15px; display: grid; gap: 5px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); }
.marketplace-summary-grid strong { font-size: 13px; }
.marketplace-summary-grid span { color: var(--muted); font-size: 11px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span { padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: #42565e; font-size: 11px; }
.marketplace-notice { margin-bottom: 20px; }
.export-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.export-card { padding: 20px; display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--border); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.export-card-top { display: flex; gap: 13px; align-items: flex-start; }
.export-card-top h2 { margin: 0; font-size: 19px; }
.export-card-top p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.export-logo { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; color: white; font-weight: 900; font-size: 16px; }
.export-card.mercadolivre .export-logo { background: #f1c40f; color: #172026; }
.export-card.shopee .export-logo { background: #ee4d2d; }
.export-card.amazon .export-logo { background: #172026; color: #ff9900; }
.export-progress > div:first-child { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.export-progress strong { color: var(--text); }
.progress-track { margin-top: 8px; height: 7px; overflow: hidden; border-radius: 999px; background: #e8eef0; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--teal-dark),var(--teal)); }
.export-pendencies { border: 1px solid #f0ded0; border-radius: 12px; background: #fff9f5; }
.export-pendencies summary { padding: 11px 13px; cursor: pointer; color: var(--warning); font-size: 11px; font-weight: 800; }
.pendency-list { padding: 0 12px 12px; display: grid; gap: 7px; }
.pendency-list a { padding: 8px 9px; display: grid; gap: 2px; border-radius: 9px; background: white; border: 1px solid #f0ded0; }
.pendency-list a:hover { border-color: var(--orange); }
.pendency-list strong { font-size: 11px; }
.pendency-list span, .pendency-list p { margin: 0; color: var(--muted); font-size: 10px; }
.ready-message { padding: 11px 13px; border-radius: 12px; background: #edf9f4; color: var(--success); font-size: 11px; font-weight: 700; }
.btn-export { margin-top: auto; width: 100%; }
.compact-card { margin-top: 20px; }

@media (max-width: 1180px) {
    .marketplace-grid, .export-grid { grid-template-columns: 1fr; }
    .variation-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
    .marketplace-summary-grid { grid-template-columns: 1fr; }
    .variation-toggle, .repeatable-head, .advanced-block summary { align-items: stretch; flex-direction: column; }
}
@media (max-width: 560px) {
    .repeatable-row, .variation-row { grid-template-columns: 1fr; }
    .repeatable-row { padding-right: 46px; }
}

.login-back { margin-top: 18px; display: inline-flex; color: var(--muted); font-size: 12px; font-weight: 700; }
.login-back:hover { color: var(--teal-dark); }
.installer-body .form-section { box-shadow: none; }
.installer-body .section-title { margin-bottom: 16px; }
.installer-body .section-title h2 { font-size: 17px; }

/* v3.0 — multiempresas e seis marketplaces */
.grid-2.admin-layout { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(0,1.28fr); gap:20px; align-items:start; }
.form-stack { display:grid; gap:16px; }
.check-line { display:flex; align-items:center; gap:9px; font-size:13px; font-weight:700; }
.check-line input { width:auto; }
.table-subtitle { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.info-box, .company-export-heading { padding:13px 15px; border:1px solid var(--border); border-radius:12px; background:#f6fafb; }
.company-export-heading { margin:0 0 18px; display:flex; justify-content:space-between; gap:15px; align-items:center; }
.company-export-heading span { color:var(--muted); font-size:12px; }
.export-company-filter { margin-bottom:18px; }
.export-actions { margin-top:auto; display:grid; gap:9px; }
.export-actions .btn { width:100%; justify-content:center; }
.export-card.tiktok .export-logo { background:#111; color:#fff; }
.export-card.magalu .export-logo { background:#1477d4; color:#fff; }
.export-card.submarino .export-logo { background:#0066b3; color:#fff; }
.marketplace-card.tiktok-card .marketplace-mark { background:#111; color:#fff; }
.marketplace-card.magalu-card .marketplace-mark { background:#1477d4; color:#fff; }
.marketplace-card.submarino-card .marketplace-mark { background:#0066b3; color:#fff; }
@media (max-width:1000px){.grid-2.admin-layout{grid-template-columns:1fr}}

/* Solicitações de teste: acesso gerado */
.generated-access-card { margin-bottom: 20px; border-color: rgba(82,210,200,.55); box-shadow: 0 18px 44px rgba(22,143,100,.10); }
.generated-access-card .card-header { background: linear-gradient(135deg, rgba(82,210,200,.12), rgba(255,107,53,.06)); }
.generated-access-company { margin-bottom: 17px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.generated-access-company strong { font-size: 18px; }
.generated-access-company span { color: var(--muted); font-size: 13px; }
.generated-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.credential-field { padding: 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.credential-field > span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.credential-field code { min-width: 0; overflow-wrap: anywhere; color: #153d42; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 800; }
.generated-access-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.row-highlight { background: #f0fbfa !important; box-shadow: inset 4px 0 var(--teal-dark); }

@media (max-width: 720px) {
    .generated-access-grid { grid-template-columns: 1fr; }
    .credential-field { grid-template-columns: 1fr; }
    .credential-field .btn { width: 100%; }
    .generated-access-actions .btn { width: 100%; }
}

/* v3.0.6 — cobrança, testes e correções dos formulários administrativos */
input:not([type]) {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid #cfdbdf;
    border-radius: 11px;
    outline: none;
    transition: .16s ease;
}
input:not([type]):focus { border-color: var(--teal-dark); box-shadow: 0 0 0 4px rgba(82,210,200,.14); }
.badge-success { color: #0f704e; background: #ddf6eb; }
.text-danger { color: var(--danger) !important; }

.admin-form-card { overflow: hidden; }
.admin-form-card .admin-form-body { padding: 22px; }
.admin-form-card .admin-form-alert { margin: 16px 22px 0; }
.admin-form-body .form-group { width: 100%; }
.admin-form-body small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.admin-form-body .action-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.billing-form-note { padding: 14px; display: flex; align-items: center; gap: 13px; border: 1px solid #d8eeee; border-radius: 13px; background: #f1fbfa; }
.billing-form-note > span { min-width: 92px; color: var(--teal-dark); font-size: 21px; font-weight: 900; letter-spacing: -.04em; }
.billing-form-note strong, .billing-form-note small { display: block; }
.billing-form-note strong { font-size: 12px; }
.billing-form-note small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.billing-stats-grid { margin-bottom: 20px; }
.product-stats-grid { margin-top: 20px; }
.billing-money { font-size: clamp(21px, 2.5vw, 31px); }
.stat-card.attention { border-color: #f1c4c9; background: linear-gradient(180deg, #fff, #fff8f9); }
.stat-card.attention::after { background: rgba(217,68,82,.12); }
.billing-warning-card { margin-bottom: 22px; border-color: #f0d3b2; }
.billing-warning-card .card-header { background: linear-gradient(135deg, #fff8ef, #fff); }
.billing-due-label { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; }
.billing-due-label.soon { color: #8c5709; background: #fff1d8; }
.billing-due-label.overdue { color: #a92e3a; background: #ffe8eb; }
.billing-actions { flex-wrap: wrap; min-width: 315px; }
.billing-actions form { display: inline-flex; }
.lead-action-group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; min-width: 205px; }

.plan-summary { margin-bottom: 22px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--border); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.plan-summary.active { border-color: #bfead8; background: linear-gradient(135deg, #f2fcf8, #fff); }
.plan-summary.trial { border-color: #f2d8bd; background: linear-gradient(135deg, #fff8ef, #fff); }
.plan-summary h2 { margin: 8px 0 3px; font-size: 19px; }
.plan-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.plan-summary-expiry { min-width: 150px; padding-left: 20px; border-left: 1px solid var(--border); text-align: right; }
.plan-summary-expiry span, .plan-summary-expiry strong, .plan-summary-expiry small { display: block; }
.plan-summary-expiry span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.plan-summary-expiry strong { margin-top: 3px; font-size: 18px; }
.plan-summary-expiry small { margin-top: 2px; color: var(--muted); }

@media (max-width: 820px) {
    .admin-form-card .admin-form-body { padding: 18px; }
    .billing-actions { min-width: 260px; }
}
@media (max-width: 560px) {
    .admin-form-card .admin-form-body { padding: 17px; }
    .admin-form-card .admin-form-alert { margin: 14px 17px 0; }
    .billing-form-note, .plan-summary { align-items: flex-start; flex-direction: column; }
    .billing-form-note > span { min-width: 0; }
    .plan-summary-expiry { width: 100%; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--border); text-align: left; }
    .lead-action-group, .billing-actions { min-width: 230px; justify-content: flex-start; }
}
