* {
    box-sizing: border-box;
}

:root {
    --navy: #193b4c;
    --navy-deep: #102d3b;
    --blue: #2c7890;
    --blue-soft: #eaf4f7;
    --gold: #d7a84a;
    --ink: #22313a;
    --muted: #6b7b84;
    --line: #dbe4e8;
    --bg: #f3f6f7;
    --white: #ffffff;
    --danger: #a94747;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

body {
    margin: 0;
}

button,
input,
select {
    font: inherit;
}

.login-body,
.setup-body {
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(16, 45, 59, .96), rgba(44, 120, 144, .88)),
        repeating-linear-gradient(45deg, transparent, transparent 18px, rgba(255,255,255,.03) 18px, rgba(255,255,255,.03) 20px);
}

.login-body {
    display: grid;
    place-items: center;
}

.login-wrap {
    width: min(480px, 100%);
}

.login-card,
.setup-card {
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}

.login-card {
    padding: 46px 40px 38px;
    text-align: center;
}

.brand-mark {
    width: 72px;
    height: 72px;
    margin: 0 auto 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    border: 4px solid #d8edf3;
    font-weight: 800;
    letter-spacing: .08em;
}

.brand-en,
.header-brand,
.page-kicker {
    margin: 0;
    color: var(--blue);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .17em;
}

.login-card h1 {
    margin: 8px 0 30px;
    font-size: clamp(1.35rem, 5vw, 1.8rem);
}

.login-form,
.setup-form,
.setup-form fieldset {
    display: grid;
    gap: 18px;
}

.login-form {
    text-align: left;
}

.login-form label,
.setup-form label,
.filter-grid label {
    display: grid;
    gap: 7px;
}

.login-form label span,
.setup-form label span,
.filter-grid label span {
    color: #4d606a;
    font-size: .84rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 45px;
    padding: 9px 12px;
    border: 1px solid #cbd7dc;
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(44, 120, 144, .14);
}

.primary-button,
.search-button,
.detail-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.primary-button {
    min-height: 49px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 8px 18px rgba(44, 120, 144, .22);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.primary-button.compact {
    min-height: 43px;
    white-space: nowrap;
}

.notice-box,
.error-box,
.success-box {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: .9rem;
    line-height: 1.6;
}

.notice-box {
    background: #fff6dc;
    color: #795816;
}

.notice-box a {
    color: inherit;
    font-weight: 800;
}

.error-box {
    background: #fdeaea;
    color: #8f3030;
}

.success-box {
    background: #e5f4e8;
    color: #315f3c;
}

.preview-link,
.back-link,
.primary-link {
    display: block;
    margin-top: 16px;
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.back-link {
    color: var(--muted);
    font-size: .88rem;
}

.primary-link {
    padding: 12px 16px;
    border-radius: 9px;
    background: var(--blue);
    color: var(--white);
    text-align: center;
}

.setup-wrap {
    width: min(980px, 100%);
    margin: 0 auto;
}

.setup-card {
    padding: 38px;
}

.setup-card h1 {
    margin: 8px 0 16px;
}

.setup-help {
    color: var(--muted);
    line-height: 1.7;
}

.setup-form fieldset {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.setup-form legend {
    padding: 0 8px;
    color: var(--navy);
    font-weight: 800;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.app-body {
    min-height: 100vh;
    background: var(--bg);
}

.app-header {
    min-height: 74px;
    padding: 13px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--navy-deep);
    color: var(--white);
    border-bottom: 4px solid var(--gold);
}

.app-header h1 {
    margin: 4px 0 0;
    font-size: 1.18rem;
}

.header-brand {
    color: #8dd1df;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .88rem;
}

.header-user a {
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px;
    color: var(--white);
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: calc(100vh - 74px);
}

.side-nav {
    padding: 22px 14px;
    background: var(--white);
    border-right: 1px solid var(--line);
}

.nav-item {
    display: block;
    padding: 13px 15px;
    margin-bottom: 6px;
    border-radius: 9px;
    color: #52646e;
    font-weight: 700;
    text-decoration: none;
}

.nav-item.active {
    background: var(--blue-soft);
    color: var(--navy);
    border-left: 4px solid var(--blue);
}

.app-main {
    min-width: 0;
    padding: 28px;
}

.page-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.page-heading h2 {
    margin: 4px 0 0;
    font-size: 1.65rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.summary-card {
    padding: 18px 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 13px;
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

.summary-card strong {
    margin-top: 5px;
    display: inline-block;
    font-size: 2rem;
    color: var(--navy);
}

.summary-card small {
    margin-left: 5px;
    color: var(--muted);
}

.filter-panel,
.product-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.filter-panel {
    margin-bottom: 18px;
    padding: 17px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1.45fr repeat(4, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.search-button {
    min-height: 45px;
    padding: 9px 22px;
    border-radius: 9px;
    background: var(--navy);
    color: var(--white);
}

.product-panel {
    overflow: hidden;
}

.product-panel-head {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: .87rem;
}

.product-panel-head strong {
    color: var(--ink);
    font-size: 1rem;
}

.table-wrap {
    overflow-x: auto;
}

.product-table {
    width: 100%;
    min-width: 1060px;
    border-collapse: collapse;
}

.product-table th {
    padding: 12px 10px;
    background: #eef3f5;
    color: #52646e;
    font-size: .76rem;
    text-align: left;
    white-space: nowrap;
}

.product-table td {
    padding: 13px 10px;
    border-top: 1px solid #edf1f3;
    font-size: .86rem;
    vertical-align: middle;
}

.product-name-cell {
    min-width: 280px;
}

.product-name-cell strong {
    display: block;
    margin-top: 4px;
    line-height: 1.45;
}

.product-no {
    color: var(--blue);
    font-size: .75rem;
    font-weight: 800;
}

.image-placeholder {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #d6e7ec, #eef4f6);
    color: #72909b;
    font-size: .8rem;
    font-weight: 800;
}

.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-new {
    color: #586a73;
    background: #edf1f3;
}

.status-progress {
    color: #8b631a;
    background: #fff3d9;
}

.status-selling {
    color: #176174;
    background: #dff3f7;
}

.status-done {
    color: #356442;
    background: #e1f1e5;
}

.price-cell {
    font-weight: 800;
    white-space: nowrap;
}

.detail-button {
    padding: 7px 11px;
    border-radius: 7px;
    color: var(--blue);
    background: var(--blue-soft);
}

.preview-footer {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: .8rem;
    text-align: center;
}

@media (max-width: 1100px) {
    .filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-wide {
        grid-column: span 2;
    }
}

@media (max-width: 800px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .setup-card {
        padding: 26px 18px;
    }

    .app-header {
        padding: 12px 16px;
    }

    .app-header h1 {
        font-size: 1rem;
    }

    .app-shell {
        display: block;
    }

    .side-nav {
        padding: 8px 10px;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-item {
        margin: 0;
        padding: 10px 12px;
        white-space: nowrap;
    }

    .nav-item.active {
        border-left: 0;
        border-bottom: 3px solid var(--blue);
    }

    .app-main {
        padding: 18px 12px 28px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-wide {
        grid-column: span 2;
    }

    .search-button {
        grid-column: span 2;
    }
}

@media (max-width: 520px) {
    .login-card {
        padding: 36px 22px 30px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button.compact {
        width: 100%;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-wide,
    .search-button {
        grid-column: auto;
    }
}


/* Step008 商品登録 */
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd7dc;
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    line-height: 1.65;
    resize: vertical;
    outline: none;
}

textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(44, 120, 144, .14);
}

.button-link,
.secondary-link-button,
.cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.nav-disabled {
    cursor: default;
    opacity: .45;
    pointer-events: none;
}

.form-message {
    margin-bottom: 18px;
}

.product-form {
    display: grid;
    gap: 18px;
}

.form-section {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.form-section-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #edf1f3;
    padding-bottom: 14px;
}

.form-section-heading h3 {
    margin: 0;
    color: var(--navy);
    font-size: 1.08rem;
}

.form-section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.6;
}

.auto-code {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 20px;
}

.form-grid label,
.full-label {
    display: grid;
    gap: 7px;
}

.form-grid label > span,
.full-label > span {
    color: #4d606a;
    font-size: .84rem;
    font-weight: 700;
}

.required-field > span::after {
    content: "必須";
    margin-left: 7px;
    padding: 2px 6px;
    border-radius: 5px;
    background: #fbe7e7;
    color: #9a3838;
    font-size: .66rem;
    vertical-align: 1px;
}

.form-span-2 {
    grid-column: span 2;
}

.form-grid small,
.full-label small {
    color: var(--muted);
    font-size: .76rem;
}

.inline-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.secondary-button {
    min-height: 45px;
    padding: 9px 14px;
    border: 1px solid #b8cbd3;
    border-radius: 9px;
    background: #f4f8f9;
    color: var(--navy);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.secondary-link-button,
.cancel-button {
    min-height: 43px;
    padding: 10px 16px;
    border: 1px solid #bdcdd4;
    border-radius: 9px;
    background: var(--white);
    color: var(--navy);
    font-weight: 800;
}

.money-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.money-field span {
    color: var(--muted);
    font-weight: 700;
}

.textarea-action {
    display: flex;
    justify-content: flex-end;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 4px 0 24px;
}

.register-button {
    min-width: 220px;
}

.empty-state {
    padding: 52px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-state strong {
    display: block;
    color: var(--ink);
    font-size: 1.05rem;
}

.empty-state p {
    margin: 8px 0 0;
}

.date-cell {
    white-space: nowrap;
}

@media (max-width: 800px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: auto;
    }

    .form-section {
        padding: 18px 14px;
    }

    .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .register-button,
    .cancel-button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .inline-field {
        grid-template-columns: 1fr;
    }

    .form-section-heading {
        display: block;
    }

    .auto-code {
        display: inline-block;
        margin-top: 10px;
    }
}


/* Step009 商品詳細・編集 */
.detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    text-decoration: none;
    white-space: nowrap;
}

.action-cell {
    white-space: nowrap;
}

.product-meta-bar {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    overflow: hidden;
}

.product-meta-bar > div {
    padding: 16px 20px;
    border-right: 1px solid var(--line);
}

.product-meta-bar > div:last-child {
    border-right: 0;
}

.product-meta-bar span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.product-meta-bar strong {
    color: var(--navy);
    font-size: .96rem;
}

.fixed-code {
    padding: 7px 11px;
    border-radius: 8px;
    background: var(--navy);
    color: var(--white);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .product-meta-bar {
        grid-template-columns: 1fr;
    }

    .product-meta-bar > div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .product-meta-bar > div:last-child {
        border-bottom: 0;
    }
}


/* Step010 商品写真 */
.product-main-image,
.image-manager-photo img,
.new-image-item img {
    display: block;
    object-fit: cover;
    background: #eef3f5;
}

.product-main-image {
    width: 54px;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.photo-limit {
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf4f7;
    color: var(--blue);
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}

.file-input {
    padding: 10px;
    border: 1px dashed #aebfc7;
    border-radius: 10px;
    background: #f8fafb;
}

.new-image-preview {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.new-image-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
}

.new-image-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.new-image-item span {
    display: block;
    padding: 7px 8px;
    color: var(--navy);
    font-size: .74rem;
    font-weight: 800;
    text-align: center;
}

.image-manager-list {
    display: grid;
    gap: 10px;
}

.image-manager-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.image-manager-item.marked-delete {
    opacity: .48;
    background: #fff3f3;
}

.image-manager-photo {
    position: relative;
}

.image-manager-photo img {
    width: 92px;
    height: 92px;
    border-radius: 9px;
}

.main-image-label {
    position: absolute;
    left: 5px;
    bottom: 5px;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(23, 48, 65, .9);
    color: #fff;
    font-size: .67rem;
    font-weight: 800;
}

.main-image-label:empty {
    display: none;
}

.image-manager-info {
    min-width: 0;
}

.image-manager-info strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: .85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-manager-info small {
    color: var(--muted);
}

.image-manager-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.image-order-button {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #bdcdd4;
    border-radius: 8px;
    background: #f5f8f9;
    color: var(--navy);
    cursor: pointer;
    font-weight: 800;
}

.image-delete-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fdecec;
    color: #8d3030;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 800;
}

.image-delete-check input {
    width: auto;
    min-height: auto;
}

.add-photo-field {
    margin-top: 18px;
}

.no-photo-message {
    padding: 24px;
    border: 1px dashed #c9d5da;
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 800px) {
    .image-manager-item {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .image-manager-photo img {
        width: 76px;
        height: 76px;
    }

    .image-manager-actions {
        grid-column: span 2;
        flex-wrap: wrap;
    }
}


/* Step012 カテゴリー別採寸 */
.measurement-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8f3ed;
    color: #35664b;
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}

.measurement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 20px;
}

.standard-measurement-field {
    display: grid;
    gap: 7px;
}

.standard-measurement-field[hidden] {
    display: none;
}

.standard-measurement-field > span {
    color: #4d606a;
    font-size: .84rem;
    font-weight: 700;
}

.measurement-input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.measurement-input-wrap > span {
    color: var(--muted);
    font-weight: 700;
}

.no-standard-measurements {
    grid-column: 1 / -1;
    padding: 14px;
    border: 1px dashed #c7d6dc;
    border-radius: 10px;
    background: #f7fafb;
    color: var(--muted);
    font-size: .84rem;
}

.no-standard-measurements[hidden] {
    display: none;
}

.custom-measurement-head {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #edf1f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.custom-measurement-head strong {
    display: block;
    color: var(--navy);
}

.custom-measurement-head small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.custom-measurement-list {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.custom-measurement-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) 80px auto;
    gap: 9px;
    align-items: center;
}

.measurement-unit-input {
    text-align: center;
}

.remove-measurement-button {
    min-height: 43px;
    padding: 8px 13px;
    border: 1px solid #e0baba;
    border-radius: 8px;
    background: #fff4f4;
    color: #913d3d;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 800px) {
    .measurement-grid {
        grid-template-columns: 1fr;
    }

    .custom-measurement-head {
        align-items: stretch;
        flex-direction: column;
    }

    .custom-measurement-row {
        grid-template-columns: 1fr 1fr 72px;
    }

    .remove-measurement-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .custom-measurement-row {
        grid-template-columns: 1fr;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #f8fafb;
    }

    .remove-measurement-button {
        grid-column: auto;
    }
}


/* Step013 出品先管理 */
.listing-row-list {
    display: grid;
    gap: 14px;
}

.listing-row {
    padding: 16px;
    border: 1px solid #d8e2e6;
    border-radius: 12px;
    background: #f9fbfc;
}

.listing-row-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
}

.listing-row-grid label {
    display: grid;
    gap: 7px;
}

.listing-row-grid label > span {
    color: #4d606a;
    font-size: .82rem;
    font-weight: 700;
}

.listing-url-field {
    grid-column: span 3;
}

.other-marketplace-field.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.listing-row-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.remove-listing-button {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #e0baba;
    border-radius: 8px;
    background: #fff4f4;
    color: #913d3d;
    cursor: pointer;
    font-weight: 700;
}

.listing-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #b9d0da;
    border-radius: 8px;
    background: #eef6f8;
    color: var(--blue);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.marketplace-cell {
    max-width: 220px;
}

.marketplace-badge {
    display: inline-flex;
    align-items: center;
    margin: 2px 3px 2px 0;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf4f6;
    color: #3f6473;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.marketplace-empty {
    color: var(--muted);
    font-size: .8rem;
}

@media (max-width: 1100px) {
    .listing-row-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .listing-url-field {
        grid-column: span 2;
    }
}

@media (max-width: 620px) {
    .listing-row-grid {
        grid-template-columns: 1fr;
    }

    .listing-url-field {
        grid-column: auto;
    }

    .other-marketplace-field.is-hidden {
        display: none;
    }

    .listing-row-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .listing-open-link,
    .remove-listing-button {
        width: 100%;
    }
}


/* Step014 売却・発送管理 */
.page-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sale-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.sale-filter-grid label {
    display: grid;
    gap: 7px;
}

.sale-filter-grid label span {
    color: #4d606a;
    font-size: .84rem;
    font-weight: 700;
}

.sale-table .product-main-image {
    display: block;
    border-radius: 7px;
}

.negative-profit {
    color: #a23b3b;
}

.payment-badge,
.shipping-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.payment-badge.is-paid {
    background: #e5f4e8;
    color: #315f3c;
}

.payment-badge.is-unpaid {
    background: #fff1d7;
    color: #7a5411;
}

.shipping-badge.is-shipped {
    background: #e5edf6;
    color: #375a7c;
}

.shipping-badge.is-waiting {
    background: #fff1d7;
    color: #7a5411;
}

.sale-product-card {
    margin-bottom: 18px;
    padding: 18px;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.sale-product-image {
    width: 120px;
    height: 120px;
    border-radius: 11px;
    overflow: hidden;
    background: #edf2f4;
}

.sale-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sale-no-image {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.sale-product-info > span {
    color: var(--blue);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.sale-product-info h3 {
    margin: 5px 0 12px;
    color: var(--navy);
    font-size: 1.18rem;
}

.sale-product-info dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px 14px;
    margin: 0;
}

.sale-product-info dt {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
}

.sale-product-info dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.registered-listing-note {
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #cadde4;
    border-radius: 12px;
    background: #f1f7f9;
}

.registered-listing-note > strong {
    color: var(--navy);
}

.registered-listing-note > div {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.registered-listing-note > div span {
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--white);
    color: #3f6473;
    font-size: .75rem;
    font-weight: 800;
}

.registered-listing-note p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.6;
}

.profit-panel {
    margin-top: 20px;
    padding: 17px 20px;
    display: grid;
    grid-template-columns: max-content auto;
    gap: 4px 16px;
    align-items: baseline;
    border: 1px solid #cadde4;
    border-radius: 12px;
    background: #f1f7f9;
}

.profit-panel > span {
    color: var(--navy);
    font-weight: 800;
}

.profit-panel strong {
    color: #2c7450;
    font-size: 1.45rem;
}

.profit-panel strong.is-negative {
    color: #a23b3b;
}

.profit-panel small {
    grid-column: 1 / -1;
    color: var(--muted);
}

.sale-hidden-field {
    display: none !important;
}

@media (max-width: 900px) {
    .sale-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sale-filter-grid .search-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .page-heading-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading-actions .secondary-link-button {
        width: 100%;
    }

    .sale-filter-grid {
        grid-template-columns: 1fr;
    }

    .sale-filter-grid .search-button {
        grid-column: auto;
    }

    .sale-product-card {
        grid-template-columns: 1fr;
    }

    .sale-product-image {
        width: 100%;
        height: 220px;
    }

    .profit-panel {
        grid-template-columns: 1fr;
    }

    .profit-panel small {
        grid-column: auto;
    }
}


/* Step015 削除・復元 */
.delete-product-section {
    margin: 2px 0 28px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e4caca;
    border-radius: 14px;
    background: #fff7f7;
}

.delete-product-section h3 {
    margin: 0;
    color: #7c3030;
    font-size: 1rem;
}

.delete-product-section p {
    margin: 6px 0 0;
    color: #806464;
    font-size: .82rem;
    line-height: 1.6;
}

.delete-product-button {
    min-height: 43px;
    padding: 9px 16px;
    border: 1px solid #c96c6c;
    border-radius: 9px;
    background: #a94444;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.deleted-summary-card {
    margin-bottom: 18px;
    padding: 18px 22px;
    display: grid;
    grid-template-columns: max-content auto max-content;
    gap: 4px 8px;
    align-items: baseline;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.deleted-summary-card > span {
    color: var(--muted);
    font-weight: 700;
}

.deleted-summary-card > strong {
    color: var(--navy);
    font-size: 1.7rem;
}

.deleted-summary-card > small {
    color: var(--muted);
    font-weight: 700;
}

.deleted-summary-card p {
    grid-column: 1 / -1;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.6;
}

.deleted-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.deleted-filter-grid label {
    display: grid;
    gap: 7px;
}

.deleted-filter-grid label span {
    color: #4d606a;
    font-size: .84rem;
    font-weight: 700;
}

.restore-product-button {
    min-height: 36px;
    padding: 7px 15px;
    border: 1px solid #9fc4ae;
    border-radius: 8px;
    background: #eaf5ed;
    color: #356247;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.deleted-product-table .product-main-image {
    display: block;
    border-radius: 7px;
}

@media (max-width: 800px) {
    .delete-product-section {
        align-items: stretch;
        flex-direction: column;
    }

    .delete-product-button {
        width: 100%;
    }

    .deleted-filter-grid {
        grid-template-columns: 1fr;
    }
}


/* Step016 管理者設定 */
.settings-intro {
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid #cadde4;
    border-radius: 14px;
    background: #f1f7f9;
}

.settings-intro h3 {
    margin: 0;
    color: var(--navy);
    font-size: 1rem;
}

.settings-intro p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.7;
}

.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 28px;
}

.admin-settings-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    overflow: hidden;
}

.admin-settings-heading {
    padding: 17px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e6edf0;
    background: #f8fafb;
}

.admin-settings-heading > div > span {
    color: var(--blue);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
}

.admin-settings-heading h3 {
    margin: 4px 0 0;
    color: var(--navy);
    font-size: 1.05rem;
}

.current-admin-badge {
    padding: 5px 9px;
    border-radius: 999px;
    background: #e6f3ea;
    color: #356247;
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-settings-form {
    padding: 20px;
    display: grid;
    gap: 16px;
}

.admin-settings-form > label,
.admin-password-fields label {
    display: grid;
    gap: 7px;
}

.admin-settings-form label > span {
    color: #4d606a;
    font-size: .84rem;
    font-weight: 700;
}

.admin-password-fields {
    padding-top: 16px;
    display: grid;
    gap: 14px;
    border-top: 1px solid #edf1f3;
}

.admin-settings-meta {
    padding: 11px 13px;
    display: grid;
    gap: 4px;
    border-radius: 9px;
    background: #f4f7f8;
    color: var(--muted);
    font-size: .74rem;
}

.admin-save-button {
    width: 100%;
    min-height: 45px;
}

@media (max-width: 900px) {
    .admin-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .admin-settings-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
