@page{
size:A4;
margin:20mm;
}

body{
font-family:Arial;
background:#f2f2f2;
}

.invoice{
width:210mm;
min-height:297mm;
background:white;
margin:auto;
padding:25px;
box-sizing:border-box;
display:flex;
flex-direction:column;
}

/* header */

.header{
display:flex;
align-items:center;
justify-content:space-between;
}

.main-logo{

width:120px;      /* fixed width */
height:50px;      /* fixed height */

object-fit:contain;

display:block;

margin:0 auto 5px auto;

}
.company{
flex:1;
text-align:center;
}

.company h2{
margin:0;
font-size:24px;
}

.company p{
margin:2px 0;
font-size:13px;
}

.date{
display:flex;
flex-direction:column;
align-items:flex-end;
font-size:13px;
}

.date input{
width:130px;
border:none;
text-align:right;
font-weight:bold;
background:transparent;
}

/* title */

.title{
text-align:center;
margin-top:15px;
padding:6px;
font-weight:bold;
border-top:2px solid black;
border-bottom:2px solid black;
}

/* info */

.info{
display:grid;
grid-template-columns:1fr 1fr;
gap:40px;
margin-top:25px;
}

.info label{
font-size:13px;
font-weight:bold;
}

.info input{
width:100%;
border:none;
border-bottom:2px solid black;
margin-bottom:18px;
background:transparent;
}

/* table */

table{
width:100%;
border-collapse:collapse;
margin-top:25px;
}

table, th, td{
border:1px solid black;
}

th{
background:#eee;
padding:8px;
}

td{
padding:6px;
}

td input{
width:100%;
border:none;
background:transparent;
}

/* buttons */

button{
margin-top:15px;
padding:8px;
border:1px solid black;
background:white;
cursor:pointer;
}

button:hover{
background:#eee;
}

/* total */

.total{
margin-top:25px;
text-align:right;
font-weight:bold;
}

.total input{
width:120px;
margin-left:10px;
}

.final{
margin-top:5px;
font-size:18px;
}

/* signature */

.signature{
margin-top:80px;
display:flex;
justify-content:space-between;
}

.signline{
width:250px;
border-top:2px solid black;
margin-bottom:5px;
}

/* actions */

.actions{
margin-top:25px;
display:flex;
gap:10px;
}

.actions button{
flex:1;
}

/* footer */

.footer{
margin-top:40px;
font-size:11px;
text-align:center;
border-top:1px solid #ccc;
padding-top:8px;
display:flex;
justify-content:space-between;
}

/* print */

@media print{

body{
background:white;
}

button{
display:none;
}

.invoice{
margin:0;
padding:0;
width:auto;
min-height:auto;
}

input{
border:none;
}

}
/* body */

body{
font-family:Arial, sans-serif;
margin:0;
padding:0;
background:#f5f5f5;
}



/* top buttons */

.top-buttons{
margin:15px;
}

.button{
display:inline-block;
padding:8px 15px;
background:#007bff;
color:white;
text-decoration:none;
border-radius:5px;
margin-right:8px;
font-size:14px;
}

.button:hover{
background:#0056b3;
}

.button.stock{
background:#28a745;
}

.button.stock:hover{
background:#1e7e34;
}



/* invoice box */

.invoice{
background:white;
width:900px;
margin:auto;
padding:20px;
box-shadow:0 0 10px rgba(0,0,0,0.1);
}



/* header */

.header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;
}

.main-logo{
width:120px;
margin-bottom:5px;
}



/* title */

.title{
text-align:center;
font-size:28px;
font-weight:bold;
margin-bottom:20px;
letter-spacing:2px;
}



/* info section */

.info{
display:flex;
justify-content:space-between;
margin-bottom:20px;
}

.info div{
width:48%;
}

.info label{
display:block;
font-size:13px;
margin-top:8px;
}

.info input{
width:100%;
padding:6px;
border:1px solid #ccc;
border-radius:4px;
}



/* table */

table{
width:100%;
border-collapse:collapse;
margin-bottom:15px;
}

table th{
background:#007bff;
color:white;
padding:8px;
font-size:14px;
}

table td{
border:1px solid #ddd;
padding:6px;
}

table input{
width:100%;
border:none;
outline:none;
padding:5px;
}



/* add button */

button{
padding:6px 12px;
border:none;
background:#007bff;
color:white;
border-radius:4px;
cursor:pointer;
}

button:hover{
background:#0056b3;
}



/* total */

.total{
margin-top:20px;
width:300px;
margin-left:auto;
}

.total div{
margin-bottom:8px;
font-size:15px;
}

.final{
font-size:18px;
font-weight:bold;
}



/* signature */

.signature{
display:flex;
justify-content:space-between;
margin-top:50px;
}

.signline{
border-top:1px solid black;
width:200px;
margin-bottom:5px;
}



/* footer */

.footer{
margin-top:40px;
font-size:12px;
display:flex;
justify-content:space-between;
border-top:1px solid #ccc;
padding-top:10px;
}



/* stock table */

.stock-table th{
background:#28a745;
color:white;
}

.add-btn{
background:#28a745;
}

.add-btn:hover{
background:#1e7e34;
}

.delete-btn{
background:red;
}

.delete-btn:hover{
background:darkred;
}
.login-box{

width:320px;
margin:120px auto;
padding:30px;

background:white;

border-radius:8px;

box-shadow:0 0 10px rgba(0,0,0,0.15);

text-align:center;

}

.login-box input{

width:100%;
padding:10px;
margin:8px 0;

border:1px solid #ccc;

border-radius:5px;

}

.login-box button{

width:100%;
padding:10px;

background:#0073aa;

color:white;

border:none;

border-radius:5px;

cursor:pointer;

}

.login-box button:hover{

background:#005177;

}