/* The client portal at app.alrightdev.com. It sits on top of the website's site.css, so the
   fonts, colours and theme match alrightdev.com and follow the admin panel's settings. */

[hidden] { display: none !important; }   /* site.css sets display on .btn, which would win */

.portal { padding: clamp(28px, 5vw, 48px) 0 56px; display: grid; gap: 16px; }
.bar nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.bar-end { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.bar nav a[aria-current] { font-weight: 600; }

.page-top { margin-bottom: 4px; }
.page-top h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 6px; }
.muted { color: var(--text-2); }
.opt { color: var(--text-2); font-weight: 400; font-size: 13px; }
.hint { color: var(--text-2); font-size: 13px; margin-top: -4px; }
.err { color: var(--bad, #c42b1c); font-size: 14px; }

.card { padding: 22px 24px; border-radius: var(--r); background: var(--card); border: 1px solid var(--stroke); }
.card h2 { font-size: 1.15rem; margin-bottom: 12px; }
.card > p { color: var(--text-2); max-width: 64ch; }
.card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.auth { max-width: 26rem; margin: 6vh auto 0; }
.auth h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth .muted { margin-bottom: 20px; }
.auth .alt { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.auth .done { margin-top: 16px; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.form label:has(.opt) { display: block; }
.form label:has(.opt) input { margin-top: 6px; }
.form input, .input, .textarea {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--text); background: var(--ctl, var(--card));
  border: 1px solid var(--stroke); border-radius: var(--r-sm, 6px);
}
.form .btn { justify-self: start; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field .label, .field label { font-size: 14px; font-weight: 500; }
.is-busy { opacity: .6; pointer-events: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stat { text-decoration: none; color: inherit; display: grid; gap: 4px; align-content: start; }
.stat:hover, .stat:focus-visible { border-color: var(--accent); }
.stat .big { font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat .small-big { font-size: 1.15rem; font-weight: 600; }
.stat .muted { font-size: 14px; }

.list { display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  text-decoration: none; color: inherit; padding: 16px 20px; }
.row:hover, .row:focus-visible { border-color: var(--accent); }
.row-main { display: grid; gap: 2px; }
.row-main .muted { font-size: 13px; }
.row-end { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.back { font-size: 14px; }
.back a { text-decoration: none; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--selected); color: var(--accent-text); }
.tag-paid { background: color-mix(in srgb, var(--good, #0f7b0f) 16%, transparent); color: var(--good, #0f7b0f); }
.tag-over { background: color-mix(in srgb, var(--bad, #c42b1c) 16%, transparent); color: var(--bad, #c42b1c); }
.tag-void, .tag-cancelled { background: var(--subtle, var(--selected)); color: var(--text-2); }

.inv-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
.inv-head h2 { margin-bottom: 2px; }
.inv-head .muted { font-size: 14px; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.inv-table th, .inv-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--divider, var(--stroke)); }
.inv-table thead th { font-size: 13px; color: var(--text-2); font-weight: 600; }
.inv-table .num { text-align: right; white-space: nowrap; }
.inv-table tfoot th { font-size: 1rem; border-bottom: none; padding-top: 14px; }
.inv-note { margin-top: 16px; color: var(--text-2); white-space: pre-wrap; max-width: 64ch; }
.paid-line { margin-top: 16px; font-weight: 500; }

.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slots button { padding: 8px 14px; font: inherit; border-radius: var(--r-sm, 6px);
  border: 1px solid var(--stroke); background: var(--ctl, var(--card)); color: var(--text); cursor: pointer; }
.slots button:hover { border-color: var(--accent); }
.slots button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
.slots .muted { margin: 0; }

.avatar-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--selected); display: grid;
  place-items: center; overflow: hidden; font-weight: 600; color: var(--accent-text); font-size: 1.4rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.file { font: inherit; font-size: 14px; }

@media print {
  .bar, .foot, .no-print, .back, #list { display: none !important; }
  .card { border: none; padding: 0; }
  [hidden] { display: none !important; }   /* site.css sets display on .btn, which would win */

.portal { padding: 0; }
}

@media (max-width: 620px) {
  .row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .row-end { width: 100%; justify-content: space-between; }
  .bar nav { gap: 4px 12px; font-size: 14px; }
}

/* ---- sign-up picture check ---- */
.cap-field { display: grid; gap: 8px; }
.cap-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* our own picture check: see-through letters on the same soft tint as the buttons */
.cap-img { border: 1px solid var(--tint-line); border-radius: 14px; background: var(--tint); box-shadow: var(--tint-sh);
  max-width: 100%; height: auto; image-rendering: pixelated; }
.cap-input { max-width: 14rem; text-transform: uppercase; letter-spacing: .22em;
  font-size: 1.05rem; }
/* the honeypot: off-screen rather than display:none, which some bots check for */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* projects */
.ph-bar { display: block; height: 6px; border-radius: 999px; background: var(--selected);
  overflow: hidden; margin-top: 8px; max-width: 420px; }
.ph-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.detail .ph-bar { margin: 4px 0 16px; }
h3.sub { font-size: 1rem; margin: 22px 0 8px; }
.ph-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.ph-list li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ph-list li .muted { font-size: 13px; margin-left: auto; }
.ph-list .ph-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none;
  border-radius: 50%; border: 1px solid var(--stroke); font-size: 12px; font-weight: 700; }
.ph-list li.is-done .ph-mark { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
.ph-list.plain li { justify-content: space-between; }
.small-note { margin-top: 22px; font-size: 13px; max-width: 60ch; }
.quote-note { margin-top: 20px; font-weight: 500; max-width: 60ch; }

/* ---- Client App on phones (2.12.0): bottom tab bar, safe areas, the Add to Home Screen hint ---- */
.tabbar { display: none; }
.tabbar .i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  .bar { padding-top: env(safe-area-inset-top); }
  .bar nav { display: none; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--stroke);
    background: color-mix(in srgb, var(--card, #fff) 88%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px;
    border-radius: var(--r-sm); color: var(--text-2); font-size: 11px; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tabbar a[aria-current] { color: var(--accent-text, var(--accent)); }
  .tabbar a[aria-current] .i { stroke-width: 2.25; }
  body[data-account="signed"] .foot { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .btn { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
}
@media (display-mode: standalone) { .bar-end a[href="https://alrightdev.com"] { display: none; } }
.app-hint { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 31;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--card, #fff);
  border: 1px solid var(--stroke); box-shadow: 0 10px 30px rgb(0 0 0 / .14); }
.app-hint img { border-radius: 10px; flex: none; }
.app-hint p { margin: 0; display: grid; font-size: 14px; }
.app-hint p span { color: var(--text-2); }
.app-hint-x { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--hover, transparent); color: var(--text-2); font-size: 22px; cursor: pointer; }

/* 2.14.0: no scroll bars */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* 2.14.1: the picture button looks like a button, and the top bar stays on one line on phones */
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.avatar-row > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.avatar-row .hint { margin: 0; }
@media (max-width: 760px) {
  .bar { flex-wrap: nowrap; align-items: center; gap: 10px; }
  .bar .brand { min-width: 0; }
  .bar-end { margin-left: auto; flex: none; }
  .bar-end a[href="https://alrightdev.com"] { display: none; }
}

/* 2.16.1: the one-time "new app icon" note on iPhone */
.icon-note{position:fixed;left:12px;right:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:60;display:flex;gap:12px;align-items:center;padding:14px 16px;border-radius:14px;background:var(--card,#fff);color:var(--text,#1c1a2e);border:1px solid var(--stroke,#e3e5e8);box-shadow:0 12px 30px rgb(0 0 0 / .18);font-size:14px;line-height:1.45}
.icon-note p{margin:0;flex:1}
.icon-note button{flex:none;min-height:40px;padding:0 14px;border:0;border-radius:10px;background:var(--accent,#4b4ff0);color:var(--on-accent,#fff);font:inherit;font-weight:700;cursor:pointer}

/* 2.17.0: sign-in code step */
.code-input{font:700 28px/1.2 inherit;letter-spacing:.5em;text-align:center;font-variant-numeric:tabular-nums}
.form .check{display:flex;flex-direction:row;align-items:center;gap:10px;font-weight:500}
.form .check input{width:20px;height:20px;margin:0;flex:none}
.linkish{background:none;border:0;padding:0;font:inherit;color:var(--accent-text,var(--accent));text-decoration:underline;cursor:pointer}
