/* Reset some basics */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 15px;
    background-color: #fefefe;
    color: #333;
    font-size: 14px;
}

/* override if needed */
input[type="text"], input[type="submit"] {
    width: 100%;
    padding: 0.5em;
    margin: 0.5em 0;
    box-sizing: border-box;
}

form {
    padding: 1em;
}

h1, h2, h3 {
    color: #0056b3;
    margin-bottom: 10px;
}

header {
    background-color: #007BFF;
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

header h1 {
    margin: 0;
    font-size: 20px;
}

header nav {
    display: flex;
    gap: 10px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

header nav a:hover {
    background-color: #0056b3;
}

footer {
    background-color: #f0f0f0;
    text-align: center;
    padding: 10px 5px;
    margin-top: 30px;
    font-size: 12px;
    color: #555;
}

footer p {
    margin: 5px 0 0;
}

/* Table styling - modern, compact */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

thead {
    background-color: #f2f2f2;
}

th, td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid #ddd;
    background-color: #fff;
    box-shadow: 0 0 0 1px #e0e0e0;
    white-space: nowrap;
}

th {
    background-color: #f8f9fa;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.3px;
}

tr.paid td, .paid {
    background-color: #e6f9ed;
}

tr:hover td {
    background-color: #f1f9ff;
}

/* Buttons - general smaller */
a.button, button, .button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    margin: 0.25em 0.25em;
}

a.button:hover, button:hover, .button:hover {
    background-color: #0056b3;
}

/* Color-coded buttons */
a.button.add-payment,
button.add-payment {
    background-color: #28a745;
}

a.button.add-payment:hover,
button.add-payment:hover {
    background-color: #218838;
}

a.button.add-jobs,
button.add-jobs {
    background-color: #fd7e14;
}

a.button.add-jobs:hover,
button.add-jobs:hover {
    background-color: #e86c0d;
}

a.button.invoice,
button.invoice {
    background-color: #17a2b8;
}

a.button.invoice:hover,
button.invoice:hover {
    background-color: #138496;
}

/* Form styles */
label {
    display: block;
    margin-top: 8px;
    font-weight: bold;
    font-size: 13px;
}

input[type="text"], input[type="number"], input[type="date"], select {
    width: 100%;
    padding: 6px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.readonly {
    background-color: #f5f5f5;
}

.button-group {
    margin-top: 15px;
    display: flex;
    gap: 8px;
}

/* Flex container for add_jobs */
.flex-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.flex-container > div {
    flex: 1 1 380px;
}

/* Messages */
.error {
    color: red;
    margin-top: 12px;
    font-size: 13px;
}

.success {
    color: green;
    margin-top: 12px;
    font-size: 13px;
}

.msg {
    margin-top: 15px;
    color: #333;
    font-size: 13px;
}

.grand-total {
    font-weight: bold;
    margin-top: 12px;
    font-size: 14px;
}

/* CATEGORY TOGGLE BUTTON */
.category-toggle {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: bold;
    background-color: #343a40;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    margin: 12px 0 6px;
    transition: background-color 0.3s ease;
}
.category-toggle:hover {
    background-color: #212529;
}

/* CATEGORY CONTENT */
.category-content {
    padding: 10px 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

/* JOB BUTTONS */
.job-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.job-button {
    padding: 20px;
    background: #007bff;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.job-button:hover {
    background: #0056b3;
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    margin: 100px auto;
    border-radius: 10px;
    position: relative;
}
.close {
    position: absolute;
    top: 10px; right: 20px;
    font-size: 24px;
    cursor: pointer;
}

/* CALCULATOR */
.calculator {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}
.calculator button {
    font-size: 20px;
    padding: 15px;
    background: #f1f1f1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.calculator button:hover {
    background: #ddd;
}
.add-btn {
    background: #28a745;
    color: white;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
}

/* READY NOTIFY */
.notify-ready.ready-sent {
    background-color: #28a745;
    color: #fff;
    font-weight: bold;
}

/* RESPONSIVE */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 8px;
    }

    .flex-container {
        flex-direction: column;
    }

    table, input[type="text"], input[type="number"], input[type="date"], select, button, a.button {
        font-size: 12px;
    }

    input[type="text"], input[type="number"], input[type="date"], select {
        width: 100%;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        display: none;
    }

    tr {
        margin-bottom: 1em;
        border: 1px solid #ccc;
        padding: 0.5em;
        background-color: #fafafa;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 1em;
        top: 0.75em;
        font-weight: bold;
    }

    .button {
        display: block;
        margin: 0.5em 0;
    }

/* Wrap buttons nicely in action columns */
td[data-label="Actions"],
td:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    padding-left: 0 !important;
}

/* On mobile: make sure buttons look good */
@media screen and (max-width: 768px) {
    td[data-label="Actions"] .button,
    td:last-child .button {
        flex: 1 1 auto;
        margin: 4px 0;
        white-space: nowrap;
    }
}
<style>
/* ===============================
   Loyalty Tier Badge Styling
   =============================== */

.tier-badge {
    display: inline-block;
    position: relative;
    padding: 3px 8px;
    margin-left: 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
    cursor: default;
    transition: transform 0.15s ease;
}

.tier-badge:hover {
    transform: scale(1.08);
}

/* Hover points tooltip */
.tier-badge:hover::after {
    content: attr(data-points) " pts";
    position: absolute;
    left: 50%;
    top: -25px;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

/* Tier colors */
.tier-badge.new {
    background-color: #6c757d; /* Gray */
}

.tier-badge.regular {
    background-color: #007bff; /* Blue */
}

.tier-badge.vip {
    background-color: #8a2be2; /* Purple */
}

.tier-badge.vvip {
    background-color: #ff9800; /* Orange */
}

.job-category {
    margin-bottom: 10px;
}

.category-toggle {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    background: #343a40;
    color: #fff;
    cursor: pointer;
}

.category-toggle:hover {
    background: #23272b;
}

.job-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 12px;
    margin-top: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.job-button {
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    text-align: center;
    line-height: 1.3;
}

.job-button:hover {
    background: #0056b3;
}

.job-button small {
    display: block;
    font-weight: normal;
    font-size: 12px;
    opacity: 0.9;
}

