/* ==========================================================================
   Salary Calculation & Certificate Generator Design System
   ========================================================================== */

:root {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-subtle: #f1f5f9;
    --border-color: #e2e8f0;
    --border-focus: #6366f1;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Times New Roman', Times, serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-certificate: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-navbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.92);
}

.nav-container {
    max-width: 1540px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.015em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease-in-out;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
    background-color: #ffffff;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-surface-subtle);
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-icon:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

.btn-storage-clear:hover {
    color: #b91c1c;
    border-color: #fca5a5;
    background-color: #fef2f2;
}

.storage-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #065f46;
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 9999px;
    transition: all 0.25s ease;
}

.storage-status-pill .status-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    transition: all 0.25s ease;
}

.storage-status-pill.saving {
    color: #92400e;
    background-color: #fef3c7;
    border-color: #fde68a;
}

.storage-status-pill.saving .status-dot {
    background-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.storage-status-pill.cleared {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.storage-status-pill.cleared .status-dot {
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   Stat Metric Strip
   ========================================================================== */

.metrics-strip {
    max-width: 1540px;
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.775rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    border-color: transparent;
    color: #ffffff;
}

.stat-card.highlight .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-card.highlight .stat-value {
    color: #ffffff;
}

/* ==========================================================================
   Main Application Layout (Two-Column)
   ========================================================================== */

.app-main {
    max-width: 1540px;
    margin: 1.5rem auto 3rem;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    width: 100%;
}

/* ==========================================================================
   Tabs Navigation
   ========================================================================== */

.tabs-nav {
    display: flex;
    gap: 0.35rem;
    background: #e2e8f0;
    padding: 0.35rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.25rem;
    width: fit-content;
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-family: inherit;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.18s ease-in-out;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content-panel {
    display: none;
    width: 100%;
}

.tab-content-panel.active {
    display: block;
}

/* Configuration Grid: Left Form & % Column (~400px), Right 12-Month Ledger (Flexible remaining width) */
.monthly-sheet-grid {
    display: grid;
    grid-template-columns: minmax(380px, 420px) 1fr;
    gap: 1.25rem;
    align-items: start;
    width: 100%;
}

.config-left-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.config-right-col {
    width: 100%;
    min-width: 0;
}

/* ==========================================================================
   Bank Transactions Table & Controls
   ========================================================================== */

/* ==========================================================================
   Monthly Salary Form & 12-Month Payroll Table
   ========================================================================== */

.month-form-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.month-form-header {
    background-color: #fafbfd;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.month-form-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.month-form-body {
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mode-pill-toggle {
    display: inline-flex;
    background: var(--bg-surface-subtle);
    padding: 3px;
    border-radius: var(--radius-sm);
    gap: 3px;
    margin-bottom: 0.25rem;
}

.mode-pill-btn {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.mode-pill-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.range-selectors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

/* Appendable Monthly Components */
.components-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.monthly-components-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.monthly-comp-row {
    display: grid;
    grid-template-columns: 1fr 130px 32px;
    gap: 0.5rem;
    align-items: center;
    background: #fafbfd;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #edf2f7;
    transition: all 0.15s ease-in-out;
}

.monthly-comp-row:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

/* Monthly Total Counter Banner */
.monthly-total-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-top: 0.25rem;
}

.monthly-total-label {
    font-size: 0.825rem;
    font-weight: 700;
    color: #3730a3;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.monthly-total-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

/* 12-Month Table */
.payroll-sheet-wrap {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.payroll-sheet-header {
    background-color: #fafbfd;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.payroll-table-container {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
}

.payroll-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.81rem;
}

.payroll-table th {
    background-color: #f8fafc;
    padding: 0.5rem 0.55rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    text-align: right;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.payroll-table th:first-child {
    text-align: left;
}

.payroll-table td {
    padding: 0.28rem 0.4rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
    vertical-align: middle;
    font-size: 0.81rem;
}

.payroll-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

.payroll-table tr:hover {
    background-color: #f8fafc;
}

.payroll-cell-input {
    width: 100%;
    font-size: 0.81rem;
    text-align: right;
    padding: 0.25rem 0.35rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    font-weight: 500;
    transition: all 0.15s;
}

.payroll-cell-input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.payroll-cell-input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.payroll-row-total {
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    padding-right: 0.35rem;
    white-space: nowrap;
}

.payroll-total-val {
    font-weight: 700;
    color: var(--primary);
    display: inline-block;
}

.payroll-bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 5px;
    vertical-align: middle;
    white-space: nowrap;
    cursor: help;
}

.payroll-tax-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #e11d48;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
    cursor: help;
}

.payroll-cell-input.inline-tax {
    color: #be123c;
    font-weight: 600;
}

.payroll-cell-input.inline-tax:hover {
    border-color: #fda4af;
    background: #fff1f2;
}

.payroll-cell-input.inline-tax:focus {
    border-color: #f43f5e;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.15);
}

.monthly-comp-row.is-deduction {
    background: #fff5f5;
    border-color: #fecdd3;
}

.monthly-comp-row.is-deduction:hover {
    background: #fff1f2;
    border-color: #fda4af;
}

.monthly-comp-row.is-deduction .currency-symbol {
    color: #e11d48;
    font-weight: 700;
}

.monthly-comp-row.is-deduction .comp-input-amount {
    color: #be123c;
    font-weight: 700;
}

.rate-tag.rate-deduct {
    background-color: #ffe4e6;
    color: #be123c;
    border-color: #fecdd3;
}

.payroll-table tfoot td {
    background-color: #f1f5f9;
    font-weight: 800;
    color: var(--text-main);
    border-top: 2px solid #cbd5e1;
    border-bottom: none;
    padding: 0.5rem 0.55rem;
    font-size: 0.83rem;
    white-space: nowrap;
}

.payroll-table tfoot td:first-child {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tx-table-wrap {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.tx-table th {
    background-color: #f8fafc;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    text-align: left;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    z-index: 5;
}

.tx-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.tx-table tr:hover {
    background-color: #f8fafc;
}

.tx-input-sm {
    width: 100%;
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
}

.tx-input-sm:focus {
    outline: none;
    border-color: var(--border-focus);
}

.category-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tag-salary { background-color: #e0f2fe; color: #0369a1; }
.tag-bonus { background-color: #fef3c7; color: #b45309; }
.tag-referral { background-color: #ecfdf5; color: #047857; }
.tag-overtime { background-color: #f3e8ff; color: #6b21a8; }
.tag-performance { background-color: #fee2e2; color: #b91c1c; }
.tag-other { background-color: #f1f5f9; color: #475569; }

/* Reconciliation Box */
.reconciliation-box {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.82rem;
}

.recon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.recon-row.strong {
    font-weight: 700;
    color: var(--text-main);
    border-top: 1px dashed #cbd5e1;
    padding-top: 0.45rem;
    font-size: 0.9rem;
}

/* Quick Paste Modal / Textarea */
.paste-box-wrap {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
}

.paste-box-wrap.active {
    display: flex;
}

.textarea-paste {
    width: 100%;
    height: 120px;
    font-family: monospace;
    font-size: 0.78rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    resize: vertical;
}

.config-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fafbfd;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Controls */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-size: 0.785rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.input-text,
.input-number,
.select-box {
    width: 100%;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-main);
    transition: all 0.15s ease-in-out;
}

.input-text:focus,
.input-number:focus,
.select-box:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.currency-prefix-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.currency-prefix-wrap .input-number {
    padding-left: 2.25rem;
}

/* Percentage Inputs Grid */
.pct-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.pct-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pct-symbol {
    position: absolute;
    right: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.pct-input-wrap .input-number {
    padding-right: 1.75rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

/* Dynamic Fixed Items List */
.fixed-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.fixed-item-row {
    display: grid;
    grid-template-columns: 1fr 120px 32px;
    gap: 0.5rem;
    align-items: center;
    background: #fafbfd;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #edf2f7;
}

.btn-add-dashed {
    width: 100%;
    padding: 0.6rem;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fafbfd;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-add-dashed:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* ==========================================================================
   Right Certificate Column (Live Preview)
   ========================================================================== */

.preview-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
}

.preview-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* The Official Printable Certificate Document */
.certificate-sheet {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 2.5rem 2.75rem;
    box-shadow: var(--shadow-certificate);
    color: #000000;
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.55;
    min-height: auto;
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.cert-statement {
    margin-bottom: 1.25rem;
    text-align: justify;
    font-size: 15px;
    line-height: 1.55;
}

.cert-statement strong {
    font-weight: 600;
}

/* Official 3-Column Certificate Table */
.cert-table {
    width: 100%;
    border-collapse: collapse;
    border: 1.5px solid #000000;
    margin-bottom: 0.75rem;
    font-family: var(--font-serif);
}

.cert-table th,
.cert-table td {
    border: 1px solid #000000;
    padding: 6.5px 12px;
    font-size: 14.5px;
    vertical-align: middle;
}

.cert-table thead th {
    font-weight: bold;
    text-align: center;
    background-color: #ffffff;
    padding: 8px 12px;
}

.cert-table .col-particulars {
    text-align: left;
    width: 50%;
}

.cert-table .col-rate {
    text-align: center;
    width: 25%;
    font-size: 13px;
    font-family: var(--font-sans);
}

.cert-table .col-amount {
    text-align: right;
    width: 25%;
    font-weight: 500;
}

/* Rate Tag inside table */
.rate-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rate-pct {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.rate-fixed {
    background-color: #f8fafc;
    color: #64748b;
}

/* Total Row Styling */
.cert-table tr.total-row td {
    font-weight: bold;
    font-size: 15px;
}

.cert-table tr.total-row .col-amount {
    border-bottom: 3px double #000000;
}

/* Words in Taka Row */
.taka-words-wrap {
    margin-top: 0.85rem;
    display: flex;
    align-items: flex-start;
    font-size: 14.5px;
    font-family: var(--font-serif);
}

.taka-words-label {
    font-weight: bold;
    white-space: nowrap;
    margin-right: 10px;
}

.taka-words-content {
    font-weight: bold;
    color: #000000;
    flex: 1;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    .monthly-sheet-grid,
    .bonuses-pct-grid {
        grid-template-columns: 1fr;
    }
    .metrics-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-strip {
        grid-template-columns: 1fr;
    }
    .certificate-sheet {
        padding: 1.5rem;
    }
    .cert-table th, .cert-table td {
        padding: 4px 6px;
        font-size: 13px;
    }
}
