:root {
    /* "Guest Check" ticket palette */
    --paper:   #eef1e8;   /* ticket paper */
    --paper-2: #f7f9f2;   /* lighter inputs */
    --sage:    #d7dccd;   /* surface behind the ticket */
    --rule:    #b6c0d8;   /* faint blue ruled line */
    --blue:    #27509c;   /* heading / border ink */
    --blue-dk: #1d3f7d;
    --red:     #d6452a;   /* stamped-number red */
    --ink:     #28324a;   /* body text */
    --muted:   #7c8295;
    --ok:      #27509c;   /* keep confirmations on-palette (blue) */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--sage);
    color: var(--ink);
    line-height: 1.45;
    padding: 24px 16px;
}

.card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--paper);
    border: 2px solid var(--blue);
    border-radius: 4px;
    padding: 26px 24px;
    /* faint inner rule, like the printed frame on a guest check */
    box-shadow: 0 10px 28px rgba(31, 63, 125, 0.14),
                inset 0 0 0 4px var(--paper),
                inset 0 0 0 6px var(--rule);
}

/* Logo masthead */
.masthead { text-align: center; margin-bottom: 6px; }
.masthead .logo { width: 140px; max-width: 50%; height: auto; }

h1 { margin: 0 0 4px; font-size: 28px; color: var(--blue); }
.subtitle { margin: 0 0 20px; color: var(--muted); text-align: center; }

.banner {
    padding: 12px 14px;
    border-radius: 4px;
    margin-bottom: 14px;
    font-weight: 600;
    border: 1px solid;
}
.banner.success { background: #e6ecf6; color: var(--blue); border-color: var(--blue); }
.banner.error   { background: #fbe7e2; color: var(--red);  border-color: var(--red); }

.text-field {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    font-size: 16px;
    background: var(--paper-2);
    color: var(--ink);
}
.text-field:focus { outline: none; border-color: var(--blue); }

.group {
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 14px 16px 16px;
    margin: 0 0 16px;
    background: var(--paper-2);
}
.group legend {
    font-weight: 700;
    padding: 0 8px;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 15px;
}
.group legend small {
    font-weight: 700;
    color: var(--red);
    margin-left: 8px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
}

/* −/+ stepper: value on the LEFT, buttons on the RIGHT, all custom-sized */
.stepper { display: flex; align-items: center; gap: 12px; }
.step-input {
    width: 62px;
    height: 50px;
    border: 1px solid var(--blue);
    border-radius: 4px;
    background: #fff;
    color: var(--blue);
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}
.step-input::-webkit-outer-spin-button,
.step-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btns { display: flex; gap: 8px; }
.step {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--blue);
    border-radius: 4px;
    background: #fff;
    color: var(--blue);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.step:hover:not(:disabled)  { background: var(--paper); }
.step:active:not(:disabled) { background: var(--rule); }
.step:disabled { color: #b9c2d6; border-color: #cdd5e6; cursor: not-allowed; }

.cheese-row { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; }
.cheese-label { font-weight: 700; font-size: 14px; color: var(--blue); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .03em; }
.cheese-row .radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    cursor: pointer;
}
.cheese-row .radio input { width: 19px; height: 19px; accent-color: var(--blue); cursor: pointer; }
.cheese-row .radio input:disabled { cursor: not-allowed; }

.hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.hint.over { color: var(--red); font-weight: 600; }

.btn {
    width: 100%;
    padding: 15px;
    border: 0;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s ease;
}
.btn:hover { background: var(--blue-dk); }

/* ---- Admin ---- */
.admin-wrap { max-width: 860px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a {
    padding: 9px 16px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--blue);
    background: #fff;
    border: 1px solid var(--rule);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: 14px;
}
.tabs a.active { background: var(--blue); color: #fff; border-color: var(--blue); }

table { width: 100%; border-collapse: collapse; margin-top: 6px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
th { color: var(--blue); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid var(--blue); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.totals-grid td:first-child { font-weight: 600; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.topbar .brand { display: flex; align-items: center; gap: 12px; }
.topbar .brand img { height: 50px; width: auto; }
.topbar h1 { margin: 0; font-size: 22px; text-transform: uppercase; letter-spacing: .04em; }
.topbar a { color: var(--muted); text-decoration: none; font-size: 14px; }

.pill { display:inline-block; padding:2px 8px; border-radius:4px; background:#fff; border:1px solid var(--rule); font-size:12px; }
.pill.low  { background:#fbe7e2; color: var(--red); border-color: var(--red); }
.pill.zero { background: var(--red); color:#fff; border-color: var(--red); }
.muted { color: var(--muted); }
