/* ===== ML Architettura — Snagging app · theme =====
   Brand: black & white + Neue Haas Grotesk + lowercase (from ml-architettura.com).
   --accent is the single colour knob (terracotta); set it to #000000 for
   a pure-monochrome look. */
:root{
  --black:#000000;
  --ink:#111111;
  --grey-1:#54595F;   /* brand secondary */
  --grey-2:#7A7A7A;   /* brand text grey */
  --line:#e6e6e6;
  --bg:#ffffff;
  --accent:#C94D2B;   /* terracotta · RGB 201,77,43 — the single accent */
  --accent-ink:#ffffff;
  --open:#ef4444;     /* snag status (functional, not brand) */
  --closed:#22c55e;
  --font:"Neue Haas Grotesk Display Pro","Neue Haas Grotesk Display","Neue Haas Grotesk","Helvetica Neue",Helvetica,Arial,system-ui,sans-serif;
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; padding:0; }
body{ font-family:var(--font); background:var(--black); color:var(--ink); overscroll-behavior-y:contain; }
#app{ min-height:100dvh; }
button{ font-family:inherit; }

/* ---------- Login (page 1): dark brand moment ---------- */
.login{
  min-height:100dvh; background:var(--black); color:#fff;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:40px 32px calc(28px + env(safe-area-inset-bottom)); gap:44px;
}
.login-brand{ text-align:center; }
.login-logo{ width:160px; max-width:62vw; height:auto; display:block; margin:0 auto; }
.tagline{ margin-top:12px; color:#9a9a9a; font-weight:300; font-size:12px; letter-spacing:4px; text-transform:lowercase; }
.login-form{ width:100%; max-width:300px; display:flex; flex-direction:column; }
.login-form label{ font-size:10px; letter-spacing:2px; text-transform:uppercase; color:#8a8a8a; margin:18px 0 6px; }
.login-form input{
  background:transparent; border:0; border-bottom:1px solid #333; color:#fff;
  padding:9px 2px; font-size:16px; font-family:inherit;
}
.login-form input::placeholder{ color:#555; }
.login-form input:focus{ outline:none; border-bottom-color:var(--accent); }
.btn-accent{
  margin-top:30px; background:var(--accent); color:var(--accent-ink); border:0;
  padding:14px; font-size:13px; letter-spacing:3px; text-transform:lowercase; font-weight:600; cursor:pointer;
}
.btn-accent:active{ transform:translateY(1px); }
.login-hint{ margin-top:16px; text-align:center; color:#5a5a5a; font-size:11px; letter-spacing:.5px; }
.login-err{ margin-top:14px; text-align:center; color:#ff8a6a; font-size:13px; min-height:1em; }
.login-remember{ display:flex; align-items:center; gap:8px; margin-top:16px; color:#bbb; font-size:13px; cursor:pointer; letter-spacing:normal; text-transform:none; }
.login-remember input{ width:16px; height:16px; accent-color:var(--accent); margin:0; }
.login-foot{ color:#4a4a4a; font-size:10px; letter-spacing:3px; text-transform:uppercase; }

/* ---------- App chrome (light inner pages) ---------- */
.screen{ min-height:100dvh; background:var(--bg); color:var(--ink); position:relative; }
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--bg); z-index:5;
}
.topbar .brand-logo{ height:20px; width:auto; display:block; }
.pad{ padding:22px 18px calc(22px + env(safe-area-inset-bottom)); }
h1{ font-weight:500; letter-spacing:.5px; font-size:24px; margin:4px 0 10px; }
.muted{ color:var(--grey-2); line-height:1.5; }
.link{ background:none; border:0; color:var(--grey-1); text-transform:lowercase; letter-spacing:1px; cursor:pointer; font-size:14px; }
.tag{ display:inline-block; margin-top:18px; font-size:11px; letter-spacing:2px; text-transform:uppercase; color:var(--grey-2); border:1px solid var(--line); border-radius:999px; padding:5px 12px; }

/* ---------- Projects (page 2) ---------- */
.topbar-actions{ display:flex; align-items:center; gap:14px; }
.team-select{ -webkit-appearance:none; appearance:none; border:1px solid var(--line); background:#fff; font:inherit; font-weight:500; letter-spacing:.5px; color:var(--ink); padding:6px 26px 6px 12px; border-radius:999px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23777'/></svg>"); background-repeat:no-repeat; background-position:right 10px center; }
.team-static{ font-weight:500; letter-spacing:.5px; color:var(--ink); }
.team-switch{ display:flex; align-items:center; gap:7px; }
.switch-label{ font-size:10px; letter-spacing:1.5px; text-transform:uppercase; color:var(--grey-2); }
.icon-btn{ background:none; border:0; font-size:22px; line-height:1; display:inline-flex; align-items:center; justify-content:center; color:var(--ink); cursor:pointer; padding:4px 6px; }
.menu{ position:absolute; right:14px; top:54px; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 10px 28px rgba(0,0,0,.16); padding:8px; min-width:190px; display:none; z-index:9; }
.menu.open{ display:block; }
.menu .who{ font-size:12px; color:var(--grey-2); padding:6px 8px; border-bottom:1px solid var(--line); margin-bottom:6px; word-break:break-all; }
.sync-line{ font-size:11px; color:var(--grey-2); padding:2px 8px 6px; word-break:break-word; }
.sync-line.ok{ color:#2f9e44; }
.sync-line.bad{ color:#c0392b; }
.menu button{ width:100%; text-align:left; background:none; border:0; padding:10px 8px; border-radius:6px; cursor:pointer; font:inherit; text-transform:lowercase; letter-spacing:.5px; }
.menu button:hover{ background:#f5f5f5; }

.list{ padding-bottom:96px; }
.proj-row{ display:flex; gap:14px; align-items:center; padding:14px 18px; border-bottom:1px solid var(--line); cursor:pointer; }
.proj-row:active{ background:#fafafa; }
.proj-thumb{ width:54px; height:54px; border-radius:8px; background:#efefef; flex:none; overflow:hidden; display:flex; align-items:center; justify-content:center; color:#9a9a9a; font-weight:600; letter-spacing:1px; }
.proj-thumb img{ width:100%; height:100%; object-fit:cover; }
.proj-main{ flex:1; min-width:0; }
.proj-name{ font-weight:600; font-size:16px; letter-spacing:.2px; }
.proj-sub{ color:var(--grey-2); font-size:13px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.proj-meta{ font-size:12.5px; margin-top:6px; color:var(--grey-1); display:flex; align-items:center; gap:7px; }
.dot{ width:8px; height:8px; border-radius:50%; background:var(--accent); display:inline-block; flex:none; }
.dot.none{ background:#cfcfcf; }
.chev{ color:#cccccc; font-size:22px; flex:none; }
.empty{ text-align:center; color:var(--grey-2); padding:64px 28px; line-height:1.6; }

.fab{ position:fixed; right:18px; bottom:calc(18px + env(safe-area-inset-bottom)); width:56px; height:56px; border-radius:50%; background:var(--accent); color:var(--accent-ink); border:0; font-size:0; box-shadow:0 4px 14px rgba(0,0,0,.25); cursor:pointer; z-index:8; }
/* draw the + as two centred bars so it never depends on font metrics */
.fab::before,.fab::after{ content:""; position:absolute; top:50%; left:50%; background:currentColor; border-radius:1px; }
.fab::before{ width:22px; height:2.5px; transform:translate(-50%,-50%); }
.fab::after{ width:2.5px; height:22px; transform:translate(-50%,-50%); }
.fab:active{ transform:translateY(1px); }

/* bottom sheet + scrim (shared) */
.scrim{ position:fixed; inset:0; background:rgba(0,0,0,.4); opacity:0; pointer-events:none; transition:opacity .2s; z-index:18; }
.scrim.open{ opacity:1; pointer-events:auto; }
.sheet{ position:fixed; left:0; right:0; bottom:0; background:#fff; border-radius:16px 16px 0 0; transform:translateY(110%); transition:transform .25s; z-index:20; padding:20px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet.open{ transform:translateY(0); }
.sheet h2{ margin:0 0 8px; font-size:18px; font-weight:600; letter-spacing:.3px; }
.field label{ display:block; font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--grey-2); margin:14px 0 5px; }
.field input{ width:100%; font:inherit; padding:11px; border:1px solid var(--line); border-radius:8px; background:#fafafa; }
.field input:focus{ outline:none; border-color:var(--accent); }
.field select{ width:100%; font:inherit; padding:11px; border:1px solid var(--line); border-radius:8px; background:#fafafa; color:var(--ink); -webkit-appearance:none; appearance:none; }
.field select:focus{ outline:none; border-color:var(--accent); }
.part-row{ display:flex; gap:8px; margin-bottom:8px; }
.part-row input{ flex:1; min-width:0; font:inherit; padding:10px; border:1px solid var(--line); border-radius:8px; background:#fafafa; }
.part-row input:focus{ outline:none; border-color:var(--accent); }
.part-row .pp-del{ flex:none; width:40px; border:1px solid var(--line); background:#f0f0f0; border-radius:8px; font-size:18px; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--grey-1); }
.meta-head{ font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--grey-2); margin:26px 0 3px; }
.meta-hint{ font-size:11.5px; color:var(--grey-2); margin-bottom:10px; line-height:1.4; }
.meta-row{ display:flex; gap:8px; margin-bottom:8px; }
.meta-row input{ min-width:0; font:inherit; padding:10px; border:1px solid var(--line); border-radius:8px; background:#fafafa; }
.meta-row input:focus{ outline:none; border-color:var(--accent); }
.meta-row .meta-label{ flex:0 0 40%; font-size:13px; }
.meta-row .meta-value{ flex:1; }
.meta-add{ width:100%; padding:11px; border-radius:8px; font-weight:600; letter-spacing:1px; text-transform:lowercase; border:0; cursor:pointer; }
.sheet-actions{ display:flex; gap:10px; margin-top:22px; }
.sheet-actions button{ flex:1; padding:13px; border-radius:8px; font-weight:600; letter-spacing:1px; text-transform:lowercase; cursor:pointer; border:0; }
.btn-ghost{ background:#f0f0f0; color:var(--ink); }
.btn-primary{ background:var(--accent); color:var(--accent-ink); }

/* ---------- Project hub (page 3) ---------- */
.hero{ position:relative; height:185px; background:#161616; overflow:hidden; }
.hero-img{ position:absolute; inset:0; background-size:cover; background-position:center; }
.hero-img.placeholder{ display:flex; align-items:center; justify-content:center; color:#333; font-size:64px; font-weight:700; letter-spacing:6px; background:#161616; }
.hero-grad{ position:absolute; inset:0; background:linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,0) 55%); }
.hero-top{ position:absolute; top:0; left:0; right:0; display:flex; justify-content:space-between; padding:calc(10px + env(safe-area-inset-top)) 12px 10px; }
.hero-btn{ background:rgba(20,20,20,.55); color:#fff; border:0; width:38px; height:38px; border-radius:50%; font-size:22px; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.hero-hint{ position:absolute; bottom:10px; left:14px; color:#8a8a8a; font-size:11px; letter-spacing:1px; text-transform:uppercase; }
.proj-head{ padding:16px 18px 8px; display:flex; align-items:flex-start; gap:12px; }
.head-main{ flex:1; min-width:0; }
.proj-head h1{ margin:0 0 4px; }
.proj-head .proj-sub{ font-size:14px; white-space:normal; }
.proj-head .proj-meta{ margin-top:8px; }
.edit-details{ flex:none; background:none; border:1px solid var(--line); border-radius:999px; padding:8px 13px; font-size:12px; letter-spacing:.5px; color:var(--ink); cursor:pointer; text-transform:lowercase; }
.hub{ padding:8px 0 28px; }
.hub-row{ display:flex; align-items:center; gap:10px; padding:16px 18px; border-top:1px solid var(--line); cursor:pointer; }
.hub-row:active{ background:#fafafa; }
.hub-label{ flex:1; font-weight:500; font-size:16px; }
.hub-sum{ color:var(--grey-2); font-size:13px; }
.bar-title{ font-weight:600; letter-spacing:.3px; }
.hero-add{ position:absolute; left:0; right:0; bottom:14px; display:flex; justify-content:center; z-index:2; }
.hero-add button{ background:rgba(255,255,255,.92); color:#111; border:0; border-radius:999px; padding:9px 16px; font:inherit; font-size:13px; font-weight:600; letter-spacing:.5px; cursor:pointer; }
.hero-edit{ position:absolute; right:12px; bottom:12px; z-index:2; background:rgba(20,20,20,.6); color:#fff; border:0; border-radius:999px; padding:8px 13px; font-size:12px; cursor:pointer; }
.busy{ position:fixed; inset:0; background:rgba(255,255,255,.6); display:none; align-items:center; justify-content:center; z-index:30; }
.busy.on{ display:flex; }
.spin{ width:34px; height:34px; border:4px solid #ddd; border-top-color:var(--accent); border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.id-rows{ margin-top:8px; }
.id-row{ display:flex; gap:10px; padding:3px 0; font-size:14px; }
.id-k{ flex:none; width:132px; color:var(--grey-2); font-size:10.5px; letter-spacing:.5px; text-transform:uppercase; padding-top:3px; line-height:1.3; }
.id-v{ flex:1; min-width:0; color:var(--ink); }
.id-empty{ margin-top:8px; color:var(--grey-2); font-size:13px; }


/* ---------- Home (page 1): business card + tile grid ---------- */
.home .topbar{ justify-content:space-between; }
.bcard{ border:1px solid var(--line); border-radius:12px; padding:20px 20px 16px; background:#fff; }
.bc-top{ display:flex; gap:16px; align-items:flex-start; }
.bc-id{ flex:1; min-width:0; }
.bc-name{ font-size:17px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; line-height:1.15; }
.bc-title{ font-size:13px; letter-spacing:.6px; text-transform:uppercase; color:var(--grey-1); margin-top:2px; }
.bc-lines{ margin-top:14px; display:flex; flex-direction:column; gap:3px; }
.bc-line{ display:flex; gap:7px; font-size:13.5px; line-height:1.45; }
.bc-k{ flex:none; width:22px; color:var(--grey-2); }
.bc-v{ color:var(--ink); text-decoration:none; word-break:break-word; }
a.bc-v:active{ color:var(--accent); }
.bc-qr{ flex:none; width:88px; height:88px; cursor:zoom-in; }
.bc-mark{ flex:none; font-size:20px; font-weight:700; letter-spacing:2px; color:var(--ink); }
.bc-foot{ display:flex; justify-content:space-between; align-items:flex-end; gap:12px;
          margin-top:22px; font-size:11.5px; line-height:1.5; color:var(--grey-1); }
.bc-web a{ color:inherit; text-decoration:none; }
.bc-foot a{ text-decoration:none; }
.bc-web{ font-weight:700; color:var(--ink); white-space:nowrap; }

.resume{ display:flex; align-items:center; gap:10px; margin-top:14px; padding:13px 15px;
         border:1px solid var(--line); border-radius:10px; text-decoration:none; color:inherit; background:#fff; }
.resume-k{ font-size:10.5px; letter-spacing:1.2px; text-transform:uppercase; color:var(--grey-2); }
.resume-v{ flex:1; min-width:0; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.resume-go{ color:var(--grey-2); font-size:18px; }

.tiles{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.tile{ position:relative; display:flex; flex-direction:column; gap:2px; padding:18px 16px 15px;
       border:1px solid var(--line); border-radius:12px; background:#fff; text-decoration:none; color:inherit;
       min-height:120px; justify-content:flex-end; }
.tile:active{ background:#fafafa; }
/* Plain line icons in ink, no coloured chip. The accent stays reserved for badges —
   a terracotta chip under a terracotta badge made the badge hard to read, which is the
   one thing on the tile that has to be readable at a glance. */
.tile-ico{ position:absolute; top:15px; left:16px;
           display:flex; align-items:center; justify-content:center; width:26px; height:26px;
           color:var(--ink); }
.tile-ico svg{ width:100%; height:100%; display:block; }
/* outer offset = the gap between tiles; padding (not margin) below, so the page keeps it */
.hub-tiles{ margin:18px 12px 0; padding-bottom:calc(12px + env(safe-area-inset-bottom)); }
.tile-label{ font-weight:600; font-size:15px; }
.tile-sub{ font-size:11.5px; color:var(--grey-2); }
.tile-badge{ position:absolute; top:11px; right:11px; min-width:21px; height:21px; padding:0 6px;
             border-radius:11px; background:var(--accent); color:var(--accent-ink);
             font-size:11.5px; font-weight:700; display:flex; align-items:center; justify-content:center; }


/* ---------- To-do's ---------- */
.todo{ display:flex; gap:12px; align-items:flex-start; padding:14px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.todo:last-child{ border-bottom:0; }
.todo-check{ flex:none; width:22px; height:22px; margin-top:1px; border:1.5px solid var(--grey-2);
             border-radius:6px; background:#fff; cursor:pointer; padding:0; }
.todo-check.on{ background:var(--accent); border-color:var(--accent); position:relative; }
.todo-check.on::after{ content:''; position:absolute; left:6px; top:2px; width:5px; height:10px;
                       border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg); }
.todo-main{ flex:1; min-width:0; }
/* the WHOLE sentence, wrapped - these are not row labels */
.todo-text{ font-size:14.5px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.todo-meta{ display:flex; flex-wrap:wrap; gap:4px 10px; margin-top:5px; font-size:11.5px; color:var(--grey-2); }
.todo-proj{ font-weight:600; color:var(--grey-1); }
.todo-late{ color:var(--accent); font-weight:600; }
.todo.is-done .todo-text{ color:var(--grey-2); text-decoration:line-through; }
.todo-prov{ margin-top:16px; font-size:11.5px; line-height:1.6; color:var(--grey-2); }
.field textarea{ width:100%; font:inherit; padding:11px; border:1px solid var(--line);
                 border-radius:8px; background:#fafafa; resize:vertical; }
.field textarea:focus{ outline:none; border-color:var(--accent); }
.list-head{ margin:26px 0 6px; font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--grey-2); }
.mem-row{ display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--line); font-size:14px; }
.mem-row span{ flex:1; min-width:0; }
.mem-row .pp-del{ flex:none; width:34px; height:30px; border:1px solid var(--line); background:#f0f0f0;
                  border-radius:8px; font-size:16px; line-height:1; cursor:pointer; color:var(--grey-1); }
.mem-none{ font-size:12.5px; color:var(--grey-2); padding:6px 0; }
.mem-add{ width:100%; margin-top:10px; font:inherit; padding:11px; border:1px solid var(--line);
          border-radius:8px; background:#fafafa; color:var(--ink); -webkit-appearance:none; appearance:none; }

/* ---------- Team directory ---------- */
.team-seg{ margin-bottom:22px; }
.team-group{ margin-bottom:26px; }
.team-name{ display:flex; align-items:center; gap:8px; font-size:11px; letter-spacing:1.5px;
            text-transform:uppercase; color:var(--grey-2); margin-bottom:8px; }
.team-mine{ font-size:9.5px; letter-spacing:.8px; padding:2px 7px; border-radius:9px;
            background:var(--accent); color:var(--accent-ink); }
.person{ display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); cursor:pointer; }
.person:last-child{ border-bottom:0; }
.person-ini{ flex:none; width:38px; height:38px; border-radius:50%; background:#f0f0f0;
             display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:600; color:var(--grey-1); }
.person-main{ flex:1; min-width:0; }
.person-name{ font-size:14.5px; font-weight:600; }
.person-title{ font-size:11.5px; color:var(--grey-2); }
.person-go{ color:var(--grey-2); font-size:18px; }
.sheet .bcard{ border:0; padding:4px 0 0; }

/* ---------- Plan page (page 4) ---------- */
.plan-empty{ padding:60px 24px; text-align:center; display:flex; flex-direction:column; gap:14px; align-items:center; }
.btn-primary.wide{ padding:13px 22px; border-radius:8px; font-weight:600; letter-spacing:1px; text-transform:lowercase; }
.plan-empty .hint{ color:var(--grey-2); font-size:12px; }
.floor-strip{ display:flex; gap:8px; overflow-x:auto; padding:12px 14px; border-bottom:1px solid var(--line); -webkit-overflow-scrolling:touch; }
.floor-thumb{ flex:none; width:62px; height:62px; border-radius:8px; border:1px solid var(--line); background:#f2f2f2; overflow:hidden; cursor:pointer; padding:0; position:relative; display:flex; align-items:flex-end; }
.floor-thumb.on{ border-color:var(--accent); box-shadow:0 0 0 2px var(--accent); }
.floor-thumb .ft-img{ position:absolute; inset:0; background-size:cover; background-position:center; }
.floor-thumb .ft-name{ position:relative; z-index:1; width:100%; font-size:10px; background:rgba(255,255,255,.85); padding:2px 0; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.floor-thumb.add{ align-items:center; justify-content:center; font-size:26px; color:var(--grey-2); background:#fff; }
.floor-head{ display:flex; align-items:center; gap:10px; padding:12px 16px 6px; }
.floor-name{ font-weight:600; font-size:16px; flex:1; }
.mini{ background:none; border:1px solid var(--line); border-radius:999px; padding:6px 12px; font-size:12px; letter-spacing:.5px; cursor:pointer; text-transform:lowercase; color:var(--ink); }
.mini.danger{ color:#b3261e; border-color:#e7c3c0; }
.plan-view{ padding:8px 14px 18px; }
.plan-view img{ width:100%; height:auto; display:block; border:1px solid var(--line); border-radius:8px; background:#fff; }
.plan-actions{ display:flex; gap:10px; padding:0 16px 24px; }

/* ---------- Snags page (page 5) ---------- */
.snags-screen{ display:flex; flex-direction:column; height:100dvh; }
.seg{ display:flex; border:1px solid var(--line); border-radius:999px; overflow:hidden; }
/* the buttons SHARE the pill evenly however many there are - they used to size to their
   own text, which left a dead unclickable stub whenever there were only two */
.seg-btn{ flex:1 1 0; min-width:0; text-align:center; background:#fff; border:0; padding:6px 12px; font:inherit; font-size:13px; text-transform:lowercase; letter-spacing:.5px; color:var(--grey-1); cursor:pointer; }
.seg-btn.on{ background:var(--ink); color:#fff; }
.snags-body{ flex:1; min-height:0; display:flex; flex-direction:column; position:relative; }
.stage{ flex:1; position:relative; overflow:hidden; background:#e9edf1; touch-action:none; user-select:none; -webkit-user-select:none; }
.canvas{ position:absolute; top:0; left:0; transform-origin:0 0; will-change:transform; }
.canvas .plan-img{ display:block; pointer-events:none; }
.canvas .plan-hi{ position:absolute; pointer-events:none; z-index:1; }   /* sharp vector layer over the preview */
.pin{ position:absolute; z-index:3; width:28px; height:28px; margin:-14px 0 0 -14px; border-radius:50%; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; transform:scale(var(--inv,1)); transform-origin:center; cursor:pointer; }
.pin b{ color:#fff; font-size:13px; font-weight:800; }
.pin.open{ background:#e5484d; } .pin.in_progress{ background:#f5a623; } .pin.closed{ background:#2f9e44; } .pin.reopened{ background:#a855f7; }
.pin.dim{ opacity:.32; }
.pin.moving{ box-shadow:0 0 0 3px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.55); z-index:6; cursor:grab; }
.move-bar{ position:fixed; left:0; right:0; bottom:0; display:flex; gap:12px; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); background:rgba(255,255,255,.97); border-top:1px solid var(--line); z-index:9; }
.move-bar button{ flex:1; padding:13px; border-radius:8px; font-weight:600; letter-spacing:1px; text-transform:lowercase; cursor:pointer; border:0; }
.place-hint{ position:absolute; left:50%; bottom:86px; transform:translateX(-50%); background:rgba(15,23,42,.9); color:#fff; padding:8px 14px; border-radius:999px; font-size:13px; display:none; z-index:6; pointer-events:none; }
.place-hint.show{ display:block; }
.fab.on{ background:var(--ink); }
.floor-bar{ display:flex; gap:8px; padding:10px 14px; overflow-x:auto; border-bottom:1px solid var(--line); flex:none; }
.floor-chip{ flex:none; background:#fff; border:1px solid var(--line); border-radius:999px; padding:6px 14px; font:inherit; font-size:13px; cursor:pointer; }
.floor-chip.on{ background:var(--ink); color:#fff; border-color:var(--ink); }
.snag-search-row{ padding:10px 14px; border-bottom:1px solid var(--line); flex:none; }
.snag-search{ width:100%; padding:9px 14px; border:1px solid var(--line); border-radius:999px; font:inherit; font-size:14px; background:#fafafa; -webkit-appearance:none; }
.snag-search:focus{ outline:none; border-color:var(--accent); }
.list-top{ display:flex; align-items:center; border-bottom:1px solid var(--line); }
.chips{ display:flex; gap:8px; padding:12px 14px; overflow-x:auto; flex:1; min-width:0; }
.list-edit{ flex:none; margin:0 14px; background:#fff; border:1px solid var(--accent); border-radius:999px; padding:6px 14px; font:inherit; font-size:13px; cursor:pointer; text-transform:lowercase; color:var(--accent); }
.list-edit.on{ background:var(--accent); color:#fff; }
.tag-filter{ display:flex; gap:8px; padding:10px 14px; overflow-x:auto; border-bottom:1px solid var(--line); flex:none; }
.tag-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:4px; }
.tag-chip{ background:#fff; border:1px solid var(--line); border-radius:999px; padding:6px 12px; font:inherit; font-size:13px; cursor:pointer; }
.tag-chip.on{ background:var(--accent); border-color:var(--accent); color:#fff; }
.chip.tagf, .tag-chip{ text-transform:none; }
.snag-del{ flex:none; background:none; border:0; font-size:18px; line-height:1; padding:6px 8px; cursor:pointer; }
.chip{ flex:none; background:#fff; border:1px solid var(--line); border-radius:999px; padding:6px 14px; font:inherit; font-size:13px; cursor:pointer; text-transform:lowercase; }
.chip.on{ background:var(--ink); color:#fff; border-color:var(--ink); }
.snag-list{ flex:1; min-height:0; overflow-y:auto; }
.snag-row{ display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid var(--line); cursor:pointer; }
.snag-row:active{ background:#fafafa; }
.snag-num{ flex:none; width:30px; height:30px; border-radius:50%; color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; }
.snag-num.open{ background:#e5484d; } .snag-num.in_progress{ background:#f5a623; } .snag-num.closed{ background:#2f9e44; } .snag-num.reopened{ background:#a855f7; }
.snag-mid{ flex:1; min-width:0; }
.snag-title{ font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.snag-meta{ color:var(--grey-2); font-size:12px; margin-top:2px; }
.snag-status{ flex:none; font-size:12px; font-weight:600; text-transform:lowercase; }
/* snag bottom sheet */
.snag-sheet{ max-height:86dvh; overflow-y:auto; }
.sheet-grab{ width:40px; height:4px; border-radius:2px; background:#ddd; margin:0 auto 12px; }
.snag-head{ display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.sheet-title{ flex:1; font-weight:600; font-size:16px; }
.snag-sheet label{ display:block; font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--grey-2); margin:14px 0 6px; }
.snag-sheet textarea{ width:100%; min-height:64px; font:inherit; padding:11px; border:1px solid var(--line); border-radius:8px; background:#fafafa; resize:vertical; }
.snag-sheet input{ width:100%; font:inherit; padding:11px; border:1px solid var(--line); border-radius:8px; background:#fafafa; }
.snag-sheet textarea:focus, .snag-sheet input:focus{ outline:none; border-color:var(--accent); }
.st-row{ display:flex; gap:8px; flex-wrap:wrap; }
.st-btn{ border:1px solid var(--line); background:#fff; border-radius:999px; padding:7px 12px; font:inherit; font-size:12.5px; cursor:pointer; text-transform:lowercase; }
.st-btn.on{ background:var(--c); color:#fff; border-color:var(--c); }
.photos{ display:flex; gap:8px; flex-wrap:wrap; }
.photos .thumb{ position:relative; width:76px; height:76px; border-radius:8px; overflow:hidden; border:1px solid var(--line); }
.photos .thumb img{ width:100%; height:100%; object-fit:cover; }
.photos .thumb .x{ position:absolute; top:2px; right:2px; width:20px; height:20px; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; cursor:pointer; }
.addphoto{ width:76px; height:76px; border:2px dashed #cfcfcf; border-radius:8px; background:#fafafa; color:#9a9a9a; font-size:26px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.status-badge{ flex:none; color:#fff; font-size:11px; font-weight:700; text-transform:lowercase; letter-spacing:.5px; padding:4px 10px; border-radius:999px; }
.view-val{ font-size:15px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.photos.view .thumb{ cursor:default; }
.fit-btn{ position:fixed; left:18px; bottom:calc(18px + env(safe-area-inset-bottom)); background:#fff; border:1px solid var(--line); border-radius:999px; padding:9px 16px; font:inherit; font-size:13px; text-transform:lowercase; letter-spacing:.5px; box-shadow:0 2px 8px rgba(0,0,0,.15); cursor:pointer; z-index:8; }
.lightbox{ position:fixed; inset:0; background:rgba(0,0,0,.92); display:flex; align-items:center; justify-content:center; padding:16px; z-index:50; }
.lightbox img{ max-width:100%; max-height:100%; object-fit:contain; -webkit-touch-callout:default; -webkit-user-select:auto; user-select:auto; }
.lb-actions{ position:fixed; left:0; right:0; bottom:calc(22px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; align-items:center; gap:10px; z-index:60; padding:0 16px; }
.lb-row{ display:flex; gap:10px; }
.lb-btn{ background:rgba(255,255,255,.95); color:#111; border:0; border-radius:999px; padding:12px 22px; font:inherit; font-size:14px; font-weight:600; letter-spacing:.3px; cursor:pointer; box-shadow:0 2px 12px rgba(0,0,0,.4); }
.lb-hint{ color:rgba(255,255,255,.9); font-size:12px; text-align:center; background:rgba(0,0,0,.42); padding:6px 12px; border-radius:999px; max-width:92%; }
/* sketch / annotate editor */
.sketch{ position:fixed; top:0; left:0; right:0; bottom:0; width:100%; max-width:100%; overflow:hidden; background:#0d0d0d; z-index:80; display:flex; flex-direction:column; }
.sketch > *{ min-width:0; }
.sk-top{ display:flex; align-items:center; gap:10px; padding:calc(8px + env(safe-area-inset-top)) 12px 8px; background:#1b1b1b; }
.sk-title{ flex:1; min-width:0; text-align:center; color:#eee; font-size:14px; letter-spacing:.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sk-top .sk-btn{ flex:none; }
.sk-stage{ flex:1; position:relative; overflow:hidden; }
.sk-stage canvas{ position:absolute; inset:0; margin:auto; max-width:calc(100% - 16px); max-height:calc(100% - 16px); touch-action:none; }
.sk-toolbar{ display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap; padding:12px 12px calc(12px + env(safe-area-inset-bottom)); background:#1b1b1b; }
.sk-color{ width:26px; height:26px; border-radius:50%; border:2px solid rgba(255,255,255,.25); cursor:pointer; }
.sk-color.on{ box-shadow:0 0 0 2px #1b1b1b, 0 0 0 4px #fff; }
.sk-w{ display:inline-block; border-radius:50%; background:#ddd; opacity:.5; cursor:pointer; }
.sk-w[data-w="1"]{ width:7px; height:7px; } .sk-w[data-w="2"]{ width:12px; height:12px; } .sk-w[data-w="3"]{ width:17px; height:17px; }
.sk-w.on{ opacity:1; background:#fff; box-shadow:0 0 0 2px rgba(255,255,255,.35); }
.sk-sep{ width:1px; height:22px; background:rgba(255,255,255,.15); }
.sk-btn{ background:#333; color:#fff; border:0; border-radius:8px; padding:8px 16px; font:inherit; font-size:14px; cursor:pointer; }
.sk-btn.primary{ background:var(--accent); }

/* ---------- Reports (page 6) ---------- */
.rep-row{ display:flex; align-items:center; gap:14px; padding:14px 16px; border-bottom:1px solid var(--line); cursor:pointer; }
.rep-row:active{ background:#fafafa; }
.rep-date{ flex:none; width:60px; font-weight:700; font-size:13px; }
.rep-mid{ flex:1; min-width:0; }
.rep-subject{ font-weight:500; }
.rep-meta{ color:var(--grey-2); font-size:12px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rep-word{ flex:none; background:none; border:1px solid var(--line); color:var(--grey-1); border-radius:999px; font:inherit; font-size:11px; text-transform:lowercase; letter-spacing:.5px; padding:5px 11px; margin-right:6px; cursor:pointer; }
.rep-del{ flex:none; background:none; border:0; font-size:18px; line-height:1; display:flex; align-items:center; justify-content:center; padding:6px 8px; cursor:pointer; opacity:.55; }
.rep-del:active{ opacity:1; }
/* printable report overlay */
.report{ position:fixed; inset:0; background:#fff; z-index:45; overflow:auto; }
.rbar{ position:sticky; top:0; display:flex; gap:8px; align-items:center; padding:10px 12px; background:var(--ink); }
.rbar .mini.light{ color:#fff; border-color:rgba(255,255,255,.35); }
.rbar .btn-primary{ padding:8px 16px; border-radius:999px; }
.rwrap{ max-width:820px; margin:0 auto; padding:22px 18px 48px; }
.rcover{ border-bottom:2px solid var(--ink); padding-bottom:16px; }
.rlogo{ height:24px; margin-bottom:14px; }
.rcover h1{ margin:0 0 12px; font-size:24px; font-weight:600; }
.rrow{ display:flex; gap:12px; padding:3px 0; font-size:13.5px; }
.rk{ flex:none; width:128px; color:var(--grey-2); text-transform:uppercase; font-size:10.5px; letter-spacing:1px; padding-top:3px; }
.rv{ flex:1; min-width:0; }
.rfilter{ margin-top:12px; font-size:11px; color:var(--grey-2); text-transform:uppercase; letter-spacing:1.5px; }
.rfloor{ margin-top:24px; }
.rfloor h2{ font-size:16px; font-weight:600; border-bottom:1px solid var(--line); padding-bottom:6px; margin:0 0 4px; }
.rplan{ position:relative; border:1px solid var(--line); border-radius:6px; overflow:hidden; margin:12px 0; }
.rplan img{ display:block; width:100%; }
.rdot{ position:absolute; width:22px; height:22px; margin:-11px 0 0 -11px; border-radius:50%; border:2px solid #fff; color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; box-shadow:0 1px 3px rgba(0,0,0,.4); }
.rsnag{ padding:12px 0; border-bottom:1px solid var(--line); }
.rsnag-head{ display:flex; align-items:center; gap:10px; }
.rsnag-head b{ flex:1; font-weight:600; }
.rsnag-st{ flex:none; font-size:12px; font-weight:700; text-transform:lowercase; }
.rsnag-resp{ font-size:12px; color:var(--grey-2); margin-top:5px; }
.rsnag-imgs{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.rsnag-imgs img{ width:150px; height:112px; object-fit:cover; border-radius:6px; border:1px solid var(--line); }
/* Punto-block report layout */
.rcover-top{ display:flex; align-items:flex-start; justify-content:space-between; }
.rnum{ text-align:right; color:var(--grey-2); font-size:20px; line-height:1.1; }
.rnum-date{ font-size:12px; margin-top:2px; }
.rcover-photo{ margin:16px 0; border:1px solid var(--line); background:#dfe4ea; height:210px; display:flex; align-items:center; justify-content:center; color:#9aa3ad; font-size:12px; letter-spacing:1px; overflow:hidden; }
.rcover-photo img{ width:100%; height:100%; object-fit:cover; }
.r-punto{ margin-top:22px; }
.r-punto-bar{ display:flex; justify-content:space-between; align-items:center; background:#cfd4da; padding:5px 10px; font-weight:700; font-size:13px; }
.r-punto-fields{ padding:8px 2px 2px; font-size:13.5px; line-height:1.7; }
.r-punto-fields b{ font-weight:700; }
.r-punto-body{ display:grid; grid-template-columns:3fr 1fr; gap:16px; align-items:start; margin-top:8px; }
.r-fotos{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; align-content:start; }
.r-foto{ aspect-ratio:1/1; border:1px solid var(--line); overflow:hidden; background:#f2f2f2; }
.r-foto img{ width:100%; height:100%; object-fit:cover; }
.r-mappa{ position:relative; width:100%; aspect-ratio:1/1; border:1px solid var(--line); overflow:hidden; background:#dfe4ea; }
.r-mappa img{ width:100%; height:100%; object-fit:cover; }
.r-mappa .rdot{ position:absolute; width:20px; height:20px; margin:-10px 0 0 -10px; border-radius:50%; border:2px solid #fff; color:#fff; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; box-shadow:0 1px 3px rgba(0,0,0,.4); }
/* template-matching cover + page 2 */
.tpage{ max-width:820px; margin:0 auto; position:relative; padding:42px 56px 72px; }
.tcover, .tpage2{ min-height:94vh; }
.tcover-head, .tpage2-head{ display:flex; justify-content:space-between; align-items:flex-start; }
.tlogo-big{ height:58px; }
.tlogo-sm{ height:24px; }
.treport{ text-align:right; color:#9aa3ad; font-size:26px; line-height:1; }
.treport-sm{ text-align:right; color:#9aa3ad; font-size:11px; line-height:1.3; }
.tdate{ font-size:13px; margin-top:4px; }
.tphoto{ width:62%; aspect-ratio:1.49; margin:34px auto; border:1px solid #9aa3ad; background:#dfe4ea; display:flex; align-items:center; justify-content:center; color:#7c8690; text-align:center; font-size:12px; letter-spacing:1.5px; line-height:1.8; overflow:hidden; }
.tphoto img{ width:100%; height:100%; object-fit:cover; }
.tmeta{ margin:28px auto 0; border-collapse:collapse; }
.tmeta .tk{ text-align:right; font-weight:700; font-style:italic; padding:7px 18px; white-space:nowrap; font-size:14px; }
.tmeta .tbar{ border-left:1px solid #333; width:1px; padding:0; }
.tmeta .tv{ font-style:italic; padding:7px 18px; font-size:14px; }
.tinfo{ margin-top:46px; }
.tinfo p{ margin:0 0 18px; font-size:14px; }
.trule{ border:0; border-top:1px solid #333; margin:22px 0; }
.tpart-h{ text-decoration:underline; display:block; margin-bottom:14px; }
.tpart-row{ display:flex; gap:30px; font-size:14px; line-height:1.5; }
.tpart-row span:first-child{ width:230px; }
.tfooter{ position:absolute; left:56px; right:56px; bottom:22px; display:flex; justify-content:space-between; gap:10px; color:#777; font-size:10px; line-height:1.45; }
.report.pdfview{ display:flex; flex-direction:column; overflow:hidden; }
.report.pdfview .rbar{ position:static; }
.pdf-frame{ flex:1; width:100%; border:0; background:#525659; }
@media print{
  body > *{ display:none !important; }
  .report{ display:block !important; position:static; overflow:visible; }
  .rbar{ display:none !important; }
  .rsnag, .rfloor, .r-punto{ break-inside:avoid; }
  .tcover, .tpage2{ break-after:page; }
}
.ptr{ position:fixed; top:-46px; left:50%; transform:translateX(-50%); width:38px; height:38px; border-radius:50%; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.22); display:flex; align-items:center; justify-content:center; color:var(--ink); font-size:18px; z-index:60; opacity:0; transition:opacity .15s; pointer-events:none; }
.ptr.show{ opacity:1; }
.ptr-spin{ transition:transform .15s; line-height:1; }
.ptr.ready .ptr-spin{ transform:rotate(180deg); }
.ptr.loading .ptr-spin{ animation:spin .8s linear infinite; }

/* ---------- in-app report viewer ---------- */
.pdfv{ position:fixed; inset:0; z-index:60; background:#2b2b2b; display:flex; flex-direction:column; }
.pdfv-bar{ display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--bg);
           padding:calc(10px + env(safe-area-inset-top)) 16px 10px; border-bottom:1px solid var(--line); }
.pdfv-bar .bar-title{ flex:1; min-width:0; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.pdfv-body{ flex:1; overflow:auto; -webkit-overflow-scrolling:touch; display:flex; flex-direction:column; align-items:center;
            gap:10px; padding:8px 8px calc(16px + env(safe-area-inset-bottom)); }
.pdfv-page{ background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.35); max-width:100%; height:auto; }
.pdfv-wait{ margin:auto; display:flex; flex-direction:column; align-items:center; color:#b9b9b9; }
.pdfv-wait img{ width:140px; max-width:50vw; margin-bottom:30px; }
.pdfv-txt{ font-size:13px; letter-spacing:3px; margin-bottom:22px; text-align:center; padding:0 20px; }
.pdfv-prog{ width:min(240px,62vw); height:4px; background:#444; border-radius:999px; overflow:hidden; position:relative; }
.pdfv-prog::before{ content:''; position:absolute; top:0; bottom:0; left:-40%; width:40%; background:var(--accent); border-radius:999px; animation:pvsl 1.15s ease-in-out infinite; }
@keyframes pvsl{ 0%{ left:-40% } 100%{ left:100% } }

.addphoto.addcam{ display:flex; align-items:center; justify-content:center; }
.addphoto.addcam svg{ width:26px; height:26px; }

/* full-screen QR: white ground and a quiet zone so any phone camera locks on */
.qr-big{ position:fixed; inset:0; z-index:70; background:#fff; display:flex; flex-direction:column;
         align-items:center; justify-content:center; padding:24px; cursor:zoom-out; }
.qr-big img{ width:min(86vw, 70vh, 520px); height:auto; image-rendering:pixelated; }
.qr-hint{ margin-top:22px; font-size:12px; letter-spacing:2px; text-transform:uppercase; color:var(--grey-2); }

/* ---------- interface language switch (home) ---------- */
.lang-seg{ width:76px; }
.lang-seg .seg-btn{ padding:5px 0; font-size:12px; letter-spacing:1px; }

/* ---------- reports list: type filter, drafts, month groups ---------- */
.rep-chips{ display:flex; gap:8px; padding:12px 16px; overflow-x:auto; border-bottom:1px solid var(--line); }
.reports-screen .list-head{ padding:0 16px; margin:20px 0 4px; }
.rep-kind{ display:inline-block; margin-right:6px; padding:1px 7px; border-radius:9px; font-size:10.5px; letter-spacing:.4px;
           text-transform:lowercase; background:#f0f0f0; color:var(--grey-1); }
.rep-kind.draft{ background:var(--accent); color:var(--accent-ink); }
.rep-row.draft .rep-subject{ font-weight:600; }
.next-card{ display:flex; flex-wrap:wrap; align-items:center; gap:2px 10px; width:calc(100% - 32px); margin:14px 16px 0; padding:13px 15px;
            border:1px dashed var(--accent); border-radius:10px; background:#fff; font:inherit; text-align:left; cursor:pointer; color:inherit; }
.next-k{ width:100%; font-size:10.5px; letter-spacing:1.2px; text-transform:uppercase; color:var(--grey-2); }
.next-v{ flex:1; min-width:0; font-weight:600; }
.next-go{ color:var(--accent); font-size:13px; font-weight:600; text-transform:lowercase; }
.kind-pick{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.kind-btn{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:14px 16px; border:1px solid var(--line);
           border-radius:10px; background:#fff; font:inherit; text-align:left; cursor:pointer; color:inherit; }
.kind-btn:active{ background:#fafafa; border-color:var(--accent); }
.kind-btn b{ font-size:15.5px; font-weight:600; }
.kind-btn span{ font-size:12.5px; color:var(--grey-2); }

/* ---------- report editor ---------- */
.editor-screen .topbar{ gap:10px; }
.editor-screen .bar-title{ flex:1; min-width:0; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ed-status{ flex:none; font-size:11px; letter-spacing:.5px; text-transform:lowercase; color:var(--grey-2); min-width:64px; text-align:right; }
.ed-status.saved{ color:#2f9e44; }
.ed-status.unsaved{ color:#b3261e; font-weight:600; }
.editor{ padding-bottom:calc(110px + env(safe-area-inset-bottom)); }
.ed-warn{ margin-bottom:14px; padding:11px 13px; border-radius:8px; background:#fff4e5; color:#7a4a00; font-size:13px; line-height:1.45; }
.ed-field label{ display:block; font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--grey-2); margin:14px 0 5px; }
.editor input, .editor select, .editor textarea{ width:100%; font:inherit; padding:11px; border:1px solid var(--line); border-radius:8px;
                                                  background:#fafafa; color:var(--ink); }
.editor select{ -webkit-appearance:none; appearance:none; }
.editor input:focus, .editor select:focus, .editor textarea:focus{ outline:none; border-color:var(--accent); }
.editor textarea{ resize:none; line-height:1.45; min-height:64px; overflow:hidden; }
.editor .part-row input{ padding:10px; }
.ed-pair{ display:flex; gap:10px; }
.ed-pair .ed-field{ flex:1; min-width:0; }
.ed-h{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin:30px 0 10px; padding-top:16px; border-top:1px solid var(--line);
       font-size:12px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--ink); }
.ed-h-sub{ font-size:11px; font-weight:400; letter-spacing:.3px; text-transform:none; color:var(--grey-2); }
.ed-btns{ display:flex; flex-wrap:wrap; gap:8px; }
.ed-start{ display:flex; flex-direction:column; gap:3px; width:100%; margin-bottom:12px; padding:13px 15px; border:1px dashed var(--accent);
           border-radius:10px; background:#fff; font:inherit; font-weight:600; text-align:left; cursor:pointer; color:var(--ink); }
.ed-start span{ font-weight:400; font-size:12px; color:var(--grey-2); }
.ed-add{ width:100%; margin-top:4px; padding:12px; border:1px dashed #cfcfcf; border-radius:10px; background:#fafafa; font:inherit;
         font-weight:600; letter-spacing:.5px; text-transform:lowercase; color:var(--grey-1); cursor:pointer; }
.ed-count{ margin-top:12px; font-size:13px; color:var(--grey-1); }
.ed-foot{ margin-top:34px; display:flex; justify-content:center; }
.ed-actions{ position:fixed; left:0; right:0; bottom:0; display:flex; gap:12px; padding:12px 16px calc(12px + env(safe-area-inset-bottom));
             background:rgba(255,255,255,.97); border-top:1px solid var(--line); z-index:9; }
.ed-actions button{ flex:1; padding:13px; border-radius:8px; font-weight:600; letter-spacing:1px; text-transform:lowercase; cursor:pointer; border:0; }

/* topics (argomenti) and notes */
.tp-card{ border:1px solid var(--line); border-radius:12px; padding:12px; margin-bottom:12px; background:#fff; }
.tp-head, .nt-head{ display:flex; align-items:center; gap:6px; }
.tp-code{ flex:none; width:30px; height:30px; border-radius:8px; background:var(--ink); color:#fff; font-weight:700; font-size:14px;
          display:flex; align-items:center; justify-content:center; }
.editor .tp-title{ flex:1; min-width:0; font-weight:600; }
.ic{ flex:none; width:32px; height:32px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--grey-1);
     font-size:15px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.ic:disabled{ opacity:.3; cursor:default; }
.tp-notes{ margin:10px 0 8px; }
.nt{ border-left:2px solid var(--line); padding:4px 0 12px 10px; margin-bottom:10px; }
.nt-code{ flex:none; min-width:30px; font-weight:700; font-size:13px; color:var(--grey-1); }
.editor .nt-title{ flex:1; min-width:0; text-decoration:underline; padding:8px 10px; }
.editor .nt-title::placeholder{ text-decoration:none; }
.editor .nt-text{ margin-top:8px; }
.nt-label{ margin:10px 0 6px; font-size:10.5px; letter-spacing:1.3px; text-transform:uppercase; color:var(--grey-2); }
.nt-chips{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.nt-chips .tag-chip{ padding:5px 11px; font-size:12.5px; }
.editor .nt-free{ width:120px; flex:0 1 120px; padding:5px 11px; border-radius:999px; font-size:12.5px; }
.nt-photos{ margin-top:10px; }
.nt-photos .thumb img{ cursor:zoom-in; }

/* ---------- meetings ---------- */
.meetings-screen .list-head{ padding:0 16px; margin:20px 0 4px; }
.mt-date{ flex:0 0 42%; }
.mt-foot{ flex-direction:column; align-items:center; gap:16px; }
.mt-verbale{ padding:12px 20px; border-radius:8px; border:0; font:inherit; font-weight:600; letter-spacing:.5px; text-transform:lowercase; cursor:pointer; }
.mt-none{ font-size:13px; color:var(--grey-2); margin-bottom:10px; }
.mt-sum{ border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fafafa; }
.mt-sum-row{ display:flex; align-items:baseline; gap:10px; padding:4px 0; font-size:13.5px; }
.mt-sum-row b{ flex:none; width:22px; }
.mt-sum-row span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mt-sum-row em{ flex:none; font-style:normal; font-size:12px; color:var(--grey-2); }
.mt-open{ display:block; margin-top:8px; padding:4px 0; font-size:13px; color:var(--accent); }
.tp-ro{ flex:1; min-width:0; font-weight:600; }
.nt-ro{ margin-top:6px; white-space:pre-wrap; line-height:1.45; font-size:14px; }
.nt-ro-resp{ margin-top:6px; font-size:12px; color:var(--grey-2); }

/* ---------- one meeting: notes listed like snags ---------- */
.meeting-screen .topbar{ gap:10px; }
.meeting-screen .bar-title{ flex:1; min-width:0; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.meeting-screen .list-edit{ margin:0; }
.mt-head{ display:flex; gap:8px; padding:10px 14px; border-bottom:1px solid var(--line); }
.mt-head input{ min-width:0; font:inherit; font-size:14px; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:#fafafa; color:var(--ink); }
.mt-head input[type=date]{ flex:0 0 42%; }
.mt-head input:not([type]){ flex:1; }
.mt-head input:focus{ outline:none; border-color:var(--accent); }
.mt-list{ padding-bottom:110px; }
.mt-topic{ display:flex; align-items:center; gap:8px; padding:16px 16px 6px; cursor:pointer; }
.mt-topic-l{ flex:none; width:24px; height:24px; border-radius:6px; background:var(--ink); color:#fff; font-size:12.5px; font-weight:700;
             display:flex; align-items:center; justify-content:center; }
.mt-topic.empty .mt-topic-l{ background:#cfcfcf; }
.mt-topic-t{ flex:1; min-width:0; font-size:12px; font-weight:700; letter-spacing:1.2px; text-transform:uppercase; color:var(--grey-1);
             overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mt-empty-topic{ padding:2px 16px 10px 48px; font-size:12px; color:var(--grey-2); border-bottom:1px solid var(--line); }
.mt-code{ flex:none; min-width:34px; height:28px; padding:0 7px; border-radius:14px; background:var(--ink); color:#fff;
          display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12.5px; }
.mt-code.big{ min-width:40px; height:32px; border-radius:16px; font-size:14px; }
.mt-row.unprinted .mt-code{ background:#cfcfcf; }
.mt-row.unprinted .snag-title{ color:var(--grey-2); }
.mt-row .snag-title u{ text-underline-offset:2px; }
.mt-ed{ flex:none; display:flex; align-items:center; gap:4px; }
.mt-fromlast{ width:calc(100% - 32px); margin:0 16px; }
.mt-warn{ margin:12px 14px 0; }
/* ---------- photo gallery ---------- */
.ph-body{ padding:0 12px calc(24px + env(safe-area-inset-bottom)); }
.ph-head{ padding:0 4px; margin:18px 0 8px; }
.ph-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.ph-cell{ position:relative; aspect-ratio:1/1; padding:0; border:0; border-radius:8px; overflow:hidden; background:#eef0f2; cursor:pointer; }
.ph-cell img{ width:100%; height:100%; object-fit:cover; display:block; }
.ph-cell img:not([src]){ visibility:hidden; }
.ph-cell.missing{ background:#f4f4f4 repeating-linear-gradient(45deg, #f4f4f4 0 6px, #ececec 6px 12px); }
.ph-badge{ position:absolute; left:5px; bottom:5px; max-width:calc(100% - 10px); padding:2px 7px; border-radius:9px; font-size:10.5px; font-weight:600;
           background:rgba(17,17,17,.72); color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ph-badge.meeting{ background:rgba(201,77,43,.85); }
/* full-screen photo with swiping */
.gv{ padding:0; touch-action:none; }
.gv-stage{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; overflow:hidden; touch-action:none; }
.gv-img{ max-width:100%; max-height:100%; object-fit:contain; transform-origin:center center; will-change:transform; -webkit-user-drag:none; user-select:none; }
.gv-top{ position:fixed; left:0; right:0; top:0; z-index:61; display:flex; align-items:center; gap:10px;
         padding:calc(10px + env(safe-area-inset-top)) 12px 10px 16px; background:linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); color:#fff; }
.gv-count{ flex:none; font-weight:700; font-size:14px; }
.gv-label{ flex:1; min-width:0; font-size:13px; opacity:.85; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gv-x{ flex:none; width:36px; height:36px; border:0; border-radius:50%; background:rgba(255,255,255,.15); color:#fff; font-size:20px; cursor:pointer; }
.gv-nav{ position:fixed; top:50%; transform:translateY(-50%); z-index:61; width:44px; height:64px; border:0; border-radius:10px;
         background:rgba(255,255,255,.14); color:#fff; font-size:30px; cursor:pointer; }
.gv-nav:disabled{ visibility:hidden; }
.gv-prev{ left:8px; } .gv-next{ right:8px; }
@media (hover: none){ .gv-nav{ display:none; } }       /* phones swipe; the arrows are for computers */
/* ---------- deleting a project ---------- */
.del-warn{ font-size:14px; line-height:1.45; margin:6px 0 4px; }
.del-list{ margin:6px 0 4px; padding-left:20px; font-size:14px; line-height:1.6; }
.btn-danger{ background:#b3261e; color:#fff; }
.btn-danger:disabled{ opacity:.35; cursor:default; }
.notif-card{ position:relative; margin-top:14px; padding:14px 15px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.notif-t{ font-weight:600; font-size:15px; }
.notif-s{ margin-top:4px; font-size:13px; line-height:1.45; color:var(--grey-1); padding-right:18px; }
.notif-on{ margin-top:10px; padding:10px 18px; border-radius:8px; border:0; font:inherit; font-weight:600; letter-spacing:.5px; text-transform:lowercase; cursor:pointer; }
.notif-x{ position:absolute; top:8px; right:8px; width:28px; height:28px; border:0; background:none; font-size:18px; color:var(--grey-2); cursor:pointer; }
.tag-edit{ margin-bottom:10px; }
.tag-rm{ display:inline-flex; align-items:center; gap:6px; }
.tag-rm span{ font-size:15px; line-height:1; opacity:.85; }
.tag-new{ align-items:stretch; }
.tag-new .tag-addbtn{ flex:0 0 auto; width:auto; padding:10px 16px; }
.mt-info{ margin:12px 14px 0; padding:10px 12px; border-radius:8px; background:#f2f4f7; color:var(--grey-1); font-size:12.5px; line-height:1.45; }
.mt-foot{ display:flex; flex-direction:column; align-items:center; gap:16px; margin-top:30px; }
.note-sheet .tag-chips{ margin-bottom:8px; }
.note-sheet .mt-newtopic{ border-style:dashed; color:var(--grey-1); }
.note-sheet #ns-topicname{ font-weight:600; }
.note-sheet textarea{ min-height:96px; line-height:1.45; resize:none; overflow:hidden; }
.note-sheet .ns-title{ text-decoration:underline; text-underline-offset:2px; }
.note-sheet .ns-title::placeholder{ text-decoration:none; }
.note-sheet .nt-chips .tag-chip{ padding:5px 11px; font-size:12.5px; }
.note-sheet .nt-free{ width:130px; flex:0 1 130px; padding:5px 11px; border-radius:999px; font-size:12.5px; }
.note-sheet .ed-status{ min-width:0; }
.ns-by{ margin:-2px 0 4px; font-size:11.5px; color:var(--grey-2); }
