/* ===== 原始資料頁面專屬樣式 ===== */
.raw-cancellation-link { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 16px; border-radius:12px; color:#334155; text-decoration:none; }
.raw-cancellation-link.active { background:#0f766e; color:white; }
.cancellation-area { margin-top:24px; }
.cancellation-source { font-size:12px; padding:5px 9px; border-radius:8px; background:#e2f3ef; color:#0f766e; }
.cancellation-summary { background:#f1f7f5; border-radius:14px; padding:18px; margin-bottom:20px; }
.cancellation-summary p { margin:8px 0 0; color:#475569; font-size:14px; }
.cancellation-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:20px 0; }
.cancellation-filters label { display:grid; gap:6px; color:#475569; }
.cancellation-filters input,.cancellation-filters select { min-height:44px; border:1px solid #cbd5e1; border-radius:9px; padding:8px 12px; background:white; max-width:100%; }
.cancellation-filters button,.cancellation-pages a { min-height:44px; display:inline-flex; align-items:center; padding:10px 18px; background:#0f766e; color:white; border:0; border-radius:9px; text-decoration:none; }
.cancellation-filters a { min-height:44px; display:inline-flex; align-items:center; }
.cancellation-list { display:grid; grid-template-columns:1fr; gap:0; margin-top:12px; }
.cancellation-pages { display:flex; justify-content:center; align-items:center; gap:16px; margin-top:24px; }
/* Keep button labels white in visited, hover and active link states. */
body.raw-data-tab .cancellation-pages a,
body.raw-data-tab .cancellation-pages a:visited,
body.raw-data-tab .cancellation-pages a:hover,
body.raw-data-tab .cancellation-pages a:active { color:#fff; text-decoration:none; }
@media(max-width:640px) { .cancellation-list { grid-template-columns:1fr; } .cancellation-card { padding:16px; } .cancellation-filters label { width:100%; } .raw-data-toggle { flex-wrap:wrap; } }

body.raw-data-tab {
    background-color: #f4f7f6;
}

body.raw-data-tab #main-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

/* 原始資料區塊通用樣式 */
.cancellation-table-wrap { display: none; }
@media (max-width: 768px) {
    body.raw-data-tab .cancellation-summary { padding: 10px 12px; border-radius: 0; margin-bottom: 12px; }
    body.raw-data-tab .cancellation-summary p { font-size: 12px; line-height: 1.45; margin-top: 4px; }
    body.raw-data-tab .cancellation-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; font-size: 13px; }
    body.raw-data-tab .cancellation-filters label { width: auto; min-width: 0; gap: 4px; }
    body.raw-data-tab .cancellation-filters input, body.raw-data-tab .cancellation-filters select { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px; }
    body.raw-data-tab .cancellation-mobile-row { padding: 8px 10px; }
    .cancellation-mobile-meta { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 3px; color: #64727f; font-size: 12px; line-height: 1.45; }
    .cancellation-mobile-status { color: #705b35; font-size: 12px; line-height: 1.45; margin-top: 3px; }
    .cancellation-mobile-address { color: #64727f; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
}
@media (min-width: 769px) {
    body.raw-data-tab .cancellation-list { display: none; }
    body.raw-data-tab .cancellation-table-wrap { display: block; overflow-x: auto; margin-top: 16px; }
    body.raw-data-tab .cancellation-table { width: 100%; min-width: 900px; table-layout: fixed; border-collapse: collapse; background: white; font-size: 14px; }
    .cancellation-table th, .cancellation-table td { padding: 10px 12px; border-bottom: 1px solid #dce4ea; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
    .cancellation-table th { color: #475569; background: #eef4f2; font-weight: 600; }
    .cancellation-table tbody tr:nth-child(even) { background: #f8faf9; }
    .cancellation-table .cancel-number, .cancellation-table th:nth-child(4), .cancellation-table th:nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }
    .cancel-project-col { width: 28%; }
    .cancel-unit-col { width: 10%; }
    .cancel-date-col { width: 11%; }
    .cancel-price-col, .cancel-area-col { width: 10%; }
    .cancel-floor-col { width: 5%; }
    .cancel-status-col { width: 26%; }
    .cancel-source-col { width: 12%; }
    .cancel-address { display: block; margin-top: 4px; color: #64748b; font-size: 12px; }
    .cancel-original-status { color: #705b35; }
    .cancellation-table summary { min-height: 40px; cursor: pointer; color: #0f766e; }
    .cancellation-table pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: 11px; line-height: 1.5; max-height: 320px; overflow-y: auto; }
    body.raw-data-tab .cancellation-summary { border-radius: 0; padding: 12px 16px; border-left: 3px solid #0f766e; }
}
.raw-data-section {
    margin-top: 0;
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem var(--section-px);
    box-shadow: var(--shadow-lg);
    clear: both;
    width: 100%;
    display: block;
    position: relative;
}

.raw-data-section h2 {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.raw-data-section h3 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-info {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: normal;
    margin-left: 0.5rem;
}

.raw-data-section .table-container {
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    background: white;
    overflow: hidden;
    /* 覆蓋 .table-container 繼承：執照分析表格不需要這些 */
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.raw-data-section .table-header {
    background-color: var(--color-bg-surface);
    border-bottom: 2px solid var(--color-border-light);
    position: relative;
    z-index: 10;
}

.raw-data-section .table-header table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.raw-data-section .table-header th {
    background-color: var(--color-bg-surface);
    font-weight: 600;
    color: var(--color-text);
    border-right: 1px solid var(--color-border-light);
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.raw-data-section .table-header th:last-child {
    border-right: none;
}

.raw-data-section .table-body {
    max-height: 700px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* WebKit 隱藏滾動條 */
.raw-data-section .table-body::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.raw-data-section .table-body::-webkit-scrollbar-thumb {
    background: transparent;
}

.raw-data-section .table-body table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
}

.raw-data-section .table-body td {
    font-size: 0.9rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-right: 1px solid var(--color-border-light);
    border-bottom: 1px solid #f0f0f0;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.raw-data-section .table-body td:last-child {
    border-right: none;
}

.raw-data-section .table-body tr:hover {
    background-color: var(--color-bg-surface);
}

.raw-data-section .table-body tr:nth-child(even) {
    background-color: #fafafa;
}

.raw-data-section .table-body tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* 預售屋/成屋切換器 */
.raw-data-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    width: fit-content;
}

/* raw-data-toggle-btn 樣式由 .tab-btn 提供 */

/* 行政區卡片區塊 */
.raw-data-district-section {
    margin-bottom: 2rem;
}

.raw-data-district-section h3 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.raw-data-district-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.raw-data-district-card {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-white);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
    text-align: center;
}

@media (hover: hover) {
    .raw-data-district-card:hover {
        border-color: var(--color-primary-light);
        background: var(--color-bg-surface);
    }
}

.raw-data-district-card.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

/* 原始資料表格區塊 */
.raw-data-table-section {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem var(--section-px);
    box-shadow: var(--shadow-md);
}

.raw-data-table-section h3 {
    color: var(--color-text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#raw-data-count {
    font-weight: normal;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

#raw-data-table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    /* 覆蓋 .table-container 繼承：原始資料表格不需要這些 */
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
}

#raw-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#raw-data-table th {
    position: sticky;
    top: 0;
    background: var(--color-bg-surface);
    color: var(--color-text);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: none;
    box-shadow: inset 0 -2px 0 var(--color-border-light);
    z-index: 10;
}

#raw-data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

#raw-data-table td.number {
    text-align: right;
    font-family: 'Consolas', 'Monaco', monospace;
}

#raw-data-table tbody tr:hover {
    background: var(--color-bg-surface);
}

#raw-data-table .project-link {
    color: var(--color-primary-dark);
    text-decoration: none;
}

#raw-data-table .project-link:hover {
    text-decoration: underline;
}

/* 原始資料載入 Spinner */
.loading-spinner-row td {
    text-align: center;
    padding: 20px;
}

.raw-data-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: rawDataSpin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes rawDataSpin {
    to { transform: rotate(360deg); }
}

/* 新資料淡入動畫（僅首次載入生效，滾動追加不觸發） */
#raw-data-table tbody tr.fade-in {
    animation: rawDataFadeIn 0.3s ease-in-out;
}

@keyframes rawDataFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SEO 摘要區塊（共用 .raw-data-glossary 供所有頁面使用） */
.raw-data-intro,
.permits-intro,
.sales-intro,
.market-intro,
.developer-intro {
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    line-height: 1.7;
}

.raw-data-intro p,
.permits-intro p,
.sales-intro p,
.market-intro p,
.developer-intro p {
    margin-bottom: 0.75rem;
}

.raw-data-completed-note {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border-light);
    border-left: 3px solid var(--color-type-completed, #7c3aed);
    border-radius: var(--radius-sm);
    background: var(--color-bg-surface);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.raw-data-completed-note[hidden] {
    display: none;
}

.raw-data-glossary {
    margin-top: 0.5rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.raw-data-glossary + .raw-data-glossary {
    margin-top: 0.25rem;
}

.raw-data-glossary summary {
    padding: 0.6rem 1rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--color-bg-surface);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: disclosure-closed;
}

.raw-data-glossary[open] > summary {
    list-style: disclosure-open;
}

.raw-data-glossary summary::marker {
    font-size: 0.75rem;
}

.glossary-copy-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted, #999);
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm, 4px);
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

@media (hover: hover) {
    .glossary-copy-btn:hover {
        color: var(--color-primary-dark, #245f8d);
        background: rgba(0, 0, 0, 0.05);
    }
}

.glossary-copy-btn.copied {
    color: var(--color-success, #22c55e);
}

.raw-data-glossary ul,
.raw-data-glossary dl,
.raw-data-glossary ol {
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.raw-data-glossary ol {
    padding-left: 2rem;
}

.raw-data-glossary ul {
    list-style: disc inside;
}

.raw-data-glossary li + li {
    margin-top: 0.3rem;
}

.raw-data-glossary dt {
    font-weight: 600;
    margin-top: 0.5rem;
}

.raw-data-glossary dt:first-child {
    margin-top: 0;
}

.raw-data-glossary dd {
    margin-left: 0;
    margin-bottom: 0.25rem;
}

.raw-data-glossary a,
.raw-data-intro a,
.permits-intro a,
.sales-intro a,
.market-intro a,
.developer-intro a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.developer-seo-drawer {
    margin: 1rem 0;
    padding: 0.85rem;
    border: 1px solid rgba(220, 228, 234, 0.95);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    color: var(--color-text);
}

.developer-seo-drawer:not([open]) {
    display: block;
    padding: 0.38rem 0.65rem;
    background: rgba(255, 255, 255, 0.72);
}

.developer-seo-drawer > summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 32px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.developer-seo-drawer > summary::-webkit-details-marker {
    display: none;
}

.developer-seo-drawer > summary::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid rgba(220, 228, 234, 0.95);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.76);
    color: #2f8c82;
    font-weight: 800;
    line-height: 1;
}

.developer-seo-drawer[open] > summary {
    color: #22313f;
}

.developer-seo-drawer[open] > summary::before {
    content: "-";
    color: var(--color-primary-dark);
}

.developer-seo-drawer .raw-data-glossary {
    margin: 0.65rem 0 0;
    border-color: rgba(220, 228, 234, 0.9);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
}

.developer-seo-drawer .raw-data-glossary summary {
    min-height: 42px;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    color: #22313f;
    font-size: 0.86rem;
    font-weight: 700;
}

.developer-seo-drawer .raw-data-glossary ol {
    display: grid;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem 0.75rem 2rem;
}

.developer-seo-drawer .raw-data-glossary ol li {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.82rem;
    line-height: 1.65;
}

.developer-seo-drawer .raw-data-glossary ol li::marker {
    color: #2f8c82;
    font-weight: 800;
}

.developer-seo-drawer .raw-data-glossary ol a {
    color: #22313f;
    font-weight: 750;
}

/* 手機版原始資料樣式 */
@media (max-width: 768px) {
    .raw-data-section {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .raw-data-section .table-container {
        font-size: 0.8rem;
    }

    .raw-data-section .data-table th,
    .raw-data-section .data-table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .raw-data-section .table-body {
        max-height: 600px;
    }

    .raw-data-toggle {
        width: 100%;
    }

    .raw-data-toggle-btn {
        flex: 1;
    }

    .raw-data-district-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.5rem;
    }

    .raw-data-district-card {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    #raw-data-table-container {
        max-height: 400px;
    }

    #raw-data-table th,
    #raw-data-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* ===== 2026 raw data feed redesign =====
   raw-data 頁需要一層輕量工作區外框，否則內容直接落在 page bg 上會比其他 tab 少承載感。
   注意：.raw-data-section base rule 在 #permits-tab 內部有 3 個 .raw-data-section.permit-panel 在用，
   所以 base rule 不能改，只 override raw-data-tab body scope。 */
body.raw-data-tab .raw-data-section {
    padding: clamp(1.1rem, 2vw, 1.55rem);
    border: 1px solid rgba(220, 228, 234, 0.94);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 16px 42px rgba(31, 45, 55, 0.06);
}

body.raw-data-tab .raw-data-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

body.raw-data-tab .raw-data-title-block {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

body.raw-data-tab .raw-data-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #0d5d54;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
}

body.raw-data-tab .raw-data-section h2 {
    margin: 0;
    color: #22313f;
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    line-height: 1.18;
}

body.raw-data-tab .raw-data-title-block p {
    max-width: 42rem;
    margin: 0;
    color: #64727f;
    font-size: 0.94rem;
    line-height: 1.6;
}

body.raw-data-tab .raw-data-toggle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    min-width: 300px;
    flex-shrink: 0;
    margin: 0;
    padding: 0.25rem;
    border: 1px solid #dce4ea;
    border-radius: var(--radius-md);
    background: rgba(238, 244, 242, 0.82);
}

body.raw-data-tab .raw-data-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    min-width: 0;
    padding: 8px 14px;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.3;
    border: 0;
    border-radius: var(--radius-sm);
    color: #64727f;
    background: transparent;
    cursor: pointer;
    font-weight: 850;
}

body.raw-data-tab .raw-data-toggle-btn.active {
    color: #0d5d54;
    background: #fff;
    box-shadow: 0 6px 18px rgba(31, 45, 55, 0.08);
}

.cancellation-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 768px) {
    body.raw-data-tab .raw-data-toggle { min-width: 0; width: 100%; }
    body.raw-data-tab .raw-data-toggle-btn { padding: 8px 6px; font-size: 0.85rem; }
}

body.raw-data-tab .raw-data-intro {
    margin: 0 0 1rem;
    color: #64727f;
}

body.raw-data-tab .raw-data-intro .raw-data-glossary {
    margin-top: 0.75rem;
    border: 1px solid #dce4ea;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
}

body.raw-data-tab .raw-data-intro .raw-data-glossary summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0.6rem 0.8rem;
    background: rgba(238, 244, 242, 0.82);
    color: #22313f;
    font-size: 0.86rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.45;
    list-style: none;
}

body.raw-data-tab .raw-data-intro .raw-data-glossary summary::-webkit-details-marker {
    display: none;
}

body.raw-data-tab .raw-data-intro .raw-data-glossary summary::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid #dce4ea;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.82);
    color: #2f8c82;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1;
}

body.raw-data-tab .raw-data-intro .raw-data-glossary[open] summary {
    border-bottom: 1px solid #dce4ea;
}

body.raw-data-tab .raw-data-intro .raw-data-glossary[open] summary::before {
    content: "-";
    color: #855514;
}

body.raw-data-tab .raw-data-intro .raw-data-glossary ol {
    padding: 0.8rem 1rem 0.9rem 2.2rem;
    background: rgba(255, 255, 255, 0.92);
    color: #64727f;
    font-size: 0.85rem;
    line-height: 1.65;
}

body.raw-data-tab .raw-data-intro .raw-data-glossary li a {
    color: #22313f;
    font-weight: 750;
}

body.raw-data-tab .raw-data-intro .glossary-copy-btn {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    padding: 0;
    border-radius: var(--radius-sm);
    color: #64727f;
}

@media (hover: hover) {
    body.raw-data-tab .raw-data-intro .glossary-copy-btn:hover {
        color: #0d5d54;
        background: rgba(47, 140, 130, 0.1);
    }
}

body.raw-data-tab .raw-data-district-section {
    margin: 0 0 1rem;
}

body.raw-data-tab .raw-data-district-section h3 {
    margin-bottom: 0.75rem;
    color: #22313f;
    font-size: 1rem;
    font-weight: 850;
}

body.raw-data-tab .raw-data-district-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

body.raw-data-tab .raw-data-district-card {
    min-height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #dce4ea;
    border-radius: var(--radius-md);
    color: #22313f;
    background: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 850;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

@media (hover: hover) {
    body.raw-data-tab .raw-data-toggle-btn:hover,
    body.raw-data-tab .raw-data-district-card:hover {
        border-color: rgba(47, 140, 130, 0.38);
        transform: translateY(-1px);
    }
}

body.raw-data-tab .raw-data-district-card.active {
    border-color: rgba(47, 140, 130, 0.46);
    color: #0d5d54;
    background: #dff0ed;
}

body.raw-data-tab .raw-data-table-section {
    overflow: hidden;
    margin-top: 1rem;
    padding: 0;
    border: 1px solid rgba(220, 228, 234, 0.94);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: none;
}

body.raw-data-tab .raw-data-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    min-height: 58px;
    padding: 0 1rem;
    border-bottom: 1px solid #dce4ea;
}

body.raw-data-tab .raw-data-table-head h3 {
    margin: 0;
    color: #22313f;
    font-size: 1rem;
    font-weight: 850;
}

body.raw-data-tab #raw-data-count {
    color: #64727f;
    font-size: 0.82rem;
    font-weight: 750;
}

body.raw-data-tab #raw-data-table-container {
    max-height: 620px;
    overflow: auto;
    margin: 0;
    padding: 0.75rem;
    border: 0;
    border-radius: 0;
    background: rgba(238, 244, 242, 0.62);
}

body.raw-data-tab #raw-data-table {
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

body.raw-data-tab #raw-data-table th {
    position: sticky;
    top: -0.75rem;
    padding: 0 0.75rem 0.35rem;
    border: 0;
    background: rgba(238, 244, 242, 0.96);
    box-shadow: none;
    color: #64727f;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

body.raw-data-tab #raw-data-table td {
    height: 60px;
    padding: 0.65rem 0.75rem;
    border-top: 1px solid #dce4ea;
    border-bottom: 1px solid #dce4ea;
    background: rgba(255, 255, 255, 0.94);
    color: #22313f;
    font-size: 0.9rem;
    vertical-align: middle;
}

body.raw-data-tab #raw-data-table td:first-child {
    border-left: 1px solid #dce4ea;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-weight: 850;
    white-space: nowrap;
}

body.raw-data-tab #raw-data-table td:last-child {
    border-right: 1px solid #dce4ea;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

body.raw-data-tab #raw-data-table tbody tr:hover td {
    background: #f8fbfa;
}

body.raw-data-tab .raw-data-name-cell {
    display: grid;
    gap: 0.25rem;
    min-width: 220px;
}

body.raw-data-tab .raw-data-name-cell strong,
body.raw-data-tab #raw-data-table .project-link {
    color: #22313f;
    font-size: 0.94rem;
    font-weight: 850;
    text-decoration: none;
}

body.raw-data-tab .raw-data-name-cell span {
    color: #64727f;
    font-size: 0.78rem;
}

body.raw-data-tab #raw-data-table td.number,
body.raw-data-tab #raw-data-table th.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 850;
}

body.raw-data-tab .raw-data-type-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 0.55rem;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

body.raw-data-tab .raw-data-type-tag.presale {
    color: var(--color-type-presale, #0f766e);
    background: var(--color-type-presale-soft, #e0f2fe);
}

body.raw-data-tab .raw-data-type-tag.completed {
    color: var(--color-type-completed, #7c3aed);
    background: var(--color-type-completed-soft, #ede9fe);
}

body.raw-data-tab .raw-data-mobile-list {
    display: none;
}

body.raw-data-tab .raw-data-empty {
    padding: 1rem;
    color: #64727f;
    text-align: center;
    font-weight: 750;
}

body.raw-data-tab .raw-data-skeleton-row td {
    height: 60px;
    padding: 0.65rem 0.75rem;
    border: 0;
    background: transparent;
}

body.raw-data-tab .raw-data-skeleton-row .skeleton {
    height: 42px;
    border-radius: var(--radius-md);
}

body.raw-data-tab .raw-data-loadmore-skeleton {
    height: 32px;
    border-radius: var(--radius-md);
}

@media (max-width: 860px) {
    body.raw-data-tab .raw-data-head {
        align-items: stretch;
        flex-direction: column;
    }

    body.raw-data-tab .raw-data-toggle {
        min-width: 0;
    }

    body.raw-data-tab .raw-data-table-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.85rem;
    }

    body.raw-data-tab #raw-data-table-container {
        display: none;
    }

    body.raw-data-tab .raw-data-mobile-list {
        display: grid;
        gap: 0;
        max-height: 70vh;
        overflow-y: auto;
        padding: 0;
        background: rgba(238, 244, 242, 0.72);
        -webkit-overflow-scrolling: touch;
    }

    body.raw-data-tab .raw-data-mobile-row {
        min-width: 0;
        padding: 0.74rem 0.82rem;
        border-bottom: 1px solid #dce4ea;
        background: rgba(255, 255, 255, 0.94);
    }

    body.raw-data-tab .raw-data-mobile-row:last-child {
        border-bottom: 0;
    }

    body.raw-data-tab .raw-data-mobile-skeleton {
        display: grid;
        gap: 0.46rem;
        min-height: 86px;
    }

    body.raw-data-tab .raw-data-mobile-skeleton .skeleton {
        height: 13px;
        border-radius: var(--radius-sm);
    }

    body.raw-data-tab .raw-data-mobile-skeleton .skeleton:nth-child(1) {
        width: 82%;
        height: 17px;
    }

    body.raw-data-tab .raw-data-mobile-skeleton .skeleton:nth-child(2) {
        width: 58%;
    }

    body.raw-data-tab .raw-data-mobile-skeleton .skeleton:nth-child(3) {
        width: 72%;
    }

    body.raw-data-tab .raw-data-mobile-main,
    body.raw-data-tab .raw-data-mobile-meta,
    body.raw-data-tab .raw-data-mobile-detail {
        display: flex;
        align-items: baseline;
        min-width: 0;
    }

    body.raw-data-tab .raw-data-mobile-main {
        justify-content: space-between;
        gap: 0.7rem;
    }

    body.raw-data-tab .raw-data-mobile-main strong {
        overflow: hidden;
        color: #22313f;
        font-size: 0.92rem;
        font-weight: 850;
        line-height: 1.45;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.raw-data-tab .raw-data-mobile-main b {
        flex: 0 0 auto;
        color: #0d5d54;
        font-size: 0.9rem;
        font-weight: 850;
        line-height: 1.45;
        white-space: nowrap;
    }

    body.raw-data-tab .raw-data-mobile-meta,
    body.raw-data-tab .raw-data-mobile-detail {
        gap: 0.42rem;
        margin-top: 0.24rem;
        overflow: hidden;
        color: #64727f;
        font-size: 0.75rem;
        font-weight: 750;
        line-height: 1.45;
        white-space: nowrap;
    }

    body.raw-data-tab .raw-data-mobile-meta span {
        flex: 0 0 auto;
    }

    body.raw-data-tab .raw-data-mobile-detail span {
        flex: 0 0 auto;
    }

    body.raw-data-tab .raw-data-mobile-detail span:last-child {
        overflow: hidden;
        flex: 1 1 auto;
        min-width: 0;
        text-overflow: ellipsis;
    }

    body.raw-data-tab .raw-data-mobile-main .project-link {
        color: inherit;
        text-decoration: none;
    }
}
