/* =========================================================
   investor01.css
   用途：投資人財務報告頁面專屬樣式（新版 .report-* 架構）
   作用範圍：.investor-financial-page
   載入順序：main.css → menu.css → slide.css → shared-sidebar.css
             → shared-subnav.css → investor01.css

   舊版 .tab-menu / .tab-content / .tech-accordion 等 class
   已由 .report-* 取代，本檔不再包含舊版樣式。
========================================================= */

/* =========================================================
   Design tokens（投資人專區色系）
   覆蓋 shared-sidebar.css 的 :root 變數，限定此頁使用
========================================================= */
.investor-financial-page {
    --inv-primary:   #0c596f;
    --inv-accent:    #19a7b8;
    --inv-text:      #1a3040;
    --inv-muted:     #7a94a3;
    --inv-border:    #dce4ea;
    --inv-bg-light:  #f5f8fa;
    --inv-bg-panel:  #f0f5f8;
}

/* =========================================================
   財務報告區塊容器
========================================================= */
.investor-report-block {
    width: 100%;
    max-width: 100%;
}

/* =========================================================
   Report Tabs（頁籤列）
   桌機：grid 兩欄等寬；手機 575px 以下：flex segmented control
========================================================= */
.report-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--inv-bg-panel);
    border: 1px solid var(--inv-border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.report-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 0 18px;
    color: var(--inv-muted);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
    transition: color 0.2s ease, background 0.2s ease;
}

/* 兩欄分隔線 */
.report-tab + .report-tab {
    border-left: 1px solid var(--inv-border);
}

/* Active tab：白底 */
.report-tab.active {
    color: var(--inv-text);
    background: #ffffff;
    font-weight: 800;
}

/* Active tab：頂部漸層色條 */
.report-tab.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--inv-primary), var(--inv-accent));
}

.report-tab::after {
    display: none;
}

/* =========================================================
   Report Panels（頁籤內容容器）
========================================================= */
.report-panels {
    width: 100%;
    padding: 36px 40px;
    background: #ffffff;
    border: 1px solid var(--inv-border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 20px rgba(7, 41, 56, 0.05);
}

.report-panel {
    display: none;
    width: 100%;
}

.report-panel.active {
    display: block;
}

/* =========================================================
   Report Accordion（年度展開列表容器）
========================================================= */
.report-accordion {
    width: 100%;
    border: 1px solid var(--inv-border);
    border-radius: 8px;
    overflow: hidden;
}

/* =========================================================
   Report Year（單一年度列）
========================================================= */
.report-year {
    width: 100%;
    border-bottom: 1px solid var(--inv-border);
}

.report-year:last-child {
    border-bottom: none;
}

/* 年份切換按鈕（滿版 row） */
.report-year-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 14px 20px;
    color: var(--inv-text);
    font-weight: 700;
    text-align: left;
    background: #ffffff;
    border: none;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.report-year-toggle:hover,
.report-year-toggle:focus-visible {
    background: var(--inv-bg-light);
    color: var(--inv-primary);
}

/* 年份標題文字 */
.report-year-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: inherit;
}

/* 發佈時間小字 */
.report-year-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--inv-muted);
    font-size: 13px;
    font-weight: 600;
}

.report-year-meta i {
    color: inherit;
}

/* 展開/收合圖示推至最右側 */
.report-year-toggle > i {
    margin-left: auto;
    font-size: 16px;
    color: var(--inv-muted);
    flex-shrink: 0;
}

/* =========================================================
   Report Year Body（年度展開內容區）
========================================================= */
.report-year-body {
    width: 100%;
    padding: 20px;
    background: var(--inv-bg-light);
    border-top: 1px solid var(--inv-border);
}

/* =========================================================
   Report File Grid（PDF 卡片 grid）
   桌機：3 欄
   平板（1200px 以下）：2 欄
   手機（768px 以下）：1 欄
========================================================= */
.report-file-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

/* =========================================================
   Report File Card（PDF 連結卡片）
========================================================= */
.report-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 16px 14px;
    color: var(--inv-text);
    background: #ffffff;
    text-decoration: none;
    border: 1px solid var(--inv-border);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(7, 41, 56, 0.04);
    transition: color 0.2s ease, transform 0.2s ease,
                box-shadow 0.2s ease, border-color 0.2s ease;
}

.report-file-card:hover {
    color: var(--inv-primary);
    transform: translateY(-3px);
    border-color: rgba(25, 167, 184, 0.38);
    box-shadow: 0 8px 22px rgba(7, 41, 56, 0.10);
}

/* 左側文字區（報告名稱 + 日期） */
.report-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-file-title {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.45;
    color: inherit;
}

.report-file-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--inv-muted);
    font-size: 12px;
    font-weight: 600;
}

.report-file-date i {
    color: inherit;
}

/* 右側 PDF 圖示按鈕 */
.report-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--inv-primary), var(--inv-accent));
    border-radius: 8px;
    font-size: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-file-card:hover .report-file-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(12, 89, 111, 0.30);
}

/* =========================================================
   RWD
========================================================= */

/* 1200px 以下：卡片改 2 欄 */
@media (max-width: 1199.98px) {
    .report-file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 768px 以下：縮減 padding、字體縮小 */
@media (max-width: 767.98px) {
    .report-tab {
        min-height: 52px;
        font-size: 1.05rem;
        white-space: nowrap;
        padding: 0 12px;
    }

    .report-panels {
        padding: 20px 16px;
    }

    .report-year-toggle {
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 10px;
        padding: 12px 16px;
    }

    .report-year-title {
        font-size: 15px;
    }

    .report-year-meta {
        font-size: 12px;
    }

    .report-year-body {
        padding: 16px 14px 18px;
    }

    /* 手機版：PDF 卡片單欄 */
    .report-file-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .report-file-card {
        min-height: 72px;
    }
}

/* =========================================================
   575px 以下：頁籤改 Segmented control
========================================================= */
@media (max-width: 575.98px) {
    /* tabs：改 flex pill 容器 */
    .report-tabs {
        display: flex;
        border-radius: 999px;
        border: 1px solid var(--inv-border);
        background: var(--inv-bg-panel);
        padding: 4px;
        gap: 4px;
        border-bottom: 1px solid var(--inv-border);
    }

    .report-tab {
        flex: 1;
        min-height: 40px;
        font-size: 0.88rem;
        white-space: nowrap;
        padding: 0 10px;
        border-radius: 999px;
        letter-spacing: 0;
        border-left: none;
    }

    .report-tab + .report-tab {
        border-left: none;
    }

    /* Active：深藍綠底白字 */
    .report-tab.active {
        background: var(--inv-primary);
        color: #ffffff;
    }

    /* 隱藏頂部色條（pill 模式不需要） */
    .report-tab.active::before {
        display: none;
    }

    /* panels 在 segmented control 下方，加間距與獨立圓角 */
    .report-panels {
        margin-top: 10px;
        padding: 16px 12px;
        border-radius: 8px;
        border: 1px solid var(--inv-border);
    }

    .report-file-grid {
        gap: 6px;
    }

    .report-file-card {
        min-height: 64px;
        padding: 12px;
        border-radius: 6px;
    }

    .report-file-title {
        font-size: 13.5px;
    }

    .report-file-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-radius: 6px;
    }
}
