*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, sans-serif;
}

body{
    background:#eef3f9;
    padding:10px;
}

.app-container{
    max-width:500px;
    margin:auto;
    background:#fff;
    border-radius:18px;
    padding:15px;
    box-shadow:0 4px 15px rgba(0,0,0,0.08);
}

/* HEADER */

.top-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.logo{
    width:125px;
    object-fit:contain;
}

.phone-area{
    display:flex;
    align-items:center;
    font-weight:bold;
    color:#0a3d91;
    font-size:14px;
}

.phone-icon{
    width:18px;
    height:18px;
    object-fit:contain;
    margin-right:5px;
}

/* TITLE */

.quote-title{
    text-align:center;
    margin-bottom:18px;
    color:#0a3d91;
    font-size:22px;
    font-weight:bold;
}

/* CUSTOMER DETAILS */

.customer-box{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-bottom:15px;
}

.customer-box input{
    height:45px;
    padding:10px 12px;
    border:1px solid #ccd5e0;
    border-radius:12px;
    font-size:15px;
    outline:none;
    background:#fff;
}

.customer-box input:focus{
    border-color:#0a3d91;
}

/* PRODUCT TABLE */

.product-table{
    width:100%;
}

.table-head{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr;
    gap:5px;
    background:#0a3d91;
    color:#fff;
    padding:10px 5px;
    border-radius:12px;
    font-size:13px;
    font-weight:bold;
    margin-bottom:5px;
    text-align:center;
}

.product-row{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr;
    gap:5px;
    align-items:center;
    background:#fafcff;
    padding:10px 5px;
    border-bottom:1px solid #e5eaf1;
    font-size:13px;
    min-height:58px;
}

.product-name{
    font-weight:600;
    color:#222;
    line-height:1.3;
}

.product-row input{
    width:100%;
    height:36px;
    border:1px solid #ccd5e0;
    border-radius:10px;
    text-align:center;
    font-size:14px;
    outline:none;
}

.product-row input:focus{
    border-color:#0a3d91;
}

.rate,
.amount{
    text-align:center;
    font-weight:bold;
    color:#0a3d91;
}

.qty-text{
    display:block;
    text-align:center;
    font-weight:bold;
    font-size:15px;
    color:#000;
}

/* TOTALS */

.totals-box{
    margin-top:20px;
    background:#f9fbff;
    border-radius:14px;
    padding:15px;
}

.line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
    font-size:15px;
    color:#222;
}

.discount-box,
.labour-box{
    display:flex;
    flex-direction:column;
}

.discount-box label,
.labour-box label{
    font-size:13px;
    margin-bottom:5px;
    color:#666;
    font-weight:600;
}

.discount-box input,
.labour-box input{
    height:40px;
    width:120px;
    padding:5px 10px;
    border-radius:10px;
    border:1px solid #ccd5e0;
    outline:none;
    font-size:14px;
}

.discount-box input:focus,
.labour-box input:focus{
    border-color:#0a3d91;
}

#subtotal,
#discount_amount,
#after_discount,
#labour_amount{
    font-weight:bold;
    color:#0a3d91;
}

#discount_amount{
    color:#d11a2a;
}

.grand-total{
    font-size:21px;
    font-weight:bold;
    color:#0a3d91;
    border-top:2px dashed #ccd5e0;
    padding-top:15px;
    margin-top:10px;
}

#grand_total{
    color:#0a3d91;
}

/* BUTTONS */

.btn-area{
    display:flex;
    gap:10px;
    margin-top:20px;
}

.btn-area button{
    flex:1;
    height:50px;
    border:none;
    border-radius:14px;
    background:#0a3d91;
    color:#fff;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    transition:0.2s;
}

.btn-area button:active{
    transform:scale(0.98);
}

/* QUOTE MODE */

.quote-mode{
    background:#fff;
}

.quote-input{
    border:none !important;
    background:transparent !important;
    padding-left:0 !important;
    font-weight:bold;
    color:#000;
}

/* PRINT */

@media print{

    body{
        background:#fff;
        padding:0;
    }

    .app-container{
        box-shadow:none;
        border-radius:0;
        max-width:100%;
    }

    .btn-area{
        display:none;
    }

    input{
        border:none !important;
        background:transparent !important;
    }

}

/* MOBILE OPTIMIZATION */

@media(max-width:480px){

    .logo{
        width:110px;
    }

    .phone-area{
        font-size:13px;
    }

    .table-head{
        font-size:11px;
    }

    .product-row{
        font-size:12px;
    }

    .product-row input{
        height:34px;
        font-size:13px;
    }

    .line{
        font-size:14px;
    }

    .grand-total{
        font-size:19px;
    }

}