:root {
  --cream: #FAF6F0;
  --surface: #ffffff;
  --ink: #3B2A20;
  --muted: #6F5839;
  --accent: #B4703A;
  --accent-dark: #965a2b;
  --border: #E7DBC9;
  --espresso: #2A1B12;
  --ok: #6B8F5C;
  --late: #C97B3D;
  --bad: #B5533C;
  --off: #C9BBA8;
  --waiter: #5B7C8D;
  --bartender: #C9A227;
  --bs-body-bg: var(--cream);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent-dark);
}
html { font-size: 15px; }
body { font-family: 'Work Sans', system-ui, sans-serif; background: var(--cream); color: var(--ink); min-height: 100vh; }
/* Coffee-and-milk backdrop. A fixed pseudo-element (not background-attachment) so it also behaves on iPhone. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 12% 0%, rgba(255, 255, 255, .75) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(150, 90, 43, .38) 0%, rgba(150, 90, 43, 0) 65%),
    linear-gradient(165deg, #FBF6EE 0%, #F1E3CF 42%, #E2C6A1 100%);
}
h1, h2, h3, .brand { font-family: 'Fraunces', Georgia, serif; font-weight: 600; }
h1 { font-size: 1.9rem; margin-bottom: 1rem; }
.text-muted, .form-text { color: var(--muted) !important; }
.navbar-espresso { background: var(--espresso); }
.navbar-espresso .navbar-brand, .navbar-espresso .nav-link, .navbar-espresso .dropdown-toggle { color: #f3e8d8; }
.navbar-espresso .nav-link:hover { color: #fff; }
.navbar-espresso .brand { font-size: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: .75rem; }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-dark); --bs-btn-hover-border-color: var(--accent-dark); --bs-btn-active-bg: var(--accent-dark); --bs-btn-active-border-color: var(--accent-dark); }
.btn-outline-primary { --bs-btn-color: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); --bs-btn-active-bg: var(--accent); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(180,112,58,.2); }
.table { --bs-table-bg: var(--surface); --bs-table-border-color: var(--border); }
.table thead th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
footer { color: var(--muted); font-size: .85rem; }

.hero { background: linear-gradient(135deg, var(--espresso), #4a3122); color: #f3e8d8; border-radius: 1rem; padding: 3rem 2rem; }
.hero h1 { color: #fff; font-size: 2.4rem; }
.clock-box { text-align: center; padding: 2rem 1rem; }
.clock-box .big { font-family: 'Fraunces', serif; font-size: 2.6rem; }

.st-ok { background: var(--ok); color: #fff; }
.st-late { background: var(--late); color: #fff; }
.st-bad { background: var(--bad); color: #fff; }
.st-off { background: var(--off); color: var(--ink); }
.st-plain { background: #efe4d2; color: var(--ink); }
.badge-soft { display: inline-block; padding: .1rem .45rem; border-radius: .4rem; font-size: .75rem; }

/* Schedule, colored by job role so waiters and bartenders are easy to tell apart at a glance. */
.role-waiter { background: var(--waiter); color: #fff; }
.role-bartender { background: var(--bartender); color: #fff; }
.role-other { background: #efe4d2; color: var(--ink); }
.role-legend { display: inline-flex; align-items: center; gap: .35rem; margin-right: 1rem; font-size: .85rem; }
.role-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; }
.role-dot.role-waiter { background: var(--waiter); }
.role-dot.role-bartender { background: var(--bartender); }
.item.me { outline: 2px solid var(--espresso); outline-offset: -2px; }

/* Weekly timeline: a day-planner view. One shared hour axis on the left, one column per day; each shift is a
   bar whose vertical position and height are its actual start/end time, so duration and time of day read at a
   glance. Overlapping shifts on the same day sit in side-by-side lanes (see ScheduleLayout.AssignLanes). */
.timeline-scroll { overflow-x: auto; }
.timeline-grid { display: grid; grid-template-columns: 46px repeat(7, minmax(110px, 1fr)); gap: 3px; min-width: 900px; }
.timeline-axis-header, .timeline-day-header { text-align: center; color: var(--muted); font-size: .8rem; padding: 2px 0 6px; }
.timeline-day-header { font-weight: 600; color: var(--ink); }
.timeline-day-header.today { color: var(--accent); }
.timeline-day-header .day-counts { display: block; font-size: .68rem; font-weight: 400; color: var(--muted); }
.timeline-axis-body, .timeline-day-body { position: relative; height: 640px; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; }
.timeline-axis-body { background: transparent; border: none; }
.timeline-day-body.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.axis-tick { position: absolute; right: 6px; transform: translateY(-50%); font-size: .68rem; color: var(--muted); white-space: nowrap; }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); }
.timeline-bar { position: absolute; border-radius: .3rem; padding: 2px 5px; font-size: .68rem; line-height: 1.2; color: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.timeline-bar strong { display: block; font-size: .72rem; }
@media (max-width: 700px) {
  .timeline-axis-body, .timeline-day-body { height: 520px; }
  .timeline-bar { font-size: .62rem; }
}

.month-grid { table-layout: fixed; width: 100%; border-collapse: separate; border-spacing: 4px; }
.month-grid th { text-align: center; color: var(--muted); font-size: .8rem; }
.month-grid td { vertical-align: top; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; height: 110px; padding: 4px; overflow: hidden; }
.month-grid td.other { background: transparent; border-color: transparent; }
.month-grid td.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.month-grid .day { font-size: .75rem; color: var(--muted); }
.month-grid .item { display: block; font-size: .72rem; padding: 1px 5px; margin-top: 2px; border-radius: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 768px) { .month-grid td { height: 80px; } .month-grid .item { font-size: .62rem; } }
.lang-switch .nav-link { padding-left: .35rem; padding-right: .35rem; }
.lang-switch .nav-link.active { color: #fff; }

.hero-split { display: grid; grid-template-columns: 5fr 7fr; background: var(--espresso); color: #f3e8d8; border-radius: 1rem; overflow: hidden; min-height: 400px; }
.hero-split .hero-text { padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center; gap: .5rem; }
.hero-split h1 { color: #fff; font-size: 3rem; margin-bottom: .5rem; letter-spacing: .01em; }
.hero-split .hero-photo { position: relative; min-height: 260px; }
.hero-split .hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-split .hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--espresso) 0%, rgba(42,27,18,0) 30%); }
@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .hero-photo { order: -1; height: 240px; }
  .hero-split .hero-photo::after { background: linear-gradient(180deg, rgba(42,27,18,0) 60%, var(--espresso) 100%); }
  .hero-split .hero-text { padding: 2rem 1.5rem; }
}

/* Lattiera Club */
.big-number { font-family: 'Fraunces', Georgia, serif; font-size: 3rem; line-height: 1; }
.stamps { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: .75rem; }
.stamp { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px dashed var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem; background: #fff; }
.stamp.filled { background: var(--accent); border: 2px solid var(--accent); color: #fff; font-weight: 600; }
.card .stamps { justify-content: flex-start; }
.card.text-center .stamps { justify-content: center; }
.qr-box { width: 220px; max-width: 100%; background: #fff; padding: 8px; border-radius: .75rem; border: 1px solid var(--border); }
.qr-box svg { width: 100%; height: auto; display: block; }
.qr-box.qr-big { width: 340px; }
.poster { background: #fff; border: 2px solid var(--espresso); border-radius: 1rem; padding: 2.5rem 1.5rem; }
@media print {
  header, footer, .no-print, .lang-switch { display: none !important; }
  body::before { display: none; }
  body { background: #fff; }
  .poster { border: none; }
}
