/* ==========================================================================
   GPF Calculator Bangladesh - Premium Design & Interaction Stylesheet
   Compliant with Finance Division GPF Rules, CGA Statements & Slabs (13%, 12%, 11%)
   ========================================================================== */

.gpfc-container {
    --gpfc-primary: #1e3a8a;
    --gpfc-primary-light: #eff6ff;
    --gpfc-secondary: #0d9488;
    --gpfc-accent: #f59e0b;
    --gpfc-success: #10b981;
    --gpfc-danger: #ef4444;
    --gpfc-dark: #0f172a;
    --gpfc-card-bg: #ffffff;
    --gpfc-border: #e2e8f0;
    --gpfc-text: #1e293b;
    --gpfc-muted: #64748b;
    --gpfc-radius: 14px;
    --gpfc-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --gpfc-glow: 0 0 0 3px rgba(30, 58, 138, 0.2);

    font-family: inherit;
    color: var(--gpfc-text);
    margin-bottom: 2.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Hero Section - Centered */
.gpfc-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0369a1 100%);
    color: #ffffff;
    padding: 2.2rem 2rem;
    border-radius: var(--gpfc-radius);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.3);
    text-align: center;
    box-sizing: border-box;
    width: 100%;
}

.gpfc-hero::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.gpfc-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin: 0 0 0.65rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.gpfc-hero-subtitle {
    font-size: 0.98rem;
    color: #bae6fd;
    margin: 0 auto;
    max-width: 820px;
    line-height: 1.55;
    text-align: center;
}

/* Tabs */
.gpfc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.4rem;
    border-radius: 12px;
    margin-bottom: 1.75rem;
    box-sizing: border-box;
    width: 100%;
}

.gpfc-tab-btn {
    flex: 1 1 175px;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    box-sizing: border-box;
}

.gpfc-tab-btn.active {
    background: #ffffff;
    color: var(--gpfc-primary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

/* Quick Pay Grade Presets */
.gpfc-presets-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px dashed var(--gpfc-border);
    border-radius: 10px;
    box-sizing: border-box;
    width: 100%;
}

.gpfc-presets-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.gpfc-preset-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.gpfc-preset-chip:hover {
    background: var(--gpfc-primary-light);
    border-color: var(--gpfc-primary);
    color: var(--gpfc-primary);
}

/* Grid Layout */
.gpfc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 1.5rem;
    align-items: start;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 1060px) {
    .gpfc-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.gpfc-col-inputs,
.gpfc-col-summary {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Cards */
.gpfc-card {
    background: var(--gpfc-card-bg);
    border: 1px solid var(--gpfc-border);
    border-radius: var(--gpfc-radius);
    padding: 1.5rem 1.25rem;
    box-shadow: var(--gpfc-shadow);
    margin-bottom: 1.5rem;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.gpfc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gpfc-border);
}

.gpfc-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gpfc-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gpfc-card-badge {
    font-size: 0.75rem;
    background: #e2e8f0;
    color: #475569;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

/* Form Fields */
.gpfc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.gpfc-col-full {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .gpfc-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.gpfc-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    box-sizing: border-box;
}

.gpfc-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.gpfc-label-sub {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--gpfc-muted);
}

.gpfc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gpfc-currency {
    position: absolute;
    left: 0.85rem;
    font-weight: 700;
    color: var(--gpfc-muted);
    pointer-events: none;
}

.gpfc-input {
    width: 100%;
    min-width: 0;
    padding: 0.75rem 0.85rem 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid var(--gpfc-border);
    border-radius: 9px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.gpfc-input:focus {
    outline: none;
    border-color: var(--gpfc-primary);
    box-shadow: var(--gpfc-glow);
}

.gpfc-select {
    width: 100%;
    min-width: 0;
    padding: 0.75rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid var(--gpfc-border);
    border-radius: 9px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.gpfc-select:focus {
    outline: none;
    border-color: var(--gpfc-primary);
    box-shadow: var(--gpfc-glow);
}

/* Ledger Table */
.gpfc-ledger-wrap {
    overflow-x: hidden !important;
    border: 1px solid var(--gpfc-border);
    border-radius: 10px;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
}

.gpfc-ledger-table {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #ffffff;
    table-layout: fixed;
    box-sizing: border-box;
}

.gpfc-ledger-table th {
    background: #f8fafc;
    color: #334155;
    padding: 0.6rem 0.25rem;
    text-align: center;
    font-weight: 700;
    border-bottom: 2px solid var(--gpfc-border);
    font-size: 0.82rem;
    box-sizing: border-box;
    overflow: hidden;
}

.gpfc-ledger-table th:first-child {
    text-align: left;
    padding-left: 0.6rem;
}

.gpfc-ledger-table th:nth-last-child(-n+2) {
    text-align: right;
    padding-right: 0.6rem;
}

.gpfc-ledger-table td {
    padding: 0.45rem 0.25rem;
    border-bottom: 1px solid var(--gpfc-border);
    vertical-align: middle;
    box-sizing: border-box;
    overflow: hidden;
}

.gpfc-ledger-table td:first-child {
    padding-left: 0.6rem;
}

.gpfc-ledger-table td:nth-last-child(-n+2) {
    padding-right: 0.6rem;
}

.gpfc-ledger-table tfoot td {
    background: #f8fafc;
    font-weight: 700;
    padding: 0.65rem 0.25rem;
    border-top: 2px solid var(--gpfc-border);
    box-sizing: border-box;
    font-size: 0.84rem;
}

.gpfc-ledger-table tfoot td:first-child {
    padding-left: 0.6rem;
}

.gpfc-ledger-table tfoot td:nth-last-child(-n+2) {
    padding-right: 0.6rem;
}

.gpfc-ledger-input {
    width: 100%;
    max-width: 78px;
    min-width: 0;
    margin: 0 auto;
    display: block;
    padding: 0.35rem 0.2rem;
    border: 1.5px solid var(--gpfc-border);
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
    box-sizing: border-box;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.gpfc-ledger-input::-webkit-outer-spin-button,
.gpfc-ledger-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gpfc-ledger-input:focus {
    outline: none;
    border-color: var(--gpfc-primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.12);
}

.gpfc-mob-label {
    display: none;
}

.gpfc-td-month {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gpfc-m-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.85rem;
    line-height: 1.2;
}

.gpfc-m-sub {
    font-size: 0.72rem;
    color: #64748b;
}

.gpfc-cell-val {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Summary Card Output */
.gpfc-summary-sticky {
    position: sticky;
    top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.gpfc-summary-card {
    background: #ffffff;
    border: 2px solid var(--gpfc-primary);
    border-radius: var(--gpfc-radius);
    padding: 1.75rem;
    box-shadow: 0 14px 35px -5px rgba(30, 58, 138, 0.15);
    box-sizing: border-box;
    width: 100%;
}

.gpfc-summary-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.gpfc-closing-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gpfc-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.gpfc-closing-amount {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--gpfc-primary);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.gpfc-interest-badge {
    background: #dcfce7;
    color: #15803d;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-block;
    word-break: break-word;
}

.gpfc-profit-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    box-sizing: border-box;
}

.gpfc-profit-box .label {
    font-size: 0.85rem;
    color: #166534;
    font-weight: 600;
}

.gpfc-profit-box .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #15803d;
    margin-top: 0.2rem;
}

.gpfc-breakdown-list {
    margin-bottom: 1.5rem;
}

.gpfc-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--gpfc-border);
    font-size: 0.88rem;
}

.gpfc-breakdown-row:last-child {
    border-bottom: none;
}

.gpfc-breakdown-row.highlight {
    font-weight: 700;
    background: #f8fafc;
    padding: 0.6rem 0.5rem;
    border-radius: 6px;
    border-bottom: none;
}

.gpfc-breakdown-val {
    font-weight: 700;
    color: #0f172a;
}

.gpfc-breakdown-val.profit {
    color: var(--gpfc-success);
}

.gpfc-breakdown-val.deduction {
    color: var(--gpfc-danger);
}

/* Actions */
.gpfc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.25rem;
    width: 100%;
}

.gpfc-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 9px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-sizing: border-box;
    text-align: center;
}

.gpfc-btn-print {
    background: #0f172a;
    color: #ffffff;
}

.gpfc-btn-print:hover {
    background: #1e293b;
}

.gpfc-btn-copy {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.gpfc-btn-copy:hover {
    background: #e2e8f0;
}

.gpfc-btn-reset {
    background: transparent;
    color: #ef4444;
    font-size: 0.82rem;
    padding: 0.4rem;
}

.gpfc-btn-reset:hover {
    text-decoration: underline;
}

/* Alerts */
.gpfc-alert {
    padding: 0.85rem 1rem;
    border-radius: 9px;
    font-size: 0.85rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.gpfc-alert-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}

.gpfc-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Retirement Projection Table */
.gpfc-proj-wrap {
    overflow-x: hidden !important;
    border: 1px solid var(--gpfc-border);
    border-radius: 10px;
    margin-top: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
}

.gpfc-proj-table {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    table-layout: fixed;
    box-sizing: border-box;
}

.gpfc-proj-table th {
    background: #f1f5f9;
    padding: 0.6rem 0.35rem;
    text-align: left;
    font-weight: 700;
    border: 1px solid var(--gpfc-border);
    box-sizing: border-box;
    font-size: 0.82rem;
}

.gpfc-proj-table td {
    padding: 0.5rem 0.35rem;
    border: 1px solid var(--gpfc-border);
    box-sizing: border-box;
    font-size: 0.83rem;
}

/* Tablet & Mobile Breakpoints - Zero Horizontal Scroll */
@media (min-width: 520px) and (max-width: 767px) {
    .gpfc-ledger-table tr.gpfc-month-row {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    .gpfc-td-input {
        grid-column: span 1 !important;
    }
    .gpfc-td-result {
        grid-column: span 2 !important;
    }
}

@media (max-width: 767px) {
    .gpfc-ledger-wrap,
    .gpfc-proj-wrap {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin-top: 0.5rem;
        overflow: visible !important;
    }

    .gpfc-ledger-table,
    .gpfc-ledger-table tbody,
    .gpfc-proj-table,
    .gpfc-proj-table tbody {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .gpfc-ledger-table thead,
    .gpfc-proj-table thead {
        display: none !important;
    }

    .gpfc-mob-label {
        display: block !important;
        font-size: 0.72rem;
        color: #64748b;
        font-weight: 600;
        margin-bottom: 3px;
        line-height: 1.2;
    }

    /* Month Card on Mobile */
    .gpfc-ledger-table tr.gpfc-month-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        background: #ffffff;
        border: 1px solid var(--gpfc-border) !important;
        border-radius: 12px;
        padding: 0.85rem !important;
        margin-bottom: 0.75rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
        box-sizing: border-box;
        width: 100%;
    }

    .gpfc-td-month {
        grid-column: 1 / -1 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        padding: 0 0 0.5rem 0 !important;
        border-bottom: 1px dashed var(--gpfc-border) !important;
        margin-bottom: 0.15rem;
        background: transparent !important;
    }

    .gpfc-m-name {
        font-weight: 700;
        font-size: 0.95rem;
        color: #0f172a;
    }

    .gpfc-m-sub {
        font-size: 0.78rem;
        color: #64748b;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 12px;
    }

    .gpfc-td-input {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        border-bottom: none !important;
        background: transparent !important;
    }

    .gpfc-td-input .gpfc-ledger-input {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.5rem 0.4rem !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        text-align: left !important;
        background: #f8fafc;
    }

    .gpfc-td-result {
        grid-column: span 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center;
        background: #f8fafc !important;
        padding: 0.5rem 0.65rem !important;
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
        text-align: left !important;
        margin-top: 0.2rem;
    }

    .gpfc-td-result .gpfc-cell-val {
        font-size: 0.92rem;
        font-weight: 700;
        color: #0f172a;
    }

    .gpfc-td-interest .gpfc-cell-val {
        color: #16a34a !important;
    }

    /* tfoot Totals Card on Mobile */
    .gpfc-ledger-table tfoot {
        display: block !important;
        width: 100% !important;
        margin-top: 0.75rem;
    }

    .gpfc-ledger-table tr.gpfc-tfoot-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        background: #eff6ff !important;
        border: 2px solid var(--gpfc-primary) !important;
        border-radius: 12px !important;
        padding: 0.85rem !important;
        box-sizing: border-box;
        width: 100%;
    }

    .gpfc-tf-month {
        grid-column: 1 / -1 !important;
        font-size: 1rem !important;
        font-weight: 800 !important;
        color: var(--gpfc-primary) !important;
        padding: 0 0 0.4rem 0 !important;
        border-bottom: 1px solid #bfdbfe !important;
        border-top: none !important;
        text-align: center !important;
        background: transparent !important;
    }

    .gpfc-tf-cell {
        display: flex !important;
        flex-direction: column !important;
        background: #ffffff !important;
        padding: 0.45rem 0.6rem !important;
        border-radius: 8px !important;
        border: 1px solid #cbd5e1 !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        text-align: left !important;
        box-sizing: border-box;
    }

    .gpfc-tf-cell span:last-child {
        font-size: 0.92rem;
        color: #0f172a;
        margin-top: 2px;
    }

    /* Projection Card on Mobile */
    .gpfc-proj-table tr.gpfc-proj-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.45rem !important;
        background: #ffffff;
        border: 1px solid var(--gpfc-border) !important;
        border-radius: 10px;
        padding: 0.75rem !important;
        margin-bottom: 0.65rem;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
        box-sizing: border-box;
        width: 100%;
    }

    .gpfc-proj-yr {
        grid-column: 1 / -1 !important;
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--gpfc-primary);
        padding: 0 0 0.35rem 0 !important;
        border: none !important;
        border-bottom: 1px dashed var(--gpfc-border) !important;
        background: transparent !important;
    }

    .gpfc-proj-cell {
        display: flex !important;
        flex-direction: column !important;
        font-size: 0.82rem;
        padding: 0.4rem 0.5rem !important;
        background: #f8fafc;
        border-radius: 6px;
        border: 1px solid #edf2f7 !important;
        text-align: left !important;
    }

    .gpfc-proj-val {
        font-weight: 700;
        font-size: 0.88rem;
        margin-top: 2px;
    }
}

@media (max-width: 640px) {
    .gpfc-hero {
        padding: 1.5rem 1rem;
    }
    .gpfc-hero-title {
        font-size: 1.35rem;
    }
    .gpfc-card {
        padding: 1.15rem 0.85rem;
    }
    .gpfc-summary-card {
        padding: 1.25rem 1rem;
    }
    .gpfc-closing-amount {
        font-size: 2.2rem;
    }
    .gpfc-tab-btn {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   Dark Mode Styles for GPF Calculator BD
   Matches TulBD Theme System ([data-theme="dark"] & .dark-theme)
   ========================================================================== */

[data-theme="dark"] .gpfc-container,
.dark-theme .gpfc-container,
body.dark-theme .gpfc-container {
    --gpfc-card-bg: #1e293b;
    --gpfc-border: #334155;
    --gpfc-text: #f8fafc;
    --gpfc-muted: #94a3b8;
    --gpfc-dark: #f8fafc;
    --gpfc-primary-light: rgba(14, 165, 233, 0.2);
    --gpfc-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    color: #f8fafc;
}

[data-theme="dark"] .gpfc-card,
.dark-theme .gpfc-card,
body.dark-theme .gpfc-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .gpfc-card-header,
.dark-theme .gpfc-card-header,
body.dark-theme .gpfc-card-header {
    border-bottom-color: #334155 !important;
}

[data-theme="dark"] .gpfc-card-title,
.dark-theme .gpfc-card-title,
body.dark-theme .gpfc-card-title {
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-card-badge,
.dark-theme .gpfc-card-badge,
body.dark-theme .gpfc-card-badge {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .gpfc-tabs,
.dark-theme .gpfc-tabs,
body.dark-theme .gpfc-tabs {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}

[data-theme="dark"] .gpfc-tab-btn,
.dark-theme .gpfc-tab-btn,
body.dark-theme .gpfc-tab-btn {
    color: #94a3b8 !important;
}

[data-theme="dark"] .gpfc-tab-btn:hover:not(.active),
.dark-theme .gpfc-tab-btn:hover:not(.active),
body.dark-theme .gpfc-tab-btn:hover:not(.active) {
    background: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-tab-btn.active,
.dark-theme .gpfc-tab-btn.active,
body.dark-theme .gpfc-tab-btn.active {
    background: #1e293b !important;
    color: #38bdf8 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .gpfc-presets-bar,
.dark-theme .gpfc-presets-bar,
body.dark-theme .gpfc-presets-bar {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .gpfc-presets-label,
.dark-theme .gpfc-presets-label,
body.dark-theme .gpfc-presets-label {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .gpfc-preset-chip,
.dark-theme .gpfc-preset-chip,
body.dark-theme .gpfc-preset-chip {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .gpfc-preset-chip:hover,
.dark-theme .gpfc-preset-chip:hover,
body.dark-theme .gpfc-preset-chip:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
}

[data-theme="dark"] .gpfc-label,
.dark-theme .gpfc-label,
body.dark-theme .gpfc-label {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .gpfc-label-sub,
.dark-theme .gpfc-label-sub,
body.dark-theme .gpfc-label-sub {
    color: #94a3b8 !important;
}

[data-theme="dark"] .gpfc-input,
.dark-theme .gpfc-input,
body.dark-theme .gpfc-input,
[data-theme="dark"] .gpfc-select,
.dark-theme .gpfc-select,
body.dark-theme .gpfc-select {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-select option,
.dark-theme .gpfc-select option,
body.dark-theme .gpfc-select option {
    background: #0f172a !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-input:focus,
.dark-theme .gpfc-input:focus,
[data-theme="dark"] .gpfc-select:focus,
.dark-theme .gpfc-select:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

[data-theme="dark"] .gpfc-unit-tag,
.dark-theme .gpfc-unit-tag,
body.dark-theme .gpfc-unit-tag {
    color: #94a3b8 !important;
}

/* Statement Table in Dark Mode */
[data-theme="dark"] .gpfc-table-wrap,
.dark-theme .gpfc-table-wrap,
body.dark-theme .gpfc-table-wrap {
    border-color: #334155 !important;
}

[data-theme="dark"] .gpfc-statement-table,
.dark-theme .gpfc-statement-table,
body.dark-theme .gpfc-statement-table {
    background: #0f172a !important;
}

[data-theme="dark"] .gpfc-statement-table th,
.dark-theme .gpfc-statement-table th,
body.dark-theme .gpfc-statement-table th {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .gpfc-statement-table td,
.dark-theme .gpfc-statement-table td,
body.dark-theme .gpfc-statement-table td {
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .gpfc-statement-table tr:hover,
.dark-theme .gpfc-statement-table tr:hover,
body.dark-theme .gpfc-statement-table tr:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

/* Summary Card in Dark Mode */
[data-theme="dark"] .gpfc-summary-card,
.dark-theme .gpfc-summary-card,
body.dark-theme .gpfc-summary-card {
    background: #1e293b !important;
    border-color: #0284c7 !important;
    box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.5) !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-closing-box,
.dark-theme .gpfc-closing-box,
body.dark-theme .gpfc-closing-box {
    background: rgba(2, 132, 199, 0.15) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
}

[data-theme="dark"] .gpfc-closing-amount,
.dark-theme .gpfc-closing-amount,
body.dark-theme .gpfc-closing-amount {
    color: #38bdf8 !important;
}

[data-theme="dark"] .gpfc-stat-row,
.dark-theme .gpfc-stat-row,
body.dark-theme .gpfc-stat-row {
    border-bottom-color: #334155 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .gpfc-stat-label,
.dark-theme .gpfc-stat-label,
body.dark-theme .gpfc-stat-label {
    color: #94a3b8 !important;
}

[data-theme="dark"] .gpfc-stat-val,
.dark-theme .gpfc-stat-val,
body.dark-theme .gpfc-stat-val {
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-proj-card,
.dark-theme .gpfc-proj-card,
body.dark-theme .gpfc-proj-card {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .gpfc-proj-cell,
.dark-theme .gpfc-proj-cell,
body.dark-theme .gpfc-proj-cell {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .gpfc-btn-print,
.dark-theme .gpfc-btn-print,
body.dark-theme .gpfc-btn-print {
    background: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-btn-print:hover,
.dark-theme .gpfc-btn-print:hover,
body.dark-theme .gpfc-btn-print:hover {
    background: #475569 !important;
}

[data-theme="dark"] .gpfc-btn-share,
.dark-theme .gpfc-btn-share,
body.dark-theme .gpfc-btn-share {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .gpfc-btn-share:hover,
.dark-theme .gpfc-btn-share:hover,
body.dark-theme .gpfc-btn-share:hover {
    background: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .gpfc-btn-reset,
.dark-theme .gpfc-btn-reset,
body.dark-theme .gpfc-btn-reset {
    color: #f87171 !important;
}

/* Printable Statement Sheet */
@media print {
    body * {
        visibility: hidden;
    }
    #gpfc-print-area, #gpfc-print-area * {
        visibility: visible;
    }
    #gpfc-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
        background: #ffffff;
        color: #000000;
    }
    .gpfc-actions, .gpfc-tabs, .gpfc-presets-bar {
        display: none !important;
    }
}
