:root {
    --ink: #1e241f;
    --muted: #687069;
    --paper: #f6f5ef;
    --card: #ffffff;
    --line: #e3e2da;
    --yellow: #f4c542;
    --yellow-soft: #fff4c7;
    --green: #246b49;
    --red: #ad3434;
    --shadow: 0 14px 40px rgba(36, 42, 36, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    line-height: 1.6;
}
a { color: inherit; }
button, input, select { font: inherit; }
textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 20px 20px;
    color: #fff;
    background: #202620;
    display: flex;
    flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px 12px 12px 4px;
    color: #202620;
    background: var(--yellow);
    font-weight: 900;
    letter-spacing: -.08em;
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .06em; }
.brand small { color: #b9c0ba; font-size: .72rem; }
.sidebar nav { margin-top: 38px; display: grid; gap: 5px; }
.nav-link { padding: 11px 14px; border-radius: 10px; color: #dfe4df; text-decoration: none; font-weight: 700; font-size: .92rem; }
.nav-link:hover, .nav-link.is-active { color: #202620; background: var(--yellow); }
.nav-link.is-disabled { color: #737b74; cursor: default; }
.nav-section { margin: 24px 14px 6px; color: #8d958e; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.sidebar-user { margin-top: auto; padding: 16px 14px 4px; border-top: 1px solid #3a423b; }
.sidebar-user span, .sidebar-user small { display: block; }
.sidebar-user small { color: #9ca49d; overflow-wrap: anywhere; }
.text-button { margin-top: 10px; padding: 0; border: 0; color: var(--yellow); background: transparent; font-size: .82rem; }

.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 48px clamp(24px, 4vw, 68px) 80px; }
.mobile-header { display: none; }
.page-heading { margin-bottom: 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading.compact { align-items: center; }
.page-heading h1 { margin: 2px 0 4px; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.14; letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--green); font-size: .72rem; font-weight: 900; letter-spacing: .15em; }
.page-usage-guide {
    margin: -10px 0 22px;
    padding: 17px 20px;
    border: 1px solid #cfded4;
    border-left: 5px solid var(--green);
    border-radius: 14px;
    background: #f1f7f3;
}
.page-usage-guide-heading { display: flex; align-items: center; gap: 11px; }
.page-usage-guide-heading h2 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
.page-usage-guide-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: var(--green);
    font-weight: 900;
}
.page-usage-guide ol { margin: 12px 0 0; padding-left: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px 24px; }
.page-usage-guide li { padding-left: 3px; color: #3f5547; font-size: .82rem; }
.page-usage-guide li::marker { color: var(--green); font-weight: 900; }
.page-usage-guide-note { margin: 13px 0 0; padding: 10px 12px; border-radius: 9px; color: #674d00; background: var(--yellow-soft); font-size: .8rem; font-weight: 700; }
.field-help { margin: 8px 0 14px; padding: 9px 11px; border-radius: 8px; color: var(--muted); background: #f5f6f2; font-size: .78rem; }
.status-pill { padding: 8px 13px; border: 1px solid #cbd8cf; border-radius: 999px; background: #edf6f0; color: var(--green); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.status-pill span { width: 8px; height: 8px; margin-right: 7px; display: inline-block; border-radius: 50%; background: #39a369; }
.heading-summary { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #fff; font-size: .8rem; white-space: nowrap; }
.heading-summary strong { color: var(--ink); font-size: 1.15rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card { min-height: 166px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 5px 18px rgba(36, 42, 36, .035); }
.metric-card-accent { border-color: #efcd69; background: var(--yellow-soft); }
.metric-card > span, .metric-card > small { display: block; }
.metric-card > span { min-height: 42px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.metric-card strong { display: block; margin: 8px 0 5px; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1; letter-spacing: -.04em; }
.metric-card strong small { font-size: .8rem; letter-spacing: 0; }
.metric-card > small { color: #858c86; font-size: .7rem; }

.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.panel h2 { margin: 2px 0; font-size: 1.35rem; letter-spacing: -.02em; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; }
.progress-number { color: var(--muted); font-size: .78rem; font-weight: 800; }
.progress-track { height: 7px; margin: 22px 0 25px; overflow: hidden; border-radius: 99px; background: #e9e9e3; }
.progress-track span { height: 100%; display: block; border-radius: inherit; background: var(--yellow); }
.progress-phase-2 { width: 33.33%; }
.progress-phase-3 { width: 50%; }
.progress-phase-4 { width: 66.67%; }
.progress-phase-5 { width: 83.33%; }
.progress-phase-6 { width: 92%; }
.progress-phase-7 { width: 100%; }
.check-list, .plain-list { margin: 0; padding: 0; list-style: none; }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.check-list li { padding: 14px; border-radius: 13px; background: #f7f8f4; display: flex; gap: 11px; }
.check-list li > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-weight: 900; }
.check-list strong, .check-list small { display: block; }
.check-list strong { font-size: .88rem; }
.check-list small { color: var(--muted); font-size: .7rem; }
.next-panel { overflow: hidden; color: #fff; background: #273129; position: relative; }
.next-panel::after { content: ""; width: 170px; height: 170px; position: absolute; right: -65px; bottom: -70px; border: 28px solid rgba(244, 197, 66, .16); border-radius: 50%; }
.next-panel .eyebrow { color: var(--yellow); }
.next-panel p:not(.eyebrow) { color: #c5cdc6; }
.next-tag { width: fit-content; margin: 20px 0; padding: 6px 10px; border-radius: 7px; color: #242b25; background: var(--yellow); font-size: .72rem; font-weight: 900; }
.plain-list { position: relative; z-index: 1; display: grid; gap: 7px; color: #edf0ed; font-size: .82rem; }
.plain-list li::before { content: "—"; margin-right: 8px; color: var(--yellow); }

.alert { margin: 0 0 20px; padding: 13px 16px; border-radius: 11px; font-size: .88rem; }
.alert-success { border: 1px solid #bad7c5; color: #1f6544; background: #edf8f1; }
.alert-warning { border: 1px solid #ead08a; color: #725914; background: #fff8df; }
.alert-error { border: 1px solid #e5bebe; color: #892727; background: #fff0f0; }
.status-pill-waiting { border-color: #ead08a; color: #725914; background: #fff8df; }
.status-pill-waiting span { background: #d7a824; }
.form-panel { max-width: 760px; }
.settings-form, .form-stack { display: grid; gap: 20px; }
.settings-form label, .form-stack label { display: grid; gap: 7px; }
.settings-form label > span, .form-stack label > span { font-size: .85rem; font-weight: 800; }
.settings-form label > small { color: var(--muted); font-size: .73rem; }
input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid #cfd2ca; border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
textarea { min-height: 105px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #927514; box-shadow: 0 0 0 3px rgba(244, 197, 66, .25); }
.input-with-unit { display: flex; align-items: center; border: 1px solid #cfd2ca; border-radius: 10px; background: #fff; overflow: hidden; }
.input-with-unit:focus-within { border-color: #927514; box-shadow: 0 0 0 3px rgba(244, 197, 66, .25); }
.input-with-unit input { border: 0; border-radius: 0; box-shadow: none; }
.input-with-unit span { padding: 0 13px; color: var(--muted); white-space: nowrap; }
.form-actions { padding-top: 6px; }
.primary-button { padding: 12px 20px; border: 0; border-radius: 10px; color: #202620; background: var(--yellow); font-weight: 900; box-shadow: 0 5px 14px rgba(146, 117, 20, .18); }
.primary-button:hover { background: #e8b92f; }
.secondary-button { padding: 9px 13px; border: 1px solid #ccd0c9; border-radius: 9px; color: var(--ink); background: #fff; text-decoration: none; font-size: .78rem; font-weight: 800; }
.secondary-button:hover { border-color: #999f98; }
.settings-link-card { max-width: 760px; margin: 0 0 18px; padding: 18px 20px; border: 1px solid #ecd06f; border-radius: 15px; background: var(--yellow-soft); display: flex; align-items: center; justify-content: space-between; gap: 20px; text-decoration: none; }
.settings-link-card strong, .settings-link-card small { display: block; }
.settings-link-card small { color: var(--muted); font-size: .72rem; }
.settings-link-card b { white-space: nowrap; font-size: .78rem; }
.form-stack-wide { display: grid; gap: 16px; }
.form-panel-wide { max-width: 1000px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading.padded { margin: 0; padding: 23px 25px 17px; }
.section-heading h2 { margin: 2px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.form-grid label { display: grid; align-content: start; gap: 7px; }
.form-grid label > span { font-size: .82rem; font-weight: 800; }
.form-grid label > small { color: var(--muted); font-size: .7rem; }
.form-grid .span-2 { grid-column: span 2; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 800; }
.checkbox-label input { width: 18px; height: 18px; }
.sticky-actions { position: sticky; bottom: 82px; z-index: 2; max-width: 1000px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); text-align: right; }

.table-panel { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { color: var(--muted); background: #f7f7f3; font-size: .7rem; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
.log-badge { padding: 4px 7px; border-radius: 6px; background: var(--yellow-soft); font-weight: 800; }
.empty-cell { padding: 40px; text-align: center; color: var(--muted); }
.product-table td:first-child strong, .product-table td:first-child small { display: block; }
.product-table td:first-child small { max-width: 280px; color: var(--muted); white-space: normal; }
.status-label { display: inline-block; padding: 4px 8px; border-radius: 7px; font-size: .7rem; font-weight: 800; }
.status-active { color: #1f6544; background: #e7f5ec; }
.status-muted { color: #686e69; background: #eef0ed; }
.status-warning { color: #80600b; background: var(--yellow-soft); }
.stock-number { font-size: 1.08rem; }
.stock-number.is-low { color: var(--red); }
.low-label { display: block; color: var(--red); font-size: .62rem; font-weight: 800; }
.row-actions { display: flex; gap: 8px; }
.row-actions a { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; text-decoration: none; font-size: .7rem; font-weight: 800; }
.button-link { display: inline-block; text-decoration: none; white-space: nowrap; }
.product-filter-panel { margin-bottom: 18px; padding: 18px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(125px, .7fr)) auto; gap: 12px; align-items: end; }
.product-filter-panel label { display: grid; gap: 6px; }
.product-filter-panel label > span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.product-filter-panel input, .product-filter-panel select { padding: 9px 10px; font-size: .78rem; }
.product-filter-actions { display: flex; gap: 7px; }
.product-filter-actions .primary-button, .product-filter-actions .secondary-button { padding: 9px 12px; }
.product-master-panel { margin-bottom: 18px; }
.product-master-table td { vertical-align: middle; }
.product-master-table td:nth-child(2) strong, .product-master-table td:nth-child(2) small,
.product-master-table td:nth-child(3) span, .product-master-table td:nth-child(3) small,
.product-master-table td:nth-child(7) span, .product-master-table td:nth-child(7) small { display: block; }
.product-master-table td:nth-child(2) small, .product-master-table td:nth-child(3) small,
.product-master-table td:nth-child(7) small { max-width: 260px; color: var(--muted); white-space: normal; }
.product-thumb { width: 58px; height: 58px; display: block; border: 1px solid var(--line); border-radius: 10px; object-fit: contain; background: #f7f7f3; }
.product-thumb-empty { display: grid; place-items: center; color: #969d97; font-size: .52rem; font-weight: 900; letter-spacing: .05em; }
.channel-statuses { display: grid; gap: 4px; }
.channel-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .69rem; font-weight: 800; white-space: nowrap; }
.channel-status i { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #c8ccc8; }
.channel-status.is-active { color: var(--green); }
.channel-status.is-active i { background: #39a369; box-shadow: 0 0 0 3px #e7f5ec; }
.unmatched-products-panel { margin-top: 18px; }
.wrap-cell { min-width: 240px; white-space: normal; }
.sku-change-confirm { margin-top: 20px; padding: 13px; border: 1px solid #ead08a; border-radius: 10px; background: #fff8df; }
.product-master-form-grid textarea { min-height: 110px; }

.inventory-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(340px, 1.2fr); gap: 18px; }
.balance-cards { margin: 18px 0 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.balance-cards > div { padding: 16px; border-radius: 13px; background: #f6f7f3; }
.balance-cards span, .balance-cards strong { display: block; }
.balance-cards span { min-height: 38px; color: var(--muted); font-size: .7rem; }
.balance-cards strong { margin-top: 7px; font-size: 1.6rem; }
.balance-cards strong small { font-size: .7rem; }
.inventory-form { padding-top: 22px; border-top: 1px solid var(--line); }
.movement-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; }
.movement-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; }
.movement-list li:last-child { border-bottom: 0; }
.movement-list strong, .movement-list span { display: block; }
.movement-list strong { font-size: 1rem; }
.movement-list span, .movement-list small { color: var(--muted); font-size: .7rem; }
.movement-list small { max-width: 55%; text-align: right; }
.empty-text { color: var(--muted); font-size: .82rem; }

.import-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; }
.import-grid > * { min-width: 0; }
.upload-panel > p:not(.eyebrow), .notice-text { color: var(--muted); font-size: .82rem; }
.upload-panel code { padding: 2px 5px; border-radius: 5px; background: #f2f2ee; }
.upload-form { margin-top: 22px; display: grid; gap: 14px; }
.file-drop { padding: 24px; border: 1px dashed #aeb4ac; border-radius: 14px; background: #f9faf7; display: grid; gap: 8px; }
.file-drop > span { font-weight: 900; }
.file-drop > small { color: var(--muted); font-size: .7rem; }
.file-drop input { padding: 8px; background: #fff; }
.single-column { grid-template-columns: 1fr; margin-top: 18px; }
.notice-text { margin: 20px 0 0; padding: 12px; border-left: 3px solid var(--yellow); background: #fff9e2; }
.import-history { margin-top: 18px; }
.profit-cell { font-weight: 900; }
.table-input { min-width: 94px; padding: 8px 9px; border-radius: 7px; }
.table-checkbox { display: flex; align-items: center; gap: 6px; font-size: .7rem; white-space: nowrap; }
.table-checkbox input { width: 16px; height: 16px; }
td > small { display: block; max-width: 260px; color: var(--muted); white-space: normal; }
.wrap-cell { min-width: 320px; white-space: normal; }

.analytics-heading { align-items: center; }
.period-filter { min-width: 190px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(36, 42, 36, .035); }
.period-filter label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.period-filter select { padding: 8px 10px; font-weight: 800; }
.period-filter .secondary-button { width: 100%; margin-top: 8px; }
.analytics-metrics .metric-card-business.is-positive { border-color: #a9d2b8; background: #edf8f1; }
.analytics-metrics .metric-card-business.is-negative { border-color: #e3baba; background: #fff0f0; }
.analytics-metrics .metric-card-business.is-negative strong { color: var(--red); }
.analytics-top-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 18px; }
.goal-panel .panel-heading { align-items: flex-start; }
.goal-panel .panel-heading > strong { font-size: 1.65rem; }
.goal-panel progress { width: 100%; height: 13px; margin: 28px 0 12px; accent-color: var(--yellow); }
.goal-numbers { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: .78rem; }
.goal-numbers strong { display: block; color: var(--ink); font-size: 1.05rem; }
.goal-message { margin: 22px 0 0; padding: 14px 16px; border-radius: 12px; color: #775a0c; background: var(--yellow-soft); }
.goal-achieved { color: var(--green); background: #edf8f1; }
.profit-breakdown { margin: 20px 0 0; }
.profit-breakdown > div { padding: 8px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #efeee8; }
.profit-breakdown dt { color: var(--muted); }
.profit-breakdown dd { margin: 0; font-weight: 800; }
.profit-breakdown .subtotal { margin-top: 6px; border-top: 2px solid var(--line); }
.profit-breakdown .total { padding-top: 13px; border-bottom: 0; font-size: 1.05rem; }
.profit-breakdown .total dt, .profit-breakdown .total dd { color: var(--ink); font-weight: 900; }
.trend-panel { margin-top: 18px; }
.trend-panel .section-heading { align-items: flex-start; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.chart-legend span::before { content: ""; width: 9px; height: 9px; margin-right: 5px; display: inline-block; border-radius: 3px; }
.legend-sales::before { background: #aeb5ae; }
.legend-product::before { background: var(--yellow); }
.legend-business::before { background: var(--green); }
.trend-chart { display: grid; gap: 14px; }
.trend-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 14px; }
.trend-row > strong { font-size: .78rem; }
.trend-bars { display: grid; gap: 5px; }
.trend-bars > div { display: grid; grid-template-columns: minmax(120px, 1fr) 105px; align-items: center; gap: 10px; }
.trend-bars span { text-align: right; font-size: .7rem; font-variant-numeric: tabular-nums; }
.trend-bars progress { width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: #efefeb; }
.trend-bars progress::-webkit-progress-bar { border-radius: 99px; background: #efefeb; }
.trend-bars progress::-webkit-progress-value { border-radius: 99px; background: #aeb5ae; }
.trend-bars progress::-moz-progress-bar { border-radius: 99px; background: #aeb5ae; }
.trend-bars .trend-product::-webkit-progress-value { background: var(--yellow); }
.trend-bars .trend-product::-moz-progress-bar { background: var(--yellow); }
.trend-bars .trend-business::-webkit-progress-value { background: var(--green); }
.trend-bars .trend-business::-moz-progress-bar { background: var(--green); }
.trend-bars .trend-business.is-negative::-webkit-progress-value { background: var(--red); }
.trend-bars .trend-business.is-negative::-moz-progress-bar { background: var(--red); }
.analytics-table-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(420px, .8fr) minmax(560px, 1.2fr); gap: 18px; align-items: start; }
.data-coverage-note { margin: 18px 0 0; padding: 13px 16px; border-left: 3px solid var(--yellow); color: var(--muted); background: #fff9e2; font-size: .76rem; }

.social-form-grid, .strategy-form-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.social-summary-panel { margin-top: 18px; border-color: #e2c45d; background: linear-gradient(135deg, #fffdf3 0%, #fff 68%); }
.social-summary-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.social-summary-card { min-width: 0; padding: 18px; border: 1px solid #e5e7df; border-radius: 15px; background: rgba(255, 255, 255, .9); }
.social-summary-card > span, .social-summary-card > strong { display: block; }
.social-summary-card > span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.social-summary-card > strong { margin-top: 8px; font-size: 1rem; line-height: 1.45; }
.social-summary-card > p { margin: 8px 0 0; color: #5e655f; font-size: .78rem; line-height: 1.65; }
.social-summary-priority { border-color: #e3c24d; background: #fff9df; }
.social-summary-tasks { margin: 9px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.social-summary-tasks a { color: #285e43; font-size: .77rem; font-weight: 700; }
.social-summary-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.social-summary-meta span { padding: 6px 10px; border-radius: 999px; color: #586159; background: #f1f3ee; font-size: .68rem; font-weight: 800; }
.social-post-table-prominent { margin-top: 18px; }
.social-post-table-prominent .section-heading > small { max-width: 320px; color: var(--muted); text-align: right; }
.compact-form { margin-top: 20px; }
.three-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.account-summary-panel { height: 100%; }
.account-cards { margin-top: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.account-cards > div { padding: 18px; border-radius: 14px; background: #f6f7f3; }
.account-cards strong, .account-cards span, .account-cards b, .account-cards small { display: block; }
.account-cards span, .account-cards small { color: var(--muted); font-size: .7rem; }
.account-cards b { margin: 12px 0 4px; font-size: 1.15rem; }
.social-create-panel, .social-metric-panel, .social-post-table { margin-top: 18px; }
.social-csv-panel { margin-top: 18px; }
.social-create-panel .section-heading > small { max-width: 320px; color: var(--muted); text-align: right; }
.tracking-link { max-width: 340px; margin-top: 7px; display: block; overflow: hidden; color: #476f58; font-size: .68rem; text-overflow: ellipsis; }
.social-operation-panel { margin-bottom: 22px; }
.operation-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.operation-steps li { padding: 16px; border: 1px solid #e5e7df; border-radius: 14px; background: #fafbf8; }
.operation-steps strong, .operation-steps span { display: block; }
.operation-steps strong { margin-bottom: 7px; color: #1b5e42; }
.operation-steps span { color: #5e655f; font-size: .82rem; line-height: 1.65; }
.tracking-link-row { display: flex; align-items: center; gap: 7px; max-width: 420px; margin-top: 8px; }
.tracking-link-row code { min-width: 0; overflow: hidden; color: #476f58; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.copy-tracking-link { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #cbd7cf; border-radius: 7px; background: #fff; color: #1b5e42; cursor: pointer; font-size: .7rem; font-weight: 700; }
.copy-tracking-link:hover { background: #f2f7f3; }
.social-attribution-panel { margin-bottom: 22px; }
.attribution-review-form { display: grid; gap: 7px; margin-top: 8px; }
.attribution-review-form select { min-width: 250px; max-width: 360px; }
.attribution-review-form > div { display: flex; gap: 7px; }
.compact-button { width: auto; min-width: 74px; padding: 7px 10px; }
.attribution-status-suggested { color: #805a00; background: #fff4cf; }
.attribution-status-confirmed { color: #17623f; background: #e6f5ed; }
.attribution-status-rejected { color: #6e7270; background: #eef0ef; }
.advice-label { max-width: 330px; display: block; font-size: .73rem; line-height: 1.55; }
.advice-good { color: #1f6544; }
.advice-warning { color: #80600b; }
.advice-muted { color: var(--muted); }
.strategy-form-grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
.codex-import-panel > p:not(.eyebrow) { color: var(--muted); font-size: .78rem; }
.code-textarea { min-height: 260px; font-family: Consolas, "SFMono-Regular", monospace; font-size: .74rem; }
.strategy-list { margin-top: 18px; display: grid; gap: 14px; }
.strategy-card { border-left: 5px solid #c9ccc6; }
.strategy-card.priority-high { border-left-color: var(--red); }
.strategy-card.priority-medium { border-left-color: var(--yellow); }
.strategy-card.priority-low { border-left-color: #aeb5ae; }
.strategy-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.strategy-card-head > div { display: flex; flex-wrap: wrap; gap: 7px; }
.strategy-card-actions, .home-action-controls { display: flex; align-items: center; gap: 8px; }
.inline-complete-form { margin: 0; }
.complete-button { padding: 9px 13px; border: 1px solid #8eb5a0; border-radius: 9px; color: #17623f; background: #eef8f2; font-size: .78rem; font-weight: 900; }
.complete-button:hover { border-color: #4f8c6b; background: #e2f3e9; }
.strategy-type, .urgent-label { padding: 4px 8px; border-radius: 7px; background: #eef0ed; font-size: .7rem; font-weight: 800; }
.urgent-label { color: #8c2525; background: #fff0f0; }
.strategy-card h2 { margin: 18px 0 8px; }
.strategy-card > p { margin: 0 0 10px; color: #505750; line-height: 1.7; }
.strategy-reason { color: var(--muted); }
.strategy-card footer { margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .7rem; }
.home-actions-panel { margin-top: 18px; }
.home-operation-panel { margin-bottom: 18px; }
.home-operation-heading { margin-bottom: 16px; }
.home-summary-badge { padding: 7px 11px; border-radius: 999px; font-size: .72rem; font-weight: 900; }
.home-operation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-operation-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-left: 5px solid #97a09a; border-radius: 13px; color: var(--ink); background: #fbfcfa; text-decoration: none; }
.home-operation-card.status-ok { border-left-color: var(--green); }
.home-operation-card.status-waiting { border-left-color: #8b918c; }
.home-operation-card.status-warning { border-left-color: var(--yellow); background: #fffdf4; }
.home-operation-card.status-critical { border-left-color: var(--red); background: #fff7f7; }
.home-operation-card .home-card-label { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; }
.home-operation-card strong { display: block; margin: 6px 0 4px; font-size: 1.18rem; }
.home-operation-card small { display: block; color: #4f5751; line-height: 1.5; }
.home-operation-card p { margin: 9px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.home-summary-badge.status-ok { color: #17623f; background: #e6f4eb; }
.home-summary-badge.status-waiting { color: #5c625e; background: #eef0ed; }
.home-summary-badge.status-warning { color: #735b09; background: #fff2bd; }
.home-summary-badge.status-critical { color: #8c2525; background: #ffe4e4; }
.home-overall-pill.status-warning, .home-overall-pill.status-critical { background: #fff7f0; }
.home-overall-pill.status-warning span { background: var(--yellow); }
.home-overall-pill.status-critical span { background: var(--red); }
.home-action-list { margin: 0; padding: 0; list-style: none; }
.home-action-list li { padding: 13px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) 130px 55px; align-items: center; gap: 14px; }
.home-action-list li:last-child { border-bottom: 0; }
.home-action-list li > div { display: flex; align-items: center; gap: 10px; }
.home-action-list .home-action-controls { justify-content: flex-end; }
.home-action-list small { color: var(--muted); }
.home-action-list a { color: var(--green); font-size: .74rem; font-weight: 800; text-decoration: none; }
.purchase-entry-panel, .purchase-items-panel, .purchase-preview-panel, .purchase-history-panel { margin-bottom: 18px; }
.purchase-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.purchase-mode-fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; border: 0; }
.purchase-mode-fieldset legend { margin-bottom: 9px; font-weight: 800; }
.purchase-mode-fieldset label { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf8; }
.purchase-mode-fieldset strong, .purchase-mode-fieldset small { display: block; }
.purchase-mode-fieldset small { margin-top: 4px; color: var(--muted); }
.purchase-quantity-input { max-width: 120px; }
.purchase-note { display: block; padding: 18px; }
.purchase-note span { display: block; margin-bottom: 8px; font-weight: 800; }
.purchase-preview-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.purchase-preview-summary > div { padding: 14px; border-radius: 12px; background: #f5f7f3; }
.purchase-preview-summary span, .purchase-preview-summary strong { display: block; }
.purchase-preview-summary span { color: var(--muted); font-size: .7rem; }
.purchase-preview-summary strong { margin-top: 6px; }
.purchase-confirm-actions { display: flex; gap: 10px; margin-top: 18px; }
.purchase-confirm-actions form { margin: 0; }
.table-action { display: inline-block; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-decoration: none; font-size: .7rem; font-weight: 800; }
.fba-progress-grid { margin-bottom: 18px; }
.fba-status-text { font-size: 1.15rem !important; line-height: 1.35 !important; letter-spacing: -.02em !important; }
.fba-order-panel, .fba-history-panel { margin-bottom: 18px; }
.fba-sync-note { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.fba-sync-note a { color: var(--green); font-weight: 800; }
.fba-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.fba-action-form { display: grid; align-content: start; gap: 14px; }
.fba-action-form > p:not(.eyebrow), .fba-reversal-panel p { margin: 0; color: var(--muted); font-size: .8rem; }
.fba-action-form label, .fba-reversal-form label { display: grid; gap: 6px; }
.fba-action-form label > span, .fba-reversal-form label > span { font-size: .76rem; font-weight: 800; }
.fba-action-form fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.fba-action-form legend { padding: 0 5px; font-size: .75rem; font-weight: 800; }
.fba-quantity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.fba-reversal-panel { margin-bottom: 18px; display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); align-items: start; gap: 24px; }
.fba-reversal-form { min-width: 0; display: grid; grid-template-columns: minmax(150px, .55fr) minmax(220px, 1.45fr); grid-template-areas: "date reason" "action action"; align-items: end; gap: 10px; }
.fba-reversal-form label:nth-of-type(1) { grid-area: date; min-width: 0; }
.fba-reversal-form label:nth-of-type(2) { grid-area: reason; min-width: 0; }
.fba-reversal-form input { width: 100%; min-width: 0; }
.fba-reversal-form button { grid-area: action; justify-self: end; }
.wrap-cell { min-width: 220px; white-space: normal; }
.priority-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #aeb5ae; }
.priority-dot.priority-high { background: var(--red); }
.priority-dot.priority-medium { background: var(--yellow); }
.status-unconfirmed { color: #686e69; background: #eef0ed; }
.status-planned { color: #80600b; background: var(--yellow-soft); }
.status-in_progress { color: #285f7a; background: #e8f4fa; }
.status-completed { color: #1f6544; background: #e7f5ec; }
.status-rejected { color: #892727; background: #fff0f0; }

.notification-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; margin-top: 18px; }
.connection-success { padding: 16px; border-radius: 12px; color: var(--green); background: #edf8f1; }
.setup-steps { padding-left: 22px; color: var(--muted); font-size: .86rem; line-height: 1.8; }
.code-line code { display: block; padding: 10px 12px; overflow-wrap: anywhere; border-radius: 9px; background: #f2f2ee; font-size: .75rem; }
.link-code-box { margin-top: 16px; padding: 18px; border: 2px dashed #ddbd4f; border-radius: 13px; text-align: center; background: var(--yellow-soft); }
.link-code-box small, .link-code-box span { display: block; color: var(--muted); }
.link-code-box strong { display: block; margin: 7px 0; font-size: 1.45rem; letter-spacing: .08em; }
.check-row { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; }
.check-row input { width: auto; margin-top: 4px; }
.check-row span, .check-row strong, .check-row small { display: block; }
.rule-fieldset { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.rule-fieldset legend { padding: 0 6px; font-size: .78rem; font-weight: 800; }
.notification-action-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; }
.notification-action-panel p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-size: .82rem; }
.notification-actions { display: flex; gap: 10px; }
.notification-actions button:disabled { cursor: not-allowed; opacity: .45; }
.notification-history, .run-history-panel { margin-top: 18px; }
.panel-padding { padding: 24px 28px 0; }
.notification-severity { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.severity-critical { color: #8b2020; background: #ffe5e5; }
.severity-warning { color: #735512; background: #fff4cf; }
.severity-info { color: #255f78; background: #e5f5fb; }
.table-note { display: block; max-width: 500px; margin-top: 4px; white-space: pre-line; color: var(--muted); }
.run-list { margin: 16px 0 0; padding: 0; list-style: none; }
.run-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .78rem; }
.run-list small { color: var(--muted); }

.integration-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-top: 18px; }
.integration-description { color: var(--muted); font-size: .82rem; line-height: 1.7; }
.integration-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.integration-actions button:disabled { cursor: not-allowed; opacity: .45; }
.integration-snapshot { margin-top: 18px; }
.integration-snapshot .section-heading > small { color: var(--muted); }
.sync-state { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.sync-state.is-matched { color: #1f6544; background: #e7f5ec; }
.sync-state.is-unmatched { color: #892727; background: #fff0f0; }
.snapshot-unmatched { background: #fff9f9; }
.difference-zero { color: var(--green); font-weight: 900; }
.difference-warning { color: #8b5f0a; font-weight: 900; }

.inventory-cutover-panel, .inventory-action-panel, .inventory-error-panel, .inventory-history { margin-top: 18px; }
.inventory-cutover-panel > p:not(.eyebrow), .quick-sale-panel > p, .inventory-guide-panel > p { color: var(--muted); font-size: .82rem; }
.inventory-sync-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 18px; margin-top: 18px; }
.inventory-action-panel { border: 2px solid #d06767; background: #fffafa; }
.inventory-action-panel .section-heading > strong { color: var(--red); }
.inventory-task-list { display: grid; gap: 10px; margin-top: 18px; }
.inventory-task-list article { padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #efd2d2; border-radius: 13px; background: #fff; }
.inventory-task-list article span, .inventory-task-list article strong, .inventory-task-list article small { display: block; }
.inventory-task-list article span { color: var(--muted); font-size: .72rem; font-weight: 800; }
.inventory-task-list article strong { margin: 3px 0; color: var(--red); font-size: 1.5rem; }
.inventory-task-list article strong small { display: inline; font-size: .72rem; }
.inventory-task-list article > div > small { color: var(--muted); font-size: .72rem; }
.inventory-error-panel { border-left: 5px solid var(--red); }
.inventory-history .sync-state { min-width: 72px; text-align: center; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, #fff0a8 0, transparent 35%), #202620; }
.login-card { width: min(100%, 440px); padding: clamp(28px, 6vw, 46px); border-radius: 24px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .28); }
.login-brand { margin-bottom: 28px; text-align: center; }
.brand-mark-large { width: 58px; height: 58px; margin: 0 auto 16px; font-size: 1.4rem; }
.login-brand h1 { margin: 3px 0 5px; font-size: 1.55rem; letter-spacing: -.04em; }
.login-brand > p:last-child { margin: 0; color: var(--muted); font-size: .85rem; }
.login-card .primary-button { width: 100%; margin-top: 3px; }
.secure-note { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: .7rem; }
.login-card-wide { width: min(100%, 560px); }
.security-secret-box { margin: 18px 0; padding: 16px; border: 2px dashed #ddbd4f; border-radius: 12px; background: var(--yellow-soft); }
.security-secret-box span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; }
.security-secret-box code, .security-uri code { display: block; overflow-wrap: anywhere; font-size: .88rem; letter-spacing: .05em; }
.security-uri { margin: 0 0 20px; color: var(--muted); font-size: .74rem; }
.security-uri code { margin-top: 8px; padding: 10px; border-radius: 8px; background: #f2f2ee; letter-spacing: 0; }
.security-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.security-status-grid p:last-child, .security-form-panel > p { color: var(--muted); font-size: .82rem; line-height: 1.7; }
.security-form-panel, .recovery-code-panel { margin-top: 18px; }
.recovery-code-panel { border: 2px solid #ddbd4f; background: #fffdf4; }
.recovery-code-panel > p:not(.eyebrow) { color: var(--muted); font-size: .82rem; }
.recovery-code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.recovery-code-grid code { padding: 10px; border-radius: 8px; background: #f2f2ee; text-align: center; font-weight: 800; letter-spacing: .06em; }
.heading-actions { display: flex; align-items: center; gap: 12px; }
.raksul-config-panel, .raksul-operation-panel, .raksul-candidate-panel { margin-top: 18px; }
.raksul-operation-panel > p { color: var(--muted); font-size: .82rem; line-height: 1.7; }
.raksul-candidate-panel td small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; }

/* Mercari Shops address labels */
.address-label-upload-panel, .address-label-preview-panel, .address-label-print-panel, .address-label-print-preview-panel, .address-label-history-panel { margin-top: 18px; }
.address-label-controls-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 18px; margin-top: 18px; }
.address-label-settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.address-label-settings-form label { display: grid; gap: 7px; color: var(--muted); font-size: .74rem; font-weight: 800; }
.address-label-settings-form input, .address-label-settings-form select { width: 100%; }
.address-label-settings-form button, .address-label-settings-form .form-help { align-self: end; }
.address-label-selection-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.address-label-placement-editor { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.address-label-placement-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.address-label-placement-heading h3 { margin: 0 0 5px; font-size: .95rem; }
.address-label-placement-heading p { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.6; }
.address-label-placement-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.address-label-placement-slot { min-height: 58px; padding: 8px 10px; display: grid; align-content: center; gap: 3px; border: 1px solid #bbc2bb; border-radius: 8px; text-align: left; color: var(--ink); background: #fff; cursor: pointer; }
.address-label-placement-slot:hover { border-color: var(--green); }
.address-label-placement-slot.is-selected { border: 2px solid var(--green); background: #edf8f1; }
.address-label-placement-slot.is-empty { color: var(--muted); background: #f5f5f1; }
.address-label-placement-number { font-size: .65rem; font-weight: 800; }
.address-label-placement-slot strong { overflow: hidden; font-size: .78rem; white-space: nowrap; text-overflow: ellipsis; }
.address-label-placement-actions { margin-top: 10px; display: flex; align-items: center; gap: 11px; }
.address-label-placement-actions span { color: var(--muted); font-size: .72rem; }
.address-label-upload-grid, .address-label-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.address-label-upload-grid { grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr); align-items: end; }
.address-label-upload-grid label, .address-label-settings-grid label { display: grid; gap: 7px; color: var(--muted); font-size: .74rem; font-weight: 800; }
.address-label-upload-grid input, .address-label-settings-grid input, .address-label-settings-grid select { width: 100%; }
.address-label-error { margin-top: 14px; padding: 13px 15px; border: 1px solid #e7b1b1; border-radius: 10px; color: #892727; background: #fff4f4; white-space: pre-line; }
.address-label-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.address-label-toolbar-actions, .address-label-print-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.address-label-preview-panel .table-wrap { max-height: 480px; }
.address-label-preview-panel tr.is-previously-printed { background: #fff9e8; }
.address-label-preview-panel .identifier-cell { white-space: nowrap; font-family: Consolas, monospace; font-size: .72rem; }
.address-label-preview-panel .address-cell { min-width: 240px; }
.address-label-preview-panel .warning-cell { color: #805a00; font-weight: 800; white-space: nowrap; }
.address-label-reprint-confirm { margin: 14px 20px 20px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; border-radius: 10px; color: #725400; background: #fff3cc; font-size: .78rem; font-weight: 800; }
.address-label-reprint-confirm input { width: auto; margin-top: 2px; }
.address-label-reprint-warning { padding: 11px 13px; border-radius: 10px; background: #fff3cc; }
.address-label-reprint-warning label { display: flex; align-items: flex-start; gap: 9px; color: #725400; font-size: .78rem; font-weight: 800; }
.address-label-reprint-warning input { width: auto; margin-top: 2px; }
.address-label-print-note, .address-label-settings-message { color: var(--muted); font-size: .78rem; line-height: 1.7; }
.address-label-settings-message { min-height: 1.3em; margin: 8px 0 0; color: var(--green); }
.address-label-print-root { --address-label-offset-x: 0mm; --address-label-offset-y: 0mm; --address-label-scale: 1; width: 100%; margin-top: 18px; overflow: auto; }
.address-label-page { width: min(100%, 210mm); aspect-ratio: 210 / 297; margin: 0 auto 18px; overflow: hidden; background: #fff; box-shadow: 0 4px 24px rgba(28, 35, 29, .14); }
.address-label-sheet { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(6, 1fr); transform: translate(var(--address-label-offset-x), var(--address-label-offset-y)) scale(var(--address-label-scale)); transform-origin: 0 0; }
.address-label-cell { min-width: 0; min-height: 0; padding: 3mm; display: grid; grid-template-rows: 5mm 21mm 5mm 12mm .5mm; overflow: hidden; box-sizing: border-box; outline: 1px dashed #aeb5ae; outline-offset: -1px; color: #111; background: #fff; font-family: "ＭＳ 明朝", "MS Mincho", serif; }
.address-label-cell.is-empty { background: repeating-linear-gradient(135deg, #fff, #fff 7px, #f5f5f2 7px, #f5f5f2 8px); }
.address-label-postal, .address-label-address, .address-label-name, .address-label-sender { min-width: 0; overflow: hidden; }
.address-label-postal, .address-label-name { display: flex; align-items: center; font-size: 14pt; white-space: nowrap; }
.address-label-address { display: flex; align-items: center; font-size: 14pt; line-height: 1.18; overflow-wrap: anywhere; }
.address-label-address.is-address-long { font-size: 12pt; }
.address-label-address.is-address-very-long { font-size: 10.5pt; line-height: 1.12; }
.address-label-name.is-name-long { font-size: 12pt; }
.address-label-sender { display: flex; flex-direction: column; justify-content: center; font-size: 9pt; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; }
.address-label-sender span { display: block; }
.address-label-spacer { min-height: 0; }

@page { size: A4 portrait; margin: 0; }

@media (max-width: 1050px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inventory-layout, .import-grid, .analytics-top-grid, .analytics-table-grid, .social-form-grid, .social-summary-grid, .strategy-form-grid, .notification-grid, .integration-grid, .security-status-grid, .inventory-sync-grid { grid-template-columns: 1fr; }
    .home-operation-grid { grid-template-columns: 1fr; }
    .purchase-form-grid, .purchase-preview-summary, .purchase-mode-fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fba-action-grid { grid-template-columns: 1fr; }
    .fba-reversal-panel { grid-template-columns: 1fr; }
    .fba-reversal-form { grid-template-columns: minmax(150px, .55fr) minmax(220px, 1.45fr); }
    .address-label-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .address-label-controls-grid { grid-template-columns: 1fr; }
    .product-filter-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-filter-search { grid-column: span 2; }
}

@media (max-width: 760px) {
    .purchase-form-grid, .purchase-preview-summary, .purchase-mode-fieldset { grid-template-columns: 1fr; }
    .purchase-entry-panel .section-heading, .purchase-items-panel .section-heading, .purchase-preview-panel .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .fba-quantity-grid { grid-template-columns: 1fr; }
    .fba-reversal-form { grid-template-columns: 1fr; grid-template-areas: "date" "reason" "action"; }
    .fba-reversal-form button { width: 100%; justify-self: stretch; }
    .operation-steps { grid-template-columns: 1fr; }
    .social-summary-panel .section-heading, .social-post-table-prominent .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .social-post-table-prominent .section-heading > small { text-align: left; }
    .tracking-link-row { align-items: stretch; flex-direction: column; }
    .copy-tracking-link { align-self: flex-start; }
    .attribution-review-form select { min-width: 220px; max-width: 100%; }
    .app-shell { display: block; }
    .sidebar { position: fixed; z-index: 10; top: auto; bottom: 0; width: 100%; height: 70px; padding: 9px 12px; display: block; box-shadow: 0 -8px 25px rgba(0, 0, 0, .12); }
    .sidebar > .brand, .sidebar-user, .nav-section, .nav-link.is-disabled { display: none; }
    .sidebar nav { height: 100%; margin: 0; grid-auto-flow: column; grid-auto-columns: minmax(72px, 1fr); align-items: center; overflow-x: auto; }
    .nav-link { padding: 10px 2px; text-align: center; font-size: .62rem; }
    .content { padding: 0 17px 100px; }
    .mobile-header { height: 70px; margin: 0 -17px 26px; padding: 12px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(246, 245, 239, .94); }
    .mobile-header .brand { gap: 8px; }
    .mobile-header .brand-mark { width: 34px; height: 34px; }
    .mobile-header > span { color: var(--muted); font-size: .78rem; font-weight: 800; }
    .page-heading { align-items: flex-start; }
    .page-usage-guide { margin-top: -8px; padding: 15px 16px; }
    .page-usage-guide ol { grid-template-columns: 1fr; gap: 7px; }
    .upload-form > *, .file-drop input { min-width: 0; max-width: 100%; }
    .analytics-heading { display: grid; }
    .period-filter { width: 100%; }
    .status-pill { margin-top: 8px; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric-card { min-height: 145px; padding: 17px; }
    .metric-card > span { min-height: 38px; font-size: .73rem; }
    .check-list { grid-template-columns: 1fr; }
    .panel { padding: 22px; }
    .table-panel { padding: 0; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .product-filter-panel { grid-template-columns: 1fr; }
    .product-filter-search { grid-column: auto; }
    .product-filter-actions > * { flex: 1; text-align: center; }
    .three-compact, .account-cards { grid-template-columns: 1fr; }
    .home-action-list li { grid-template-columns: 1fr auto; }
    .home-operation-heading { align-items: flex-start; }
    .home-action-list li > small { grid-column: 1; }
    .sticky-actions { bottom: 80px; }
    .trend-bars > div { grid-template-columns: minmax(90px, 1fr) 88px; }
    .notification-action-panel { align-items: flex-start; flex-direction: column; }
    .notification-actions { width: 100%; flex-wrap: wrap; }
    .run-list li { grid-template-columns: 1fr; gap: 3px; }
    .recovery-code-grid { grid-template-columns: 1fr; }
    .inventory-task-list article { align-items: stretch; flex-direction: column; }
    .inventory-task-list article form, .inventory-task-list article button { width: 100%; }
    .heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .address-label-upload-grid, .address-label-settings-grid, .address-label-settings-form { grid-template-columns: 1fr; }
    .address-label-toolbar { align-items: stretch; flex-direction: column; }
    .address-label-toolbar-actions, .address-label-print-actions { width: 100%; }
    .address-label-print-actions button { flex: 1 1 180px; }
    .address-label-print-root { margin-right: -22px; margin-left: -22px; width: calc(100% + 44px); }
    .address-label-page { min-width: 210mm; margin-left: 0; }
    .address-label-placement-heading, .address-label-placement-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 470px) {
    .page-heading { display: block; }
    .status-pill { width: fit-content; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 128px; }
    .metric-card > span { min-height: auto; }
}

@media print {
    html, body { width: 210mm !important; min-width: 210mm !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
    body * { visibility: hidden !important; }
    .address-label-print-root, .address-label-print-root * { visibility: visible !important; }
    .address-label-print-root { position: absolute; top: 0; left: 0; width: 210mm !important; margin: 0 !important; overflow: visible !important; }
    .address-label-page { width: 210mm !important; height: 297mm !important; margin: 0 !important; overflow: hidden !important; box-shadow: none !important; break-after: page; page-break-after: always; }
    .address-label-page:last-child { break-after: auto; page-break-after: auto; }
    .address-label-sheet { width: 210mm !important; height: 297mm !important; grid-template-columns: repeat(2, 105mm) !important; grid-template-rows: repeat(6, 49.5mm) !important; }
    .address-label-cell { width: 105mm !important; height: 49.5mm !important; outline: 0 !important; }
    .address-label-cell.is-empty { background: #fff !important; }
}
