/* Progmera Savitarna */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --pg-green:  #3C841A;
    --pg-dark:   #03241E;
    --pg-green2: #2d6614;
    --pg-light:  #f0f7ec;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: #f5f5f5;
    color: #222;
}

h1, h2, h3, h4, .navbar-brand {
    font-family: 'Exo 2', sans-serif;
}

/* ── Navbar ─────────────────────────────────── */
.sav-navbar {
    background: var(--pg-dark);
    padding: .6em 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
}
.sav-navbar .brand {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.2em;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: .03em;
}
.sav-navbar .brand span { color: var(--pg-green); }
.sav-navbar .user-info {
    font-size: .85em;
    color: #adc;
    text-align: right;
}
.sav-navbar .user-name { }
.sav-navbar .user-code {
    font-size: 1em;
    color: #aee;
    margin-top: .15em;
    text-align: center;
    font-weight: 600;
    letter-spacing: .04em;
}
.sav-navbar .btn-logout {
    background: none;
    border: 1px solid #aaa;
    color: #ccc;
    padding: .25em .8em;
    border-radius: 4px;
    font-size: .8em;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.sav-navbar .btn-logout:hover { background: rgba(255,255,255,.1); }

/* ── Sidebar nav ─────────────────────────────── */
.sav-sidenav {
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 1em 0;
    min-height: calc(100vh - 50px);
}
.sav-sidenav a {
    display: flex;
    align-items: center;
    gap: .5em;
    padding: .65em 1.2em;
    color: #333;
    text-decoration: none;
    font-size: .92em;
    border-left: 3px solid transparent;
    transition: background .15s;
}
.sav-sidenav a:hover  { background: var(--pg-light); color: var(--pg-green); }
.sav-sidenav a.active { background: var(--pg-light); color: var(--pg-green); border-left-color: var(--pg-green); font-weight: 600; }
.sav-sidenav .nav-icon { width: 1.2em; text-align: center; }

/* ── Content ─────────────────────────────────── */
.sav-content {
    padding: 1.5em;
    max-width: 900px;
}

/* ── Cards ───────────────────────────────────── */
.sav-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 1.2em 1.5em;
    margin-bottom: 1.2em;
}
.sav-card h5 {
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #888;
    margin-bottom: .3em;
}

/* ── Balance card ────────────────────────────── */
.balance-card { border-left: 4px solid var(--pg-green); }
.balance-card.debt { border-left-color: #c0392b; }
.balance-amount {
    font-size: 2.2em;
    font-weight: 700;
    font-family: 'Exo 2', sans-serif;
    color: var(--pg-green);
    line-height: 1;
}
.balance-amount.debt { color: #c0392b; }

/* ── Quick action buttons ────────────────────── */
.sav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6em;
    margin-bottom: 1.5em;
}
.sav-btn {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    padding: .55em 1.2em;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: .9em;
    font-family: 'Open Sans', sans-serif;
    text-decoration: none;
    transition: filter .15s;
}
.sav-btn:hover { filter: brightness(.9); text-decoration: none; }
.sav-btn-primary { background: var(--pg-green); color: #fff; }
.sav-btn-outline  { background: #fff; color: var(--pg-green); border: 1px solid var(--pg-green); }

/* ── Table ───────────────────────────────────── */
.sav-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
}
.sav-table th {
    background: #f8f8f8;
    border-bottom: 2px solid #e0e0e0;
    padding: .5em .8em;
    text-align: left;
    font-weight: 600;
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #666;
}
.sav-table td {
    padding: .55em .8em;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.sav-table tr:hover td { background: #fafff8; }

/* ── Login page ──────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pg-dark) 0%, #1a4030 100%);
    padding: 1em;
}
.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 2.5em 2em;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,.3);
}
.login-logo {
    text-align: center;
    margin-bottom: 1.5em;
}
.login-logo .logo-text {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--pg-dark);
}
.login-logo .logo-text span { color: var(--pg-green); }
.login-logo .logo-sub {
    font-size: .85em;
    color: #888;
    margin-top: .1em;
}
.sav-input {
    width: 100%;
    padding: .7em .9em;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
    transition: border-color .2s;
}
.sav-input:focus { outline: none; border-color: var(--pg-green); box-shadow: 0 0 0 3px rgba(60,132,26,.12); }
.sav-input-otp {
    text-align: center;
    font-size: 2em;
    font-family: 'Exo 2', sans-serif;
    letter-spacing: .3em;
    font-weight: 700;
}
.login-hint { font-size: .82em; color: #888; margin: .4em 0 .8em; }
.alert-err { background: #fdecea; color: #c0392b; border: 1px solid #f5b7b1; border-radius: 5px; padding: .6em .9em; margin-bottom: .8em; font-size: .9em; }
.alert-ok  { background: #eafbe7; color: #217a35; border: 1px solid #a9dfb2; border-radius: 5px; padding: .6em .9em; margin-bottom: .8em; font-size: .9em; }

/* ── Badge ───────────────────────────────────── */
.badge-ok   { background: #e8f5e9; color: #2e7d32; padding: .2em .6em; border-radius: 20px; font-size: .78em; font-weight: 600; }
.badge-warn { background: #fff3e0; color: #e65100; padding: .2em .6em; border-radius: 20px; font-size: .78em; font-weight: 600; }
.badge-gray { background: #f0f0f0; color: #666;    padding: .2em .6em; border-radius: 20px; font-size: .78em; }

/* ── Services block ──────────────────────────── */
.svc-mobile { display: none; }
.svc-mob-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .8em;
    padding: .7em 0;
    border-bottom: 1px solid #f0f0f0;
}
.svc-mob-name { flex: 1; font-size: .9em; font-weight: 600; }
.svc-mob-adr  { font-size: .78em; color: #aaa; font-weight: 400; margin-top: .15em; }
.svc-mob-right { text-align: right; flex-shrink: 0; }
.svc-mob-price { font-size: 1.05em; font-weight: 700; }
.svc-mob-old   { font-size: .78em; color: #aaa; text-decoration: line-through; }
.svc-mob-disc  { font-size: .78em; color: #2e7d32; font-weight: 600; }
.svc-mob-isip  { font-size: .75em; color: #888; margin-top: .15em; }
.svc-mob-isip.active { color: #c0392b; }
.svc-mob-total {
    display: flex;
    justify-content: space-between;
    padding: .7em 0 .2em;
    font-weight: 700;
    font-size: .92em;
    border-top: 2px solid #bbb;
    margin-top: .2em;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
    /* Layout: content viršuje, nav apačioje */
    .sav-main-wrap {
        flex-direction: column-reverse !important;
        min-height: unset !important;
    }
    /* Bottom tab bar */
    .sav-sidenav {
        width: 100% !important;
        min-height: unset;
        border-right: none;
        border-top: 1px solid #e0e0e0;
        padding: 0;
        display: flex;
        flex-direction: row;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(0,0,0,.08);
    }
    .sav-sidenav a {
        flex: 1;
        flex-direction: column;
        justify-content: center;
        padding: .5em .2em .4em;
        font-size: .65em;
        gap: .15em;
        border-left: none;
        border-top: 3px solid transparent;
        text-align: center;
    }
    .sav-sidenav a.active {
        border-left: none;
        border-top-color: var(--pg-green);
    }
    .sav-sidenav .nav-icon { font-size: 1.4em; width: auto; }
    /* Content padding + bottom nav aukštis */
    .sav-content {
        padding: 1em .8em;
        padding-bottom: 75px;
        max-width: 100%;
    }
    .balance-amount { font-size: 1.8em; }
    /* Lentelės su scroll */
    .sav-card { padding: 1em; overflow-x: auto; }
    .sav-table { min-width: 400px; }
    /* Paslaugos: kortelės vietoj lentelės */
    .svc-desktop { display: none; }
    .svc-mobile  { display: block; }
    /* Navbar kompaktiškas */
    .sav-navbar .user-info { font-size: .72em; }
    .sav-navbar .user-code { font-size: .85em; }
}
