/* styles.css */
:root {
    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial;
    color: #222;
    --accent: #0b6efd;
    --muted: #666;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 1rem;
    background: #f7f8fb;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

h1 {
    margin: 0 0 1rem;
    font-size: 1.4rem;
}

form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

input[type="text"],
input[type="search"],
input:not([type]) {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-width: 200px;
}

button {
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    opacity: 0.95;
}

.counts .grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.countCard {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    min-width: 110px;
}

.striped {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.striped th,
.striped td {
    border: 1px solid #eee;
    padding: 0.5rem;
    text-align: left;
}

.striped tbody tr:nth-child(odd) {
    background: #fff;
}

.striped tbody tr:nth-child(even) {
    background: #fbfbfb;
}

.moneyCell {
    min-width: 70px;
}

.moneyCell[contenteditable] {
    background: #fffbe6;
    border: 1px dashed #f0c674;
    padding: 0.25rem;
    border-radius: 4px;
}

.actions {
    margin-top: 0.75rem;
}

.message {
    margin-top: 0.5rem;
    color: var(--muted);
}

small.note {
    display: block;
    color: var(--muted);
    margin-top: 0.5rem;
}

button.greyed {
    background-color: #aaa !important;
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 1st - Blue Ribbon */
.res-highlight-1st {
    background-color: #bbdefb;
    color: #0d47a1;
    border-bottom: 2px solid #90caf9;
}

/* 2nd - Red Ribbon */
.res-highlight-2nd {
    background-color: #ffcdd2;
    color: #b71c1c;
    border-bottom: 2px solid #ef9a9a;
}

/* 3rd - Green Ribbon */
.res-highlight-3rd {
    background-color: #c8e6c9;
    color: #1b5e20;
    border-bottom: 2px solid #a5d6a7;
}