* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #eef1f5;
    color: #1f2933;

    /*
     * Font ya receipt-like
     */
    font-family: "Courier New", Courier, monospace;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.actions {
    max-width: 760px;
    margin: 20px auto;

    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;

    border: none;
    padding: 9px 15px;

    border-radius: 4px;

    text-decoration: none;

    cursor: pointer;

    font-family: Arial, sans-serif;

    font-size: 13px;
}

.primary {
    background: #1769aa;
    color: white;
}

.secondary {
    background: #ffffff;
    color: #1769aa;

    border: 1px solid #1769aa;
}

.dark {
    background: #263238;
    color: white;
}


/* =========================================================
   RECEIPT
========================================================= */

.receipt {

    width: 700px;

    min-height: 800px;

    margin: 20px auto;

    background: #ffffff;

    padding: 28px 32px;

    /*
     * Blue receipt book border
     */
    border: 2px solid #1d5f91;

    /*
     * Slight paper feel
     */
    box-shadow:
        0 3px 12px rgba(0, 0, 0, .12);

}


/* =========================================================
   COMPANY HEADER
========================================================= */

.receipt-header {

    display: flex;

    align-items: center;

    gap: 15px;

    padding-bottom: 12px;

    /*
     * Blue receipt line
     */
    border-bottom: 2px solid #1d5f91;
}


/* LOGO */

.company-logo {

    width: 85px;

    height: 85px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;
}


.company-logo img {

    max-width: 85px;

    max-height: 85px;

    object-fit: contain;
}


/* COMPANY DETAILS */

.company-info {

    flex: 1;

    text-align: center;
}


.company-info h1 {

    margin: 0 0 5px;

    font-family: Arial, sans-serif;

    font-size: 23px;

    font-weight: 800;

    letter-spacing: .5px;

    color: #155a8a;
}


.company-info p {

    margin: 2px 0;

    font-size: 11px;

    line-height: 1.35;

    color: #333;
}


/* =========================================================
   RECEIPT TITLE
========================================================= */

.receipt-title {

    text-align: center;

    margin: 15px 0 12px;

    padding: 7px 10px;

    /*
     * Blue band kama receipt books
     */
    background: #1d5f91;

    color: white;

    font-family: Arial, sans-serif;

    font-size: 17px;

    font-weight: bold;

    letter-spacing: 1px;

}


/* =========================================================
   RECEIPT META
========================================================= */

.receipt-meta {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 8px 0;

    border-bottom: 1px solid #7fa5c0;

    font-size: 12px;

    color: #222;
}


.receipt-meta strong {

    color: #155a8a;
}


/* =========================================================
   RECEIVED FROM
========================================================= */

.received-from {

    margin-top: 10px;

    padding: 8px 5px;

    border-bottom: 1px solid #7fa5c0;

    font-size: 12px;

}


.received-from strong {

    color: #155a8a;

}


/* =========================================================
   RECEIPT TABLE
========================================================= */

.receipt-items {

    width: 100%;

    border-collapse: collapse;

    margin-top: 14px;

    font-size: 11px;

    /*
     * Prevent table from looking like modern invoice
     */
    table-layout: fixed;
}


/* TABLE HEADER */

.receipt-items th {

    background: #dcebf5;

    color: #174f76;

    border: 1px solid #477fa4;

    padding: 7px 5px;

    text-align: center;

    font-family: Arial, sans-serif;

    font-size: 10px;

    font-weight: bold;

    text-transform: uppercase;
}


/* TABLE CELLS */

.receipt-items td {

    border: 1px solid #6f9bb5;

    padding: 6px 5px;

    height: 37px;

    color: #222;
}


/* COLUMN WIDTHS */

.receipt-items .sn {

    width: 42px;
}


.receipt-items .qty {

    width: 70px;
}


.receipt-items .amount-col {

    width: 115px;
}


.receipt-items .total-col {

    width: 125px;
}


/* ALIGNMENT */

.receipt-items .center {

    text-align: center;
}


.receipt-items .money {

    text-align: right;

    padding-right: 8px;
}


/* EMPTY ROWS */

.receipt-items tbody tr {

    height: 38px;
}


/* =========================================================
   TOTAL
========================================================= */

.receipt-items tfoot td {

    border: 1px solid #477fa4;

    padding: 9px 7px;

    background: #eef6fb;
}


.receipt-items .total-label {

    text-align: right;

    font-family: Arial, sans-serif;

    font-size: 11px;

    font-weight: bold;

    color: #174f76;
}


.receipt-items .grand-total {

    text-align: right;

    font-family: "Courier New", monospace;

    font-size: 13px;

    font-weight: bold;

    color: #123f5d;

    white-space: nowrap;
}


/* =========================================================
   AMOUNT IN WORDS
========================================================= */

.amount-words {

    margin-top: 13px;

    padding: 9px 6px;

    border-bottom: 1px solid #7fa5c0;

    font-size: 11px;

    line-height: 1.5;
}


.amount-words strong {

    color: #155a8a;

}


/* =========================================================
   PAYMENT METHOD
========================================================= */

.payment-method {

    padding: 9px 6px;

    font-size: 11px;
}


.payment-method strong {

    color: #155a8a;

}


/* =========================================================
   NORMAL FORM PAGES
========================================================= */

.container {

    width: 95%;

    max-width: 1100px;

    margin: 30px auto;
}


.topbar {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;
}


.form-card,
.table-card {

    background: white;

    padding: 25px;

    border-radius: 6px;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, .08);
}


.form-group {

    margin-bottom: 18px;
}


.form-group label {

    display: block;

    font-family: Arial, sans-serif;

    font-weight: bold;

    font-size: 13px;

    margin-bottom: 7px;
}


.row {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}


input,
select,
textarea {

    width: 100%;

    padding: 10px;

    border: 1px solid #ccc;

    border-radius: 4px;

    font-size: 14px;
}


textarea {

    resize: vertical;
}


/* =========================================================
   TABLE HISTORY
========================================================= */

table {

    width: 100%;

    border-collapse: collapse;
}


table th,
table td {

    padding: 10px;

    border-bottom: 1px solid #ddd;

    text-align: left;
}


table th {

    background: #dcebf5;

    color: #174f76;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .receipt {

        width: 95%;

        padding: 20px;

    }


    .receipt-header {

        flex-direction: column;

    }


    .company-info h1 {

        font-size: 19px;

    }


    .receipt-meta {

        flex-direction: column;

        align-items: flex-start;

        gap: 5px;

    }


    .row {

        grid-template-columns: 1fr;

    }


    .table-card {

        overflow-x: auto;

    }

}


/* =========================================================
   PRINT
========================================================= */

@media print {

    body {

        background: white;

    }


    .actions {

        display: none !important;

    }


    .receipt {

        width: 700px;

        margin: 0 auto;

        box-shadow: none;

        border: 2px solid #1d5f91;

    }

}