:root {
    font-family: Inter, 'Segoe UI', 'Malgun Gothic', sans-serif;
    color: #202936;
    background: #f5f6f9;
    font-synthesis: none;
}
.overview-filters {
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr !important;
}
.overview-context {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.overview-context label,
.overview-table-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #68717c;
    white-space: nowrap;
}
.overview-context select,
.overview-charts .chart-heading select {
    width: auto;
    min-width: 90px;
    max-width: 160px;
    flex-shrink: 0;
}
.overview-table-controls select {
    width: auto;
    margin: 0;
    height: 36px;
}
.overview-charts .chart-heading > div:first-child {
    min-width: 0;
    flex: 1;
}
.overview-context select,
.overview-table-controls select,
.overview-charts select {
    padding: 8px;
    border: 1px solid #e0e4ec;
    border-radius: 6px;
    background: white;
    color: #505c70;
}
.creator-metrics.overview-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.overview-metrics > div {
    padding: 20px;
}
.overview-metrics dd {
    font-size: 27px;
    overflow-wrap: anywhere;
}
.overview-metrics small {
    color: #8991a0;
    font-size: 11px;
    display: block;
    margin-top: 10px;
}
.overview-definition {
    color: #68717c;
    margin-bottom: 22px;
}
.overview-charts {
    display: grid;
    margin-bottom: 24px;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
}
.overview-charts > section {
    border: 1px solid #e4e7ee;
    border-radius: 12px;
    background: white;
    padding: 22px;
}
.overview-trend {
    grid-column: 1 / -1;
}
.overview-svg {
    display: block;
    width: 100%;
    max-height: 320px;
}
.overview-donut {
    width: 190px;
    max-width: 100%;
    overflow: visible;
    height: 190px;
    display: block;
    margin: 20px auto;
}
.creator-rank {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 14px;
    margin: 14px 0;
    font-size: 12px;
}
.creator-rank a {
    color: #5e547f;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.creator-rank a span {
    color: #9b93b5;
    margin-right: 8px;
}
.creator-rank svg {
    width: 100%;
    height: 6px;
    grid-column: 1 / -1;
}
.creator-rank strong {
    font-size: 12px;
    color: #556174;
}
.source-legend {
    display: grid;
    gap: 15px;
    margin: 24px 0;
}
.source-legend > div {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.source-legend small {
    grid-column: 2 / -1;
    color: #8991a0;
}
.overview-table-controls {
    display: flex;
    margin-left: auto;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
#overview-rows td {
    font-size: 12px;
}
@media (max-width: 1000px) {
    .overview-filters {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .creator-metrics.overview-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 650px) {
    .overview-filters {
        grid-template-columns: 1fr !important;
    }
    .creator-metrics.overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .overview-charts {
        grid-template-columns: 1fr;
    }
    .overview-context {
        align-items: flex-start;
        flex-direction: column;
    }
    .overview-table-controls {
        margin-top: 12px;
    }
}
.page-nav {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #e4e7ee;
    margin-bottom: 24px;
}
.page-nav a {
    padding: 18px 4px 14px;
    color: #788193;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
}
.page-nav a[aria-current='page'] {
    color: #6158cb;
    border-bottom-color: #7167de;
}
.creator-filters {
    grid-template-columns: 2fr 1fr 1fr !important;
}
.creator-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0;
}
.creator-metrics > div {
    border: 1px solid #e4e7ee;
    border-radius: 12px;
    background: white;
    padding: 24px;
}
.creator-metrics dt {
    color: #788193;
    font-size: 12px;
}
.creator-metrics dd {
    margin: 14px 0 0;
    font-size: 30px;
    font-weight: 700;
}
.analysis-note {
    padding: 0 20px;
    line-height: 1.8;
    color: #697386;
}
.analysis-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid #e4e7ee;
}
.analysis-tabs button {
    background: transparent;
    padding: 10px 18px;
    color: #70798b;
    border-radius: 7px;
}
.analysis-tabs button[aria-pressed='true'] {
    background: #eeecff;
    color: #6158cb;
    font-weight: 700;
}
.creator-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    border-top: 1px solid #edf0f5;
}
.creator-content h3 {
    margin: 12px 0 8px;
    font-size: 16px;
    overflow-wrap: anywhere;
}
.creator-content p {
    margin: 4px 0;
}
.content-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
}
@media (max-width: 760px) {
    .creator-filters {
        grid-template-columns: 1fr !important;
    }
    .creator-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .creator-metrics > div {
        padding: 16px;
    }
    .creator-content {
        flex-direction: column;
    }
    .analysis-tabs {
        gap: 0;
        padding: 10px;
    }
    .analysis-tabs button {
        padding: 10px 12px;
    }
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
button,
input,
select {
    font: inherit;
}
button {
    cursor: pointer;
    transition: background 0.15s;
}
button:disabled {
    opacity: 0.4;
    cursor: default;
}
button:focus-visible,
a:focus-visible {
    outline: 3px solid #a7a4ff;
    outline-offset: 3px;
}
input:focus,
select:focus {
    outline: 2px solid #a7a4ff;
    border-color: #7770e8;
}
button {
    border: 0;
}
[hidden] {
    display: none !important;
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #50b599;
    border-radius: 50%;
    margin-right: 7px;
}
.dot.failed {
    background: #d96c64;
}
main {
    margin: 0 auto;
    padding: 0 42px 30px;
    max-width: 1440px;
}
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    border-bottom: 1px solid #e4e7ee;
}
.breadcrumb {
    font-size: 12px;
    color: #7f8897;
}
.breadcrumb span {
    padding: 0 12px;
    color: #c4c8d0;
}

.heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0 14px;
}
.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #756fd0;
}
h1 {
    font-size: 29px;
    letter-spacing: -1px;
    margin: 9px 0;
}
p {
    color: #858c99;
    font-size: 12px;
    line-height: 1.7;
}
.heading p {
    margin: 0;
}
.secondary {
    border: 1px solid #dfe3eb;
    background: white;
    color: #586275;
    border-radius: 7px;
    padding: 9px 14px;
    font-size: 12px;
}
.secondary:hover:enabled {
    background: #f0f0fc;
}
.connection {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #87909e;
    margin-bottom: 19px;
    gap: 3px;
}
.connection #updated {
    margin-left: auto;
}
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
    min-height: 16px;
}
.connection-status .dot {
    display: block;
    flex: 0 0 7px;
    margin: 0;
}
.search-card,
.table-card {
    background: white;
    border: 1px solid #e4e7ee;
    border-radius: 11px;
}
.filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 22px 24px 4px;
}
label,
.field-label {
    font-size: 11px;
    font-weight: 600;
    color: #667184;
}
.date-range {
    min-width: 0;
}
.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.date-range-inputs input {
    margin-top: 0;
    flex: 1;
}
input,
select {
    width: 100%;
    border: 1px solid #dfe3eb;
    border-radius: 6px;
    padding: 10px 11px;
    background: white;
    color: #384359;
    font-size: 12px;
    margin-top: 8px;
    min-width: 0;
}
input::placeholder {
    color: #afb6c1;
}
.filters > label,
.filters > .date-range {
    display: grid;
    grid-template-rows: 16px 40px;
    row-gap: 8px;
    line-height: 16px;
    min-width: 0;
}
.filters input,
.filters select {
    height: 40px;
    margin-top: 0;
}
.filters .date-range-inputs {
    margin-top: 0;
}
.search-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px 24px;
}
.search-footer p {
    margin: 0 auto 0 0;
    font-size: 11px;
}
.search-footer button {
    width: 120px;
    height: 40px;
    flex-shrink: 0;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.page-size {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.page-size select {
    margin: 0;
    width: 85px;
}
.primary {
    background: #171717;
    color: white;
    padding: 11px 19px;
    border-radius: 7px;
    font-size: 12px;
    white-space: nowrap;
}
.primary span {
    margin-left: 18px;
}
.primary:hover {
    background: #333333;
}

.table-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
}
h2 {
    font-size: 15px;
    margin: 0;
}
h2 span {
    font-size: 11px;
    background: #f0eefb;
    color: #7b6fc8;
    border-radius: 5px;
    padding: 3px 7px;
    margin-left: 6px;
}
.table-heading p {
    font-size: 11px;
    margin: 8px 0 0;
}

.table-wrap {
    overflow: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}
th {
    font-size: 10px;
    font-weight: 500;
    color: #8993a2;
    background: #fafbfc;
    padding: 12px 22px;
    border-block: 1px solid #edf0f4;
}
td {
    font-size: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f1f5;
}
td small {
    display: block;
    font-size: 10px;
    color: #9aa3af;
    margin-top: 5px;
}
.order-link {
    background: none;
    color: #6656cc;
    font-weight: 600;
    padding: 2px 0;
}
.creator-link {
    color: #202936;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.creator-link:hover {
    color: #000;
}
.status {
    display: inline-block;
    background: #eef1f5;
    color: #798394;
    padding: 5px 8px;
    font-size: 10px;
    border-radius: 5px;
}
.status.paid {
    background: #e9f6ef;
    color: #40886b;
}
.pagination {
    padding: 17px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #8b94a3;
}
.pagination button {
    margin-left: 8px;
}
.empty {
    text-align: center;
    padding: 42px 24px;
}
.empty > div {
    font-size: 40px;
    color: #c6c2e7;
}
.empty h3 {
    font-size: 14px;
    color: #7c8594;
}
.error {
    background: #fff0ef;
    border: 1px solid #f0d2ce;
    color: #ae544e;
    padding: 15px;
    border-radius: 8px;
    margin-top: 18px;
    font-size: 12px;
}
dialog {
    border: 0;
    border-radius: 15px;
    width: min(760px, 92vw);
    max-height: 88vh;
    padding: 28px;
    box-shadow: 0 24px 100px #17212e44;
    color: #263244;
}
dialog::backdrop {
    background: #17212e77;
}
.creator-dialog {
    width: min(1100px, 92vw);
    overscroll-behavior: contain;
}
html.creator-dialog-open {
    overflow: hidden;
    scrollbar-gutter: stable;
}
.creator-dialog-content .heading {
    margin-top: 0;
}
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eceef4;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.detail-header h2 {
    color: #6656cc;
    font-size: 24px;
    margin-top: 8px;
}
.detail-header .eyebrow {
    color: #8993a2;
}
.icon-button {
    font-size: 26px;
    color: #8490a2;
    background: #f4f5f8;
    border-radius: 8px;
    width: 36px;
    height: 36px;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
dt {
    font-size: 11px;
    color: #8b94a3;
    margin-bottom: 6px;
}
dd {
    font-size: 13px;
    margin: 0;
    overflow-wrap: anywhere;
}
.detail-item {
    border: 1px solid #e5e8ef;
    border-radius: 9px;
    padding: 18px;
    margin: 12px 0;
}
.detail-item h3 {
    font-size: 14px;
    margin: 0 0 14px;
}
.detail-item p {
    overflow-wrap: anywhere;
}
#detail-content h3 {
    font-size: 14px;
}
#detail-content > h3 {
    margin-top: 32px;
}
.loading {
    padding: 40px;
    text-align: center;
    color: #9aa3b1;
}
@media (max-width: 1100px) {
    main {
        margin: 0 auto;
        padding: 0 24px 24px;
    }
    .filters {
        grid-template-columns: 1fr 1fr;
    }
    .search-footer {
        flex-wrap: wrap;
    }
    .search-footer p {
        width: 100%;
    }
}
@media (max-width: 700px) {
    main {
        margin: 0;
        padding: 0 16px 20px;
    }
    .heading {
        align-items: flex-start;
        gap: 12px;
    }
    h1 {
        font-size: 25px;
    }

    .filters {
        grid-template-columns: 1fr;
    }
    .connection {
        flex-wrap: wrap;
    }
    .connection #updated {
        margin-left: 0;
        width: 100%;
        margin-top: 6px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.table-card {
    margin-top: 24px;
}
.result-summary {
    display: flex;
    flex-wrap: wrap;
    column-gap: 36px;
    row-gap: 18px;
    margin: 0;
    padding: 0 24px 16px;
}
.result-summary > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.result-summary dt {
    margin: 0;
    font-size: 12px;
    color: #778092;
}
.result-summary dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #344055;
    white-space: pre-line;
}
.result-summary strong {
    font-weight: 600;
    margin-right: 3px;
}

.creator-error {
    color: #ae544e;
    margin: 12px 24px;
}
#retry-creators {
    margin: 0 24px 10px;
}

.broadcast-title {
    color: #4b5563;
    max-width: 320px;
    white-space: normal;
}
.related-videos {
    margin-top: 10px;
    max-width: 420px;
    white-space: normal;
}
.related-video {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    font-size: 12px;
}
.related-video img {
    width: 64px;
    height: 88px;
    object-fit: cover;
    border-radius: 5px;
    background: #eee;
}
.related-video a {
    color: #222;
    text-underline-offset: 3px;
}

.detail-video {
    margin-bottom: 24px;
}
.tiktok-player {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 9 / 16;
    border: 0;
    border-radius: 14px;
    background: #111;
}
.detail-video video {
    display: block;
    width: 100%;
    max-width: 360px;
    max-height: 480px;
    background: #111;
    border-radius: 8px;
}
.video-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 400;
    color: #222;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.video-title-label {
    margin-bottom: 6px;
    font-size: 11px;
    color: #8993a2;
}
.video-title a {
    color: #222;
    text-underline-offset: 3px;
}
.video-error {
    color: #666;
    font-size: 13px;
}

/* CTK minimal analytics: the same search scope as the order table. */
.analytics {
    border-top: 1px solid #edf0f5;
    padding: 0 28px;
}
.analytics[hidden] {
    display: none;
}
.analytics::after {
    content: '';
    display: block;
    margin-bottom: 24px;
}
.chart-panel {
    padding: 26px 0 24px;
}
.chart-panel + .chart-panel {
    border-top: 1px solid #edf0f5;
}
.chart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.chart-heading h3 {
    font-size: 15px;
    font-weight: 650;
    color: #252632;
    margin: 0;
}
.chart-heading p {
    color: #8b92a4;
    font-size: 11px;
    margin: 7px 0 0;
}
.chart-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}
.chart-tools select {
    width: 85px;
    min-height: 32px;
    padding: 5px 8px;
}
.chart-key {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: #697084;
    font-size: 11px;
    white-space: nowrap;
}
.line-key {
    width: 18px;
    height: 3px;
    background: #7967cc;
    border-radius: 2px;
}
.bar-key {
    width: 11px;
    height: 11px;
    background: #e4e5ed;
    border-radius: 3px;
}
.daily-chart svg {
    display: block;
    width: 100%;
    min-height: 210px;
}
.axis-label {
    fill: #939aab;
    font-size: 11px;
    font-family: inherit;
}
.chart-readout {
    margin: 4px 0 0;
    min-height: 34px;
    padding: 10px 14px;
    background: #faf9fd;
    border-radius: 7px;
    color: #776c9e;
    font-size: 12px;
    text-align: center;
}
.chart-badge {
    background: #f5f3fa;
    color: #81749e;
    border-radius: 20px;
    font-size: 11px;
    padding: 6px 11px;
}
.product-chart-layout.is-empty {
    display: block;
    max-width: none;
}
.product-chart-layout.is-empty #product-chart {
    max-width: none;
    width: 100%;
}
.product-chart-layout.is-empty .product-legend {
    display: none;
}
.product-chart-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 55px;
    align-items: center;
    max-width: 940px;
    margin: 0 auto;
}
#product-chart svg {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: auto;
}
.donut-total {
    font-size: 30px;
    font-weight: 650;
    fill: #30303e;
}
.donut-segment {
    transition: opacity 0.15s;
}
.donut-segment:hover,
.donut-segment:focus {
    opacity: 0.75;
}
.product-legend-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto 58px;
    align-items: center;
    gap: 13px;
    padding: 13px 0;
    border-bottom: 1px solid #f0f1f5;
    font-size: 12px;
    color: #555b6e;
}
.product-legend-row:last-child {
    border-bottom: 0;
}
.product-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-legend-row strong {
    font-weight: 600;
    color: #343747;
}
.product-legend-row small {
    font-size: 10px;
    color: #8b92a4;
    margin-left: 3px;
}
.product-percent {
    color: #969caf;
    text-align: right;
    font-size: 11px;
}
.chart-note {
    color: #9299aa;
    font-size: 11px;
    text-align: right;
    margin: 12px 0 0;
}
.chart-empty {
    padding: 55px 10px;
    text-align: center;
    color: #9299aa;
    font-size: 12px;
}
@media (max-width: 700px) {
    .analytics {
        padding: 0 16px;
    }
    .chart-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .chart-tools {
        gap: 12px;
    }
    .daily-chart {
        overflow-x: auto;
    }
    .daily-chart svg {
        min-width: 660px;
    }
    .product-chart-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    #product-chart {
        max-width: 230px;
        margin: auto;
        width: 100%;
    }
}

.sort-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    font: inherit;
    white-space: nowrap;
}
.thumbnail-placeholder {
    display: inline-flex;
    width: 56px;
    min-height: 56px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f1f3f5;
    color: #68717c;
    font-size: 11px;
}
.sort-arrow {
    opacity: 0;
}
.sort-button:hover .sort-arrow,
.sort-button:focus-visible .sort-arrow,
th[aria-sort='ascending'] .sort-arrow,
th[aria-sort='descending'] .sort-arrow {
    opacity: 1;
}
.sort-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.order-amount {
    white-space: nowrap;
}
