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-error {
    display: block;
    color: #c0392b;
    font-size: 12px;
    margin-top: -4px;
}

.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; }

/* ── キャストフッターナビ ── */
.cast-footer-nav {
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 20px 0;
}
.cast-footer-nav .container {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

/* ── 印刷スタイル ── */
@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;
    }
}

/* ── Utility classes ────────────────────────────────────── */

/* Text */
.text-danger  { color: #c0392b; }
.text-muted   { color: #888; }
.text-blue    { color: #1a73e8; }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 12px; }
.text-2xs     { font-size: 11px; }
.font-bold    { font-weight: bold; }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-pre-wrap { white-space: pre-wrap; }
.text-nowrap  { white-space: nowrap; }

/* Spacing */
.ml-8   { margin-left: 8px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-20  { margin-top: 20px; }
.mt-24  { margin-top: 24px; }
.mt-28  { margin-top: 28px; }
.mb-4   { margin-bottom: 4px; }
.mb-8   { margin-bottom: 8px; }
.mb-12  { margin-bottom: 12px; }
.mb-16  { margin-bottom: 16px; }
.mb-20  { margin-bottom: 20px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }

/* Layout */
.d-flex     { display: flex; }
.flex-1     { flex: 1; }
.align-center { align-items: center; }
.gap-8      { gap: 8px; }
.gap-16     { gap: 16px; }

/* Common component patterns */
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.info-note {
    font-size: 13px;
    color: #666;
    background: #f8f4e8;
    border: 1px solid #e0c96e;
    border-radius: 4px;
    padding: 8px 12px;
}

.form-hint {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.badge-count {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: bold;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Spacing extras */
.m-0   { margin: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-18 { margin-bottom: 18px; }
.mb-28 { margin-bottom: 28px; }
.ml-12 { margin-left: 12px; }

/* Color extras */
.text-star  { color: #f0c040; }
.text-dim   { color: #999; }
.text-faint { color: #aaa; }
.text-light { color: #ccc; }
.text-gray  { color: #666; }

/* Layout helpers */
.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header-row-sm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.page-header-row-lg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.flex-min0  { flex: 1; min-width: 0; }
.flex-end   { display: flex; gap: 8px; align-items: flex-end; }

/* List item link */
.list-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
}

.list-arrow {
    color: #bbb;
    font-size: 20px;
    padding-left: 12px;
    flex-shrink: 0;
}

/* Field hint text */
.field-hint {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

/* Unread notification badge */
.unread-badge {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Filter/tag button */
.tag-filter {
    padding: 2px 8px;
    border: 1px solid #d8d8d8;
    background: #f7f7f7;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

/* Button color variants */
.button-blue   { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.button-danger { background: #c0392b; border-color: #c0392b; }
.button-dark   { background: #0b57d0; border-color: #0b57d0; color: #fff; padding: 10px 22px; white-space: nowrap; }

/* Empty state */
.empty-text { color: #999; text-align: center; margin: auto; }

/* Textarea in flex layout */
.textarea-flex { flex: 1; resize: vertical; min-height: 72px; }

/* Rounded image block */
.img-block { border: 0; border-radius: 8px; display: block; }

/* Width */
.w-auto { width: auto; }

/* Text combination shortcuts */
.text-xs-muted  { font-size: 12px; color: #888; }
.text-xs-danger { font-size: 12px; color: #c0392b; }
.text-danger-bold { color: #c0392b; font-weight: bold; }
.text-sm-muted  { font-size: 13px; color: #888; }
.text-2xs-muted { font-size: 11px; color: #666; }
.text-faint-sm  { color: #aaa; font-size: 13px; padding: 12px 0; }

/* Flex layout helpers */
.flex-wrap-8  { display: flex; gap: 8px;  align-items: center; flex-wrap: wrap; }
.flex-gap10   { display: flex; gap: 10px; align-items: center; }
.flex-gap10-list      { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.flex-gap10-list-wrap { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }

/* Display helpers */
.d-inline { display: inline; }

/* Inline form (removes block display of <form>) */
.form-inline { display: inline; margin-left: 12px; }

/* Small button modifier */
.btn-sm { font-size: 12px; padding: 3px 10px; }

/* Block button (full-width small) */
.btn-block-sm {
    display: block;
    width: 100%;
    font-size: 12px;
    padding: 5px 0;
}

.btn-block-sm-center {
    display: block;
    text-align: center;
    font-size: 12px;
    padding: 5px 0;
    margin-bottom: 6px;
}

/* Form label block style */
.form-label-sm { display: block; font-size: 13px; margin-bottom: 4px; }

/* Field hint with more top spacing */
.field-hint-md { font-size: 12px; color: #888; margin-top: 6px; }

/* Spacing micro */
.mt-2  { margin-top: 2px; }
.mt-6  { margin-top: 6px; }
.mt-12 { margin-top: 12px; }

/* Width */
.w-130  { width: 130px; }
.mw-360 { max-width: 360px; }

/* Color extras */
.text-green { color: #27ae60; }
.text-amber { color: #c0820a; }

/* Additional button color variants */
.button-green  { background: #1e8e3e; border-color: #1e8e3e; color: #fff; padding: 10px 22px; white-space: nowrap; }
.button-orange { background: #e65100; border-color: #e65100; color: #fff; }

/* Flex layout extras */
.flex-justify-end  { display: flex; gap: 8px; justify-content: flex-end; }
.flex-wrap-gap10   { display: flex; gap: 10px; flex-wrap: wrap; }
.flex-wrap-gap12   { display: flex; gap: 12px; flex-wrap: wrap; }
.d-inline-flex     { display: inline-flex; }

/* Small notification badge (no bold) */
.badge-xs {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
}

/* Warning/info tag */
.warning-tag {
    font-size: 11px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #7a5800;
    border-radius: 4px;
    padding: 2px 7px;
    vertical-align: middle;
    margin-left: 6px;
}

/* Tab navigation */
.tab-bar {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}
.tab-item {
    padding: 8px 20px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.tab-item.is-active {
    color: #0b57d0;
    border-bottom-color: #0b57d0;
    font-weight: bold;
}
.tab-item:hover {
    color: #0b57d0;
    background: #f5f8ff;
}

/* Upload drop zone */
.upload-area {
    margin-top: 12px;
    padding: 20px;
    background: #f0f7ff;
    border: 1px dashed #b0c4de;
    border-radius: 8px;
    text-align: center;
}

/* Empty state card */
.empty-card {
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    color: #888;
    font-size: 13px;
    text-align: center;
}

/* Disabled appearance */
.disabled-look { opacity: 0.5; cursor: default; }

/* Body text with line breaks */
.text-body-pre { margin-top: 16px; line-height: 1.8; white-space: pre-wrap; }

/* Modal overlay and card */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    width: min(480px, 90vw);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Stat/metric box */
.stat-card {
    border: 1px solid #ddd;
    padding: 14px 20px;
    background: #fafafa;
    min-width: 140px;
}

/* Layout extras */
.ml-auto-nowrap { margin-left: auto; white-space: nowrap; }

/* Textarea full-width */
.textarea-full { width: 100%; box-sizing: border-box; resize: vertical; }

/* Text heading sizes */
.heading-lg { font-size: 24px; font-weight: 700; color: #0b57d0; }
.heading-md { font-size: 18px; font-weight: bold; margin-bottom: 12px; }
.heading-sm { font-size: 15px; font-weight: bold; color: #333; margin-bottom: 6px; }

/* Section label with underline */
.section-label {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin: 0 0 4px;
    border-bottom: 2px solid #888;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Inline error text */
.text-error-center { font-size: 13px; color: #c0392b; text-align: center; }

/* Tiny color texts */
.text-2xs-muted-alt { font-size: 11px; color: #888; }
.text-2xs-faint     { font-size: 11px; color: #aaa; }

/* Flex column */
.flex-col-10 { display: flex; flex-direction: column; gap: 10px; max-width: 280px; }

/* Full-width box-sizing input */
.input-full { width: 100%; box-sizing: border-box; }

/* Inline with vertical-middle */
.text-xs-vm-ml8 { font-size: 12px; vertical-align: middle; margin-left: 8px; }
.text-xs-vm-ml6 { font-size: 12px; vertical-align: middle; margin-left: 6px; }

/* Orange urgent badge/tag */
.urgent-badge {
    background: #e65100;
    color: #fff;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: inline-block;
    font-size: 14px;
}

/* Star rating text */
.text-star-lg { color: #f0c040; font-size: 16px; }


/* ═══════════════════════════════════════════════════════════════
   Page-specific components (extracted from $extraHead style blocks)
   ═══════════════════════════════════════════════════════════════ */

/* ── Photo grid (profile edit upload) ──────────────────────── */
.photo-grid { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.photo-grid-item { position:relative; width:90px; cursor:grab; }
.photo-grid-item img { width:90px; height:120px; object-fit:cover; border-radius:4px; display:block; }
.photo-grid-item.sortable-ghost { opacity:0.4; }
.photo-primary-badge { position:absolute; top:4px; left:4px; background:#e8a020; color:#fff; font-size:10px; padding:2px 5px; border-radius:3px; }
.photo-sort-hint { font-size:11px; color:#999; margin-bottom:8px; }
.photo-delete-btn { display:block; width:100%; margin-top:4px; font-size:11px; padding:3px 0; text-align:center; background:#f5f5f5; border:1px solid #ddd; border-radius:3px; cursor:pointer; }
.photo-delete-btn:hover { background:#fee; border-color:#c00; color:#c00; }

/* ── Cast profile options ───────────────────────────────────── */
.cast-opts { display:flex; flex-wrap:wrap; gap:6px 20px; }
.cast-opts label { font-size:13px; display:flex; align-items:center; gap:5px; cursor:pointer; white-space:nowrap; }
.avail-pref-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.avail-pref-tag { display:inline-flex; align-items:center; gap:4px; background:#ddeeff; border:1px solid #2255aa; color:#2255aa; border-radius:4px; padding:3px 8px; font-size:13px; }
.avail-pref-tag button { background:none; border:none; color:#2255aa; cursor:pointer; font-size:14px; line-height:1; padding:0 2px; }
.avail-pref-add-row { display:flex; gap:6px; align-items:center; }

/* ── Photo gallery (preview / cast profile) ─────────────────── */
.photo-gallery { display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; margin-bottom:20px; }
.photo-gallery img { width:120px; min-width:120px; aspect-ratio:3/4; object-fit:cover; border-radius:6px; display:block; cursor:zoom-in; }
.photo-gallery-placeholder { width:120px; min-width:120px; aspect-ratio:3/4; background:#f0f0f0; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:40px; color:#ccc; }

/* ── Profile hero layout ────────────────────────────────────── */
.profile-hero { display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; margin-bottom:28px; }
.profile-info { flex:1; min-width:200px; }
.profile-name { font-size:22px; font-weight:bold; margin-bottom:8px; }
.profile-meta { font-size:14px; color:#555; line-height:2; margin-bottom:12px; }
.profile-meta-label { color:#999; font-size:12px; margin-right:4px; }
.profile-bio { font-size:14px; line-height:1.8; white-space:pre-wrap; color:#333; }

/* ── Cast option tags (preview) ─────────────────────────────── */
.cast-option-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.cast-option-tag { background:#f5f5f5; border:1px solid #ddd; color:#aaa; border-radius:4px; padding:2px 10px; font-size:13px; }
.cast-option-tag.active { background:#f0f4ff; border-color:#b0c4de; color:#334; font-weight:bold; }
.avail-pref-list { display:flex; flex-wrap:wrap; gap:4px; }
.avail-pref-chip { background:#eef9ee; border:1px solid #7bc67e; color:#2d6a2d; border-radius:4px; padding:2px 10px; font-size:13px; }

/* ── Lightbox overlay ───────────────────────────────────────── */
.lightbox-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.85); z-index:2000; align-items:center; justify-content:center; cursor:zoom-out; }
.lightbox-overlay.open { display:flex; }
.lightbox-overlay img { max-width:92vw; max-height:92vh; object-fit:contain; border-radius:8px; pointer-events:none; }

/* ── Favourite / Block buttons ──────────────────────────────── */
.fav-btn { background:#fff; border:1px solid #ccc; border-radius:4px; font-size:13px; cursor:pointer; color:#999; padding:4px 10px; line-height:1.4; white-space:nowrap; }
.fav-btn.active { color:#c0820a; border-color:#f0c040; background:#fffbe6; }
.fav-btn:hover { border-color:#f0c040; color:#c0820a; }
.block-btn { font-size:12px; padding:3px 10px; color:#c0392b; border:1px solid #c0392b; background:#fff; border-radius:4px; cursor:pointer; }
.block-btn.active { background:#c0392b; color:#fff; }

/* ── Shop gallery (horizontal scroll + arrows) ──────────────── */
.shop-gallery-wrap { position:relative; margin-bottom:20px; }
.shop-photos { display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth; padding-bottom:6px; -webkit-overflow-scrolling:touch; }
.shop-photos img { width:200px; min-width:200px; aspect-ratio:3/4; object-fit:cover; border-radius:8px; display:block; scroll-snap-align:start; cursor:zoom-in; }
.shop-photo-placeholder { width:200px; min-width:200px; aspect-ratio:3/4; background:#f0f0f0; border-radius:8px; display:flex; align-items:center; justify-content:center; color:#aaa; font-size:40px; }
.gallery-arrow { position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,.45); color:#fff; border:none; border-radius:50%; width:36px; height:36px; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:10; padding:0; }
.gallery-arrow.prev { left:-4px; }
.gallery-arrow.next { right:-4px; }

/* ── Shop photos carousel (job/offer views) ─────────────────── */
.shop-photos-track-wrap { overflow:hidden; border-radius:8px; }
.shop-photos-track { display:flex; transition:transform .3s ease; gap:6px; }
.shop-photos-track img { flex:0 0 auto; width:100%; aspect-ratio:3/4; object-fit:cover; display:block; border-radius:6px; }
.shop-photos-placeholder { width:100%; height:160px; background:#f0f0f0; border-radius:8px; display:flex; align-items:center; justify-content:center; color:#bbb; font-size:13px; margin-bottom:20px; }
.shop-photos-nav { display:flex; justify-content:center; align-items:center; gap:4px; margin-top:10px; flex-wrap:wrap; }
.shop-photos-btn { background:none; color:#3a3a4a; border:1px solid #ccc; border-radius:4px; width:32px; height:32px; font-size:16px; line-height:30px; text-align:center; cursor:pointer; padding:0; }
.shop-photos-btn:hover { background:#f0f0f0; }
.shop-photos-num { background:none; border:1px solid #ccc; border-radius:4px; width:32px; height:32px; font-size:13px; line-height:30px; text-align:center; cursor:pointer; padding:0; color:#666; }
.shop-photos-num.active { background:#3a3a4a; color:#fff; border-color:#3a3a4a; font-weight:bold; }
@media (min-width:640px) {
    .shop-photos-track { gap:8px; }
    .shop-photos-track img { width:calc((100% - 16px) / 3); }
}

/* ── Shop summary (profile view) ────────────────────────────── */
.shop-summary { display:flex; flex-direction:column; gap:8px; margin-bottom:20px; }
.shop-summary-item { display:flex; align-items:center; gap:12px; padding:10px 14px; border:1px solid #e4e4e4; background:#fafafa; border-radius:6px; }
.shop-summary-label { font-size:12px; color:#666; min-width:100px; }
.shop-summary-value { font-weight:700; }

/* ── Pay summary ────────────────────────────────────────────── */
.pay-summary { background:#fff8f0; border:1px solid #f0d8a0; border-radius:6px; padding:10px 14px; font-size:14px; margin-top:4px; }
.pay-summary-total { font-size:17px; font-weight:bold; color:#c0392b; }

/* ── Apply info box ─────────────────────────────────────────── */
.apply-info { background:#f8f8ff; border:1px solid #dde; border-radius:8px; padding:14px 16px; margin-bottom:16px; }
.apply-info-row { display:flex; justify-content:space-between; align-items:baseline; padding:5px 0; border-bottom:1px solid #eee; font-size:14px; }
.apply-info-row:last-child { border-bottom:none; }
.apply-info-label { color:#666; }
.apply-info-value { font-weight:bold; }
.apply-info-value.urgent { color:#c0392b; }
.job-application-status { margin:8px 0 12px; }

/* ── Review cards ───────────────────────────────────────────── */
.review-stars { color:#f0c040; font-size:16px; letter-spacing:1px; }
.review-cards { display:flex; flex-direction:column; gap:12px; margin-top:12px; }
.review-card { border:1px solid #e8e8e8; border-radius:8px; padding:12px 16px; background:#fafafa; }
.review-card-header { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.review-date { font-size:12px; color:#aaa; margin-left:auto; }
.review-comment { font-size:14px; color:#333; line-height:1.7; white-space:pre-wrap; }

/* ── Star rating form ───────────────────────────────────────── */
.star-rating { display:flex; flex-direction:row-reverse; justify-content:flex-end; gap:4px; margin-bottom:4px; }
.star-rating input[type="radio"] { display:none; }
.star-rating label { font-size:32px; color:#ddd; cursor:pointer; line-height:1; }
.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color:#f0c040; }

/* ── Chat UI ────────────────────────────────────────────────── */
.chat-wrap { display:flex; flex-direction:column; gap:14px; padding:16px; background:#e8eaf0; border-radius:8px; min-height:200px; max-height:540px; overflow-y:auto; margin-bottom:16px; }
.chat-row { display:flex; flex-direction:column; max-width:72%; gap:3px; }
.chat-row.chat-mine { align-self:flex-end; align-items:flex-end; }
.chat-row.chat-theirs { align-self:flex-start; align-items:flex-start; }
.chat-name { font-size:11px; color:#555; }
.chat-bubble { padding:10px 15px; border-radius:18px; font-size:14px; line-height:1.65; white-space:pre-wrap; word-break:break-word; }
.chat-row.chat-mine .chat-bubble { background:#0b57d0; color:#fff; border-bottom-right-radius:4px; }
.chat-row.chat-theirs .chat-bubble { background:#fff; color:#222; border-bottom-left-radius:4px; box-shadow:0 1px 3px rgba(0,0,0,.12); }
.chat-time { font-size:11px; color:#888; }
.chat-unread { font-size:11px; color:#c0392b; font-weight:bold; margin-top:2px; }
/* Cast role: green chat bubbles */
.chat-cast .chat-row.chat-mine .chat-bubble { background:#1e8e3e; }

/* ── Shop cards grid ────────────────────────────────────────── */
.shop-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; }
.shop-card { border:1px solid #e8e8e8; border-radius:8px; overflow:hidden; }
.shop-card-photo { width:100%; aspect-ratio:16/10; object-fit:cover; background:#f0f0f0; display:block; }
.shop-card-photo-placeholder { width:100%; aspect-ratio:16/10; background:#f0f0f0; display:flex; align-items:center; justify-content:center; color:#bbb; font-size:24px; }
.shop-card-body { padding:10px; }
.shop-card-name { font-weight:bold; font-size:14px; margin-bottom:4px; }
.shop-card-meta { font-size:11px; color:#888; margin-bottom:8px; }

/* ── Cast cards grid ────────────────────────────────────────── */
.cast-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.cast-card { border:1px solid #e8e8e8; border-radius:8px; overflow:hidden; }
.cast-card-photo { width:100%; aspect-ratio:3/4; object-fit:cover; background:#f0f0f0; display:block; }
.cast-card-photo-placeholder { width:100%; aspect-ratio:3/4; background:#f0f0f0; display:flex; align-items:center; justify-content:center; color:#bbb; font-size:28px; }
.cast-card-body { padding:10px; }
.cast-card-name { font-weight:bold; font-size:14px; margin-bottom:4px; }
.cast-card-meta { font-size:11px; color:#888; margin-bottom:8px; }
.cast-card-offer-count { display:inline-block; font-size:11px; color:#c0392b; font-weight:bold; margin-bottom:5px; text-decoration:none; }
.cast-card-offer-count:hover { text-decoration:underline; }
.cast-card-bio { font-size:11px; color:#666; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; margin-bottom:8px; min-height:2.4em; }
.cast-card-btn { display:block; width:100%; padding:6px 0; text-align:center; font-size:13px; background:#0b57d0; color:#fff; border-radius:4px; text-decoration:none; }
.cast-card-btn:hover { background:#0842a0; }

/* ── Direct offer cast recommendations ─────────────────────── */
.recommendation-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin:22px 0 14px; flex-wrap:wrap; }
.recommendation-count { min-width:74px; padding:8px 12px; background:#eef4ff; border:1px solid #9cb7e2; color:#0b57d0; text-align:center; font-weight:bold; }
.recommendation-cards { display:grid; gap:14px; }
.recommendation-card { border:1px solid #e4e4e4; border-radius:8px; background:#fff; overflow:hidden; }
.recommendation-card.is-selected { border-color:#0b57d0; box-shadow:0 0 0 2px rgba(11,87,208,.12); }
.recommendation-main { display:flex; gap:14px; padding:14px; }
.recommendation-photo,
.recommendation-photo-placeholder { width:112px; aspect-ratio:3/4; flex-shrink:0; border-radius:6px; background:#f0f0f0; object-fit:cover; display:flex; align-items:center; justify-content:center; color:#999; font-size:12px; }
.recommendation-body { flex:1; min-width:0; display:grid; gap:10px; }
.recommendation-title-row { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.recommendation-title-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.recommendation-name { margin:0 0 4px; font-size:17px; line-height:1.35; }
.recommendation-meta { font-size:12px; color:#666; line-height:1.6; }
.recommendation-score { min-width:0; text-align:center; color:#0b57d0; font-weight:bold; white-space:nowrap; border:1px solid #9cb7e2; background:#eef4ff; border-radius:4px; padding:6px 10px; line-height:1.2; }
.recommendation-score span { font-size:30px; line-height:1; }
.recommendation-beginner-badge { display:inline-block; margin-left:6px; padding:2px 7px; border:1px solid #d8c28a; background:#fff8e1; color:#8a5a00; border-radius:4px; font-size:11px; font-weight:bold; vertical-align:middle; }
.recommendation-pref-list { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.recommendation-label { font-size:12px; color:#666; font-weight:bold; }
.recommendation-stats { display:flex; flex-wrap:wrap; gap:6px; }
.recommendation-stats span { font-size:12px; color:#333; background:#f5f5f5; border:1px solid #e3e3e3; border-radius:4px; padding:3px 7px; }
.recommendation-reasons ul { margin:5px 0 0; padding-left:18px; font-size:13px; color:#333; line-height:1.65; }
.recommendation-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.recommendation-actions .button { padding:7px 12px; font-size:13px; }
.recommendation-settings-table input[type=number] { min-width:80px; }
.recommendation-settings-actions { display:flex; gap:8px; margin-top:16px; flex-wrap:wrap; }
.detail-recommendation-box { margin:16px 0 20px; padding:14px; border:1px solid #d9e5fb; background:#f5f9ff; border-radius:8px; }
.detail-recommendation-title { font-weight:bold; color:#0b57d0; margin-bottom:8px; }
.detail-recommendation-box ul { margin:0; padding-left:18px; color:#333; font-size:14px; line-height:1.7; }
.detail-recommendation-box p { margin:0; color:#555; font-size:14px; }
.detail-recommendation-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.detail-recommendation-tags span { padding:3px 8px; border:1px solid #d8e2f2; background:#fff; color:#3b4a5d; font-size:12px; border-radius:4px; }

@media (max-width: 640px) {
    .recommendation-main { flex-direction:column; }
    .recommendation-photo,
    .recommendation-photo-placeholder { width:100%; max-height:260px; }
    .recommendation-title-row { flex-direction:column; }
    .recommendation-score { text-align:left; }
}

/* ── Cast detail header (shops/cast_view) ───────────────────── */
.shop-cast-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
.shop-cast-photos { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin-bottom:20px; }
.shop-cast-photos img, .shop-cast-photo-placeholder { width:100%; aspect-ratio:3/4; object-fit:cover; border-radius:6px; background:#f0f0f0; display:flex; align-items:center; justify-content:center; color:#aaa; font-size:13px; }
.shop-cast-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:20px; }
.shop-cast-summary-item { border:1px solid #e4e4e4; background:#fafafa; padding:12px; }
.shop-cast-summary-label { font-size:12px; color:#666; margin-bottom:4px; }
.shop-cast-summary-value { font-weight:700; }
.shop-cast-review-stars { color:#f0c040; font-size:16px; letter-spacing:1px; }

/* ── Relation tabs (favourite list) ────────────────────────── */
.relation-tabs { display:flex; gap:0; margin-bottom:20px; border-bottom:2px solid #e8e8e8; }
.relation-tab { padding:10px 24px; font-size:14px; font-weight:bold; color:#666; text-decoration:none; border-bottom:3px solid transparent; margin-bottom:-2px; }
.relation-tab.active { color:#c0392b; border-bottom-color:#c0392b; }

/* ── Block list ─────────────────────────────────────────────── */
.block-list { display:grid; gap:10px; }
.block-item { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border:1px solid #e8e8e8; border-radius:6px; }
.block-item-name { font-weight:bold; font-size:14px; }
.block-item-meta { font-size:12px; color:#888; margin-top:2px; }

/* ── Job cards grid ─────────────────────────────────────────── */
.job-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.job-card { border:1px solid #e4e4e4; border-radius:8px; background:#fff; overflow:hidden; display:flex; flex-direction:column; min-height:100%; }
.job-card-photo-link { display:block; background:#f0f0f0; color:inherit; text-decoration:none; }
.job-card-photo { width:100%; aspect-ratio:16/10; object-fit:cover; display:block; background:#f0f0f0; }
.job-card-photo-placeholder { width:100%; aspect-ratio:16/10; display:flex; align-items:center; justify-content:center; background:#f0f0f0; color:#aaa; font-size:13px; }
.job-card-body { padding:14px; display:flex; flex-direction:column; gap:10px; flex:1; }
.job-card-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.job-card-heading-main { min-width:0; flex:1; }
.job-card-title { font-weight:bold; font-size:16px; line-height:1.35; }
.job-card-status { margin-top:6px; }
.job-card-shop { font-size:13px; color:#666; }
.job-card-area { font-size:12px; color:#888; margin-top:2px; }
.job-card-meta { display:grid; gap:6px; font-size:13px; color:#333; }
.job-card-meta-row { display:flex; justify-content:space-between; gap:10px; border-top:1px solid #f0f0f0; padding-top:6px; }
.job-card-meta-label { color:#777; white-space:nowrap; }
.job-recommend-score { min-width:0; padding:6px 10px; border:1px solid #9cb7e2; background:#eef4ff; color:#0b57d0; text-align:center; font-weight:bold; line-height:1.2; white-space:nowrap; border-radius:4px; }
.job-recommend-reasons { border-top:1px solid #f0f0f0; padding-top:8px; }
.job-recommend-reason-title { font-size:12px; font-weight:bold; color:#555; margin-bottom:4px; }
.job-recommend-reasons ul { margin:0; padding-left:18px; color:#333; font-size:13px; line-height:1.55; }
.job-recommend-reasons p { margin:0; color:#666; font-size:13px; }
.job-recommend-stats { display:flex; flex-wrap:wrap; gap:6px; }
.job-recommend-stats span { padding:3px 7px; border:1px solid #e3e3e3; background:#f7f7f7; color:#444; font-size:12px; border-radius:4px; }
.job-card-actions { margin-top:auto; padding-top:4px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.job-card-actions .button { display:block; width:100%; text-align:center; }
.job-list-loader { margin-top:18px; text-align:center; color:#777; font-size:13px; min-height:24px; }
.job-section-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:18px 0 12px; flex-wrap:wrap; }
.job-section-header h3 { margin:0 0 4px; }
.job-section-sort-label { border:1px solid #e0e0e0; background:#f7f7f7; color:#555; padding:6px 10px; font-size:12px; border-radius:4px; white-space:nowrap; }

/* ── Urgent job section ─────────────────────────────────────── */
.urgent-section { margin-bottom:24px; }
.urgent-section-header { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.urgent-section-title { font-size:16px; font-weight:bold; color:#bf360c; }
.urgent-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.urgent-card { border:2px solid #ff9800; border-radius:8px; background:#fff9f0; overflow:hidden; display:flex; flex-direction:column; }
.urgent-card .job-card-body { padding:14px; display:flex; flex-direction:column; gap:10px; flex:1; }

/* ── Job filter bar ─────────────────────────────────────────── */
.job-filter-bar { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; align-items:end; margin:0 0 18px; padding:14px; background:#fafafa; border:1px solid #e8e8e8; border-radius:8px; }
.job-filter-field label { display:block; font-size:12px; color:#666; margin-bottom:4px; }
.job-filter-field select,
.job-filter-field input { width:100%; }
.job-filter-check { display:flex; align-items:center; gap:6px; min-height:38px; font-size:13px; }
.job-filter-actions { display:flex; gap:8px; align-items:center; }

@media (max-width: 520px) {
    .job-card-heading { flex-direction:column; }
    .job-recommend-score { min-width:0; align-self:flex-start; }
    .job-card-actions { grid-template-columns:1fr; }
}

/* ── Offer deadline countdown ───────────────────────────────── */
.offer-deadline-expired { background:#f5f5f5; color:#777; }
.deadline-countdown { margin-top:4px; font-size:12px; color:#666; }
.deadline-countdown.is-expired { color:#999; font-weight:bold; }
.offer-pay-summary { line-height:1.45; white-space:nowrap; }
.offer-work-hours { font-weight:bold; }
.offer-net-label { margin-top:6px; font-size:12px; color:#777; }
.offer-net-total { font-weight:bold; }

/* ── Offer badge ────────────────────────────────────────────── */
.offer-badge { display:inline-block; background:#1a73e8; color:#fff; font-size:12px; font-weight:bold; padding:3px 10px; border-radius:4px; margin-bottom:12px; }

/* ── Shop summary (offer view) ──────────────────────────────── */
.shop-summary-item-detail { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }

/* ── Preview banner ─────────────────────────────────────────── */
.preview-banner { background:#fff8e1; border:1px solid #f0c040; border-radius:6px; padding:10px 16px; margin-bottom:20px; font-size:13px; color:#7a6000; display:flex; align-items:center; gap:8px; }
.preview-banner-blue { background:#1a73e8; color:#fff; padding:10px 18px; border-radius:8px; margin-bottom:20px; display:flex; align-items:center; gap:10px; font-size:14px; }
.preview-banner-blue strong { font-size:15px; }
.preview-apply-area { position:relative; }
.preview-apply-area::after { content:"プレビュー"; position:absolute; inset:0; background:rgba(255,255,255,.7); display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:bold; color:#1a73e8; letter-spacing:.1em; border-radius:8px; pointer-events:none; }

/* ── Available tonight toggle (casts/index) ─────────────────── */
.available-tonight-box { display:flex; align-items:center; gap:16px; padding:16px 20px; border-radius:8px; margin-bottom:20px; background:#f5f5f5; border:2px solid #ddd; }
.available-tonight-box.is-active { background:#e6f4ea; border-color:#34a853; }
.available-tonight-label { font-size:15px; font-weight:bold; flex:1; }
.available-tonight-box.is-active .available-tonight-label { color:#1e7e34; }
.available-tonight-sub { font-size:12px; color:#777; margin-top:2px; }
.available-tonight-box.is-active .available-tonight-sub { color:#3c7a4a; }
.available-tonight-btn { padding:8px 20px; border-radius:6px; border:1px solid #0b57d0; background:#fff; color:#0b57d0; font-size:14px; font-weight:bold; cursor:pointer; white-space:nowrap; transition:background 0.15s, color 0.15s; }
.available-tonight-btn:hover { background:#0b57d0; color:#fff; }
.available-tonight-btn.is-active { background:#34a853; border-color:#34a853; color:#fff; }
.available-tonight-btn.is-active:hover { background:#1e7e34; border-color:#1e7e34; }

/* ── Date checkbox grid (job_add) ───────────────────────────── */
.date-checkbox-grid { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.date-cb-label { display:flex; align-items:center; gap:5px; padding:5px 10px; border:1px solid #d8d8d8; border-radius:4px; cursor:pointer; font-size:14px; background:#f7f7f7; user-select:none; }
.date-cb-label:hover { background:#eef4fb; border-color:#b0c4de; }
.date-cb-label input[type=checkbox] { margin:0; }
.date-cb-label.is-checked { background:#ddeeff; border-color:#2255aa; color:#2255aa; font-weight:bold; }
.time-select-row { display:flex; gap:6px; align-items:center; margin-top:4px; }
.time-select-row select { width:auto; }
.deadline-row { display:flex; gap:6px; align-items:center; margin-top:4px; flex-wrap:wrap; }

/* ── Email notification toggle ──────────────────────────────── */
.notif-switch { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; user-select:none; }
.notif-switch input { position:absolute; opacity:0; pointer-events:none; }
.notif-switch-ui { position:relative; display:inline-flex; align-items:center; width:64px; height:32px; padding:0 8px; border-radius:16px; background:#aaa; color:#fff; font-size:12px; font-weight:bold; transition:background .18s ease; }
.notif-switch-ui::before { content:"オフ"; margin-left:auto; }
.notif-switch-ui::after { content:""; position:absolute; left:4px; top:4px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.25); transition:transform .18s ease; }
.notif-switch input:checked + .notif-switch-ui { background:#2e7d32; }
.notif-switch input:checked + .notif-switch-ui::before { content:"オン"; margin-left:0; margin-right:auto; }
.notif-switch input:checked + .notif-switch-ui::after { transform:translateX(32px); }

/* ── Shop holiday switches (profile_edit) ───────────────────── */
.shop-holiday-table th,
.shop-holiday-table td { text-align:center; vertical-align:middle; }
.holiday-switch { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; user-select:none; }
.holiday-switch input { position:absolute; opacity:0; pointer-events:none; }
.holiday-switch-ui { position:relative; display:inline-flex; align-items:center; width:74px; height:32px; padding:0 8px; border-radius:16px; background:#2e7d32; color:#fff; font-size:12px; font-weight:bold; transition:background .18s ease; }
.holiday-switch-ui::before { content:attr(data-open); margin-left:auto; }
.holiday-switch-ui::after { content:""; position:absolute; left:4px; top:4px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.25); transition:transform .18s ease; }
.holiday-switch input:checked + .holiday-switch-ui { background:#c0392b; }
.holiday-switch input:checked + .holiday-switch-ui::before { content:attr(data-closed); margin-left:0; margin-right:auto; }
.holiday-switch input:checked + .holiday-switch-ui::after { transform:translateX(42px); }

/* ── Tonight cast grid (job_add_urgent) ─────────────────────── */
.urgent-notice { background:#fff3e0; border:2px solid #ff9800; border-radius:8px; padding:14px 18px; margin-bottom:20px; font-size:14px; line-height:1.7; }
.urgent-notice strong { color:#e65100; }
.tonight-cast-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:12px; margin-bottom:8px; }
.tonight-cast-card { border:1px solid #e0e0e0; border-radius:8px; overflow:hidden; background:#fff; display:flex; flex-direction:column; }
.tonight-cast-photo { width:100%; aspect-ratio:3/4; object-fit:cover; display:block; border-radius:6px 6px 0 0; background:#f0f0f0; }
.tonight-cast-photo-placeholder { width:100%; aspect-ratio:3/4; background:#f0f0f0; display:flex; align-items:center; justify-content:center; color:#ccc; font-size:32px; border-radius:6px 6px 0 0; }
.tonight-cast-name { font-weight:bold; font-size:14px; margin-bottom:4px; }
.tonight-cast-meta { font-size:12px; color:#777; margin-bottom:8px; line-height:1.5; }
.tonight-cast-btn { display:block; text-align:center; padding:7px 0; background:#0b57d0; color:#fff; border-radius:5px; font-size:13px; text-decoration:none; }
.tonight-cast-btn:hover { background:#0842a0; }

/* ── Drawer panel (cast profile) ────────────────────────────── */
.drawer-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1000; }
.drawer-backdrop.open { display:block; }
.drawer-panel { position:fixed; top:0; right:0; bottom:0; width:min(520px,100vw); background:#fff; z-index:1001; display:flex; flex-direction:column; transform:translateX(100%); transition:transform .25s ease; box-shadow:-4px 0 24px rgba(0,0,0,.18); }
.drawer-panel.open { transform:translateX(0); }
.drawer-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #e0e0e0; background:#f8f8f8; }
.drawer-title { font-size:16px; font-weight:bold; }
.drawer-close { background:none; border:none; font-size:22px; cursor:pointer; color:#555; padding:0 4px; line-height:1; }
.drawer-close:hover { color:#c0392b; }
.drawer-body { flex:1; overflow-y:auto; padding:20px; }
.drawer-footer { padding:14px 20px; border-top:1px solid #e0e0e0; display:flex; gap:8px; }

/* ── Application list table states ──────────────────────────── */
tr.is-past { background:#f4f4f4; color:#999; }
tr.is-past a:not(.btn-detail) { color:#bbb; pointer-events:none; }
tr.is-past .button:not(.btn-detail) { opacity:.4; pointer-events:none; cursor:default; }

/* ── Mini calendar widget ───────────────────────────────────── */
.mini-cal { font-size:13px; }
.mini-cal-hd { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.mini-cal-title { font-weight:bold; font-size:14px; }
.mini-cal-nav { background:none; border:1px solid #ddd; border-radius:4px; padding:2px 9px; cursor:pointer; font-size:12px; color:#555; }
.mini-cal-nav:hover { background:#f0f0f0; }
.mini-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.mini-cal-dow { text-align:center; font-size:11px; color:#aaa; padding-bottom:4px; }
.mini-cal-day { text-align:center; padding:3px 1px 4px; border-radius:6px; cursor:pointer; min-height:40px; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; transition:background .1s; }
.mini-cal-day:hover { background:#f5f5f5; }
.mini-cal-empty { cursor:default; }
.mini-cal-empty:hover { background:none; }
.mini-cal-num { font-size:12px; line-height:20px; min-width:20px; }
.cal-today .mini-cal-num { background:#0b57d0; color:#fff; border-radius:50%; width:22px; height:22px; line-height:22px; display:inline-block; }
.cal-sel { background:#e8f0fe !important; }
.mini-cal-dots { display:flex; gap:3px; justify-content:center; margin-top:3px; flex-wrap:wrap; }
.cal-dot { width:6px; height:6px; border-radius:50%; display:inline-block; flex-shrink:0; }
.dot-confirmed  { background:#34a853; }
.dot-offered    { background:#f4a020; }
.dot-applied    { background:#4285f4; }
.dot-pending    { background:#f4a020; }
.dot-completed  { background:#888; }
.cal-dot-wrap  { display:flex; align-items:center; gap:2px; }
.cal-dot-cnt   { font-size:9px; font-weight:bold; color:#555; line-height:1; }
.cal-past { background:#f0f0f0 !important; }
.cal-past .mini-cal-num { color:#bbb; }
.cal-past:hover { background:#e8e8e8 !important; text-decoration:none; }
.mini-cal-chips { display:flex; flex-direction:column; gap:2px; margin-top:2px; width:100%; }
.cal-chip { font-size:9px; font-weight:bold; padding:1px 4px; border-radius:3px; color:#fff; text-align:center; line-height:1.4; }
.chip-confirmed  { background:#34a853; }
.chip-offered    { background:#f4a020; }
.chip-applied    { background:#4285f4; }
.chip-pending    { background:#f4a020; }
.chip-completed  { background:#888; }
.mini-cal-detail { display:none; margin-top:10px; border-top:1px solid #eee; padding-top:10px; }
.cal-detail-date { font-weight:bold; font-size:13px; margin-bottom:8px; color:#333; }
.cal-detail-item { display:flex; align-items:center; gap:7px; padding:6px 8px; border-radius:6px; margin-bottom:4px; font-size:12px; line-height:1.5; }
.item-confirmed  { background:#e6f4ea; }
.item-offered    { background:#fff3e0; }
.item-applied    { background:#e8f0fe; }
.item-pending    { background:#fff3e0; }
.item-completed  { background:#f0f0f0; }
.cal-detail-badge { font-size:10px; font-weight:bold; padding:1px 6px; border-radius:3px; white-space:nowrap; flex-shrink:0; }
.item-confirmed  .cal-detail-badge { background:#34a853; color:#fff; }
.item-offered    .cal-detail-badge { background:#f4a020; color:#fff; }
.item-applied    .cal-detail-badge { background:#4285f4; color:#fff; }
.item-pending    .cal-detail-badge { background:#f4a020; color:#fff; }
.item-completed  .cal-detail-badge { background:#888;    color:#fff; }
.cal-detail-text { flex:1; min-width:0; }
.cal-detail-link { color:#0b57d0; text-decoration:none; font-size:11px; white-space:nowrap; flex-shrink:0; }
.cal-detail-link:hover { text-decoration:underline; }
.mini-cal-legend { display:flex; gap:12px; flex-wrap:wrap; margin-top:10px; padding-top:8px; border-top:1px solid #f0f0f0; }
.mini-cal-legend-item { display:flex; align-items:center; gap:4px; font-size:11px; color:#666; }

/* ── Admin: announcement scope section ─────────────────────── */
.scope-section { border:1px solid #e0e0e0; border-radius:6px; padding:14px; margin-top:8px; background:#fafafa; }

/* ── Admin: auth test report ────────────────────────────────── */
.test-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:16px 0; }
.test-summary-item { border:1px solid #e0e0e0; border-radius:6px; padding:10px; background:#fafafa; }
.test-summary-label { font-size:12px; color:#666; }
.test-summary-value { font-size:22px; font-weight:bold; margin-top:4px; }
.test-level-ok { color:#1b7f3a; }
.test-level-warning { color:#b26a00; }
.test-level-error { color:#b00020; }
.test-detail-json { white-space:pre-wrap; background:#f7f7f7; border:1px solid #e2e2e2; border-radius:4px; padding:8px; max-width:520px; overflow:auto; }
