:root {
    --eobi: #1a7a45;
    --eobi-dark: #0f5c32;
    --eobi-soft: #e8f5ec;
    --gold: #c9a227;
    --ink: #1d2a22;
    --muted: #5d6e63;
    --paper: #f4f7f4;
    --card: #ffffff;
    --shadow: 0 12px 30px rgba(16, 70, 40, 0.08);
}

* { box-sizing: border-box; }

html, body {
    min-height: 100%;
    scroll-padding-top: 210px;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--ink);
    background: var(--paper);
}

.app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 400px at -10% -10%, rgba(26, 122, 69, 0.14), transparent 50%),
        radial-gradient(700px 320px at 110% 0%, rgba(201, 162, 39, 0.16), transparent 46%),
        radial-gradient(600px 300px at 80% 110%, rgba(56, 139, 196, 0.12), transparent 50%),
        #f4f7f4;
}

.site-chrome {
    z-index: 1030;
    box-shadow: 0 8px 24px rgba(15, 60, 30, 0.08);
}

.site-header {
    background: #fff;
    border-bottom: 3px solid var(--eobi);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 10px 0;
}

.site-header-logo {
    height: 118px;
    width: auto;
    max-width: 340px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}

.site-header-copy {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.site-header-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(1.05rem, 2.4vw, 1.65rem);
    font-weight: 700;
    color: #163d28;
    margin: 0;
    letter-spacing: .03em;
    line-height: 1.25;
    text-transform: uppercase;
}

.site-header-sub {
    margin: 4px 0 0;
    font-size: clamp(.92rem, 1.6vw, 1.12rem);
    font-weight: 600;
    color: #3f5b4a;
}

.site-header-dept {
    margin: 2px 0 0;
    font-size: .85rem;
    color: var(--muted);
}

.app-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #dbe8de;
    padding-top: .35rem;
    padding-bottom: .35rem;
}

.navbar-label {
    font-weight: 600;
    color: var(--eobi-dark);
}

.app-nav .nav-link {
    color: #355043;
    font-weight: 500;
    border-radius: 999px;
    padding: .45rem .8rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .92rem;
    transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
    transform: translateY(0);
    will-change: transform;
}

.app-nav .nav-link i { color: var(--eobi); transition: color .18s ease; }
.app-nav .nav-link.active,
.app-nav .nav-link:hover {
    background: var(--eobi-soft);
    color: var(--eobi-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(26, 122, 69, 0.12);
}

.app-nav .nav-link:active {
    transform: translateY(1px) scale(0.96);
    box-shadow: 0 1px 3px rgba(26, 122, 69, 0.16);
    background: #d7ebdd;
}

.btn-ghost {
    border: 1px solid #d5e5d9;
    background: #fff;
    color: var(--eobi-dark);
}

.btn-logout {
    background: #fff4f1;
    color: #b42318;
    border: 1px solid #f3cfc8;
}

.fuel-ticker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(420px, 52vw);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #c9a227;
    background: linear-gradient(90deg, #fff8e8, #ffffff 55%, #eef8f1);
    color: #163d28;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.45);
    animation: fuelTickerBlink 1.6s ease-in-out infinite;
}

.fuel-ticker:hover {
    color: #0f5c32;
    text-decoration: none;
}

.fuel-ticker-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #8a6d12;
}

.fuel-ticker-product {
    font-size: .72rem;
    font-weight: 600;
    color: #5d6e63;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fuel-ticker-price {
    font-size: .88rem;
    font-weight: 800;
    color: #0f5c32;
}

@keyframes fuelTickerBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.35);
    }
    50% {
        opacity: 0.72;
        box-shadow: 0 0 0 6px rgba(201, 162, 39, 0);
    }
}

@media (max-width: 1199.98px) {
    .fuel-ticker {
        max-width: 100%;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 575.98px) {
    .fuel-ticker-product { display: none; }
}

.page-title {
    font-weight: 700;
    letter-spacing: -.02em;
}

.page-kicker {
    color: var(--muted);
    font-size: .9rem;
}

.stat-card {
    border: 0;
    border-radius: 22px;
    color: #fff;
    overflow: hidden;
    position: relative;
    min-height: 132px;
    box-shadow: var(--shadow);
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -28px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
}

.stat-card .icon-bubble {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.2);
    font-size: 1.2rem;
}

.stat-card .label {
    opacity: .9;
    font-size: .84rem;
}

.stat-card .value {
    font-size: 1.55rem;
    font-weight: 700;
}

.stat-open { background: linear-gradient(135deg, #3a8bfd, #5bb4ff); }
.stat-expense { background: linear-gradient(135deg, #ef6b57, #f3a261); }
.stat-remain { background: linear-gradient(135deg, #1a7a45, #3cbf7a); }
.stat-closed { background: linear-gradient(135deg, #7b62d0, #b388ea); }
.stat-heads { background: linear-gradient(135deg, #d4a017, #f0c14b); color: #3b2a00; }
.stat-accounts { background: linear-gradient(135deg, #1d9bb3, #4ecdc4); }

.panel {
    background: var(--card);
    border: 1px solid #e3eee6;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.panel-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eef4ef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: .78rem;
    font-weight: 600;
}

.chip-open { background: #e7f8ee; color: #157347; }
.chip-closed { background: #f1f0ff; color: #5b4bb4; }

.btn-eobi {
    background: var(--eobi);
    border-color: var(--eobi);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
}

.btn-eobi:hover { background: var(--eobi-dark); color: #fff; }

.btn-gold {
    background: linear-gradient(135deg, #d4a017, #f0c14b);
    border: 0;
    color: #3b2a00;
    font-weight: 700;
    border-radius: 12px;
}

.table thead th {
    background: #f3faf5;
    color: #355043;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid #dbe8de;
}

.table td, .table th { vertical-align: middle; }

.guest-body {
    min-height: 100vh;
    background:
        radial-gradient(800px 400px at 0% 0%, rgba(26,122,69,.18), transparent 50%),
        radial-gradient(700px 400px at 100% 100%, rgba(201,162,39,.18), transparent 50%),
        #eef6f0;
}

.login-card {
    max-width: 1080px;
    margin: 4vh auto;
    background: #fff;
    border: 1px solid rgba(15, 92, 50, .28);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 0 0 8px rgba(26, 122, 69, .08),
        0 22px 48px rgba(15, 60, 30, .22);
    min-height: 560px;
}

.login-hero {
    background: #fff;
    color: #163d28;
    min-height: 560px;
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.login-hero-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.login-hero img {
    width: min(92%, 380px);
    height: auto;
    max-height: 340px;
    object-fit: contain;
    background: #fff;
    border-radius: 24px;
    padding: 18px;
}

.login-hero-dept {
    margin: 1rem 0 0;
    font-weight: 600;
    letter-spacing: .04em;
    color: #1a7a45;
}

.login-hero-foot {
    margin: .75rem 0 0;
    font-size: .82rem;
    color: #5d6e63;
    text-align: center;
}

.login-form-pane {
    background: linear-gradient(160deg, #0f5c32 0%, #1a7a45 55%, #2ea567 100%);
    color: #fff;
}

.login-kicker {
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    color: #f0c14b;
}

.login-form-pane h2 {
    color: #fff;
}

.login-form-pane .form-label,
.login-form-pane .form-check-label {
    color: #e8f5ec;
}

.login-form-pane .form-control {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    color: #163d28;
}

.login-form-pane .form-control:focus {
    border-color: #f0c14b;
    box-shadow: 0 0 0 .25rem rgba(240, 193, 75, .28);
}

.login-form-pane .form-check-input {
    background-color: #fff;
    border-color: #c5d6c9;
}

.login-form-pane .btn-eobi {
    background: #fff;
    border-color: #fff;
    color: #0f5c32;
}

.login-form-pane .btn-eobi:hover {
    background: #f0c14b;
    border-color: #f0c14b;
    color: #3b2a00;
}

.letterhead {
    background: #fff;
    border: 1px solid #c9dccf;
    border-radius: 18px;
    min-width: 1080px;
    padding: 22px 28px 16px;
    box-shadow: inset 0 0 0 6px #f7fbf8, 0 16px 40px rgba(16,70,40,.08);
}

.lh-heading {
    font-family: 'Libre Baskerville', serif;
    color: #163d28;
    margin: 0;
    letter-spacing: .02em;
}

.lh-sub {
    margin: 2px 0 0;
    color: #3f5b4a;
    font-weight: 600;
}

.lh-dept {
    color: var(--muted);
    font-size: .92rem;
}

.lh-title {
    font-family: 'Libre Baskerville', serif;
    text-align: center;
    letter-spacing: .18em;
    font-size: 1.2rem;
    margin: .3rem 0 .2rem;
    color: #123525;
}

.lh-logo {
    width: 92px;
    height: 92px;
    object-fit: contain;
}

.sheet-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
}

.pc-table {
    font-size: 14px;
}

.pc-table th,
.pc-table td {
    padding: 2px 4px;
    vertical-align: middle;
    font-size: 14px;
}

.pc-table input,
.pc-table select {
    min-width: 0;
    font-size: 14px;
    height: 28px;
    padding: 1px 6px;
    line-height: 1.2;
}

.pc-table .pay-mode-hint {
    font-size: 12px;
    line-height: 1.1;
    margin-bottom: 1px;
}

.pc-table .cheque-no {
    margin-top: 2px;
}

.pc-table .btn-sm {
    padding: 1px 6px;
    font-size: 13px;
    line-height: 1.2;
}

.pc-table th {
    white-space: nowrap;
}

.live-stats .stat-card { min-height: 110px; }

.pc-voucher {
    position: relative;
    background: #fff;
    border: 1px solid #1a3d28;
    padding: 18px 20px 16px;
    max-width: 920px;
    margin: 0 auto;
    box-shadow: 0 16px 40px rgba(16,70,40,.08);
}

.pc-sba {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: .06em;
    color: #123525;
    margin: 0 0 10px;
    font-size: .95rem;
}

.pc-sba-line {
    display: inline-block;
    min-width: 120px;
    border-bottom: 1px solid #163d28;
    margin-left: 6px;
    vertical-align: baseline;
    height: 1em;
}

.pc-voucher-remove {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 1px solid #e3c4c0;
    background: #fff;
    color: #b42318;
    border-radius: 8px;
    line-height: 1;
    font-size: 1.2rem;
}

.pc-letterhead-table,
.pc-body-table,
.pc-alloc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.pc-head {
    position: relative;
    display: block;
    min-height: 120px;
    margin-bottom: 2px;
}

.pc-head-logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 112px;
}

.pc-head-logo img {
    width: 112px;
    height: 112px;
    object-fit: contain;
}

.pc-head-titles {
    text-align: center;
    padding: 8px 310px 0 120px;
}

.pc-inst-line {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: .03em;
    color: #123525;
    line-height: 1.3;
    font-size: .92rem;
}

.pc-sub-line {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    font-weight: 600;
    font-size: .95rem;
    color: #3f5b4a;
    margin-top: 6px;
}

.pc-head-meta {
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
}

.pc-meta-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    margin-bottom: 4px;
    font-size: .82rem;
}

.pc-meta-row span:first-child {
    text-align: right;
    font-weight: 700;
    color: #355043;
}

.pc-meta-row span:last-child {
    font-weight: 600;
    border-bottom: 1px solid #c5d6c9;
    padding: 0 4px 1px;
    min-height: 1.2em;
    white-space: nowrap;
}

.pc-dept-line {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1rem;
    color: #3f5b4a;
    white-space: nowrap;
    text-align: center;
    letter-spacing: .04em;
    padding: 10px 0 2px;
    clear: both;
}

.pc-fy {
    font-size: .85rem;
    color: #5d6e63;
    text-align: center;
    padding: 0 0 8px;
}


.pc-meta-label {
    width: 130px;
    font-size: .82rem;
    font-weight: 700;
    text-align: right;
    padding: 3px 8px;
    color: #355043;
}

.pc-meta-value {
    width: 220px;
    padding: 3px 0;
    font-weight: 600;
}

.pc-body-table th {
    width: 130px;
    text-align: left;
    font-weight: 600;
    padding: 6px 8px 6px 0;
    color: #1d2a22;
    background: transparent;
    text-transform: none;
    letter-spacing: 0;
}

.pc-body-table td { padding: 4px 0; }

.pc-split {
    display: grid;
    grid-template-columns: 0.9fr 1.25fr;
    gap: 20px;
    margin: 10px 0 14px;
    align-items: start;
}

.pc-pay-block {
    padding-top: 4px;
}

.pc-pay-amount {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.pc-pay-rs {
    font-weight: 700;
}

.pc-pay-underline {
    display: inline-block;
    min-width: 120px;
    border-bottom: 1px solid #163d28;
    padding: 0 6px 2px;
    font-weight: 700;
    text-align: center;
}

.pc-pay-mode {
    font-weight: 700;
    margin: 10px 0 12px;
}

.pc-pay-cheque {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.pc-pay-no-label,
.pc-pay-dated-label {
    font-weight: 600;
}

.pc-pay-no {
    min-width: 90px;
}

.pc-pay-dated {
    min-width: 100px;
}

.pc-ledger-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pc-ledger-box {
    border: 1px solid #163d28;
    padding: 8px 10px 10px;
}

.pc-rs-row {
    display: grid;
    grid-template-columns: auto 1fr auto 90px;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.pc-rs-label, .pc-tax-label { font-weight: 700; }

.pc-block-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.pc-post-line {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 28px 88px;
    gap: 6px;
    align-items: end;
    margin-bottom: 6px;
    font-size: .86rem;
}

.pc-ac-fill,
.pc-ac-amt {
    border-bottom: 1px solid #8eae97;
    min-height: 1.25em;
    padding: 0 4px 1px;
}

.pc-ac-amt {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.pc-signs {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 28px 0 4px;
}

.pc-signs td {
    width: 33.33%;
    text-align: center;
    vertical-align: top;
    font-weight: 700;
    font-size: .9rem;
    padding: 4px 10px 0;
    word-break: break-word;
}

.pc-sign-line {
    display: block;
    margin: 22px 12px 0;
    border-bottom: 1px solid #8eae97;
}

.pc-alloc-table {
    margin-top: 18px;
    margin-bottom: 0;
    table-layout: fixed;
}

.pc-alloc-table th,
.pc-alloc-table td {
    border: 1px solid #8eae97;
    padding: 8px;
    text-align: center;
}

.pc-alloc-table th {
    background: #f3faf5;
    font-size: .78rem;
    letter-spacing: .03em;
}

.pc-alloc-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.pc-alloc-num {
    text-align: right !important;
    font-weight: 700;
    white-space: nowrap;
}

.pc-voucher-view .pc-meta-value,
.pc-voucher-view .pc-fill {
    min-height: 1.4em;
    border-bottom: 1px solid #c5d6c9;
    padding: 2px 6px;
}

@media (max-width: 767px) {
    .pc-split, .pc-rs-row, .pc-post-line {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .stat-card .value { font-size: 1.25rem; }
    .login-card { margin: 0; border-radius: 0; min-height: 100vh; }
    .login-hero { min-height: 42vh; }
    .login-hero img { width: min(72%, 280px); max-height: 240px; }
    .site-header-inner {
        gap: 14px;
        padding: 10px 0;
    }
    .site-header-logo {
        height: 88px;
        max-width: 200px;
    }
}

.js-amount,
.amount-input,
.gl-allot,
.tax-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
