:root {
  color-scheme: light;
  --navy: #101c2c;
  --muted: #667085;
  --line: #e5e9f0;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --primary: #2457e6;
  --primary-dark: #1744c8;
  --success: #078b5b;
  --warning: #9a6700;
  --danger: #c83a3a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--navy); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 40% 0%, #eaf0ff 0, #f6f8fb 45%, #eef2f7 100%); }
.login-card { width: min(420px, 100%); padding: 42px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(16,28,44,.1); }
.login-card h1 { margin: 18px 0 6px; }
.login-card p { margin: 0 0 28px; color: var(--muted); }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: white; font-weight: 800; font-size: 24px; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar { background: var(--navy); color: white; padding: 24px 18px; display: flex; flex-direction: column; }
.logo-row { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; }
nav { display: grid; gap: 5px; }
nav a { padding: 11px 14px; border-radius: 9px; color: #d5deea; text-decoration: none; }
nav a.active { background: rgba(255,255,255,.12); color: white; }
nav a.muted { cursor: default; }
.text-button { margin-top: auto; border: 0; background: none; color: #bac5d5; text-align: left; padding: 12px 14px; cursor: pointer; }
main { padding: 36px 42px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; max-width: 1180px; margin: 0 auto 26px; }
.topbar h1 { margin: 5px 0 0; font-size: 28px; }
.eyebrow { color: var(--primary); font-size: 13px; font-weight: 700; }
.badge { padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.badge.neutral { color: #596579; background: #e8ecf2; }
.badge.success { color: #067148; background: #dff5ea; }
.badge.error { color: #a22828; background: #fde5e5; }
.content-grid { max-width: 1180px; margin: auto; display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; }
.nested-content-grid { max-width: none; }
.section-heading { align-items: center; margin: 0 0 12px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 25px; box-shadow: 0 4px 18px rgba(16,28,44,.035); }
.card h2 { margin: 0; font-size: 18px; }
.card-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.card-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
label { display: grid; gap: 8px; margin-bottom: 18px; font-size: 14px; font-weight: 650; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
input, select, textarea { width: 100%; border: 1px solid #cdd5df; border-radius: 8px; padding: 11px 12px; background: white; color: var(--navy); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36,87,230,.12); }
textarea { min-height: 120px; resize: vertical; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.security-note { display: flex; gap: 10px; padding: 12px 14px; background: #f3f6fb; border-radius: 9px; color: #536072; }
.security-note p { margin: 0; font-size: 13px; line-height: 1.55; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
button { border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; font-weight: 700; }
button:disabled { opacity: .55; cursor: wait; }
.primary { color: white; background: var(--primary); }
.primary:hover { background: var(--primary-dark); }
.secondary { color: #243147; background: #e9edf3; }
.wide { width: 100%; }
.message { min-height: 20px; margin-top: 14px; font-size: 13px; }
.message.error { color: var(--danger); }
.message.success { color: var(--success); }
.status-card dl { margin: 18px 0 0; }
.status-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.status-card dl div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; text-align: right; font-size: 13px; font-weight: 650; }
.checks-card { max-width: 1180px; margin: 20px auto 0; }
.inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.inline-actions select { width: auto; min-width: 220px; }
.compact-file { width: min(330px, 100%); padding: 8px; }
.mapping-form { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.mapping-form label { margin: 0; }
.mapping-form button { margin-bottom: 0; }
.keyword-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.keyword-rule-grid label { margin-bottom: 0; }
.keyword-rule-grid textarea { min-height: 145px; }
.pricing-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.pricing-filter-grid label { margin: 0; }
.checkbox-label { display: flex; align-items: center; gap: 9px; margin: 18px 0 0; }
.checkbox-label input { width: auto; margin: 0; }
.compact-checks { margin-top: 18px; border-top: 1px solid var(--line); }
.compact-checks .check-row { grid-template-columns: 26px 1fr; align-items: start; gap: 1px 8px; }
.compact-checks .check-row strong { padding-top: 2px; }
.compact-checks .check-row span:last-child { grid-column: 2; line-height: 1.45; }
.amazon-live-check-card { margin-top: 20px; }
.template-upload-row { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.5fr) auto; gap: 12px; align-items: end; }
.template-upload-row label { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric-grid div { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.metric-grid span { display: block; color: var(--muted); font-size: 13px; }
.metric-grid strong { display: block; margin-top: 7px; font-size: 24px; }
.action-center { margin-top: 0; }
.action-center-summary { margin-bottom: 18px; }
.action-center-time { font-size: 15px !important; line-height: 1.35; }
.action-center-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.action-item { min-height: 132px; padding: 16px; border: 1px solid var(--line); border-left: 4px solid #9aa5b5; border-radius: 11px; background: #f8fafc; color: var(--navy); text-align: left; }
.action-item:hover { box-shadow: 0 7px 18px rgba(16,28,44,.08); transform: translateY(-1px); }
.action-item.high { border-left-color: var(--warning); background: #fffbeb; }
.action-item.critical { border-left-color: var(--danger); background: #fff5f5; }
.action-item.empty { opacity: .68; }
.action-item-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.action-item-label { font-weight: 750; }
.action-item-count { min-width: 34px; padding: 3px 8px; border-radius: 99px; background: #e5eaf2; text-align: center; font-size: 16px; font-weight: 800; }
.action-item.high .action-item-count { color: #795b00; background: #fff0b9; }
.action-item.critical .action-item-count { color: #a22828; background: #fde5e5; }
.action-item-detail { display: block; margin-top: 15px; color: var(--muted); font-size: 12px; line-height: 1.5; font-weight: 500; }
.section-highlight { animation: section-highlight 1.5s ease-out; }
@keyframes section-highlight { 0% { box-shadow: 0 0 0 4px rgba(36,87,230,.25); } 100% { box-shadow: none; } }
.sync-status { margin-top: 16px; padding: 13px 15px; border-radius: 9px; background: #f3f6fb; color: #536072; font-size: 14px; }
.table-section { margin-top: 24px; }
.table-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.table-heading h3 { margin: 0; font-size: 15px; }
.date-actions { display: flex; align-items: end; gap: 8px; }
.date-actions label { margin: 0; gap: 4px; color: var(--muted); font-size: 12px; }
.date-actions input { padding: 8px 9px; }
.table-note { margin: 9px 2px 0; color: var(--muted); font-size: 12px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #f8fafc; font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
td input[type="checkbox"] { width: auto; margin: 0; }
td select { min-width: 130px; padding: 8px 9px; }
.compact-button { padding: 8px 11px; white-space: nowrap; }
.download-button { display: inline-block; padding: 8px 11px; border-radius: 8px; background: var(--primary); color: white; font-weight: 700; text-decoration: none; white-space: nowrap; }
.download-button:hover { background: var(--primary-dark); }
.export-actions { align-items: end; }
.export-actions label { min-width: 210px; margin: 0; gap: 4px; color: var(--muted); font-size: 12px; }
.export-actions input { padding: 8px 9px; }
.exception-actions { min-width: 250px; justify-content: flex-start; align-items: center; }
.exception-actions .table-note { margin: 0; }
.order-import-actions { align-items: end; }
.order-import-actions label { min-width: 190px; margin: 0; gap: 4px; color: var(--muted); font-size: 12px; }
.order-items { display: grid; gap: 5px; white-space: normal; min-width: 260px; }
.order-address { min-width: 260px; max-width: 360px; white-space: normal; line-height: 1.5; }
.purchase-settings-row { display: grid; grid-template-columns: minmax(260px, 360px) auto 1fr; align-items: end; gap: 12px; margin-bottom: 18px; }
.purchase-settings-row label { margin: 0; }
.purchase-settings-row .table-note { margin: 0 0 11px; }
.purchase-checks { display: grid; gap: 4px; min-width: 260px; white-space: normal; }
.multi-package-editor { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.multi-package-grid { display: grid; gap: 14px; margin-top: 14px; }
.multi-package-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.multi-package-card h4 { margin: 0 0 10px; }
.multi-package-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.multi-package-fields label { margin: 0; }
.package-allocation-list { display: grid; gap: 8px; margin-top: 14px; }
.package-allocation-row { display: grid; grid-template-columns: minmax(260px, 1fr) 130px; align-items: end; gap: 12px; }
.package-allocation-row label { margin: 0; }
.validation-errors { min-width: 280px; white-space: normal; line-height: 1.5; }
.product-thumb { width: 54px; height: 42px; object-fit: cover; border-radius: 7px; background: #eef2f7; }
.product-title-button { padding: 0; background: none; color: var(--primary); text-align: left; }
.status-ready { color: var(--success); font-weight: 700; }
.status-pending { color: var(--danger); font-weight: 700; }
.status-warning { color: var(--warning); font-weight: 700; }
.editor-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.editor-block h3 { margin: 0 0 12px; font-size: 15px; }
.editor-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.bullet-point-fields { display: grid; gap: 7px; }
.bullet-point-fields label { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.bullet-point-fields textarea { min-height: 76px; color: var(--navy); font-size: 14px; font-weight: 400; }
.source-summary { padding: 14px; border-radius: 9px; background: #f3f6fb; color: #536072; line-height: 1.7; }
.attribute-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.attribute-grid label { margin: 0; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-list span { padding: 6px 10px; border-radius: 99px; background: #eaf0ff; color: #1744c8; font-size: 13px; }
.editor-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.editor-image { position: relative; min-height: 118px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; cursor: grab; }
.editor-image img { width: 100%; height: 100px; object-fit: contain; }
.editor-image span { position: absolute; left: 7px; top: 7px; padding: 3px 7px; border-radius: 99px; background: var(--navy); color: white; font-size: 11px; }
.editor-image input[type="checkbox"] { position: absolute; right: 9px; top: 9px; width: 20px; height: 20px; margin: 0; }
.editor-image.dragging { opacity: .45; }
.checks { display: grid; }
.check-row { display: grid; grid-template-columns: 28px 145px 1fr; align-items: center; gap: 8px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.check-row:last-child { border-bottom: 0; }
.check-row span:last-child { color: var(--muted); }
.check-icon { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; }
.check-icon.neutral { color: #667085; background: #e9edf3; }
.check-icon.success { color: white; background: var(--success); }
.check-icon.error { color: white; background: var(--danger); }
.check-icon.skipped { color: #795b00; background: #fff0b9; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main { padding: 24px 16px 48px; }
  .content-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .action-center-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .mapping-form { grid-template-columns: 1fr 1fr; }
  .keyword-rule-grid { grid-template-columns: 1fr; }
  .pricing-filter-grid { grid-template-columns: 1fr 1fr; }
  .template-upload-row { grid-template-columns: 1fr; }
  .purchase-settings-row { grid-template-columns: 1fr; align-items: stretch; }
  .multi-package-fields, .package-allocation-row { grid-template-columns: 1fr; }
  .purchase-settings-row .table-note { margin: 0; }
  .editor-columns { grid-template-columns: 1fr; gap: 0; }
  .attribute-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .login-card { padding: 28px 22px; }
  .check-row { grid-template-columns: 26px 105px 1fr; }
  .action-center-grid { grid-template-columns: 1fr; }
  .mapping-form { grid-template-columns: 1fr; }
  .attribute-grid { grid-template-columns: 1fr; }
  .pricing-filter-grid { grid-template-columns: 1fr; }
}
