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

/* =====================================
   BODY
===================================== */
body{

    min-height:100vh;

    font-family:
        Inter,
        Arial,
        sans-serif;

    background:
        linear-gradient(
            135deg,
            #020617,
            #0f172a,
            #111827
        );

    color:#fff;

    padding:35px;

    overflow-x:hidden;

    background-attachment:fixed;
}

body::before{

    content:'';

    position:fixed;

    inset:0;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(59,130,246,.08),
            transparent 25%
        ),

        radial-gradient(
            circle at 80% 80%,
            rgba(34,197,94,.06),
            transparent 25%
        ),

        radial-gradient(
            circle at 50% 50%,
            rgba(168,85,247,.05),
            transparent 35%
        );

    pointer-events:none;

    z-index:-1;
}

/* =====================================
   CONTAINER
===================================== */
.container{
    max-width:1600px;
    margin:auto;
}

/* =====================================
   HEADER
===================================== */
.header{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:20px;

    margin-bottom:35px;

    flex-wrap:wrap;
}

.header-title{

    font-size:42px;

    font-weight:900;

    letter-spacing:1px;

    background:
        linear-gradient(
            90deg,
            #ffffff,
            #93c5fd
        );

    -webkit-background-clip:text;

    -webkit-text-fill-color:transparent;

    text-shadow:
        0 0 25px rgba(59,130,246,.25);
}

.header-actions{

    display:flex;

    gap:14px;

    flex-wrap:wrap;
}

/* =====================================
   PREMIUM STATS
===================================== */
.stats-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(240px,1fr));

    gap:18px;

    margin-bottom:40px;
}

.stat-card{

    position:relative;

    overflow:hidden;

    padding:24px;

    border-radius:28px;

    background:
        linear-gradient(
            145deg,
            rgba(15,23,42,.92),
            rgba(30,41,59,.98)
        );

    border:
        1px solid rgba(255,255,255,.06);

    backdrop-filter:blur(18px);

    box-shadow:
        0 18px 40px rgba(0,0,0,.35);

    transition:.25s ease;
}

.stat-card:hover{

    transform:
        translateY(-6px);

    box-shadow:
        0 25px 50px rgba(0,0,0,.45);
}

.stat-card::before{

    content:'';

    position:absolute;

    width:220px;
    height:220px;

    border-radius:50%;

    top:-120px;
    right:-100px;

    filter:blur(70px);

    background:
        rgba(59,130,246,.18);
}

.stat-card.green::before{
    background:rgba(34,197,94,.18);
}

.stat-card.red::before{
    background:rgba(239,68,68,.18);
}

.stat-card.blue::before{
    background:rgba(59,130,246,.18);
}

.stat-label{

    color:#94a3b8;

    font-size:14px;

    margin-bottom:14px;
}

.stat-value{

    font-size:30px;

    font-weight:800;

    letter-spacing:.5px;
}

/* =====================================
   BUTTONS
===================================== */
.btn,
.add-btn,
.logout-btn{

    position:relative;

    overflow:hidden;

    border:none;

    cursor:pointer;

    transition:.25s ease;

    text-decoration:none;
}

.add-btn{

    padding:14px 22px;

    border-radius:18px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color:#fff;

    font-size:15px;

    font-weight:700;

    box-shadow:
        0 12px 25px rgba(37,99,235,.35);
}

.add-btn:hover{

    transform:
        translateY(-2px);

    box-shadow:
        0 18px 35px rgba(37,99,235,.45);
}

.fuel-btn{

    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #fbbf24
        );

    color:#111827;

    box-shadow:
        0 12px 25px rgba(245,158,11,.35);
}

.logout-btn{

    padding:14px 22px;

    border-radius:18px;

    background:
        rgba(255,255,255,.06);

    border:
        1px solid rgba(255,255,255,.08);

    color:#fff;

    font-weight:700;
}

.btn::before,
.add-btn::before{

    content:'';

    position:absolute;

    top:0;
    left:-120%;

    width:120%;
    height:100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.25),
            transparent
        );

    transition:.5s ease;
}

.btn:hover::before,
.add-btn:hover::before{

    left:120%;
}


/* =====================================
   PREMIUM SECTION DIVIDER
===================================== */
.section-divider{

    position:relative;

    display:flex;

    align-items:center;

    gap:18px;

    margin:
        55px 0 28px;

    font-size:28px;

    font-weight:900;

    letter-spacing:.5px;

    color:#fff;
}

.section-divider::before{

    content:'';

    flex:1;

    height:1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(59,130,246,.45)
        );
}

.section-divider::after{

    content:'';

    flex:1;

    height:1px;

    background:
        linear-gradient(
            90deg,
            rgba(59,130,246,.45),
            transparent
        );
}

/* =====================================
   GRID
===================================== */
#credits,
#fuelGrid{

    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(340px,1fr));

    gap:24px;
}

/* =====================================
   CARDS
===================================== */
.credit-card,
.fuel-card{

    position:relative;

    overflow:hidden;

    padding:24px;

    border-radius:30px;

    background:
        linear-gradient(
            145deg,
            rgba(15,23,42,.92),
            rgba(30,41,59,.96)
        );

    border:
        1px solid rgba(255,255,255,.06);

    backdrop-filter:blur(18px);

    box-shadow:
        0 18px 40px rgba(0,0,0,.35);

    transition:
        .25s ease,
        border .25s ease,
        box-shadow .25s ease;
}

.credit-card:hover,
.fuel-card:hover{

    transform:
        translateY(-6px);

    border:
        1px solid rgba(59,130,246,.35);

    box-shadow:
        0 25px 60px rgba(37,99,235,.18);
}

/* =====================================
   STATUS
===================================== */
.card-warning{

    border:
        1px solid rgba(245,158,11,.45);

    box-shadow:
        0 0 25px rgba(245,158,11,.18);
}

.card-danger{

    border:
        1px solid rgba(239,68,68,.45);

    box-shadow:
        0 0 30px rgba(239,68,68,.22);
}

/* =====================================
   TITLES
===================================== */
.credit-title,
.fuel-title{

    font-size:24px;

    font-weight:800;

    margin-bottom:18px;
}

/* =====================================
   INFO
===================================== */
.credit-info,
.fuel-info{

    margin-bottom:14px;

    color:#dbeafe;

    line-height:1.5;
}

/* =====================================
   PROGRESS
===================================== */
.progress{

    width:100%;

    height:10px;

    border-radius:50px;

    overflow:hidden;

    background:
        rgba(255,255,255,.05);

    margin:
        18px 0;
}

.progress-bar{

    height:100%;

    border-radius:50px;

    background:
        linear-gradient(
            90deg,
            #3b82f6,
            #60a5fa,
            #93c5fd
        );

    box-shadow:
        0 0 18px rgba(59,130,246,.45);

    transition:.35s ease;
}

/* =====================================
   ACTIONS
===================================== */
.actions{

    display:flex;

    gap:12px;

    margin-top:22px;

    flex-wrap:wrap;
}

.btn{

    flex:1;

    padding:14px;

    border-radius:16px;

    font-weight:700;

    font-size:14px;
}

.pay{

    background:
        linear-gradient(
            135deg,
            #16a34a,
            #22c55e
        );

    color:#fff;
}

.history{

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color:#fff;
}

.btn-disabled{

    opacity:.6;

    cursor:not-allowed;
}

/* =====================================
   DELETE BUTTON
===================================== */
.delete-card{

    position:absolute;

    top:14px;
    right:14px;

    width:38px;
    height:38px;

    border:none;

    border-radius:50%;

    background:
        rgba(239,68,68,.12);

    color:#fff;

    font-size:20px;

    cursor:pointer;

    backdrop-filter:blur(10px);

    transition:.25s ease;

    box-shadow:
        0 8px 18px rgba(239,68,68,.18);
}

.delete-card:hover{

    transform:scale(1.1);

    background:
        rgba(239,68,68,.22);

    box-shadow:
        0 12px 28px rgba(239,68,68,.35);
}

/* =====================================
   MODALS
===================================== */
.modal{

    position:fixed;

    inset:0;

    display:none;

    align-items:center;

    justify-content:center;

    background:
        rgba(0,0,0,.65);

    backdrop-filter:blur(8px);

    z-index:999;
}

.modal.active{
    display:flex;
}

.modal-content{

    position:relative;

    width:100%;

    max-width:700px;

    padding:32px;

    border-radius:32px;

    background:
        linear-gradient(
            145deg,
            rgba(15,23,42,.96),
            rgba(30,41,59,.98)
        );

    border:
        1px solid rgba(255,255,255,.08);

    box-shadow:
        0 35px 80px rgba(0,0,0,.55);
}

.modal-content h2{

    font-size:28px;

    margin-bottom:24px;
}

.close{

    position:absolute;

    top:18px;
    right:20px;

    font-size:28px;

    cursor:pointer;

    color:#94a3b8;
}

/* =====================================
   INPUTS
===================================== */
.modal input{

    width:100%;

    padding:15px 18px;

    margin-bottom:16px;

    border-radius:16px;

    border:
        1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.04);

    color:#fff;

    outline:none;

    transition:
        border .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.modal input:focus{

    border:
        1px solid rgba(59,130,246,.5);

    background:
        rgba(255,255,255,.08);

    box-shadow:
        0 0 18px rgba(59,130,246,.18);
}

.modal button{

    width:100%;

    padding:15px;

    border:none;

    border-radius:18px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color:#fff;

    font-weight:700;

    cursor:pointer;
}

/* =====================================
   HISTORY
===================================== */
.history-list{

    display:flex;

    flex-direction:column;

    gap:14px;

    margin-top:20px;

    max-height:420px;

    overflow:auto;
}

.history-item{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:16px;

    border-radius:18px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.05);
}

.history-date{

    color:#94a3b8;

    font-size:14px;
}

.history-amount{

    font-size:18px;

    font-weight:800;
}

.history-empty{

    padding:30px;

    text-align:center;

    color:#94a3b8;
}

/* =====================================
   PREMIUM FUEL HISTORY
===================================== */
.fuel-history-actions{

    display:flex;

    gap:14px;

    margin:
        18px 0 22px;

    flex-wrap:wrap;
}

.reset-btn{

    background:
        linear-gradient(
            135deg,
            #ef4444,
            #dc2626
        ) !important;

    color:white;

    box-shadow:
        0 10px 22px rgba(239,68,68,.28);
}

.reset-btn:hover{

    transform:
        translateY(-2px);

    box-shadow:
        0 16px 30px rgba(239,68,68,.38);
}

.fuel-history-wrapper{

    overflow:auto;

    border-radius:22px;

    border:
        1px solid rgba(255,255,255,.06);

    background:
        rgba(255,255,255,.03);

    backdrop-filter:blur(16px);
}

.fuel-history-table{

    width:100%;

    border-collapse:collapse;

    min-width:700px;
}

.fuel-history-table thead{

    background:
        linear-gradient(
            135deg,
            rgba(37,99,235,.18),
            rgba(59,130,246,.12)
        );
}

.fuel-history-table th{

    padding:18px;

    text-align:left;

    color:#fff;

    font-size:14px;

    letter-spacing:.4px;

    border-bottom:
        1px solid rgba(255,255,255,.08);
}

.fuel-history-table td{

    padding:18px;

    color:#dbeafe;

    border-bottom:
        1px solid rgba(255,255,255,.05);
}

.fuel-history-table tbody tr{

    transition:.2s ease;
}

.fuel-history-table tbody tr:hover{

    background:
        rgba(59,130,246,.08);
}

/* =====================================
   SCROLLBAR
===================================== */
::-webkit-scrollbar{
    width:8px;
    height:8px;
}

::-webkit-scrollbar-thumb{

    background:
        rgba(255,255,255,.12);

    border-radius:50px;
}

/* =====================================
   MOBILE
===================================== */
@media(max-width:768px){

    body{
        padding:18px;
    }

    .header{
        flex-direction:column;
        align-items:flex-start;
    }

    .header-title{
        font-size:34px;
    }

    #credits,
    #fuelGrid{

        grid-template-columns:1fr;
    }

    .actions{
        flex-direction:column;
    }

    .btn{
        width:100%;
    }

    .modal-content{
        padding:24px;
    }

    .fuel-history-table{
        min-width:600px;
    }
}
/* =====================================
   PREMIUM AUTH
===================================== */
.auth-page{

    min-height:100vh;

    display:flex;

    align-items:center;

    justify-content:center;

    padding:30px;
}

.auth-box{

    position:relative;

    width:100%;

    max-width:460px;

    padding:42px;

    border-radius:34px;

    overflow:hidden;

    background:
        linear-gradient(
            145deg,
            rgba(15,23,42,.96),
            rgba(30,41,59,.98)
        );

    border:
        1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(18px);

    box-shadow:
        0 35px 80px rgba(0,0,0,.55);
}

.auth-box::before{

    content:'';

    position:absolute;

    width:260px;
    height:260px;

    border-radius:50%;

    top:-120px;
    right:-120px;

    background:
        rgba(59,130,246,.16);

    filter:blur(80px);
}

.auth-title{

    position:relative;

    z-index:2;

    font-size:34px;

    font-weight:900;

    margin-bottom:28px;

    text-align:center;

    background:
        linear-gradient(
            90deg,
            #ffffff,
            #93c5fd
        );

    -webkit-background-clip:text;

    -webkit-text-fill-color:transparent;
}

.auth-form{

    position:relative;

    z-index:2;
}

.auth-input{

    width:100%;

    padding:16px 18px;

    margin-bottom:18px;

    border-radius:18px;

    border:
        1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.04);

    color:#fff;

    font-size:15px;

    outline:none;

    transition:
        border .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.auth-input:focus{

    border:
        1px solid rgba(59,130,246,.45);

    background:
        rgba(255,255,255,.08);

    box-shadow:
        0 0 22px rgba(59,130,246,.18);
}

.auth-btn{

    width:100%;

    padding:16px;

    border:none;

    border-radius:18px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color:#fff;

    font-size:16px;

    font-weight:800;

    cursor:pointer;

    transition:.25s ease;

    box-shadow:
        0 14px 28px rgba(37,99,235,.28);
}

.auth-btn:hover{

    transform:
        translateY(-2px);

    box-shadow:
        0 20px 40px rgba(37,99,235,.38);
}

.auth-footer{

    margin-top:22px;

    text-align:center;

    color:#94a3b8;

    font-size:14px;
}

.auth-footer a{

    color:#60a5fa;

    text-decoration:none;

    font-weight:700;
}