/* This app's own styles (simmons-estate#124). The house look is css/style.css, copied from Holiday & Sickness. */

.admin-only { display: none; }
body.is-admin .admin-only { display: inline-flex; }

/* The small grey second line in a cell, as Holiday & Sickness. */
.who-sub { display: block; font-size: 12px; font-weight: 400; color: var(--grey-text); margin-top: 3px; line-height: 1.35; }
.data-table td.num, .data-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.neg { color: #B71C1C; font-weight: 600; }
.data-table td a, .detail-value a { color: var(--dark); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.data-table td a:hover, .detail-value a:hover { color: var(--red); text-decoration-color: var(--red); }
.dash-wrap { max-height: 460px; }
.login-box { max-width: 420px; margin: 60px auto; padding: 0 16px; }
.nav-signout { color: rgba(255,255,255,0.6); }
.pre { white-space: pre-wrap; line-height: 1.45; }
.star-text { color: #E0A100; letter-spacing: 1px; white-space: nowrap; }
.star-off { color: var(--border); }

/* One check, read back. */
.detail-label { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--grey-text); margin-bottom: 3px; }
.detail-value { font-size: 16px; line-height: 1.45; word-break: break-word; }
.answer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 0 18px; }
.answer-table { width: 100%; border-collapse: collapse; }
.answer-table th { text-align: left; font-weight: 500; padding: 8px 12px 8px 0; width: 60%; vertical-align: top; border-top: 1px solid var(--cream); }
.answer-table td { padding: 8px 0; vertical-align: top; border-top: 1px solid var(--cream); }
.answer-table tr:first-child th, .answer-table tr:first-child td { border-top: none; }

/* The Cash Check form: phone first - one column, big targets, the submit button always in reach. */
/* The steps (cash-management#4): one card at a time, as Holiday & Sickness's request form (its css/hs.css rq-*). */
.cc-wrap { max-width: 620px; margin: 0 auto; padding: 0 16px 24px; }
.cc-top { display: flex; align-items: center; gap: 12px; padding: 14px 40px 10px 0; } /* clear of the dark-mode button */
.cc-exit { background: none; border: none; font-size: 20px; color: var(--grey-text); cursor: pointer; min-width: 40px; min-height: 40px; }
.cc-top-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase; flex: 1; }
.cc-top-step { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-text); white-space: nowrap; }
.rq-progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.rq-progress-bar { height: 100%; width: 0; background: var(--red); transition: width 0.3s ease; }
.rq-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--red); border-radius: 8px; padding: 26px 24px; box-shadow: 0 6px 24px rgba(0,0,0,0.06); animation: rq-in 0.25s ease; }
@keyframes rq-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rq-q { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 30px; letter-spacing: 0.02em; line-height: 1.15; margin-bottom: 6px; }
.rq-help { color: var(--grey-text); font-size: 16px; line-height: 1.45; margin-bottom: 18px; }
.rq-done { text-align: center; }
.rq-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 34px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.cc-done-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cc-section + .cc-section { margin-top: 18px; }
.cc-section-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey-text); padding-bottom: 4px; border-bottom: 2px solid var(--cream); }
.cc-nav { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 12px 0; margin-top: 14px; background: var(--cream); }
.cc-nav[hidden], .cc-step[hidden] { display: none; }
.cc-nav .btn { flex: 1; min-height: 52px; font-size: 18px; }
.cc-nav .btn[type="submit"] { flex: 2; }
.cc-form .field input, .cc-form .field select { min-height: 48px; font-size: 17px; }
/* The review card: each step a tappable block. */
.cc-rv-group { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; font: inherit; color: inherit; }
.cc-rv-group:hover, .cc-rv-group:focus-visible { border-color: var(--red); outline: none; }
.cc-rv-title { display: flex; justify-content: space-between; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.cc-rv-edit { color: var(--red); font-size: 14px; }
.cc-rv-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--cream); font-size: 15px; }
.cc-rv-row span { color: var(--grey-text); }
.cc-rv-row strong { text-align: right; font-weight: 600; }
.cc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cc-shop-area { font-size: 13px; margin-top: 4px; min-height: 16px; }
.cc-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--cream); }
.cc-item:first-of-type { border-top: none; }
.cc-q { font-size: 16px; line-height: 1.35; }
.cc-a { justify-self: end; }
.cc-comment-btn { grid-column: 1 / -1; justify-self: start; background: none; border: none; color: var(--red); font-size: 14px; cursor: pointer; padding: 0; }
.cc-comment { grid-column: 1 / -1; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); font-size: 16px; min-height: 40px; }
.money { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); }
.money span { padding: 0 4px 0 10px; color: var(--grey-text); }
.money input { width: 120px; border: none; background: transparent; padding: 8px 10px 8px 2px; font-size: 18px; min-height: 44px; text-align: right; }
.money:focus-within, .num-in:focus { outline: 2px solid var(--red); outline-offset: -1px; border-color: var(--red); }
.money input:focus { outline: none; }
.num-in { width: 80px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); font-size: 18px; min-height: 44px; text-align: center; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn { min-width: 76px; min-height: 44px; padding: 8px 14px; border: 2px solid var(--border); border-radius: 22px; background: var(--surface); font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.seg-btn:hover { border-color: var(--red); }
.seg-btn.on { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.seg-btn.on[data-v="No"] { background: var(--red); border-color: var(--red); color: #fff; }
.stars { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.star { background: none; border: none; font-size: 34px; line-height: 1; padding: 2px 3px; color: var(--border); cursor: pointer; min-width: 40px; min-height: 44px; }
.star.on { color: #E0A100; }
.star-n { margin-left: 8px; color: var(--grey-text); font-size: 14px; }
.cc-draft-hint { margin-top: 4px; font-size: 13px; text-align: center; }
.cc-draft-hint a { color: var(--red); }

.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.users-form { margin-top: 18px; }

/* The shop's history under the shop on The visit (cash-management#7). */
.cc-shop-info { background: var(--cream); border-radius: 6px; padding: 12px 14px; margin: 0 0 14px; font-size: 15px; }
.cc-shop-info[hidden] { display: none; }
.cc-info-block + .cc-info-block { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--border); }
.cc-info-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }
/* A section folds on its heading: the heading is the whole tap target, with the summary beside it and an arrow. */
.cc-info-block > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; }
.cc-info-block > summary::-webkit-details-marker { display: none; }
.cc-info-block > summary::after { content: "\203A"; margin-left: 4px; font-size: 22px; line-height: 1; color: var(--red); transform: rotate(90deg); transition: transform 0.15s; }
.cc-info-block:not([open]) > summary::after { transform: none; }
.cc-info-summary { flex: 1; text-align: right; font-size: 14px; color: var(--grey-text); }
.cc-info-body { padding-bottom: 2px; }
.cc-info-sub { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-text); margin: 10px 0 4px; }
.cc-info-comment { background: var(--surface); border-radius: 4px; padding: 6px 9px; margin-bottom: 5px; line-height: 1.4; word-break: break-word; }
.cc-info-order { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 5px 0; border-top: 1px solid var(--border); }
.cc-info-order span:nth-child(2) { text-align: right; }
.cc-info-order span:nth-child(3) { grid-column: 1 / -1; color: var(--grey-text); font-size: 13px; }
.cc-info-order strong { font-size: 14px; }
.cc-info-more { margin-top: 6px; }
.cc-info-more a { color: var(--red); }

/* /check, the PIN form (cash-management#10). */
body.pin-mode .menu-btn, body.pin-mode .pin-hide { visibility: hidden; }
body.pin-mode .cc-done-btns .pin-hide { display: none; }
body.pin-mode .wordmark { cursor: default; }
.pin-input { width: 100%; font-family: 'Barlow Condensed', sans-serif; font-size: 40px; letter-spacing: 0.5em; text-align: center; padding: 12px 14px; border: 2px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--dark); margin-bottom: 14px; }
.pin-input:focus { outline: none; border-color: var(--red); }
.pin-card .btn { width: 100%; min-height: 52px; font-size: 18px; }
.set-panel { max-width: 640px; }
.set-link { word-break: break-all; font-weight: 600; }
.em-check { margin-top: 16px; }
.em-check > summary { cursor: pointer; color: var(--red); font-size: 14px; margin-bottom: 8px; }

/* The G4S mailbox's To check list (cash-management#8). */
.inbox-status { margin-bottom: 10px; }
.inbox-panel { border-top-color: var(--warn); }
.inbox-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--cream); }
.inbox-item:first-of-type { border-top: none; }

/* Admin > Import (simmons-estate#125). */
.imp-panel { max-width: 720px; }
.imp-table { max-width: 420px; margin: 10px 0; }
.imp-table td.num { text-align: right; }

/* G4S Change Orders (simmons-estate#126). */
.owed { color: #B71C1C; }
.data-table tr.ord-closed td { color: var(--grey-text); }
.data-table tr.total-row td { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; text-transform: uppercase; border-top: 2px solid var(--dark); }
.oe-content { max-width: 1000px; }
.oe-outstanding { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 26px; min-height: 40px; display: flex; align-items: center; }
.oe-outstanding.is-paid { color: var(--ok); }
.ord-lines { margin-top: 12px; max-width: 520px; }
.ord-lines td.num { text-align: right; padding-left: 14px; white-space: nowrap; }
.dash-more { margin: 10px 0 0; }
.dash-more a { color: var(--red); }
/* The history of an order, as Holiday & Sickness's notes. */
.note { border-top: 1px solid var(--cream); padding: 10px 0; }
.note:first-of-type { border-top: none; }
.note-head { font-size: 13px; color: var(--grey-text); margin-bottom: 4px; }
.note-text { white-space: pre-wrap; line-height: 1.45; }

@media (max-width: 640px) {
  .answer-grid { grid-template-columns: 1fr; }
  .cc-wrap { padding: 0 12px 16px; }
  .rq-card { padding: 20px 16px; }
  .rq-q { font-size: 26px; }
  .cc-item { grid-template-columns: 1fr; }
  .cc-a { justify-self: stretch; }
  .seg-2 .seg-btn { flex: 1; }
  .money input { width: 100%; }
  .num-in { width: 100%; }
  .star { font-size: 30px; min-width: 36px; }
}

/* "All apps": back to the Simmons Apps landing page, left of the wordmark (cash-management#17). */
.topbar-start { display: flex; align-items: center; gap: 14px; }
.apps-link { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-text); text-decoration: none; white-space: nowrap; }
.apps-link:hover { color: var(--red); }
.apps-link:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 2px; }
.apps-link[hidden] { display: none; }

/* A filter under every column heading (public/js/colfilter.js, cash-management#19). */
.data-table .cf-row th { position: static; padding: 4px 6px 8px; text-transform: none; letter-spacing: 0; }
.cf-ctl { width: 100%; min-width: 72px; height: 30px; padding: 2px 6px; font-family: inherit; font-size: 13px; color: var(--dark); background: var(--surface); border: 1px solid var(--border); border-radius: 3px; }
.cf-ctl.cf-on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.cf-bar { display: flex; gap: 14px; align-items: center; margin: 0 0 8px; font-size: 14px; color: var(--grey-text); }
.cf-bar[hidden] { display: none; }
.cf-bar button { padding: 0; font: inherit; color: var(--red); text-decoration: underline; background: none; border: none; cursor: pointer; }
.data-table tr.cf-hidden { display: none !important; }
@media (max-width: 640px) {
  /* A stacked table hides its headings; its filters become one panel above the rows. */
  .data-table.stack thead { display: block; }
  .data-table.stack thead tr:not(.cf-row) { display: none; }
  .data-table.stack thead tr.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .data-table.stack .cf-row th { display: block; padding: 0; border: none; background: none; }
  .data-table.stack .cf-row th:empty { display: none; }
  .data-table.stack .cf-row th::before { content: attr(data-label); display: block; margin-bottom: 2px; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-text); }
  .cf-ctl { height: 40px; font-size: 15px; }
}
