/* GeneralSetting 列表／詳情頁共用 flex 版型（page-container 子層必須 flex:1 + min-height:0） */

.gs-page {
    background: #f4f6f8;
    padding: 0.25rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.gs-page.gs-page-detail {
    overflow-y: auto;
}

.gs-page > .page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.gs-page.gs-page-detail > .page-header {
    margin-bottom: 1rem;
}

.gs-page > .gs-tabbed-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gs-page .gs-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gs-page .gs-card.rz-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gs-page .gs-card > .rz-card-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gs-page .table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.gs-page .form-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex-shrink: 0;
}

.gs-page .toolbar-actions {
    display: flex;
    gap: 0.5rem;
}

/* List 金額欄：右對齊 + tabular nums，利於快速掃描 */
.gs-page .gs-amount {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
}

.gs-page .gs-amount--primary {
    font-weight: 600;
    color: #0033a1;
}

.gs-page .gs-amount--muted {
    color: #00256f;
}

.gs-page .gs-amount-currency {
    margin-left: 0.35rem;
    font-weight: 500;
    color: #00256f;
    font-size: 0.85em;
}

    .gs-page .gs-amount--debit {
        font-weight: 600;
        color: #f52c2c;
    }

    .gs-page .gs-amount--credit {
        font-weight: 600;
        color: #43a047;
    }

/* List 單號欄：Settlement / Open Item 成對 chip */
.gs-page .gs-docno {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.12rem 0.45rem 0.12rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid;
    line-height: 1.35;
    font-size: 0.875rem;
}

.gs-page .gs-docno--settlement {
    color: #0b4a6f;
    background: #e8f4fb;
    border-left-color: #1a7aad;
}

.gs-page .gs-docno--openitem {
    color: #5a3d00;
    background: #fbf3e0;
    border-left-color: #c48a1a;
}

.gs-page .gs-docno--empty {
    color: #8a93a6;
    font-weight: 400;
    background: none;
    border: none;
    padding: 0;
}

.gs-page .gs-docno-col-head {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gs-page .gs-docno-col-head::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.gs-page .gs-docno-col-head--settlement::before {
    background: #1a7aad;
}

.gs-page .gs-docno-col-head--openitem::before {
    background: #c48a1a;
}

/* Tab 內 Radzen 元件的 flex 鏈見 GsTabbedListSection.razor.css（需 ::deep，不可放全域 CSS） */

/* ── 全站動畫 keyframes ── */
@keyframes gs-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes gs-skeleton-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

/* ── Skeleton loading ── */
.gs-skeleton-row {
    height: 40px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: gs-skeleton-shimmer 1.2s ease-in-out infinite;
    margin-bottom: 8px;
}

.gs-skeleton-table {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

/* ── 表格進場 fade-in（補充 animation，flex 定義已在上方原始區塊） ── */
.gs-page .grid-fill {
    animation: gs-fadein 0.25s ease-out;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.gs-page .gs-grid-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

/* ── 按鈕互動回饋 ── */
.rz-button {
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.rz-button:active {
    transform: scale(0.96);
}

/* ── Badge / Toast ── */
.rz-badge {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.rz-notification {
    animation: gs-fadein 0.2s ease-out;
}

/* ── Reject reason（輕量提示，非 Alert）── */
.gs-reject-reason-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem 0.5rem 0.85rem;
    border-left: 3px solid #d97706;
    border-radius: 0 4px 4px 0;
    background: #fffbeb;
    color: #57534e;
    font-size: 0.875rem;
    line-height: 1.45;
}

.gs-reject-reason-banner__label {
    flex: 0 0 auto;
    font-weight: 600;
    color: #92400e;
    white-space: nowrap;
}

.gs-reject-reason-banner__label::after {
    content: "：";
}

.gs-reject-reason-banner__text {
    flex: 1 1 12rem;
    min-width: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #44403c;
}
