/* Digital Divine Operations — Divine navy & gold, phone-first.
   The signed-in business's name and logo are the primary branding;
   "Powered by Digital Divine Operations" sits underneath, smaller,
   always visible. Tap targets are at least 44px; focus is always
   visible; text meets WCAG AA contrast on the navy ground. */

:root {
  --navy: #0a1128;
  --navy-2: #111a38;
  --navy-3: #1a2547;
  --gold: #d4af37;
  --gold-soft: #e8cf7a;
  --cream: #f0ead8;
  --muted: #b9c1d6;
  --line: #2c3a63;
  --danger: #ff9d8a;
  --ok: #9fe6a0;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.45;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: #141414; padding: 10px 16px; z-index: 50;
}
.skip-link:focus { left: 8px; top: 8px; }

a { color: var(--gold-soft); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy-2);
  border-bottom: 2px solid var(--gold);
  padding: 8px 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--navy-3); }
.brand .initial {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background: var(--navy-3); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: bold; border: 2px solid var(--gold);
}
.brand-text { min-width: 0; }
.brand-name {
  font-size: 20px; font-weight: bold; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub { font-size: 12.5px; color: var(--muted); line-height: 1.2; }
.powered-line { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.powered-line strong { color: var(--gold-soft); font-weight: normal; }

.header-btns { display: flex; gap: 8px; margin-left: auto; }
.nav-btn {
  min-height: 44px; min-width: 44px; padding: 8px 14px;
  background: var(--navy-3); color: var(--cream);
  border: 1.5px solid var(--gold); border-radius: 10px;
  font: inherit; font-size: 15.5px; cursor: pointer;
}
.nav-btn[aria-pressed="true"] { background: var(--gold); color: #141414; }

.main-nav {
  flex: 1 1 100%;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 8px 0 4px;
}
.main-nav[hidden] { display: none; }
.main-nav a, .main-nav button {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 8px 6px;
  background: var(--navy-3); color: var(--cream); text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 15px; cursor: pointer; width: 100%;
}
.main-nav a[aria-current="page"] { border-color: var(--gold); color: var(--gold-soft); }
.main-nav .logout-item { color: var(--danger); }

/* ---------- layout ---------- */

main { max-width: 760px; margin: 0 auto; padding: 16px 14px 40px; }
main:focus { outline: none; }

h1 { font-size: 26px; margin: 6px 0 12px; color: var(--cream); }
h2 { font-size: 21px; margin: 22px 0 10px; color: var(--gold-soft); }
h3 { font-size: 18px; margin: 16px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.big-money { font-size: 30px; font-weight: bold; color: var(--gold-soft); }
.ok-text { color: var(--ok); }
.danger-text { color: var(--danger); }

.card {
  background: var(--navy-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin: 12px 0;
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.inspiration {
  text-align: center; font-style: italic; color: var(--gold-soft);
  font-size: 19px; padding: 10px 6px 2px;
}

.glance {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0;
}
.glance .cell {
  background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px;
}
.glance .cell .label { font-size: 13.5px; color: var(--muted); }
.glance .cell .value { font-size: 22px; font-weight: bold; color: var(--cream); }

/* ---------- lists & rows ---------- */

.row-item {
  display: block; width: 100%; text-align: left;
  background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin: 8px 0; color: var(--cream); font: inherit; cursor: pointer;
  min-height: 44px;
}
a.row-item { text-decoration: none; }
.row-item .row-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.row-item .row-title { font-weight: bold; font-size: 17.5px; }
.row-item .row-sub { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.row-item .amount { font-weight: bold; color: var(--gold-soft); white-space: nowrap; }

.chip {
  display: inline-block; font-size: 12.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold-soft); vertical-align: middle;
}
.chip.paid, .chip.confirmed, .chip.done { border-color: var(--ok); color: var(--ok); }
.chip.void, .chip.cancelled { border-color: var(--danger); color: var(--danger); }
.chip.waiting { border-color: var(--muted); color: var(--muted); }
.dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: middle; margin-right: 6px; border: 1px solid var(--line); }

/* ---------- forms ---------- */

label { display: block; font-size: 15px; color: var(--muted); margin: 12px 0 4px; }
label .req { color: var(--gold); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--navy); color: var(--cream);
  border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16.5px;
}
textarea { min-height: 76px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; min-height: 24px; vertical-align: middle; accent-color: var(--gold); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.check-row label { margin: 0; color: var(--cream); font-size: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; margin: 6px 6px 6px 0;
  background: var(--gold); color: #141414; border: none; border-radius: 10px;
  font: inherit; font-size: 16.5px; font-weight: bold; cursor: pointer; text-decoration: none;
}
.btn.secondary { background: var(--navy-3); color: var(--cream); border: 1.5px solid var(--gold); font-weight: normal; }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); font-weight: normal; }
.btn.small-btn { min-height: 44px; padding: 8px 12px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: default; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 44px; min-width: 44px; padding: 6px 10px;
  background: var(--navy-3); color: var(--gold-soft);
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer;
}

.form-error {
  background: #3a1620; border: 1px solid var(--danger); color: #ffd9d0;
  border-radius: 10px; padding: 10px 12px; margin: 12px 0; white-space: pre-line;
}
.form-note {
  background: var(--navy-3); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin: 12px 0;
}

.line-editor .line-row {
  display: grid; grid-template-columns: 1fr 64px 96px; gap: 8px; margin: 8px 0; align-items: end;
}
.line-editor .line-row.hours { grid-template-columns: 1fr 64px 96px 76px; }
.line-editor .line-row label { margin: 0 0 2px; font-size: 13px; }
.line-editor .remove-line { min-height: 44px; }

table.plain { width: 100%; border-collapse: collapse; margin: 10px 0; }
table.plain th, table.plain td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 15.5px; vertical-align: top; }
table.plain th { color: var(--muted); font-weight: normal; }
table.plain td.num, table.plain th.num { text-align: right; }
.totals { text-align: right; font-size: 17px; margin: 10px 0; }
.totals .grand { font-size: 21px; color: var(--gold-soft); font-weight: bold; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line); padding: 18px 14px 30px; text-align: center;
  color: var(--muted); font-size: 14px;
}
.site-footer .powered strong { color: var(--gold-soft); font-weight: normal; }

/* ---------- platform (sign-in / setup) ---------- */

.platform-hero { text-align: center; padding: 22px 0 6px; }
.platform-hero img { width: 92px; height: 92px; }
.platform-hero .platform-name { font-size: 24px; font-weight: bold; margin-top: 8px; }
.platform-hero .platform-sub { color: var(--muted); font-size: 15px; }

.manual-text { white-space: pre-wrap; font-size: 16.5px; line-height: 1.55; }

.job-card { border-left: 6px solid var(--gold); }
.job-card .row-sub { color: var(--muted); }

.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; }
.day-strip button {
  flex: 0 0 auto; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  background: var(--navy-3); color: var(--cream); border: 1px solid var(--line); font: inherit; cursor: pointer;
}
.day-strip button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (min-width: 560px) {
  .glance { grid-template-columns: repeat(3, 1fr); }
  .main-nav { grid-template-columns: repeat(4, 1fr); }
}
