/* The studio's extras on the client screens: a pencil on what exists, a dashed "+" where something can be added,
   the forms those open, and the users page. Nothing here shows for a client. */

/* ---- forms in a panel ---- */
.aform { margin-top: 20px; }
.aform select, .modal input[readonly] {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font: inherit; color: inherit; outline: none;
}
.aform select:focus { border-color: var(--fg); }
.aform input[type=date], .aform input[type=number] {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; outline: none;
}
.aform input[type=file] { width: 100%; padding: 10px 0; font-size: 0.95rem; }
.aform textarea { min-height: 80px; }
.aform [hidden] { display: none; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--fg); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.checks .check { margin: 0; }
.tk-list .check.off { opacity: 0.5; cursor: default; }
.aerr { color: var(--danger); min-height: 1.5em; margin-top: 4px; }
.aform-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 16px; }
.aform-del { margin-right: auto; font-size: 0.85rem; }
.pwtext { margin: 12px 0 16px; }
.link.danger { color: var(--danger); }
.btn.danger { background: var(--danger); border-color: var(--danger); }

/* ---- the pencil ---- */
.ico.ed { width: 34px; height: 34px; padding: 0; cursor: pointer; color: var(--fg); font: inherit; }
.ico.ed .ic { width: 15px; height: 15px; }
.ico.ed.sm { width: 28px; height: 28px; }
.ico.ed.sm .ic { width: 13px; height: 13px; }

/* ---- the "+": a light grey, dashed rectangle ---- */
.addtile {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0; cursor: pointer;
  border: 1.5px dashed #c6c6cc; border-radius: 22px; background: rgba(0,0,0,0.025); color: var(--muted);
  font: inherit; font-weight: 700; font-size: 0.85rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.addtile:hover { border-color: var(--fg); color: var(--fg); background: rgba(0,0,0,0.045); }
.addtile .ic { width: 18px; height: 18px; }

/* project choice */
.pcard { position: relative; }
.pcard > .ed { position: absolute; top: 14px; right: 14px; z-index: 2; }
.addtile.pcard { display: flex; min-height: 240px; }
.addtile.pcard .ic { width: 34px; height: 34px; }
.solo-users, .solo-back { position: fixed; left: 20px; z-index: 30; width: 72px; font-size: 0.68rem; }
.solo-users { bottom: 108px; }
.solo-back { top: 16px; }
.solo-users .rb, .solo-back .rb { width: 52px; height: 52px; }

/* project title */
.phd > .ed { align-self: center; margin-left: 10px; }

/* lists: invoices, users */
.row > .ed { flex: none; }
.addtile.row-add { width: 100%; min-height: 58px; margin-top: 10px; }

/* timeline: pencil on a card, "+" on the line between two milestones, "+" after the last one */
.col > .ed { position: absolute; top: 32px; right: 12px; z-index: 5; width: 30px; height: 30px; }
.madd {
  position: absolute; top: 14px; right: calc(var(--colgap) / -2 - 12px); z-index: 5; width: 24px; height: 24px; margin-top: -12px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer;
  background: var(--bg); border: 1.5px dashed #b4b4ba; color: var(--muted);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.madd .ic { width: 12px; height: 12px; }
.madd:hover { transform: scale(1.2); border-style: solid; border-color: var(--fg); color: var(--fg); background: #fff; }
.addtile.col-add { flex: 0 0 calc(var(--colw) * 0.5); margin-top: 20px; min-height: 150px; }
.addtile.col-add .ic { width: 26px; height: 26px; }

/* opened milestone */
.phase-head h1 .ed { display: inline-flex; vertical-align: middle; margin-left: 14px; }
.pres .ico.ed { right: 64px; bottom: 19px; }
.addrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.addrow .addtile { min-height: 56px; border-radius: 16px; padding: 0 12px; }
.react-h { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.postit .pen-note { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; background: rgba(255,255,255,0.6); border-color: transparent; color: var(--ink); }
.postit .pen-note .ic { width: 12px; height: 12px; }
.gal-dl { display: flex; align-items: center; gap: 8px; }
.ccard { position: relative; }
.ccard > .ed { position: absolute; top: 12px; right: 12px; z-index: 2; }

/* users */
.urow { flex-wrap: wrap; gap: 10px 20px; padding: 14px 14px 14px 24px; }
.urow:hover { transform: none; box-shadow: none; }
.urow-t { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.urow-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ureset { text-align: center; margin-top: 44px; }
.ureset .link { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 620px) {
  .checks { grid-template-columns: 1fr; }
  .solo-users, .solo-back { left: 8px; }
  .solo-users { bottom: 96px; }
  .solo-back { top: 8px; }
  .upage { padding-top: 76px; }
  .addtile.pcard { min-height: 120px; }
}

/* phone: the studio's extras on the upright timeline */
@media (max-width: 620px) {
  .col > .ed { top: 50%; right: 12px; margin-top: -15px; }
  .hcard { padding-right: 52px; }
  .madd { top: auto; bottom: -19px; right: auto; left: -35px; margin: 0; }
  .col:has(.peek) > .madd { bottom: -55px; }
  .addtile.col-add { flex: none; margin-top: 0; min-height: 60px; }
  .solo-users, .solo-back { top: 10px; bottom: auto; left: 6px; width: 60px; font-size: 0.58rem; }
  .solo-users .rb, .solo-back .rb { width: 44px; height: 44px; }
  .upage { padding-top: 0; }
}

@media (max-width: 620px), (hover: none) {
  .madd:hover { transform: none; }
}

/* the current images in a form: click one to take it out, click again to keep it */
.fthumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fthumb { position: relative; width: 84px; height: 62px; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); background: #e9e9ed; }
.fthumb input { position: absolute; opacity: 0; pointer-events: none; }
.fthumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s var(--ease); }
.fthumb i {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--fg);
  display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 0.8rem; line-height: 1;
}
.fthumb input:not(:checked) ~ img { opacity: 0.2; }
.fthumb input:not(:checked) ~ i { background: var(--danger); color: #fff; }
.fthumb input:focus-visible ~ img { outline: 2px solid var(--fg); outline-offset: -2px; }

/* a form that is saving: the button waits */
.aform .btn:disabled { opacity: .6; cursor: default; }
