/* skkmore-autolist v1.0 Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f6f8;
    color: #222;
    line-height: 1.5;
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: #1a1d24;
    color: #fff;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.nav-brand { display: flex; align-items: baseline; gap: 10px; }
.logo { font-size: 20px; font-weight: 700; }
.subtitle { font-size: 12px; opacity: 0.6; }
.nav-links a {
    color: #bbb;
    text-decoration: none;
    margin-left: 25px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; border-color: #4a9eff; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.page-header { margin-bottom: 25px; }
.page-header h1 { font-size: 24px; margin-bottom: 6px; }
.page-header .subtitle { font-size: 14px; color: #666; }

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    overflow: hidden;
}
.card.hidden { display: none; }
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}
.card-header h2 { font-size: 18px; font-weight: 600; }
.card-header h3 { font-size: 16px; }
.step-num {
    width: 28px; height: 28px;
    background: #4a9eff; color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.card-body { padding: 20px; }

/* Forms */
.form-row { margin-bottom: 14px; }
.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
    font-size: 13px;
}
.form-row input, .form-row select, .form-row textarea {
    padding: 8px 12px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.form-row input.wide, .form-row select.wide, .form-row textarea.wide { width: 100%; }
.form-row textarea { resize: vertical; font-family: monospace; font-size: 13px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74,158,255,0.15);
}
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-row .hint { font-size: 12px; color: #888; margin-top: 4px; display: block; }

/* Buttons */
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: #4a9eff; color: #fff; }
.btn-primary:hover { background: #3a8ae5; }
.btn-secondary { background: #eef0f4; color: #333; }
.btn-secondary:hover { background: #dfe2e8; }
.btn-large { padding: 12px 30px; font-size: 16px; }

/* Status Lines */
.status-line {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    min-height: 32px;
}
.status-line.pending { background: #fff7e6; color: #b97a00; }
.status-line.success { background: #eaf7ea; color: #237f23; }
.status-line.error { background: #fbeaea; color: #b32e2e; }
.status-line.warn { background: #fff3e0; color: #a36308; }

/* Product preview */
.product-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
}
.product-images .main-img {
    width: 100%;
    border-radius: 6px;
    background: #f0f0f0;
    aspect-ratio: 1;
    object-fit: cover;
}
.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.thumbnails img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
    cursor: pointer;
}
.thumbnails img:hover { border-color: #4a9eff; }
.product-info h3 { font-size: 16px; margin-bottom: 15px; line-height: 1.4; }
.info-row { margin-bottom: 8px; font-size: 13px; }
.info-row strong { color: #666; margin-right: 6px; }

/* Tier buttons */
.tier-buttons { display: flex; gap: 8px; }
.btn-tier {
    padding: 8px 14px;
    border: 1px solid #dfe1e5;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.btn-tier.active { border-color: #4a9eff; background: #eaf3ff; color: #2471c4; font-weight: 600; }

/* Attributes */
.attributes-list {
    margin-top: 10px;
    padding: 12px;
    background: #f7f8fa;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}
.attr-item { font-size: 13px; margin-bottom: 5px; }
.attr-item strong { color: #666; }

/* Platform checkboxes */
.platform-list { display: flex; flex-direction: column; gap: 8px; margin: 15px 0; }
.platform-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    cursor: pointer;
    transition: all .15s;
}
.platform-option:hover { border-color: #4a9eff; background: #fafbfd; }
.platform-option input { margin-right: 4px; }
.platform-name { font-weight: 600; }
.platform-type {
    background: #eef0f4;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

/* Preview cards */
.preview-card { border-left: 4px solid #4a9eff; }
.pricing-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #f7f8fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.pricing-item {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
}
.pricing-item span { font-size: 11px; color: #888; }
.pricing-item strong { font-size: 15px; color: #222; }
.pricing-item.highlight { background: #eaf3ff; }
.pricing-item.highlight strong { color: #2471c4; }

/* Pricing grid (settings page) */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
.pricing-form-container { margin-top: 15px; }

/* Results */
.result-box {
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
}
.result-box.success { background: #eaf7ea; color: #237f23; border-left: 4px solid #4ebb4e; }
.result-box.error { background: #fbeaea; color: #b32e2e; border-left: 4px solid #e25656; }
.result-box a { color: inherit; }

/* History table */
.history-table {
    width: 100%;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-collapse: collapse;
}
.history-table th, .history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.history-table th {
    background: #f7f8fa;
    font-weight: 600;
    font-size: 13px;
    color: #555;
}
.history-table .thumb {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 4px;
}
.product-cell .title-cn { font-weight: 600; margin-bottom: 3px; max-width: 400px; }
.product-cell .product-id { font-size: 11px; color: #999; }
.source-link { font-size: 12px; color: #4a9eff; text-decoration: none; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #eef0f4;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: #555;
}
.badge-success { background: #eaf7ea; color: #237f23; }
.badge-failed { background: #fbeaea; color: #b32e2e; }
.badge-pending { background: #fff7e6; color: #b97a00; }

.job-item { font-size: 12px; margin-bottom: 4px; }
.job-item a { color: #4a9eff; margin-left: 4px; text-decoration: none; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
}
.empty-state p { margin-bottom: 20px; color: #666; }

/* Platform card (settings) */
.platform-card .platform-actions {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.platform-card h3 { font-size: 14px; color: #555; margin-bottom: 12px; text-transform: uppercase; }
.test-result { font-size: 13px; }

/* Warnings */
.warn {
    background: #fff7e6;
    padding: 12px;
    border-radius: 4px;
    color: #a36308;
    margin-bottom: 15px;
    border-left: 4px solid #ffb84d;
}
.muted { color: #999; }
.empty { color: #999; font-style: italic; }

/* Flash */
.flash {
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 4px;
}
.flash-error { background: #fbeaea; color: #b32e2e; }
.flash-success { background: #eaf7ea; color: #237f23; }

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
}
