/* ClockInTeam — brand styles
 * White + tones of white, ONE accent: Deep Indigo #312E81.
 * Ink #101828. Gold is jewellery only: hairlines, rings, the map pin.
 */
:root {
  --indigo: #312E81;
  --indigo-top: #4A44C2;
  --ink: #101828;
  --ink-soft: #475467;
  --paper: #ffffff;
  --paper-soft: #F7F7FA;
  --paper-line: #E7E7EF;
  --gold: #B8860B;
  --gold-soft: #C9A227;
  --good: #1a7f4b;
  --warn: #b54708;
  --bad: #b42318;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--paper-soft); display: flex; flex-direction: column; }

/* ---------- wordmark ---------- */
.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; color: var(--ink); letter-spacing: -0.01em;
}
.wordmark span { color: var(--indigo); }
.wordmark-lg { font-size: 40px; text-align: center; }
.wordmark-sm { font-size: 22px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper); border-bottom: 1px solid var(--paper-line);
  padding: 12px 18px 10px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.company-name { color: var(--ink-soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- screens ---------- */
.screen { flex: 1; padding: 18px 16px 110px; }
.screen-door { padding-top: 28px; }
h1.screen-title { font-size: 24px; margin: 2px 0 4px; font-weight: 700; }
.screen-sub { color: var(--ink-soft); margin: 0 0 16px; font-size: 15px; }
.card {
  background: var(--paper); border: 1px solid var(--paper-line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 17px; margin: 0 0 8px; }
.card h3 { font-size: 15px; margin: 0 0 6px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gold-rule { height: 2px; width: 72px; margin: 14px auto; background: linear-gradient(90deg, transparent, var(--gold-soft), transparent); border: 0; }
.gold-ring { border: 2px solid var(--gold-soft); border-radius: 50%; padding: 3px; background: var(--paper); }

/* ---------- role door ---------- */
.beaver-hero { display: block; width: 132px; height: 132px; margin: 8px auto 4px; border-radius: 50%; }
.door {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--paper-line); border-radius: var(--radius);
  padding: 18px; margin: 0 0 12px; box-shadow: var(--shadow); font: inherit; color: var(--ink);
}
.door:active { transform: scale(0.99); }
.door .door-title { font-size: 19px; font-weight: 700; display: block; }
.door .door-sub { color: var(--ink-soft); font-size: 14px; display: block; margin-top: 2px; }
.door-primary { border: 2px solid var(--indigo); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: 14px; padding: 12px 18px; background: var(--paper);
  color: var(--indigo); border: 1.5px solid var(--indigo); text-align: center;
}
.btn-primary {
  background: linear-gradient(180deg, var(--indigo-top), var(--indigo));
  color: #fff; border: 0;
}
.btn-block { display: block; width: 100%; }
.btn-quiet { border-color: var(--paper-line); color: var(--ink-soft); }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: 0.55; }
.btn-clockin {
  display: block; width: 100%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--indigo-top), var(--indigo));
  color: #fff; font-size: 24px; font-weight: 800; letter-spacing: 0.04em;
  border-radius: 22px; padding: 24px 16px; box-shadow: 0 14px 30px rgba(49, 46, 129, 0.35);
}
.btn-clockin:active { transform: scale(0.99); }
.linklike { background: none; border: 0; color: var(--indigo); font: inherit; cursor: pointer; padding: 4px; text-decoration: underline; }

/* ---------- clock screen ---------- */
.clock-img { display: block; width: min(240px, 62vw); margin: 6px auto 14px; }
.status-pill {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #ECECF7; color: var(--indigo);
}
.status-pill.in { background: #E7F6EE; color: var(--good); }
.status-pill.lunch { background: #FDF0E2; color: var(--warn); }
.site-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip {
  border: 1.5px solid var(--paper-line); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer;
}
.chip.selected { border-color: var(--indigo); background: #ECECF7; font-weight: 700; color: var(--indigo); }
.banner {
  border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px;
  background: #FDF0E2; color: #7a2e0e; border: 1px solid #F5D9BC;
}
.banner.info { background: #ECECF7; color: var(--indigo); border-color: #D5D3F0; }

/* ---------- lists ---------- */
.list-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--paper-line);
}
.list-row:last-child { border-bottom: 0; }
.list-main { font-weight: 600; }
.list-sub { color: var(--ink-soft); font-size: 13.5px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.idle { background: #B8BCC9; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #ECECF7; color: var(--indigo); white-space: nowrap; }
.tag.warn { background: #FDF0E2; color: var(--warn); }
.tag.bad { background: #FDECEA; color: var(--bad); }
.tag.good { background: #E7F6EE; color: var(--good); }
.empty { text-align: center; color: var(--ink-soft); padding: 22px 10px; }
.empty img { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 8px; }

/* ---------- forms ---------- */
label.field { display: block; font-size: 13.5px; font-weight: 600; margin: 12px 0 5px; }
input[type="text"], input[type="number"], input[type="tel"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--paper-line);
  border-radius: 12px; background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--indigo); outline-offset: 0; border-color: var(--indigo); }
.form-error { color: var(--bad); font-size: 14px; margin-top: 8px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
input[type="checkbox"].switch { width: 24px; height: 24px; accent-color: var(--indigo); }

/* ---------- week bars (calm) ---------- */
.weekbars { display: flex; align-items: flex-end; gap: 8px; height: 96px; padding-top: 18px; }
.weekbars .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: pointer; background: none; border: 0; font: inherit; padding: 0; }
.weekbars .bar { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: var(--indigo); min-height: 4px; position: relative; }
.weekbars .bar.stub { background: #D8D6EA; }
.weekbars .bar-label { font-size: 12px; font-weight: 700; color: var(--indigo); margin-bottom: 4px; min-height: 15px; }
.weekbars .day-label { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.big-total { font-size: 34px; font-weight: 800; letter-spacing: -0.01em; }
.estimate { font-size: 19px; font-weight: 700; color: var(--indigo); }

/* ---------- hours sheet table ---------- */
table.sheet { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sheet th, table.sheet td { padding: 7px 4px; text-align: right; border-bottom: 1px solid var(--paper-line); }
table.sheet th:first-child, table.sheet td:first-child { text-align: left; }
table.sheet th { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.ot { color: var(--warn); font-weight: 700; }

/* ---------- map ---------- */
.map-box { height: 260px; border-radius: 14px; overflow: hidden; border: 1px solid var(--paper-line); background: #EDEDF3; }
.map-fallback { padding: 14px; font-size: 14px; color: var(--ink-soft); }
.gold-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: radial-gradient(circle at 35% 35%, #F3D27A, #C9A227 55%, #8a6d1c);
  border: 2px solid #8a6d1c; box-shadow: 0 4px 10px rgba(16,24,40,.35);
  display: flex; align-items: center; justify-content: center;
}
.gold-pin::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--indigo); border: 2px solid #fff; }
.gold-pin-wrap { background: none; border: 0; }

/* ---------- bottom nav ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; z-index: 30;
  background: var(--paper); border-top: 1px solid var(--paper-line);
  display: flex; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.navitem {
  flex: 1; background: none; border: 0; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink); /* icons + labels FULLY visible at all times */
  padding: 2px 0 0;
}
.navitem .navicon {
  width: 46px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
}
.navitem .navicon img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.navitem.selected .navicon { background: #ECECF7; box-shadow: inset 0 0 0 1.5px var(--indigo); }
.navitem .navlabel { font-size: 11.5px; font-weight: 600; color: var(--ink); }

/* ---------- toast & modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 14.5px; z-index: 60; box-shadow: var(--shadow); max-width: 88vw; text-align: center;
}
.policy-text {
  white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; background: var(--paper-soft);
  border: 1px solid var(--paper-line); border-radius: 12px; padding: 14px; max-height: 46vh; overflow: auto;
}
details.more { margin-top: 8px; }
details.more summary { cursor: pointer; color: var(--indigo); font-weight: 600; font-size: 14px; }
.invite-code {
  font-size: 30px; font-weight: 800; letter-spacing: 0.22em; text-align: center;
  background: var(--paper-soft); border: 1.5px dashed var(--indigo); border-radius: 14px; padding: 12px;
  color: var(--indigo);
}
