/* =====================================================
   PEEPTOON GST INVOICE MAKER
   style.css
   ===================================================== */

/* --------------------------
   THEME
-------------------------- */

:root{

    --primary:#D4AF37;
    --primary-dark:#b48d15;

    --border:#d9d9d9;

    --bg:#f3f4f6;

    --white:#ffffff;

    --text:#222;

    --radius:6px;

    --shadow:0 8px 25px rgba(0,0,0,.08);

}

/* --------------------------
   RESET
-------------------------- */

*{

margin:0;
padding:0;
box-sizing:border-box;

}

html{

scroll-behavior:smooth;

}

body{

font-family:"Segoe UI",Arial,sans-serif;

background:var(--bg);

color:var(--text);

padding:25px;

line-height:1.4;

}

/* --------------------------
   A4 INVOICE
-------------------------- */

.invoice{

width:210mm;

min-height:297mm;

margin:auto;

background:#fff;

padding:30px;

border-radius:8px;

box-shadow:var(--shadow);

border:1px solid #ddd;

overflow:hidden;

}

/* --------------------------
   HEADER
-------------------------- */

/* ================= HEADER ================= */

.header{

display:flex;

justify-content:space-between;

align-items:flex-start;

gap:25px;

border-bottom:2px solid #d4af37;

padding-bottom:20px;

margin-bottom:20px;

}

.header-left{

flex:2;

display:flex;

gap:18px;

}

.logo{

width:80px;

height:80px;

object-fit:contain;

}

.company-info{

flex:1;

}

.company-info input{

margin-bottom:8px;

font-weight:600;

}

.company-info textarea{

height:90px;

margin-bottom:8px;

}

.company-contact{

display:flex;

gap:10px;

}

.header-right{

width:300px;

}

.header-right h1{

text-align:center;

color:#d4af37;

font-size:34px;

margin-bottom:15px;

letter-spacing:2px;

}

.invoice-info{

width:100%;

border-collapse:collapse;

}

.invoice-info td{

border:1px solid #ddd;

padding:8px;

}

.invoice-info td:first-child{

background:#fafafa;

font-weight:bold;

width:42%;

}

/* --------------------------
   COMPANY
-------------------------- */

.company{

display:flex;

gap:15px;

flex:2;

}

.company img{

width:85px;

height:85px;

object-fit:contain;

flex-shrink:0;

}

.company-details{

width:100%;

}

.company-details input{

font-size:14px;

font-weight:600;

margin-bottom:6px;

}

.company-details textarea{

min-height:80px;

}

/* --------------------------
   INVOICE TITLE
-------------------------- */

.invoice-title{

flex:1;

text-align:right;

}

.invoice-title h1{

font-size:34px;

font-weight:700;

color:var(--primary);

letter-spacing:2px;

margin-bottom:15px;

}

.invoice-title table{

width:100%;

border-collapse:collapse;

}

.invoice-title td{

padding:6px;

border:1px solid var(--border);

font-size:13px;

}

.invoice-title td:first-child{

font-weight:600;

background:#fafafa;

width:45%;

}
/* =====================================================
   INPUTS
===================================================== */

label{

display:block;

font-size:13px;

font-weight:600;

margin-bottom:5px;

color:#444;

}

input,
textarea,
select{

width:100%;

padding:10px 12px;

border:1px solid var(--border);

border-radius:5px;

font-size:14px;

background:#fff;

transition:.25s;

outline:none;

}

textarea{

resize:vertical;

min-height:80px;

}

input:focus,
textarea:focus,
select:focus{

border-color:var(--primary);

box-shadow:0 0 0 3px rgba(212,175,55,.15);

}


/* =====================================================
   SECTION
===================================================== */

/* =======================================================
   PARTY SECTION
======================================================= */

.party-section{

display:flex;

gap:20px;

margin-top:20px;

}

.party-card{

flex:1;

border:1px solid #ddd;

border-radius:8px;

overflow:hidden;

background:white;

}

.party-title{

background:#D4AF37;

color:white;

padding:12px 16px;

font-size:16px;

font-weight:700;

display:flex;

justify-content:space-between;

align-items:center;

}

.party-body{

padding:15px;

}

.party-body label{

display:block;

font-size:12px;

font-weight:600;

margin-bottom:4px;

color:#444;

}

.party-body input,
.party-body textarea{

margin-bottom:10px;

}

.party-grid{

display:grid;

grid-template-columns:1fr 1fr;

gap:12px;

}

.party-grid-3{

display:grid;

grid-template-columns:1fr 1fr 1fr;

gap:10px;

}

.copy-check{

display:flex;

align-items:center;

gap:6px;

font-size:12px;

font-weight:500;

color:white;

}

.copy-check input{

width:16px;

height:16px;

}
@media(max-width:900px){

.party-section{

flex-direction:column;

}

.party-grid{

grid-template-columns:1fr;

}

.party-grid-3{

grid-template-columns:1fr;

}

}

/* =====================================================
   ROW
===================================================== */

.row{

display:flex;

gap:15px;

margin-bottom:12px;

}

.col{

flex:1;

}


/* =====================================================
   BILLING & SHIPPING
===================================================== */

.address-container{

display:flex;

gap:20px;

align-items:flex-start;

}

.address-box{

flex:1;

border:1px solid var(--border);

border-radius:8px;

padding:18px;

background:#fafafa;

box-shadow:0 2px 5px rgba(0,0,0,.04);

}

.address-box h3{

margin-bottom:15px;

font-size:16px;

color:var(--primary-dark);

}

.address-box label{

margin-top:8px;

}

.address-box textarea{

min-height:95px;

}


/* =====================================================
   SAME AS BILLING
===================================================== */

.same-address{

display:flex;

justify-content:flex-end;

align-items:center;

gap:8px;

margin-bottom:12px;

font-size:13px;

}

.same-address input{

width:18px;

height:18px;

cursor:pointer;

}


/* =====================================================
   PLACE OF SUPPLY
===================================================== */

.place-box{

display:grid;

grid-template-columns:1fr 1fr 1fr;

gap:15px;

margin-top:15px;

}


/* =====================================================
   SMALL INPUTS
===================================================== */

.small{

width:120px;

}

.medium{

width:180px;

}

.large{

width:100%;

}
/* =====================================================
   PRODUCT TABLE
===================================================== */

/* ======================================================
   PRODUCT SECTION
====================================================== */

.product-section{

margin-top:25px;

}

.product-header{

display:flex;

justify-content:space-between;

align-items:center;

margin-bottom:10px;

}

.product-header h3{

font-size:18px;

color:#333;

}

.add-product{

padding:10px 16px;

background:#D4AF37;

border:none;

color:white;

font-weight:600;

border-radius:5px;

cursor:pointer;

}

.add-product:hover{

background:#b48d15;

}
.table-responsive{

border:1px solid #ddd;

border-radius:6px;

overflow:hidden;

}

#productTable{

width:100%;

border-collapse:collapse;

table-layout:fixed;

}

#productTable thead{

background:#D4AF37;

}

#productTable th{

padding:11px 6px;

color:white;

font-size:13px;

font-weight:600;

border:1px solid rgba(255,255,255,.15);

}

#productTable td{

border:1px solid #ddd;

padding:5px;

font-size:13px;

}
/* =====================================================
   COLUMN WIDTHS
===================================================== */

#productTable th:nth-child(1),
#productTable td:nth-child(1){

width:45px;

}

#productTable th:nth-child(2),
#productTable td:nth-child(2){

width:34%;

}

#productTable th:nth-child(3),
#productTable td:nth-child(3){

width:11%;

}

#productTable th:nth-child(4),
#productTable td:nth-child(4){

width:8%;

}

#productTable th:nth-child(5),
#productTable td:nth-child(5){

width:16%;

}

#productTable th:nth-child(6),
#productTable td:nth-child(6){

width:8%;

}

#productTable th:nth-child(7),
#productTable td:nth-child(7){

width:15%;

}

#productTable th:nth-child(8),
#productTable td:nth-child(8){

width:55px;

}
/* =====================================================
   TABLE INPUTS
===================================================== */

#productTable input,
#productTable select{

width:100%;

height:32px;

border:none;

background:transparent;

padding:4px;

font-size:13px;

outline:none;

}

#productTable input:focus,
#productTable select:focus{

background:#fff8dd;

}
/* =====================================================
   DESCRIPTION
===================================================== */

#productTable td:nth-child(2){

text-align:left;

}

#productTable td:nth-child(2) input{

text-align:left;

padding-left:8px;

font-weight:500;

}
/* =====================================================
   NUMBERS
===================================================== */

#productTable td:nth-child(4),
#productTable td:nth-child(5),
#productTable td:nth-child(6),
#productTable td:nth-child(7){

text-align:right;

}

#productTable td:nth-child(4) input,
#productTable td:nth-child(5) input,
#productTable td:nth-child(6) select,
#productTable td:nth-child(7) input{

text-align:right;

}
/* =====================================================
   DELETE BUTTON
===================================================== */

.delete-btn{

width:30px;

height:30px;

background:#ef4444;

color:white;

border:none;

border-radius:4px;

cursor:pointer;

font-size:14px;

}

.delete-btn:hover{

background:#dc2626;

}
/* =====================================================
   ADD BUTTON
===================================================== */

.add-product{

padding:10px 18px;

font-size:14px;

font-weight:600;

background:var(--primary);

color:#fff;

border-radius:5px;

}

.add-product:hover{

background:var(--primary-dark);

}
#productTable tfoot td{

height:40px;

background:#fafafa;

}
/* ===========================
   MOBILE RESPONSIVE
=========================== */

@media (max-width:768px){

.invoice{
    width:100%;
    margin:0;
    padding:15px;
    box-sizing:border-box;
}

.header{
    flex-direction:column;
    gap:20px;
}

.header-left,
.header-right{
    width:100%;
}

.header-right h1{
    text-align:left;
    margin-bottom:15px;
}

.party-section{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.party-card{
    width:100%;
}

.party-grid,
.party-grid-3{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
}

.total-box{
    width:100%;
    margin-top:20px;
}

.footer{
    display:flex;
    flex-direction:column;
    gap:25px;
}

.notes,
.signature{
    width:100%;
}

.btn-area{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.btn-area button{
    flex:1 1 100%;
}

.company-contact{
    display:flex;
    flex-direction:column;
    gap:10px;
}

}
.table-responsive{
    width:100%;
    overflow-x:auto;
}

#productTable{
    min-width:1000px;
}
input,
select,
textarea{

width:100%;

box-sizing:border-box;

max-width:100%;

}
.logo{

max-width:100%;

height:auto;

}
.invoice-info{

width:100%;

}

.invoice-info td{

padding:5px;

}
body{

overflow-x:hidden;

}