/* Bravo Coco – Daily Kitchen Report. Brand: navy #161670, orange #F69220, Montserrat. No build step. */
:root {
  --navy: #161670; --navy-2: #23238f; --orange: #F69220; --ink: #14142b; --muted: #62647a; --line: #dcdde8;
  --bg: #f4f4f9; --card: #fff; --red: #c62828; --red-bg: #fdeaea; --green: #1b7a43; --green-bg: #e6f5ec; --amber-bg: #fff3df; --amber: #9a5a00;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 8.5rem; }
body { margin: 0; font: 500 16px/1.4 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
a { color: var(--navy); }
small { font-size: .72rem; }
.muted { color: var(--muted); font-size: .85rem; }
.neg { color: var(--red); }

.top { display: flex; align-items: center; gap: 1rem; padding: .55rem 1rem; background: var(--navy); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.brand img { background: #fff; border-radius: 8px; padding: 3px; }
.brand b { display: block; font-weight: 800; letter-spacing: .06em; font-size: .95rem; }
.brand small { color: var(--orange); font-weight: 600; }
.top nav { display: flex; gap: .25rem; margin-left: auto; }
.top nav a { color: #fff; text-decoration: none; padding: .55rem .8rem; border-radius: 8px; font-weight: 600; font-size: .9rem; }
.top nav a.on { background: rgba(255,255,255,.16); }
.who { display: flex; align-items: center; gap: .6rem; margin: 0; }
.who span { text-align: right; font-size: .82rem; line-height: 1.15; }
.who small { display: block; color: #c9c9ee; }
.who .btn { color: #fff; border-color: rgba(255,255,255,.4); }

main { max-width: 1180px; margin: 0 auto; padding: .75rem .75rem 5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin-bottom: .9rem; }

.btn { font: inherit; font-weight: 700; font-size: .9rem; min-height: 44px; padding: .5rem .95rem; border-radius: 10px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.ghost { border-color: var(--line); background: transparent; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; }

input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); width: 100%; min-height: 44px; padding: .5rem .6rem; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; }
textarea { min-height: 4.2rem; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .seg button:focus-visible { outline: 3px solid rgba(246,146,32,.55); outline-offset: 1px; border-color: var(--orange); }
input[type=checkbox] { width: 26px; height: 26px; min-height: 0; accent-color: var(--navy); }
label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); }
label input, label select, label textarea { margin-top: .25rem; font-weight: 500; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: #f3f3f7; color: #444; }

.alert { background: var(--red-bg); color: var(--red); border-radius: 9px; padding: .6rem .8rem; font-weight: 600; }
.login { max-width: 400px; margin: 8vh auto 0; display: grid; gap: .9rem; }
.login h1 { color: var(--navy); }

/* report */
.daybar { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.daybar .btn { font-size: 1.5rem; width: 48px; padding: 0; }
.day { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.day h1 { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.day h1 span { font-weight: 600; color: var(--ink); }
.day input { width: auto; }

.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.strip > div { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 10px; padding: .45rem .65rem; }
.strip small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.strip b { font-size: 1.02rem; font-weight: 800; }
.strip em { font-style: normal; font-weight: 700; font-size: .8rem; margin-left: .3rem; }

.jump { position: sticky; top: 0; z-index: 5; display: flex; gap: .35rem; overflow-x: auto; padding: .45rem 0; background: var(--bg); scrollbar-width: none; }
.jump a { flex: none; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .75rem; font-size: .8rem; font-weight: 600; color: var(--ink); }
.jump b { color: var(--orange); font-weight: 800; }
.status { position: sticky; top: 3.1rem; z-index: 4; font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--bg); padding: 0 0 .4rem; min-height: 1.5rem; }
.status .offline { color: var(--red); margin-left: .5rem; }
.lockbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; background: var(--green-bg); color: var(--green); }

.sec > header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .7rem; }
.sec h2 { font-size: 1.05rem; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: .55rem; }
.sec h2 i { font-style: normal; background: var(--navy); color: #fff; width: 1.9rem; height: 1.9rem; border-radius: 8px; display: inline-grid; place-items: center; font-size: .95rem; flex: none; }
.hint { margin: -.3rem 0 .7rem; }
.sub { font-size: .9rem; font-weight: 800; color: var(--navy); margin: 1rem 0 .45rem; }
.sec-foot { display: flex; justify-content: flex-end; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.badge { font-size: .76rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; background: #ececf6; color: var(--navy); }
.badge.attention { background: var(--amber-bg); color: var(--amber); }
.badge.critical { background: var(--red-bg); color: var(--red); }
.badge.ok, .badge.perfect { background: var(--green-bg); color: var(--green); }

.grid { display: grid; gap: .7rem; grid-template-columns: 1fr; margin-top: .2rem; }
@media (min-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; } .span2 { grid-column: span 2; } }
@media (min-width: 900px) { .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } }

/* B – kitchens side by side */
.kitchens { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .kitchens { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); } }
.kitchen { border: 1.5px solid var(--navy); border-radius: var(--r); overflow: hidden; }
.kitchen h3 { background: var(--navy); color: #fff; padding: .55rem .7rem; font-size: 1rem; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.kitchen h3 .badge { background: var(--green-bg); color: var(--green); }
.kitchen h3 .badge.attention { background: var(--orange); color: #241400; }
table { border-collapse: collapse; width: 100%; }
.staff th, .staff td { padding: .25rem .2rem; text-align: center; font-size: .85rem; }
.staff thead th { font-size: .66rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding-top: .5rem; }
.staff tbody th, .staff tfoot th { text-align: left; padding-left: .6rem; font-weight: 600; white-space: nowrap; }
.staff .shift th { background: #ececf6; color: var(--navy); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .35rem .6rem; }
.staff .shift td { background: #ececf6; }
.staff input[type=number] { padding: .3rem .1rem; text-align: center; min-width: 2.6rem; font-weight: 700; -moz-appearance: textfield; }
.staff input::-webkit-outer-spin-button, .staff input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.staff .note td { padding: 0 .5rem .45rem; }
.staff .note input { min-height: 34px; font-size: .82rem; padding: .25rem .5rem; border-style: dashed; }
.staff .calc { font-weight: 700; color: var(--muted); }
.staff tfoot td, .staff tfoot th { border-top: 1px solid var(--line); padding: .45rem .2rem; font-weight: 700; }
.staff tfoot th { padding-left: .6rem; }
.staff tfoot .grand td, .staff tfoot .grand th { background: #f6f6fb; font-weight: 800; }
.staff .duty td { text-align: left; padding: .5rem .6rem; font-weight: 500; font-size: .8rem; color: var(--muted); }
.gap { display: inline-block; font-size: .72rem; font-weight: 800; padding: .2rem .4rem; border-radius: 6px; white-space: nowrap; }
.gap.short { background: var(--red); color: #fff; }
.gap.ok { background: var(--green-bg); color: var(--green); }
.gap.over { background: #ececf6; color: var(--navy); }
.gap.none { color: var(--muted); }

.scroll { overflow-x: auto; margin-top: .6rem; }
.plain th, .plain td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); text-align: right; font-size: .88rem; white-space: nowrap; }
.plain th:first-child, .plain td:first-child { text-align: left; }
.plain thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.plain .grand th, .plain .grand td { font-weight: 800; background: #f6f6fb; }
.plain.inputs td { padding: .2rem; }
.plain.inputs input { min-width: 5rem; }
.plain.inputs input.name { min-width: 9.5rem; }
.plain.inputs input[type=number] { text-align: right; }

/* checklist rows */
.rows { display: grid; }
.row { display: grid; gap: .45rem .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); align-items: center; grid-template-columns: 1fr 1fr; }
.row .what { grid-column: 1 / -1; font-weight: 700; }
.row .rem { grid-column: 1 / -1; }
.row .pick { display: flex; align-items: center; gap: .4rem; }
.row .pick small { font-weight: 800; color: var(--muted); width: 1.6rem; }
@media (min-width: 900px) {
  .row { grid-template-columns: 15rem auto auto 1fr; }
  .row.two { grid-template-columns: 15rem 1fr; }
  .row .what, .row .rem { grid-column: auto; }
  .signs .row { grid-template-columns: 17rem 1fr auto; }
}
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { font: inherit; font-size: .82rem; font-weight: 700; min-height: 42px; min-width: 3rem; padding: 0 .6rem; border: 0; border-right: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--navy); color: #fff; }
.seg button.on.v-yes, .seg button.on.v-ok { background: var(--green); }
.seg button.on.v-no, .seg button.on.v-attention { background: var(--red); }
.tick { display: flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--ink); min-height: 44px; }
.tick input { margin: 0; }

.entry { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; padding: .7rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fafafd; position: relative; }
.entry .wide { grid-column: 1 / -1; }
.entry .del { position: absolute; top: .3rem; right: .3rem; min-height: 34px; padding: 0 .6rem; border: 0; color: var(--red); }
@media (min-width: 900px) { .entry { grid-template-columns: repeat(6, 1fr); padding-right: 3rem; } .entry .wide { grid-column: span 2; } }
.addline { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .5rem 0 .8rem; }
.signed b { font-weight: 800; }

/* dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.tile { background: var(--navy); color: #fff; border-radius: var(--r); padding: .8rem .9rem; }
.tile small { display: block; color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tile b { font-size: 1.5rem; font-weight: 800; }
.monthbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.monthbar h1 { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.days td a { font-weight: 700; text-decoration: none; }
.days tr.off td { color: #a3a4b5; }
.days tr.today td { background: #fff7ea; }

@media print {
  .top nav, .who, .jump, .status, .sec-foot, .addline .btn, .del, .daybar .btn, .day input { display: none !important; }
  body { background: #fff; font-size: 12px; } .card { break-inside: avoid; border-color: #999; }
}

/* phone */
.staff { table-layout: fixed; }
.staff th:first-child { width: 21%; }
.staff th:last-child, .staff td:last-child { width: 17%; }
.staff input { min-width: 0 !important; }
html { scroll-padding-top: 5.8rem; }
@media (max-width: 619px) {
  .top { gap: .4rem .6rem; padding: .45rem .6rem; }
  .brand small, .who span { display: none; }
  .top nav { margin-left: auto; }
  .top nav a { padding: .5rem .55rem; }
  .who .btn { min-height: 38px; padding: .3rem .6rem; font-size: .8rem; }
  main { padding: .6rem .5rem 4rem; }
  .card { padding: .75rem .65rem; }
  .day h1 { font-size: 1.05rem; }
  .strip { grid-template-columns: 1fr 1fr; }
  .kitchen { margin: 0 -.2rem; }
  .staff tbody th, .staff tfoot th { padding-left: .4rem; font-size: .78rem; white-space: normal; }
  .staff thead th { font-size: .56rem; letter-spacing: 0; }
  .staff th, .staff td { padding: .2rem .1rem; }
  .gap { font-size: .62rem; padding: .18rem .22rem; }
  .seg button { min-width: 2.6rem; padding: 0 .45rem; }
}
@media (max-width: 899px) { .row.stack { grid-template-columns: 1fr; } .row { min-width: 0; } .row > * { min-width: 0; } }
textarea.rem { field-sizing: content; min-height: 44px; resize: none; }

/* "View as" bar (admin impersonating another user) */
.viewing-as{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;margin:0;padding:8px 14px;background:#F69220;color:#161670;font-size:14px}
.viewing-as button{border:0;border-radius:999px;padding:6px 14px;background:#161670;color:#fff;font:inherit;font-weight:700;cursor:pointer}

/* Demo accounts on the sign-in page (DEMO_LOGINS=true) */
.login.demo{margin-top:16px}
.login.demo h2{margin:0 0 4px;font-size:17px}
.login.demo code{background:#eef;border-radius:6px;padding:2px 6px;font-size:13px}
.login.demo form{margin:8px 0 0}
.demo-acc{display:block;width:100%;text-align:left;border:1px solid #d9d9ea;border-radius:12px;background:#fff;padding:10px 12px;font:inherit;color:inherit;cursor:pointer}
.demo-acc:hover,.demo-acc:focus-visible{border-color:#F69220}
.demo-acc b{display:block;color:#161670}
.demo-acc small{display:block;color:#667;font-size:12px}
.demo-acc span{display:block;font-size:13px;margin-top:2px}
