/**
 * 代理店ポータル v2.0 スタイルシート
 *
 * カラーパレット:
 *   Primary:    #1f4e79 (ダークブルー)
 *   Accent:     #e8631a (オレンジ)
 *   Received:   #1565c0 / #e3f2fd (申込受付: ライトブルー)
 *   Reviewing:  #283593 / #e8eaf6 (審査中: インディゴ)
 *   Approved:   #00695c / #e0f2f1 (承認: ティール)
 *   Rejected:   #616161 / #fafafa (NG: グレー)
 *   Success:    #1b5e20 / #e8f5e9 (契約中: グリーン)
 *   Warning:    #e65100 / #fff3e0 (滞納: オレンジ)
 *   Dunning:    #f57f17 / #fff8e1 (督促中: イエロー)
 *   Danger:     #b71c1c / #fce4ec (解約: レッド)
 *   Vacate:     #b71c1c / #fce4ec (退去解約: レッド)
 *   Billing:    #c62828 / #ffebee (代弁請求: ピンク)
 *
 * ※ ITに不慣れなユーザーでも読みやすいよう、全体的に大きめのフォントサイズを採用
 */

/* ── リセット ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: #333;
    background: #f2f6f9;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #1f4e79;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ── ログインページ ── */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #1f4e79 0%, #2d6fa6 100%);
}

.login-container {
    width: 100%;
    max-width: 480px;
    text-align: center;
}

.login-logo img {
    height: 48px;
    filter: brightness(0) invert(1);
    margin-bottom: 16px;
}

.login-title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: 0.05em;
}

.login-card {
    background: #fff;
    border-radius: 10px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.login-description {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.8;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}
.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31,78,121,0.12);
}

.otp-input {
    text-align: center;
    font-size: 2.2rem;
    letter-spacing: 0.4em;
    font-weight: 700;
}

.otp-note {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    text-align: center;
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    background: #1f4e79;
    color: #fff;
}
.btn-primary:hover {
    background: #163a5c;
    text-decoration: none;
}

.btn-link {
    background: none;
    border: none;
    color: #1f4e79;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px 0;
    text-decoration: underline;
}
.btn-link:hover {
    color: #e8631a;
}

.btn-back {
    color: #888;
}

.resend-form, .back-form {
    margin-top: 10px;
}

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
    text-align: left;
    line-height: 1.7;
}
.alert-error {
    background: #fce4ec;
    color: #b71c1c;
    border: 1px solid #f8bbd0;
}
.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.login-footer {
    margin-top: 24px;
}
.login-footer a {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}
.login-footer a:hover {
    color: #fff;
}

/* ── ポータルヘッダー ── */
.portal-header {
    background: #1f4e79;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.portal-header-inner {
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.portal-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}
.portal-logo img {
    height: 32px;
    filter: brightness(0) invert(1);
}
.portal-label {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.portal-user {
    display: flex;
    align-items: center;
    gap: 18px;
}
.portal-agency-name {
    font-size: 1.05rem;
    font-weight: 500;
}
.btn-logout {
    padding: 8px 20px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s;
}
.btn-logout:hover {
    background: rgba(255,255,255,0.25);
    text-decoration: none;
}

/* ── モバイルメニューボタン ── */
#mobileMenuBtn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

/* ── ポータルレイアウト（サイドバー + メイン） ── */
.portal-body {
    background: #f2f6f9;
}

.portal-wrapper {
    display: flex;
    min-height: calc(100vh - 68px);
}

/* ── サイドバーナビゲーション ── */
.portal-sidebar {
    width: 240px;
    min-width: 240px;
    background: #1f4e79;
    position: sticky;
    top: 68px;
    height: calc(100vh - 68px);
    overflow-y: auto;
    z-index: 150;
    flex-shrink: 0;
}

.sidebar-nav {
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
    border-left: 4px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.sidebar-nav a.active {
    background: #fff;
    color: #1f4e79;
    font-weight: 700;
    border-left: 4px solid #2d6fa6;
}

.sidebar-nav .nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* ── お知らせ新着バッジ ── */
.sidebar-nav a {
    position: relative;
}
.notice-badge {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: #e53935;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    padding: 0 6px;
    animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50%      { transform: translateY(-50%) scale(1.15); }
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 8px 16px;
}

/* ── メインコンテンツ ── */
.portal-content {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    padding: 0 32px 0 32px;
}

.portal-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 40px 36px 48px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f4e79;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 3px solid #1f4e79;
}

/* ── セッション警告バー ── */
.session-warning-bar {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 300;
    background: #d32f2f;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.btn-session-extend {
    background: #fff;
    color: #d32f2f;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-session-extend:hover {
    background: #fce4ec;
}
.btn-session-extend:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── お知らせバー ── */
.notice-bar {
    background: #fff;
    border-left: 5px solid #e8631a;
    border-radius: 6px;
    padding: 18px 22px;
    margin-bottom: 32px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.notice-icon {
    background: #e8631a;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}
.notice-content {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.6;
}
.notice-content strong {
    color: #1f4e79;
}

/* ── お知らせ一覧（折りたたみ） ── */
.section-notices-list {
    margin-bottom: 28px;
}
.section-notices-list .section-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.toggle-btn {
    background: #fff;
    border: 2px solid #1f4e79;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f4e79;
    padding: 14px 24px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.toggle-btn:hover {
    background: #1f4e79;
    color: #fff;
}
.toggle-btn[aria-expanded="true"] {
    background: #1f4e79;
    color: #fff;
    border-radius: 8px 8px 0 0;
}
.toggle-arrow {
    font-size: 0.9rem;
    transition: transform 0.2s;
}
.toggle-btn[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.notices-list {
    background: #fff;
    border: 2px solid #1f4e79;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    margin-top: 0;
}
.notice-item {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}
.notice-item:last-child {
    border-bottom: none;
}
.notice-item-date {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 4px;
}
.notice-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.notice-item-body {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
}

/* ── ダッシュボードカード ── */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 32px;
    max-width: 900px;
}

.dash-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    border-top: 4px solid #ccc;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.dash-card-loading {
    grid-column: 1 / -1;
    padding: 40px;
    color: #888;
    font-size: 1.1rem;
}

.dash-card-active     { border-top-color: #1b5e20; }
.dash-card-delinquent { border-top-color: #e65100; }
.dash-card-cancel     { border-top-color: #b71c1c; }
.dash-card-billing    { border-top-color: #c62828; }
.dash-card-dunning    { border-top-color: #f57f17; }
.dash-card-received   { border-top-color: #1565c0; }
.dash-card-reviewing  { border-top-color: #283593; }
.dash-card-approved   { border-top-color: #00695c; }
.dash-card-rejected   { border-top-color: #616161; }

.dash-card-label {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}
.dash-card-count {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}
.dash-card-active .dash-card-count     { color: #1b5e20; }
.dash-card-delinquent .dash-card-count { color: #e65100; }
.dash-card-cancel .dash-card-count     { color: #b71c1c; }
.dash-card-billing .dash-card-count    { color: #c62828; }
.dash-card-dunning .dash-card-count    { color: #f57f17; }
.dash-card-received .dash-card-count   { color: #1565c0; }
.dash-card-reviewing .dash-card-count  { color: #283593; }
.dash-card-approved .dash-card-count   { color: #00695c; }
.dash-card-rejected .dash-card-count   { color: #616161; }

.dash-card-sub {
    font-size: 0.95rem;
    color: #777;
    margin-top: 6px;
}

/* ── 案件テーブル ── */
.cases-toolbar {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1.05rem;
    font-family: inherit;
}
.search-input:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31,78,121,0.12);
}
.status-filter {
    padding: 12px 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1.05rem;
    font-family: inherit;
    background: #fff;
    min-width: 160px;
}

.cases-table-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
    max-height: calc(100vh - 200px);
}

.cases-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    min-width: 750px;
}
.cases-table thead {
    background: #1f4e79;
    color: #fff;
}
.cases-table th {
    padding: 14px 14px;
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1f4e79;
}
.cases-table td {
    padding: 14px 14px;
    font-size: 1.05rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.cases-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.cases-table tbody tr:hover {
    background: #f0f5fa;
}
.cases-table tbody tr.row-expanded {
    background: #e8eef4;
}

/* ── 左列固定（No, フェーズ, 物件名） ── */
.cases-table .th-no,
.cases-table .td-no {
    position: sticky;
    left: 0;
    z-index: 3;
    background: inherit;
    min-width: 50px;
}
.cases-table thead .th-no {
    z-index: 12;
    background: #1f4e79;
    top: 0;
}
.cases-table .th-status,
.cases-table .td-status {
    position: sticky;
    left: 50px;
    z-index: 3;
    background: inherit;
    min-width: 70px;
}
.cases-table thead .th-status {
    z-index: 12;
    background: #1f4e79;
    top: 0;
}
.cases-table .th-property,
.cases-table .td-property {
    position: sticky;
    left: 120px;
    z-index: 3;
    background: inherit;
    border-right: 2px solid #ddd;
    min-width: 240px;
    white-space: normal;
}
.cases-table thead .th-property {
    z-index: 12;
    background: #1f4e79;
    border-right: 2px solid rgba(255,255,255,0.3);
    min-width: 240px;
    top: 0;
}
/* 固定列のホバー背景を維持 */
.cases-table tbody tr:hover .td-no,
.cases-table tbody tr:hover .td-status,
.cases-table tbody tr:hover .td-property {
    background: #f0f5fa;
}
.cases-table tbody tr .td-no,
.cases-table tbody tr .td-status,
.cases-table tbody tr .td-property {
    background: #fff;
}

/* ── ソート可能カラム ── */
.cases-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    padding-right: 24px;
}
.cases-table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    opacity: 0.35;
    transition: opacity 0.15s;
}
.cases-table th.sortable:hover {
    background: #163a5c;
}
.cases-table th.sortable:hover::after {
    opacity: 0.7;
}
.cases-table th.sorted-asc,
.cases-table th.sorted-desc {
    background: #0d2f4f;
}
.cases-table th.sorted-asc::after {
    content: '▲';
    opacity: 1;
    font-size: 0.65rem;
}
.cases-table th.sorted-desc::after {
    content: '▼';
    opacity: 1;
    font-size: 0.65rem;
}

.th-no { width: 50px; text-align: center; }
.th-rent, .th-delinquent { text-align: right; }
.th-toggle { width: 36px; }

.td-no { text-align: center; color: #888; }
.th-tenant, .td-tenant { min-width: 200px; }
.td-rent, .td-delinquent { text-align: right; font-variant-numeric: tabular-nums; }
.td-delinquent-value { color: #e65100; font-weight: 700; }

.loading-cell {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1.1rem;
}

/* ── ステータスバッジ（10種） ── */
.status-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-received   { background: #e3f2fd; color: #1565c0; }
.status-reviewing  { background: #e8eaf6; color: #283593; }
.status-approved   { background: #e0f2f1; color: #00695c; }
.status-rejected   { background: #fafafa; color: #616161; }
.status-active     { background: #e8f5e9; color: #1b5e20; }
.status-delinquent { background: #fff3e0; color: #e65100; }
.status-dunning    { background: #fff8e1; color: #f57f17; }
.status-cancel     { background: #fce4ec; color: #b71c1c; }
.status-vacate     { background: #fce4ec; color: #b71c1c; }
.status-billing    { background: #ffebee; color: #c62828; }

/* ── 行展開（詳細エリア） ── */
.case-detail-row td {
    padding: 0;
    border-bottom: 3px solid #1f4e79;
}
.case-detail {
    padding: 20px 24px;
    background: #f8fafb;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 28px;
}
.detail-item {
    display: flex;
    flex-direction: column;
}
.detail-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 4px;
}
.detail-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* ── 編集フィールド ── */
.edit-group {
    grid-column: 1 / -1;
    display: flex;
    gap: 18px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    margin-top: 8px;
}
.edit-field {
    display: flex;
    flex-direction: column;
}
.edit-field label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 6px;
}
.edit-field select,
.edit-field input[type="date"],
.edit-field input[type="text"] {
    padding: 10px 14px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 1.05rem;
    font-family: inherit;
}
.edit-field input[type="text"] {
    min-width: 220px;
}

.btn-save {
    padding: 10px 28px;
    background: #1f4e79;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.btn-save:hover {
    background: #163a5c;
}
.btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.save-msg {
    font-size: 1rem;
    padding: 6px 0;
}
.save-msg-success { color: #1b5e20; }
.save-msg-error   { color: #b71c1c; }

.cases-count {
    font-size: 0.95rem;
    color: #888;
    text-align: right;
}

.toggle-icon {
    font-size: 0.85rem;
    color: #888;
    transition: transform 0.2s;
    display: inline-block;
}
.row-expanded .toggle-icon {
    transform: rotate(90deg);
}

/* ── ページネーション ── */
.pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.95rem;
    color: #555;
}
.pagination-info strong {
    color: #1f4e79;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.per-page-select {
    padding: 6px 10px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
}
.per-page-select:focus {
    outline: none;
    border-color: #1f4e79;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.page-btn:hover:not(:disabled):not(.active) {
    background: #f0f5fa;
    border-color: #1f4e79;
}
.page-btn.active {
    background: #1f4e79;
    color: #fff;
    border-color: #1f4e79;
    font-weight: 700;
}
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 4px;
    color: #888;
    font-size: 0.95rem;
}

/* ── 変更依頼フォーム ── */
.change-form {
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.change-form .form-group {
    margin-bottom: 20px;
}
.change-form .form-group label {
    font-size: 1.05rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}
.change-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1.05rem;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    min-height: 120px;
}
.change-form textarea:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31,78,121,0.12);
}

.change-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.change-type-btn {
    padding: 12px 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.change-type-btn:hover {
    border-color: #1f4e79;
    background: #f0f5fa;
}
.change-type-btn.selected,
.change-type-btn.active {
    border-color: #1f4e79;
    background: #1f4e79;
    color: #fff;
    font-weight: 700;
}

.request-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.request-history-table thead {
    background: #1f4e79;
    color: #fff;
}
.request-history-table th {
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}
.request-history-table td {
    padding: 12px 14px;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.request-history-table tbody tr:hover {
    background: #f0f5fa;
}

/* ── 代理店情報カード ── */
.agency-card {
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.agency-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 32px;
}

.agency-card-item {
    display: flex;
    flex-direction: column;
}
.agency-card-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}
.agency-card-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* ── 入金テーブル ── */
.payment-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    min-width: 650px;
}
.payment-table thead {
    background: #1f4e79;
    color: #fff;
}
.payment-table th {
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}
.payment-table td {
    padding: 12px 14px;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.payment-table tbody tr:hover {
    background: #f0f5fa;
}
.payment-table .td-amount {
    text-align: right;
}

/* ── ページタイトル ── */
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f4e79;
    margin-bottom: 20px;
}

.subsection-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin: 24px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

/* ── ツールバー ── */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.toolbar-left {
    display: flex;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
}
.toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}
.toolbar-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}
.toolbar-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
    position: relative;
}
.toolbar-select {
    padding: 10px 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    min-width: 140px;
}
.toolbar-search {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.toolbar-search:focus,
.toolbar-select:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31,78,121,0.12);
}

/* ── ボタンバリエーション ── */
.btn-secondary {
    padding: 10px 20px;
    background: #fff;
    color: #1f4e79;
    border: 2px solid #1f4e79;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover {
    background: #1f4e79;
    color: #fff;
}
.btn-toolbar {
    padding: 8px 16px;
    background: #fff;
    color: #555;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}
.btn-toolbar:hover {
    border-color: #1f4e79;
}
.btn-csv {
    padding: 10px 20px;
    background: #00695c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-csv:hover {
    background: #004d40;
}

/* ── アクションボタン（テーブル内） ── */
.btn-action {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.btn-action:hover { opacity: 0.85; }
.btn-contract { background: #1b5e20; color: #fff; }
.btn-change   { background: #1565c0; color: #fff; }
.btn-detail   { background: #e65100; color: #fff; }
.btn-save-edit {
    padding: 8px 20px;
    background: #1f4e79;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.btn-save-edit:hover { background: #163a5c; }
.btn-save-edit:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-saved { background: #1b5e20; }

/* ── バッジ ── */
.badge-gray {
    display: inline-block;
    padding: 4px 12px;
    background: #fafafa;
    color: #616161;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}
.progress-indicator {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}
.progress-indicator.reviewing {
    color: #283593;
}

/* ── データテーブル（汎用） ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.data-table thead { background: #1f4e79; color: #fff; }
.data-table th { padding: 12px 14px; font-size: 0.95rem; font-weight: 700; text-align: left; white-space: nowrap; }
.data-table td { padding: 12px 14px; font-size: 1rem; border-bottom: 1px solid #eee; vertical-align: middle; }
.data-table tbody tr:hover { background: #f0f5fa; }
/* 送金明細テーブル: 案件名・物件名・入居者名の最小幅 */
.data-table th:nth-child(2),
.data-table td:nth-child(2) { min-width: 200px; }
.data-table th:nth-child(3),
.data-table td:nth-child(3) { min-width: 180px; }
.data-table th:nth-child(5),
.data-table td:nth-child(5) { min-width: 160px; }
.data-table th:nth-child(12),
.data-table td:nth-child(12) { min-width: 140px; }

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}

/* ── サマリーカード ── */
.summary-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.summary-card {
    flex: 1;
    min-width: 150px;
    background: #fff;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    text-align: center;
}
.summary-card-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 6px;
}
.summary-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f4e79;
}

/* ── フォーム要素 ── */
.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1.05rem;
    font-family: inherit;
    background: #fff;
}
.form-select:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31,78,121,0.12);
}
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1.05rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    line-height: 1.7;
}
.form-textarea:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31,78,121,0.12);
}
.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ── 詳細展開グリッド ── */
.case-detail-inner {
    padding: 20px 24px;
    background: #f8fafb;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px 24px;
    margin-bottom: 16px;
}
.detail-field {
    display: flex;
    flex-direction: column;
}
.detail-field .detail-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 3px;
}
.detail-field .detail-value {
    font-size: 1.05rem;
    color: #333;
    font-weight: 500;
}
.detail-delinquency {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #e65100;
}
.detail-delinquency h4 {
    color: #e65100;
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.detail-edit-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}
.detail-edit-section h4 {
    font-size: 1.1rem;
    color: #1f4e79;
    margin-bottom: 12px;
}

/* ── ミニテーブル（ダッシュボード用など） ── */
.mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.mini-table th {
    background: #f5f5f5;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}
.mini-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}
.mini-table .text-right {
    text-align: right;
}

/* ── 列トグルドロップダウン ── */
.column-toggle-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 2px solid #1f4e79;
    border-radius: 8px;
    padding: 16px;
    min-width: 220px;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.column-toggle-inner {
    max-height: 300px;
    overflow-y: auto;
}
.column-toggle-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f4e79;
    margin-bottom: 10px;
}
.column-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.column-toggle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px 0;
}
.column-toggle-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ── テキスト状態 ── */
.loading-text { color: #888; text-align: center; padding: 20px 0; }
.error-text   { color: #b71c1c; }
.empty-text   { color: #888; text-align: center; padding: 20px 0; }

/* ── ローディングスピナー ── */
.loading-spinner-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    gap: 16px;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #1f4e79;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-spinner-text {
    font-size: 1.05rem;
    color: #888;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ダッシュボードカードのスケルトン */
.dash-card-skeleton {
    background: #fff;
    border-radius: 12px;
    padding: 30px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-top: 5px solid #e0e0e0;
    text-align: center;
}
.skeleton-bar {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    height: 18px;
    margin: 8px auto;
}
.skeleton-bar-lg {
    height: 40px;
    width: 60%;
    margin: 12px auto;
}
.skeleton-bar-sm {
    height: 14px;
    width: 50%;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.text-right   { text-align: right; }

/* ── 変更ステータスバッジ ── */
.change-status-pending  { background: #e3f2fd; color: #1565c0; }
.change-status-progress { background: #fff3e0; color: #e65100; }
.change-status-done     { background: #e8f5e9; color: #1b5e20; }
.change-status-rejected { background: #fafafa; color: #616161; }

/* ── 変更種別グリッド ── */
.change-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

/* ── 日付フィルタ ── */
.type-filter,
.date-label {
    font-size: 0.95rem;
    color: #555;
    white-space: nowrap;
}
.date-input {
    padding: 10px 12px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.date-input:focus {
    outline: none;
    border-color: #1f4e79;
}
.date-sep {
    padding: 0 4px;
    color: #888;
}

/* ── セクション ── */
.change-request-section,
.change-history-section {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

/* ── 5日締め案内ボックス ── */
.deadline-notice {
    background: #f0f5fa;
    border-left: 4px solid #1f4e79;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #333;
}

/* ── ステップローディング ── */
.portal-loading-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
}
.portal-loading-title {
    font-size: 1rem;
    font-weight: bold;
    color: #1f4e79;
    margin: 0;
}
.portal-loading-sub {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}
.portal-loading-dots {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}
.portal-loading-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #aaa;
    transition: color 0.3s;
}
.portal-loading-step.active { color: #1f4e79; }
.portal-loading-step.done { color: #2e7d32; }
.portal-loading-step .step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.3s;
}
.portal-loading-step.active .step-dot {
    background: #1f4e79;
    animation: portalPulse 0.8s ease infinite alternate;
}
.portal-loading-step.done .step-dot { background: #2e7d32; }
@keyframes portalPulse {
    from { transform: scale(1); }
    to { transform: scale(1.4); }
}

/* ── 確認モーダル ── */
.portal-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.portal-modal-overlay.active { opacity: 1; }
.portal-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s;
}
.portal-modal-overlay.active .portal-modal { transform: translateY(0); }
.portal-modal-title {
    font-size: 1.2rem;
    color: #1f4e79;
    margin: 0 0 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1f4e79;
}
.portal-modal-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 20px;
}
.confirm-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}
.confirm-row {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
}
.confirm-row:last-child { border-bottom: none; }
.confirm-label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.confirm-value {
    color: #555;
    font-size: 0.9rem;
}
.portal-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.btn-modal-cancel {
    padding: 10px 24px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-modal-cancel:hover { background: #f5f5f5; }
.btn-modal-ok {
    padding: 10px 32px;
    border: none;
    border-radius: 6px;
    background: #1f4e79;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-modal-ok:hover { background: #163d5e; }

/* ── 解約 収納代行停止月の案内 ── */
.deadline-info-text {
    background: #fff3e0;
    border-left: 4px solid #e65100;
    padding: 10px 14px;
    margin: -8px 0 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #bf360c;
}

/* ── インラインバリデーションエラー ── */
.form-errors {
    margin-top: 12px;
}
.form-error-item {
    color: #c62828;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 2px 0;
}
.form-error-item::before {
    content: '※ ';
}
.form-field-error {
    color: #c62828;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* ── 送信成功メッセージ ── */
.submit-success {
    background: #e8f5e9;
    border-left: 4px solid #1b5e20;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    color: #1b5e20;
    line-height: 1.7;
}
.section-recent-changes {
    margin-top: 28px;
}
.recent-changes-wrap {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.section-more {
    text-align: right;
    margin-top: 10px;
}
.section-notices-link,
.section-notices-page {
    margin-bottom: 16px;
}

/* ── 代理店情報追加クラス ── */
.agency-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f4e79;
    margin-bottom: 20px;
}
.agency-field {
    display: flex;
    flex-direction: column;
}
.agency-field-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 4px;
}
.agency-field-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* ── ヘッダー右 ── */
.portal-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ── 滞納月次テーブル ── */
.delinquency-monthly {
    margin-top: 8px;
    font-size: 0.95rem;
}
.detail-delinquency .mini-table th {
    background: #fff3e0;
    color: #333;
    font-weight: 700;
}
.detail-delinquency .mini-table td {
    color: #333;
    background: #fff;
}

/* ── フッター ── */
.portal-footer {
    text-align: center;
    padding: 24px;
    font-size: 0.95rem;
    color: #888;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

/* ── レスポンシブ ── */
@media (max-width: 1024px) {
    .dashboard-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    .cases-table-wrap {
        max-height: calc(100vh - 180px);
    }

    /* モバイルメニューボタン表示 */
    #mobileMenuBtn {
        display: block;
    }

    .portal-header-inner {
        height: 56px;
        padding: 0 14px;
    }
    .portal-logo img {
        height: 26px;
    }
    .portal-label {
        font-size: 0.95rem;
    }
    .portal-agency-name {
        font-size: 0.95rem;
    }
    .btn-logout {
        font-size: 0.85rem;
        padding: 6px 14px;
    }

    /* サイドバー: デフォルト非表示、トグルでオーバーレイ表示 */
    .portal-sidebar {
        position: fixed;
        top: 56px;
        left: -240px;
        height: calc(100vh - 56px);
        transition: left 0.25s ease;
        box-shadow: none;
        z-index: 180;
    }
    .portal-sidebar.sidebar-open {
        left: 0;
        box-shadow: 4px 0 16px rgba(0,0,0,0.25);
    }

    /* メインをフル幅に */
    .portal-wrapper {
        display: block;
    }

    .portal-main {
        padding: 18px 14px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .dash-card {
        padding: 20px 14px;
    }
    .dash-card-count {
        font-size: 2.2rem;
    }

    .cases-toolbar {
        flex-direction: column;
    }
    .search-input, .status-filter {
        min-width: 100%;
    }

    .case-detail {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .edit-group {
        flex-direction: column;
        align-items: stretch;
    }
    .edit-field input[type="text"] {
        min-width: auto;
    }

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

    .change-type-selector {
        grid-template-columns: 1fr 1fr;
    }

    .pagination-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .session-warning-bar {
        top: 56px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .login-card {
        padding: 28px 22px;
    }
}

@media (max-width: 480px) {
    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
    }
    .portal-user {
        gap: 8px;
    }
    .portal-agency-name {
        display: none;
    }
    .change-type-selector {
        grid-template-columns: 1fr;
    }
}

/* ── スケルトンローディング ── */
@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

.skeleton-card {
    height: 120px;
    border-radius: 10px;
}

.skeleton-row {
    height: 48px;
    margin-bottom: 8px;
}

.skeleton-text {
    height: 18px;
    width: 60%;
    margin-bottom: 10px;
}

.skeleton-text.short { width: 30%; }
.skeleton-text.medium { width: 50%; }
.skeleton-text.long { width: 80%; }

.skeleton-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

/* ダッシュボード用スケルトン */
.skeleton-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

/* データ読み込み完了後にスケルトンを非表示 */
.loaded .skeleton-container {
    display: none;
}
