/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General body styling */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* Headings */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 600;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 500;
}

/* Section styling */
.section {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
    transition: transform 0.2s ease;
}

.section:hover {
    transform: translateY(-5px);
}

/* Form styling */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

label {
    font-weight: 500;
    color: #555;
    margin-right: 10px;
}

input, select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    flex: 1;
    min-width: 200px;
}

input:focus, select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #3498db;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

td {
    color: #555;
    font-size: 0.95rem;
}

tr {
    transition: background-color 0.3s ease;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Button styling */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-add {
    background-color: #2ecc71;
    color: #fff;
}

.btn-add:hover {
    background-color: #27ae60;
}

.btn-edit {
    background-color: #3498db;
    color: #fff;
}

.btn-edit:hover {
    background-color: #2980b9;
}

.btn-delete {
    background-color: #e74c3c;
    color: #fff;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-print {
    background-color: #1abc9c;
    color: #fff;
}

.btn-print:hover {
    background-color: #16a085;
}

.btn-export {
    background-color: #f39c12;
    color: #fff;
}

.btn-export:hover {
    background-color: #e67e22;
}

/* Responsive table */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    form {
        flex-direction: column;
        align-items: stretch;
    }

    input, select {
        min-width: 100%;
    }

    .btn {
        width: 100%;
        margin-top: 10px;
    }

    th, td {
        font-size: 0.85rem;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    th, td {
        font-size: 0.8rem;
        padding: 8px;
    }

    .section {
        padding: 15px;
    }
}



.btn-reset {
    background-color: #dc3545;
}
.btn-reset:hover {
    background-color: #c82333;
}
.btn-export-db {
    background-color: #28a745;
}
.btn-export-db:hover {
    background-color: #218838;
}


.btn-export-db {
    background-color: #28a745;
}
.btn-export-db:hover {
    background-color: #218838;
}

/* print bill  */

@media print {
    body {
        margin: 0;
        padding: 0;
    }
    /* Hide everything except the bill template */
    body > *:not(#bill-template) {
        display: none !important;
    }
    #bill-template {
        display: block !important;
        width: 100%;
        font-size: 12px;
        margin: 0;
        padding: 10mm;
        box-sizing: border-box;
    }
    #bill-template * {
        visibility: visible !important;
    }
    /* Ensure table elements render correctly */
    #bill-template table {
        display: table !important;
    }
    #bill-template tr {
        display: table-row !important;
    }
    #bill-template td, #bill-template th {
        display: table-cell !important;
    }
    #bill-template img {
        display: block !important;
        margin: 0 auto;
    }
}


.btn-logout {
    background-color: #dc3545;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
}
.btn-logout:hover {
    background-color: #c82333;
}

th{
    background-color: red;
}