/* Layout: a menu down the left (a row you swipe on a phone), one part of the app at a time on the right.
   One look only: Nothing Fancy's own colours and type, the same as the website and the phone pages. */
:root {
  --white: rgb(242,241,238);
  --paper: #ffffff;
  --black: rgb(26,26,26);
  --grey: rgb(96,94,88);
  --pink: rgb(255,107,139);
  --mint: rgb(76,246,183);
  --coral: rgb(249,128,94);
  --yellow: rgb(255,226,120);
  --font: "Abel", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { background: var(--white); color: var(--black); font-family: var(--font); font-size: 18px; line-height: 1.4; }
body { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 48px; }
button, input, select, textarea { font: inherit; color: var(--black); }
h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.mock { background: var(--black); color: var(--white); font-size: .8rem; text-align: center; padding: 6px 12px; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
.top { display: flex; align-items: center; gap: 12px; padding-block: 14px; flex-wrap: wrap; }
.top img { width: 52px; height: 52px; }
.top .name { font-size: 1.5rem; letter-spacing: .02em; }
.top .sub { color: var(--grey); font-size: .85rem; }

.shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; max-width: 1180px; margin: 0 auto; }
nav { display: flex; flex-direction: column; gap: 6px; align-self: start; }
nav .group { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin: 14px 0 2px; }
nav button { text-align: left; background: transparent; border: 2px solid transparent; border-radius: 10px; padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; white-space: nowrap; }
nav button:hover { border-color: var(--black); }
nav button.on { background: var(--pink); border-color: var(--black); }
nav .count { background: var(--yellow); border: 2px solid var(--black); border-radius: 999px; font-size: .75rem; padding: 0 7px; }
main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.lead { color: var(--grey); max-width: 62ch; }

.card { background: var(--paper); border: 3px solid var(--black); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 10px 0; border-top: 1px solid rgba(26,26,26,.18); }
.item:first-child { border-top: 0; }
.item .what { min-width: 0; }
.item .what small, .muted { color: var(--grey); font-size: .85rem; }
.item .amt { text-align: right; white-space: nowrap; }
.click { cursor: pointer; }
.click:hover .what > span:first-child { text-decoration: underline; }
.pill { display: inline-block; border: 2px solid var(--black); border-radius: 999px; padding: 0 9px; font-size: .78rem; white-space: nowrap; background: var(--paper); }
.pill.ok { background: var(--mint); }
.pill.warn { background: var(--yellow); }
.pill.bad { background: var(--coral); }
.pill.eg { border-style: dashed; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }

.btn { border: 3px solid var(--black); border-radius: 12px; background: var(--paper); padding: 8px 14px; cursor: pointer; }
.btn.main { background: var(--pink); }
.btn.go { background: var(--mint); }
.btn.small { border-width: 2px; padding: 3px 10px; font-size: .85rem; border-radius: 10px; }
.btn:focus-visible, nav button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 2px solid var(--black); border-radius: 999px; padding: 3px 12px; background: var(--paper); cursor: pointer; font-size: .9rem; }
.chip.on { background: var(--black); color: var(--white); }

label { display: block; font-size: .9rem; margin-bottom: 4px; }
input[type=text], input[type=number], select, textarea { width: 100%; border: 2px solid var(--black); border-radius: 10px; background: var(--paper); padding: 8px 10px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.form .wide { grid-column: 1 / -1; }
.sum { background: var(--white); border: 2px dashed var(--black); border-radius: 10px; padding: 10px 12px; }
.note { background: var(--yellow); border: 2px solid var(--black); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { border: 3px solid var(--black); border-radius: 14px; background: var(--paper); padding: 12px; }
.tile b { display: block; font-size: 1.6rem; font-weight: 400; }
.tile span { color: var(--grey); font-size: .85rem; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
.kv .t { border-top: 2px solid var(--black); padding-top: 4px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: .9rem; }
.bar i { display: block; height: 18px; background: var(--mint); border: 2px solid var(--black); border-radius: 6px; min-width: 3px; }
.bar .v { text-align: right; }

.phonewrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.phone { width: 360px; max-width: 100%; border: 3px solid var(--black); border-radius: 30px; background: var(--white); overflow: hidden; }
.phone header { background: var(--pink); padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.phone header img { width: 44px; height: 44px; }
.phone header h2 { font-size: 1.15rem; }
.phone .body { padding: 16px 14px 22px; display: flex; flex-direction: column; gap: 12px; }
.big { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; border: 3px solid var(--black); border-radius: 14px; font-size: 1.15rem; cursor: pointer; background: var(--paper); }
.big.photo, .big.done { background: var(--mint); }
.big.send { background: var(--pink); }
.side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--black); color: var(--white); padding: 8px 16px; border-radius: 999px; font-size: .9rem; max-width: calc(100% - 32px); z-index: 20; }


.email { border: 2px solid var(--black); border-radius: 10px; overflow: hidden; background: var(--paper); max-width: 440px; }
.email .ehead { background: var(--pink); padding: 10px 14px; display: flex; gap: 10px; align-items: center; font-size: 1.2rem; }
.email .ehead img { width: 40px; height: 40px; }
.email .in { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.email .words { white-space: pre-wrap; }
.email .eshow { display: flex; flex-direction: column; gap: 6px; }
.email .eshow img { width: 100%; border: 2px solid var(--black); border-radius: 8px; }
.email .efoot { font-size: .78rem; color: var(--grey); border-top: 1px solid rgba(26,26,26,.25); padding-top: 10px; }
.email a.btn { text-decoration: none; display: inline-block; align-self: flex-start; color: var(--black); }
.email { margin: 0 auto; }
.email.phone { max-width: 380px; }
.email.computer { max-width: 640px; }
.blk { display: flex; flex-direction: column; gap: 6px; }
.blkbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .78rem; color: var(--grey); border-top: 1px dashed rgba(26,26,26,.4); padding-top: 4px; }
.blkbar .link { font-size: .78rem; margin-left: 10px; }
[contenteditable] { outline: none; border-radius: 6px; padding: 4px 6px; min-height: 1.7em; cursor: text; }
[contenteditable]:hover { box-shadow: 0 0 0 1px rgba(26,26,26,.3); }
[contenteditable]:focus { box-shadow: 0 0 0 2px var(--mint); }
[contenteditable]:empty::before { content: attr(data-ph); color: var(--grey); }
[contenteditable] h3 { margin: 0; }
.email b, .email strong { font-weight: 700; text-shadow: .45px 0 currentColor; }
.toolbar { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; }
.toolbar .sep { flex: 1; }
.mailapp { --m-ink: rgb(32,33,36); --m-grey: rgb(95,99,104); --m-line: rgb(218,220,224); border: 1px solid var(--m-line); border-radius: 12px; background: #fff; color: var(--m-ink); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.45; overflow: hidden; margin: 0 auto; max-width: 780px; }
.mailapp.phone { max-width: 390px; border: 3px solid var(--black); border-radius: 30px; }
.mailapp .msubject { font-size: 22px; padding: 18px 20px 6px; overflow-wrap: anywhere; }
.mailapp .mfrom { display: flex; gap: 12px; align-items: center; padding: 8px 20px 16px; font-size: 14px; }
.mailapp .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--pink); display: flex; align-items: center; justify-content: center; flex: none; }
.mailapp .mfrom small { color: var(--m-grey); font-size: 12px; overflow-wrap: anywhere; }
.mailapp .mbody { background: var(--white); padding: 20px 10px; }
.mailapp .email { max-width: 600px; font-family: Arial, Helvetica, sans-serif; font-size: 16px; }
.mailapp .email h2 { font-size: 22px; font-weight: 700; }
.mailapp .email h3 { font-size: 18px; font-weight: 700; }
.mailapp .email .ehead { font-size: 20px; font-weight: 700; }
.mailapp .email b, .mailapp .email strong { text-shadow: none; }
.mailapp .email .efoot { font-size: 12px; }
.edrow { display: flex; justify-content: flex-end; }
.popbox.wide { max-width: 860px; }
.popbox .mailapp { width: 100%; }
.edrow .link { font-size: 12px; color: var(--m-grey); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 1rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--black); flex: none; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-size: .85rem; }
.filebtn { display: inline-block; margin: 0; font-size: 1rem; }
.filename { color: var(--grey); font-size: .85rem; margin-top: 4px; overflow-wrap: anywhere; }
input[type=date] { border: 2px solid var(--black); border-radius: 10px; background: var(--paper); padding: 5px 8px; }
.range { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; }
.range label { display: inline; margin: 0; }
#pop { position: fixed; inset: 0; background: rgba(26,26,26,.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; }
.popbox { background: var(--paper); border: 3px solid var(--black); border-radius: 14px; width: 100%; max-width: 540px; max-height: 92%; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
#popbody > img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border: 2px solid var(--black); border-radius: 10px; }
.mail { border: 2px solid var(--black); border-radius: 10px; background: var(--white); padding: 12px; font-size: .92rem; display: flex; flex-direction: column; gap: 6px; }
.mail .subj { font-size: 1.05rem; }
.posters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.slot .pic { aspect-ratio: 4 / 5; max-width: 100%; border: 2px solid var(--black); border-radius: 10px; background: var(--white); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--grey); font-size: .85rem; }
.slot .pic img { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 6px 10px; border-top: 1px solid rgba(26,26,26,.18); white-space: nowrap; }
th { font-weight: 400; color: var(--grey); border-top: 0; }
td.r, th.r { text-align: right; }

@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  nav { flex-direction: row; overflow-x: auto; padding-bottom: 6px; align-items: center; }
  nav .group { margin: 0 4px 0 10px; }
  .item { grid-template-columns: minmax(0, 1fr) auto; }
  .item .when { grid-column: 1 / -1; font-size: .85rem; color: var(--grey); }
  .bar { grid-template-columns: 78px minmax(0, 1fr) 56px; }
}

/* Real app additions */
#signin { max-width: 420px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }
.thumb { width: 100%; max-height: 220px; object-fit: contain; border: 2px solid var(--black); border-radius: 10px; background: var(--white); cursor: pointer; }
.filechip { display: inline-flex; gap: 6px; align-items: center; border: 2px solid var(--black); border-radius: 10px; padding: 4px 10px; background: var(--paper); font-size: .85rem; overflow-wrap: anywhere; }
.busy { opacity: .6; pointer-events: none; }
.warnline { background: var(--coral); border: 2px solid var(--black); border-radius: 10px; padding: 8px 12px; }
.mono { font-variant-numeric: tabular-nums; }
nav a.navlink { display: block; padding: 8px 12px; border: 2px solid transparent; border-radius: 10px; color: var(--black); text-decoration: none; white-space: nowrap; }
nav a.navlink:hover { border-color: var(--black); }
.lbl { display: block; font-size: .9rem; margin-bottom: 4px; }
details summary { cursor: pointer; margin-top: 6px; }

[hidden] { display: none !important; }
select { max-width: 100%; }
a.btn { color: var(--black); text-decoration: none; display: inline-block; text-align: center; }
