.office-page {
    width: 100%;
    padding: 6px 10px 40px 0;
    box-sizing: border-box;
}

.office-header {
    background:
        linear-gradient(
            135deg,
            var(--office-team-secondary-dark, #145c22) 0%,
            var(--office-team-primary, #145c22) 48%,
            var(--office-team-secondary, #1f7a35) 100%
        );
    color: var(--office-hero-text, #fff);
    border-radius: 22px;
    padding: 26px 28px;
    box-shadow: 0 12px 28px rgba(20, 92, 34, 0.22);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.office-account-card {
    flex: 0 0 285px;
    max-width: 240px;
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 24px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(4px);
    color: var(--office-hero-text, #fff);
}

.office-account-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    line-height: 1.55;
}

.office-account-row + .office-account-row {
    margin-top: 6px;
}

.office-account-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--office-hero-subtext, rgba(255, 255, 255, 0.82));
    white-space: nowrap;
}

.office-account-value {
    font-size: 18px;
    font-weight: 950;
    color: var(--office-hero-text, #fff);
    text-align: right;
    white-space: nowrap;
}

.office-account-value.is-vip {
    color: #ffe539;
}

.office-account-value.is-normal {
    color: var(--office-hero-text, #fff);
}

.office-hero {
    display: flex;
    align-items: center;
    gap: 16px;
}

.office-team-logo-wrap {
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    border-radius: 15px;
    background: var(--office-hero-pill-bg, rgba(255, 255, 255, 0.16));
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.office-team-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    display: block;
}

.office-hero-text {
    min-width: 0;
}

.office-team-name {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.02em;
    word-break: break-word;
}

.office-office-title {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 800;
    color: var(--office-hero-subtext, rgba(255, 255, 255, 0.86));
}

.office-season-day {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 800;
    color: var(--office-hero-subtext, rgba(255, 255, 255, 0.78));
    letter-spacing: 0.04em;
}

.office-status {
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-weight: 700;
}

.office-status.active {
    display: block;
}

.office-status.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.office-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 16px 0;
}

.office-summary-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 15px 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.07);
    min-height: 92px;
}

.office-summary-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 8px;
}

.office-summary-value {
    font-size: 22px;
    font-weight: 950;
    color: #145c22;
    line-height: 1.2;
    word-break: break-word;
}

.office-summary-sub {
    margin-top: 6px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.45;
}

.office-summary-card.warning .office-summary-value {
    color: #92400e;
}

.office-summary-card.danger .office-summary-value {
    color: #991b1b;
}

.office-summary-card.success .office-summary-value {
    color: #166534;
}

@media (max-width: 1020px) {
    .office-header {
        align-items: stretch;
        flex-direction: column;
    }

    .office-account-card {
        flex: 0 1 auto;
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .office-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .office-header {
        padding: 20px 18px;
        border-radius: 18px;
    }

    .office-account-card {
        padding: 13px 14px;
        border-radius: 15px;
    }

    .office-account-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .office-account-value {
        text-align: left;
        font-size: 17px;
    }

    .office-summary-grid {
        grid-template-columns: 1fr;
    }
}

.office-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 16px;
}

.office-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.office-card-wide {
    grid-row: span 3;
}

.office-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.office-card h2 {
    margin: 0;
    font-size: 20px;
}

.office-count-pill {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #145c22;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
}

.office-alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.office-alert {
    border-radius: 14px;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.office-alert.danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.office-alert.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.office-alert.info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.office-alert.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.office-alert-title {
    font-weight: 900;
    margin-bottom: 5px;
    font-size: 15px;
}

.office-alert-message {
    color: #4b5563;
    line-height: 1.55;
    font-size: 13px;
}

.office-alert-action {
    display: inline-block;
    margin-top: 9px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #145c22;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.office-empty {
    color: #6b7280;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 14px;
}

@media (max-width: 860px) {
    .office-grid {
        grid-template-columns: 1fr;
    }

    .office-card-wide {
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    .office-hero {
        gap: 12px;
    }

    .office-team-logo-wrap {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 14px;
    }

    .office-team-logo {
        width: 50px;
        height: 50px;
    }

    .office-team-name {
        font-size: 22px;
    }

    .office-office-title {
        font-size: 15px;
    }

    .office-season-day {
        font-size: 13px;
    }
}

.office-game-card {
    padding: 16px 18px;
}

.office-game-main-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.office-game-title {
    font-size: 18px;
    font-weight: 950;
    color: #111827;
    line-height: 1.35;
}

.office-game-result {
    font-size: 20px;
    font-weight: 950;
    line-height: 1.2;
    white-space: nowrap;
}

.office-game-result.success {
    color: #166534;
}

.office-game-result.danger {
    color: #991b1b;
}

.office-game-result.warning {
    color: #92400e;
}

.office-game-result.info {
    color: #1e3a8a;
}

.office-game-meta {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
    line-height: 1.5;
}

/* =========================================================
   Office V2 Dashboard Layout
   左側資訊區：比賽 / 財務 / 聯盟新聞
   右側行動區：待辦 / 提醒 / 警告
   ========================================================= */

.office-dashboard-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.office-info-column,
.office-action-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.office-info-card {
    min-width: 0;
}

.office-match-grid,
.office-money-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.office-mini-panel {
    border: 1px solid rgba(20, 83, 45, 0.12);
    border-radius: 14px;
    background: #f8fafc;
    padding: 14px;
    min-width: 0;
}

.office-mini-label {
    font-size: 13px;
    font-weight: 900;
    color: #64748b;
    margin-bottom: 8px;
}

.office-mini-content {
    min-width: 0;
}

.office-mini-main {
    font-size: 28px;
    font-weight: 950;
    color: #111827;
    line-height: 1.35;
    word-break: break-word;
}

.office-mini-main.success {
    color: #047857;
}

.office-mini-main.warning {
    color: #b45309;
}

.office-mini-main.danger {
    color: #b91c1c;
}

.office-mini-main.info {
    color: #1d4ed8;
}

.office-mini-sub {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.55;
}

.office-mini-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.office-news-list {
    display: grid;
    gap: 10px;
}

.office-news-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(20, 83, 45, 0.12);
}

.office-news-title {
    font-size: 15px;
    font-weight: 950;
    color: #111827;
    margin-bottom: 4px;
}

.office-news-meta,
.office-news-body {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.55;
}

.office-action-column .office-card {
    min-width: 0;
}

@media (max-width: 960px) {
    .office-dashboard-v2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .office-match-grid,
    .office-money-grid {
        grid-template-columns: 1fr;
    }
}


/* Office V2：比賽資訊改為上下排列 */
.office-match-grid {
    grid-template-columns: 1fr;
}

.office-match-panel {
    padding: 16px;
}

.office-match-title {
    font-size: 16px;
    font-weight: 950;
    color: #111827;
    margin-bottom: 6px;
}

.office-match-meta-line {
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 10px;
}

.office-match-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.office-match-versus {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 28px;
    font-weight: 950;
    color: #1f2937;
    line-height: 1.25;
}

.office-match-side,
.office-match-vs {
    flex: 0 0 auto;
    color: #475569;
}

.office-match-opponent,
.office-match-opponent-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #145c22;
    font-weight: 950;
    text-decoration: none;
}

.office-match-opponent:hover {
    text-decoration: underline;
}

.office-match-result-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.office-match-score {
    font-size: 28px;
    font-weight: 950;
    line-height: 1.25;
}

.office-match-score.success {
    color: #047857;
}

.office-match-score.warning {
    color: #b45309;
}

.office-match-score.danger {
    color: #b91c1c;
}

.office-match-score.info {
    color: #1d4ed8;
}

.office-match-action {
    font-size: 15px;
    font-weight: 900;
    padding: 7px 12px;
}

@media (max-width: 640px) {
    .office-match-detail-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .office-match-versus {
        font-size: 20px;
        flex-wrap: wrap;
    }

    .office-match-score {
        font-size: 20px;
    }

    .office-match-result-wrap {
        justify-content: flex-start;
        flex-wrap: wrap;
        white-space: normal;
    }
}

/* Office V2：比賽資訊間距修正（只縮短隊名與比分距離，按鈕維持靠右） */
@media (min-width: 641px) {
    .office-match-detail-row {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        flex-wrap: nowrap;
    }

    .office-match-result-wrap {
        display: contents;
    }

    .office-match-score {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .office-match-action {
        margin-left: auto;
    }
}

.office-news-lines {
    display: grid;
    gap: 8px;
}

.office-news-line {
    display: block;
    position: relative;
    padding: 8px 10px 8px 12px;
    border-left: 3px solid rgba(22, 101, 52, 0.35);
    border-radius: 8px;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.5;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.office-news-line:hover {
    background: rgba(22, 101, 52, 0.055);
    border-left-color: #166534;
    transform: translateX(2px);
}

.office-news-line:hover .office-news-line-title {
    color: #166534;
}

.office-news-line-title {
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
}

.office-news-line-summary {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 400;
    color: #475569;
}

