body {
    margin: 0;
    font-family: sans-serif;
    background: #f5f5f5;
    color: #222;
}

a {
    color: #0b57d0;
    text-decoration: none;
}

.container {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header,
.site-footer,
.role-nav {
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.site-title {
    margin: 0;
    padding: 16px 0;
    font-size: 24px;
}

.site-header-row,
.site-user-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-user-tools {
    justify-content: flex-end;
}

.nav-actions {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.nav-action-btn {
    font-size: 13px;
    font-weight: bold;
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid #0b57d0;
    color: #0b57d0;
    background: #fff;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-action-btn:hover { background: #0b57d0; color: #fff; }
.nav-action-urgent { border-color: #e05a00; color: #e05a00; }
.nav-action-urgent:hover { background: #e05a00; color: #fff; }

.nav-links {
    display: flex;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
    color: #444;
    display: block;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.nav-links a:hover { color: #0b57d0; border-bottom-color: #0b57d0; }
.nav-sep {
    width: 1px;
    background: #ddd;
    margin: 5px 4px;
    flex-shrink: 0;
}
.nav-badge {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 3px;
    vertical-align: middle;
    line-height: 1.4;
}

.site-main {
    padding: 24px 0 40px;
}

.page-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 24px;
}

.flash {
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    background: #fff;
}

.flash-success {
    border-color: #7ab97a;
    background: #eef9ee;
}

.flash-error {
    border-color: #d99292;
    background: #fff1f1;
}

.flash-info {
    border-color: #9cb7e2;
    background: #eef4ff;
}

.notice {
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
}

.notice-success {
    border-color: #7ab97a;
    background: #eef9ee;
}

.notice-error {
    border-color: #d99292;
    background: #fff1f1;
}

.notice-info {
    border-color: #9cb7e2;
    background: #eef4ff;
}

.notice-warning {
    border-color: #e2c46a;
    background: #fffbee;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #c8c8c8;
    background: #fff;
}
.form-input-static {
    padding: 10px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #888;
    border-radius: 3px;
}

.button {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #0b57d0;
    background: #fff;
    color: #0b57d0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.button:hover {
    background: #0b57d0;
    color: #fff;
}

.button-secondary {
    border-color: #888;
    background: #fff;
    color: #555;
}

.button-secondary:hover {
    background: #0b57d0;
    border-color: #0b57d0;
    color: #fff;
}

.inline-form {
    margin: 0;
}

.inline-form + .inline-form {
    margin-top: 8px;
}

.meta-text {
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

.status-list {
    margin: 16px 0 0;
    padding-left: 18px;
}

.status-value {
    font-weight: 700;
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.simple-table th,
.simple-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

.text-right {
    text-align: right;
}

/* ── ダッシュボード ── */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.dashboard-card {
    border: 1px solid #ddd;
    padding: 16px;
    background: #fafafa;
}

.dashboard-card-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
}

.dashboard-card-count {
    font-size: 28px;
    font-weight: 700;
    color: #0b57d0;
    margin-bottom: 10px;
}

.dashboard-card-detail {
    margin: 0 0 12px;
    padding-left: 16px;
    font-size: 13px;
    color: #444;
}

.dashboard-card-links {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.dashboard-links {
    margin: 8px 0 0;
    padding-left: 18px;
    line-height: 2;
}

.dashboard-notifications {
    margin: 18px 0 22px;
    border: 1px solid #e4e4e4;
    background: #fafafa;
    padding: 14px 16px;
}

.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.dashboard-section-header h3 {
    margin: 0;
    font-size: 16px;
}

.dashboard-section-header a {
    font-size: 13px;
    white-space: nowrap;
}

.dashboard-notification-list {
    display: grid;
    gap: 8px;
}

.dashboard-notification-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #e5e5e5;
    background: #fff;
    padding: 9px 10px;
}

.dashboard-notification-item.is-unread {
    border-color: #9cb7e2;
    background: #f7fbff;
}

.dashboard-notification-title {
    font-weight: 700;
}

.dashboard-notification-meta {
    margin-top: 3px;
    color: #666;
    font-size: 12px;
}

/* ── 詳細ページ ── */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.detail-table th,
.detail-table td {
    padding: 9px 12px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.detail-table th {
    background: #f5f5f5;
    white-space: nowrap;
    width: 160px;
    font-weight: 600;
}

.detail-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 24px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ddd;
}

/* ── 審査カード ── */
.review-card {
    border: 1px solid #ddd;
    padding: 16px;
    margin-bottom: 16px;
    background: #fafafa;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.review-card-header strong {
    font-size: 16px;
    margin-right: 8px;
}

.review-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.review-btn-approve {
    background: #2e7a2e;
    border-color: #2e7a2e;
    white-space: nowrap;
}

.review-btn-reject {
    background: #c0392b;
    border-color: #c0392b;
    white-space: nowrap;
}

/* ── フィルターバー ── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 14px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    margin-bottom: 16px;
}

.filter-bar .filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.filter-bar .filter-field label {
    font-weight: 600;
    color: #555;
}

.filter-bar .filter-field input,
.filter-bar .filter-field select {
    padding: 7px 10px;
    border: 1px solid #c8c8c8;
    background: #fff;
    font-size: 13px;
    min-width: 140px;
}

.filter-bar button {
    padding: 8px 16px;
    border: 1px solid #0b57d0;
    background: #fff;
    color: #0b57d0;
    cursor: pointer;
    font-size: 13px;
    align-self: flex-end;
    transition: background 0.15s, color 0.15s;
}

.filter-bar button:hover {
    background: #0b57d0;
    color: #fff;
}

.filter-bar .filter-reset {
    font-size: 13px;
    color: #666;
    align-self: flex-end;
    padding: 8px 0;
}

.list-summary {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-approved  { background: #eef9ee; color: #2e7a2e; border: 1px solid #7ab97a; }
.badge-pending   { background: #eef4ff; color: #0b57d0; border: 1px solid #9cb7e2; }
.badge-rejected  { background: #fff1f1; color: #c0392b; border: 1px solid #d99292; }
.badge-resubmit  { background: #fff8ee; color: #a0600a; border: 1px solid #e8c07a; }
.badge-suspended { background: #f5f5f5; color: #666;    border: 1px solid #ccc; }
.badge-unverified{ background: #f5f5f5; color: #888;    border: 1px solid #ccc; }

.nav-count {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    margin-left: 4px;
    border-radius: 10px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.notification-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.notification-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-tabs a {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #ccc;
    color: #333;
    text-decoration: none;
    background: #fff;
}

.notification-tabs a.active {
    border-color: #0b57d0;
    background: #eef4ff;
    color: #0b57d0;
    font-weight: 700;
}

.notification-actions,
.notification-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-item {
    border: 1px solid #ddd;
    background: #fff;
    padding: 14px 16px;
}

.notification-item.is-unread {
    border-color: #9cb7e2;
    background: #f7fbff;
}

.notification-item.is-read {
    background: #fafafa;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.notification-meta {
    color: #666;
    font-size: 12px;
}

.notification-body {
    margin-top: 10px;
    color: #333;
    line-height: 1.7;
}

.notification-item-actions {
    margin-top: 12px;
}

/* ── 登録ステップインジケーター ── */
.register-steps {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    counter-reset: step;
}

.register-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-right: none;
    color: #999;
    font-size: 13px;
}

.register-step:last-child {
    border-right: 1px solid #ddd;
}

.register-step .step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.register-step.done {
    background: #eef9ee;
    color: #3a7a3a;
    border-color: #7ab97a;
}

.register-step.done .step-num {
    background: #7ab97a;
}

.register-step.current {
    background: #eef4ff;
    color: #0b57d0;
    border-color: #9cb7e2;
    font-weight: 700;
}

.register-step.current .step-num {
    background: #0b57d0;
}

.register-pending-box {
    text-align: center;
    padding: 32px 16px;
    border: 1px solid #9cb7e2;
    background: #eef4ff;
    margin-bottom: 20px;
}

.register-pending-box .pending-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.register-pending-email {
    font-weight: 700;
    font-size: 16px;
    margin: 8px 0;
}

.dev-verify-box {
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px dashed #d99292;
    background: #fff1f1;
    font-size: 13px;
}

/* ── 請求書ページ ── */
.invoice-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.invoice-doc {
    max-width: 800px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.7;
}

.invoice-title {
    text-align: center;
    font-size: 26px;
    letter-spacing: 0.3em;
    margin: 0 0 24px;
}

.invoice-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.invoice-to-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.invoice-info-table {
    border-collapse: collapse;
}

.invoice-info-table th,
.invoice-info-table td {
    padding: 4px 10px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.invoice-info-table th {
    background: #f5f5f5;
    white-space: nowrap;
}

.invoice-from {
    border-top: 1px solid #ddd;
    padding-top: 12px;
    margin-bottom: 20px;
    color: #444;
    font-size: 13px;
}

.invoice-from p {
    margin: 2px 0;
}

.invoice-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f4ff;
    border: 2px solid #0b57d0;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 700;
}

.invoice-total-amount {
    font-size: 24px;
    color: #0b57d0;
}

.invoice-items-table tfoot td {
    background: #fafafa;
}

.invoice-total-row td {
    background: #f0f4ff;
    font-size: 15px;
}

.invoice-bank {
    margin-top: 32px;
    border-top: 1px solid #ddd;
    padding-top: 16px;
}

.invoice-bank h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.invoice-bank-table {
    border-collapse: collapse;
    margin-bottom: 10px;
}

.invoice-bank-table th,
.invoice-bank-table td {
    padding: 6px 12px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.invoice-bank-table th {
    background: #f5f5f5;
    white-space: nowrap;
}

.invoice-bank-note {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* ── ショップフッターナビ ── */
.shop-footer-nav {
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 20px 0;
}
.shop-footer-nav .container {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.sfn-group { min-width: 120px; }
.sfn-label {
    font-size: 11px;
    font-weight: bold;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}
.sfn-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sfn-links a {
    font-size: 13px;
    color: #444;
    text-decoration: none;
}
.sfn-links a:hover { color: #0b57d0; }

/* ── 印刷スタイル ── */
@media print {
    .no-print,
    .site-header,
    .role-nav,
    .site-footer {
        display: none !important;
    }

    body {
        background: #fff;
        font-size: 12px;
    }

    .site-main {
        padding: 0;
    }

    .page-card {
        border: none;
        padding: 0;
    }

    .invoice-doc {
        max-width: 100%;
    }

    .invoice-total-box {
        border-color: #000;
        background: #eee;
    }

    .invoice-total-amount {
        color: #000;
    }
}
