/* ===== Invoicing – matches Buckaroo Bonnie Old West theme ===== */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    border: 4px dashed black;
    background: white;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

    .stat-card .label {
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #3e2723;
    }

    .stat-card .value {
        font-size: 1.8rem;
        font-weight: bold;
        margin-top: 0.25rem;
        color: #3e2723;
    }
.invoice-page {
    position: relative;
    overflow: hidden;
}

    .invoice-page::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-12deg);
        width: 600px;
        height: 600px;
        background: url('/images/BB_Watermark.jpeg') center/contain no-repeat;
        opacity: 0.08; /* adjust 0.05 to 0.15 */
        z-index: -1;
        pointer-events: none;
    }
/* Cards */
.card {
    border: 4px dashed black !important;
    border-radius: 0 !important;
    background: white !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5) !important;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

    .card h3 {
        margin-top: 0;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-bottom: 2px dashed #3e2723;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
/* Kill outline on Speak Your Piece */
a[href="/feedback"],
a[href="/feedback"]:hover,
a[href="/feedback"]:focus,
a[href="/feedback"]:focus-visible,
a[href="/feedback"]:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}
@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

input, select, textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 2px dashed #3e2723 !important;
    border-radius: 0 !important;
    background: white !important;
    font-family: 'Rye', 'Sancreek', 'Smokum', cursive, serif !important;
    font-size: 16px !important;
    color: #3e2723 !important;
}

    input:focus, select:focus, textarea:focus {
        outline: 2px solid #3e2723;
        outline-offset: 1px;
    }

/* Line items */
.item-row {
    display: grid;
    grid-template-columns: 3fr 0.8fr 1fr 0.8fr auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

@media (max-width: 700px) {
    .item-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border: 2px dashed black !important;
    border-radius: 0 !important;
    background: white !important;
    color: #3e2723 !important;
    font-family: 'Rye', 'Sancreek', 'Smokum', cursive, serif !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 3px 3px 0 #000;
    transition: all 0.15s ease;
}

    .btn:hover {
        background: #3e2723 !important;
        color: white !important;
        box-shadow: 1px 1px 0 #000;
        transform: translate(2px, 2px);
    }

.btn-primary {
    background: #3e2723 !important;
    color: white !important;
}

    .btn-primary:hover {
        background: #2c1c17 !important;
        color: white !important;
    }

.btn-secondary {
    background: white !important;
}

.btn-danger {
    background: #a94442 !important;
    color: white !important;
    border-color: #a94442 !important;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    box-shadow: 2px 2px 0 #000;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-bottom: 3px solid #3e2723;
    padding: 0.6rem 0.5rem;
}

td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px dashed #3e2723;
}

/* Status badges */
.status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border: 2px dashed black;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-draft {
    background: #f5f5f5;
}

.status-sent {
    background: #e3f2fd;
}

.status-paid, .status-accepted, .status-converted {
    background: #e8f5e9;
}

.status-overdue, .status-declined {
    background: #ffebee;
}

/* Totals box */
.totals-box {
    max-width: 280px;
    margin-left: auto;
    border: 3px dashed black;
    padding: 1rem;
    background: white;
}

    .totals-box .row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.4rem;
    }

    .totals-box .grand {
        font-size: 1.2rem;
        font-weight: bold;
        border-top: 2px solid #3e2723;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        color: #3e2723;
    }

/* Actions */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 2rem;
    border: 3px dashed #aaa;
    color: #666;
}

/* Alerts */
.alert {
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border: 3px dashed black;
}

.alert-success {
    background: #e8f5e9;
}

.alert-error {
    background: #ffebee;
}

/* Headings */
h2 {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}
