/* Pagine per i clienti: semplici, grandi, pensate anche per il telefono */

body.cliente { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% 0%, #fbfaf7 0%, var(--bg) 60%); }
.c-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; }
.c-brand { display: flex; align-items: center; gap: 10px; }
.c-mono { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 650; font-size: 12.5px; }
.c-brand b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.c-brand span { font-size: 12px; color: var(--muted); }
.c-for { font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.c-for b { color: var(--ink); font-weight: 600; }
.c-for img { height: 20px; width: auto; display: inline-block; vertical-align: middle; margin-left: 2px; }
.c-foot { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; font-size: 12px; color: var(--faint); }
.c-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.brand-s { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 650; }
.brand-s .brand-mark { width: 15px; height: 15px; }

/* ---------- approvazione ---------- */
.c-appr { width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px 24px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.c-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; position: sticky; top: 16px; }
.c-vers { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.c-vers button { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 550; color: var(--muted); }
.c-vers button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.c-canvas { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; cursor: crosshair; animation: stage-in .7s var(--ease-out) both; }
.c-canvas.locked { cursor: default; }
@keyframes stage-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.c-canvas .c-cr { width: min(460px, 86vw, calc(74vh * var(--arn, .8))); box-shadow: 0 30px 70px -30px rgba(20, 20, 20, .45), 0 2px 6px rgba(20, 20, 20, .06); }
.c-canvas .frame.c-cr { width: min(720px, 86vw, calc(74vh * var(--arn, .8))); }
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 0 0 3px #fff, 0 8px 18px -6px rgba(0, 0, 0, .45);
  animation: drop .45s var(--ease-out) both;
}
.pin.ok { background: var(--ok); }
.pin.new { animation: drop .45s var(--ease-out) both, pulse 1.6s ease-in-out infinite .5s; }
@keyframes drop { from { transform: translate(-50%, -120%); opacity: 0; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 9px rgba(255, 90, 54, .25); } }
.pop { position: absolute; transform: translate(-50%, 26px); z-index: 5; width: 270px; padding: 10px; border-radius: 14px; background: #fff; box-shadow: var(--sh-3); display: grid; gap: 8px; animation: pop-in .3s var(--ease-out) both; cursor: default; }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }
.pop textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 14px; resize: none; outline: none; }
.pop textarea:focus { border-color: var(--ink); }
.pop div { display: flex; justify-content: flex-end; gap: 6px; }
.c-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); text-align: center; }
.c-hint .ico { color: var(--accent); }
.shake { animation: shake .45s ease; color: var(--accent-ink); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* timbro dell'approvazione: arriva come un timbro vero, un po' storto */
.stamp { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.stamp > div {
  width: 58%; aspect-ratio: 1; max-width: 240px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 5px solid rgba(27, 127, 83, .92); color: rgba(27, 127, 83, .95);
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(3px);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .9), inset 0 0 0 7px rgba(27, 127, 83, .6);
  rotate: -12deg; text-transform: uppercase; text-align: center;
}
.stamp b { font-size: clamp(22px, 4vw, 34px); font-weight: 800; letter-spacing: .06em; line-height: 1; }
.stamp small { font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.stamp.in > div { animation: stamp .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stamp { 0% { transform: scale(2.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); } }

.c-panel { display: flex; flex-direction: column; gap: 16px; padding-top: 6px; }
.c-hello { font-family: var(--serif); font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
.c-intro { color: var(--ink-2); font-size: 15px; margin-top: -8px; }
.c-card { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); display: grid; gap: 8px; }
.c-kicker { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.c-card h1 { font-size: 22px; font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.c-when { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.c-cap { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.c-cap h4, .c-comments h4 { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.c-cap p { font-size: 14px; line-height: 1.55; color: var(--ink-2); white-space: pre-line; }
.c-comments ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.c-comments li { display: flex; gap: 10px; animation: rise .4s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.c-comments li.ok p { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .25); }
.c-comments b { font-size: 13.5px; font-weight: 600; }
.c-comments span { font-size: 12px; color: var(--faint); }
.c-comments p { font-size: 14px; margin-top: 2px; }
.pin-n { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }
.pin-n.ghost { background: var(--bg-2); color: var(--ink-2); font-size: 9.5px; }
.c-comments li.ok .pin-n { background: var(--ok); }
.c-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.c-actions .btn { width: 100%; }
.c-safe { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); justify-content: center; }
.c-done { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; animation: rise .5s var(--ease-out) both; }
.c-done b { display: block; font-size: 15px; }
.c-done span { font-size: 12.5px; opacity: .8; }
.c-done.approvato { background: var(--ok-soft); color: var(--ok); }
.c-done.modifiche { background: var(--danger-soft); color: var(--danger); }
.c-undo { align-self: center; color: var(--faint); }
.c-empty, .c-sent { text-align: center; padding: 80px 24px; display: grid; gap: 10px; justify-items: center; }
.c-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: #1b1b20; color: #fff; font-size: 14px; box-shadow: var(--sh-3); animation: toast-in .4s var(--ease-out) both; z-index: 20; }
.c-toast.out { opacity: 0; transition: opacity .3s; }

/* ---------- modulo richieste ---------- */
.c-mod { width: 100%; max-width: 640px; margin: 0 auto; padding: 8px 24px 24px; }
.c-form { display: grid; gap: 20px; padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); animation: stage-in .6s var(--ease-out) both; }
.c-form-h h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; letter-spacing: -.03em; line-height: 1.05; }
.c-form-h p { margin-top: 6px; color: var(--muted); font-size: 15px; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: all .18s var(--ease); }
.chips button:hover { border-color: var(--ink-2); }
.chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; transform: scale(1.03); }
.fld { display: grid; gap: 6px; flex: 1; min-width: 0; }
.fld span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld textarea { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 15px; outline: none; width: 100%; }
.fld input { height: 44px; }
.fld input:focus, .fld textarea:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(22, 22, 26, .06); }
.fld-row { display: flex; gap: 10px; flex-wrap: wrap; }
.drop-s { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; cursor: pointer; }
.send { width: 100%; }
.c-check { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; animation: pop .6s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.c-sent h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; letter-spacing: -.03em; }
.c-sent p { color: var(--muted); max-width: 40ch; }

@media (max-width: 900px) {
  .c-appr { grid-template-columns: 1fr; gap: 24px; padding: 4px 16px 16px; }
  .c-stage { position: static; }
  .c-top { padding: 12px 16px; }
  .c-brand span { display: none; }
  .c-hello { font-size: 26px; }
  .c-mod { padding: 4px 12px 12px; }
  .c-form { padding: 20px; border-radius: 20px; }
  .c-form-h h1 { font-size: 32px; }
  .c-actions { position: sticky; bottom: 10px; padding: 8px; margin: 0 -8px; border-radius: 18px; background: rgba(244, 243, 239, .85); backdrop-filter: blur(10px); }
}

/* ---------- altri contenuti in attesa ---------- */
.c-more { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: transform .25s var(--ease), box-shadow .25s; }
.c-more:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.c-more b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.c-more span { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--accent-ink); font-weight: 600; margin-top: 2px; }
.th-row { display: flex; flex: none; }
.th-row .th { height: 54px; width: 44px; padding: 2px; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--sh-1); display: flex; align-items: center; justify-content: center; }
.th-row .th > .cr, .th-row .th > .frame { height: 100%; width: auto; }
.th-row .th + .th { margin-left: -14px; }
.th-row .th:nth-child(2) { transform: rotate(4deg); }
.th-row .th:nth-child(3) { transform: rotate(-5deg); }

/* ---------- raccolta ---------- */
.c-list { width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 24px 40px; display: flex; flex-direction: column; gap: 22px; }
.c-list-h { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.c-list-h h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 650; letter-spacing: -.045em; line-height: 1.05; }
.c-list-h h1 em { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.c-list-h .btn { margin-top: 12px; }
.c-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.c-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--d) * 60ms); transition: background .3s, border-color .3s; }
.c-item.approvato { background: #f4faf6; border-color: #cfe9da; }
.c-item.modifiche { background: #fdf5f4; border-color: #f2d2ce; }
.c-item-th { position: relative; height: 118px; border-radius: 10px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; padding: 6px; }
.c-item-th .th { height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; }
.c-item-th .th > .cr, .c-item-th .th > .frame { height: 100%; width: auto; max-width: 100%; }
.mini-stamp { position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -12deg; padding: 3px 8px; border: 2px solid var(--ok); border-radius: 6px; color: var(--ok); background: rgba(255, 255, 255, .9); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; animation: stamp .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.c-item-main { min-width: 0; display: grid; gap: 4px; }
.c-item-main h3 { font-size: 17px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.c-item-main p { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-item-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 170px; }
.c-item-act .c-done { padding: 10px 12px; border-radius: 12px; animation: none; }
.c-item-act .c-done b { font-size: 13.5px; }
.c-item-act .c-done span { font-size: 12px; }
.c-list .c-undo { align-self: center; }

/* ---------- piano ---------- */
.c-plan { width: 100%; max-width: 820px; margin: 0 auto; padding: 8px 24px 40px; display: flex; flex-direction: column; gap: 22px; }
.c-plan-h { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: center; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); animation: stage-in .6s var(--ease-out) both; }
.c-plan-cover .cr { width: 100%; box-shadow: var(--sh-2); }
.c-plan-h h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 650; letter-spacing: -.04em; line-height: 1.08; margin: 4px 0 8px; }
.c-plan-h .c-intro { margin: 0; }
.c-plan-bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.c-plan-bar .bar { flex: 1; }
.c-plan-list { list-style: none; margin: 0; padding: 4px; display: grid; gap: 4px; }
.c-plan-list li { display: grid; grid-template-columns: 44px 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--d) * 45ms); }
.c-plan-list li.past { opacity: .6; }
.c-plan-list li.today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pl-date { text-align: center; line-height: 1; }
.pl-date b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.04em; }
.pl-date span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.c-plan-list .th { height: 58px; width: 52px; display: flex; align-items: center; justify-content: center; }
.c-plan-list .th > .cr, .c-plan-list .th > .frame { height: 100%; width: auto; max-width: 100%; }
.pl-main { min-width: 0; }
.pl-main b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-main span { font-size: 12.5px; color: var(--muted); }
.chip.lnk { text-decoration: none; cursor: pointer; }
.chip.lnk:hover { filter: brightness(.95); }
.c-plan-note { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); justify-content: center; }
.c-plan-note .ico { color: var(--accent); }

@media (max-width: 700px) {
  .c-list, .c-plan { padding: 4px 14px 30px; }
  .c-item { grid-template-columns: 76px 1fr; }
  .c-item-th { height: 96px; }
  .c-item-act { grid-column: 1 / -1; flex-direction: row; }
  .c-item-act .btn { flex: 1; }
  .c-plan-h { grid-template-columns: 1fr; }
  .c-plan-cover { max-width: 260px; }
  .c-plan-list li { grid-template-columns: 38px 46px 1fr; }
  .c-plan-list li > .chip { grid-column: 3; justify-self: start; }
}

/* ---------- report per il cliente ---------- */
.c-report { width: 100%; max-width: 900px; margin: 0 auto; padding: 8px 24px 40px; display: grid; gap: 18px; }
.c-report-act { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.c-report .sheet { max-width: none; animation: stage-in .6s var(--ease-out) both; }
.c-report .sheet-wrap { padding: 0; }
.sh-by b { font-size: 15px; }
.sh-next a { color: inherit; }
.sh-next a b { display: inline-flex; align-items: center; gap: 5px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl td { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.tbl .r { text-align: right; white-space: nowrap; }
.sh-grid .th { display: flex; align-items: center; justify-content: center; }
.sh-grid .th > .cr, .sh-grid .th > .frame { height: 100%; width: auto; max-width: 100%; }
/* report */
.sheet-wrap { padding: 24px; display: flex; justify-content: center; }
.sheet { width: 100%; max-width: 820px; background: #fff; border-radius: 6px; box-shadow: var(--sh-2); padding: 48px 52px; display: flex; flex-direction: column; gap: 30px; }
.sh-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
.sh-k { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.sh-h h1 { font-size: 40px; margin-top: 6px; }
.sh-h p { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--muted); text-transform: capitalize; }
.sh-by { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sh-by .brand { font-size: 15px; }
.sh-by small { color: var(--muted); font-size: 12px; }
.sh-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sh-kpi div { background: #fff; padding: 16px; }
.sh-kpi b { display: block; font-size: 32px; font-weight: 600; letter-spacing: -.05em; }
.sh-kpi span { font-size: 12px; color: var(--muted); }
.sheet h2 { font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.sh-grid figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sh-grid .th { height: 150px; background: var(--bg); border-radius: 8px; padding: 8px; }
.sh-grid figcaption b { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; }
.sh-grid figcaption span { font-size: 11px; color: var(--muted); }
.sh-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.sh-2 .tbl td { padding: 7px 0; font-size: 12.5px; white-space: normal; }
.sh-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sh-next li b { display: block; font-size: 13px; font-weight: 600; }
.sh-next li span { font-size: 12px; color: var(--muted); }
.sh-f { font-size: 11px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 14px; }


@media (max-width: 700px) { .c-report { padding: 4px 12px 30px; } .sheet { padding: 22px; } .sh-kpi { grid-template-columns: 1fr 1fr; } .sh-2 { grid-template-columns: 1fr; } .sh-h h1 { font-size: 30px; } }
@media print { .c-top, .c-foot, .c-report-act { display: none !important; } body.cliente { background: #fff; } .c-report { padding: 0; max-width: none; } .sheet { box-shadow: none; padding: 0; } @page { size: A4; margin: 14mm; } }

/* ---------- pagina del collaboratore ---------- */
.c-team { width: 100%; max-width: 780px; margin: 0 auto; padding: 8px 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.tk-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tk-kpi > div { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); display: grid; gap: 2px; align-content: start; }
.tk-kpi span { font-size: 12.5px; color: var(--muted); }
.tk-kpi b { font-size: 28px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; }
.tk-kpi small { font-size: 12px; color: var(--faint); }
.tk-kpi .ok { background: var(--ok-soft); border-color: #cfe9da; }
.tk-kpi .ok b { color: var(--ok); }
.tk-kpi .ok small, .tk-kpi .ok span { color: #3f7a5c; }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tk { display: grid; grid-template-columns: 112px 1fr; gap: 18px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); animation: rise .5s var(--ease-out) both; animation-delay: calc(var(--d) * 60ms); }
.tk.late { border-color: #f2c4bf; }
.tk-th { height: 140px; border-radius: 10px; background: var(--bg-2); padding: 6px; }
.tk-th .th { height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; }
.tk-th .th > .cr, .tk-th .th > .frame { height: 100%; width: auto; max-width: 100%; }
.tk-main { min-width: 0; display: grid; gap: 4px; align-content: start; }
.tk-main h3 { font-size: 18px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.tk-main p { font-size: 13px; color: var(--muted); }
.tk-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.tk-d { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--bg-2); font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.tk-d.now { background: var(--accent-soft); color: var(--accent-ink); }
.tk-d.late { background: var(--danger-soft); color: var(--danger); }
.tk-e { font-size: 18px; font-weight: 650; letter-spacing: -.03em; white-space: nowrap; }
.tk-form { display: flex; gap: 8px; margin-top: 8px; }
.tk-form input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 14px; outline: none; }
.tk-form input:focus { border-color: var(--ink); background: #fff; }
.tk-form .btn { height: 38px; }
.tk-done h4 { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.tk-done ul { list-style: none; margin: 0; padding: 2px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.tk-done li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.tk-done li:first-child { border-top: 0; }
.tk-done li > div { flex: 1; min-width: 0; }
.tk-done li > div b { display: block; font-size: 14px; font-weight: 600; }
.tk-done li > div span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-done .tk-e { font-size: 15px; }
.tk-ck { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.tk-done li.tot { border-top: 2px solid var(--ink); }
.tk-done li.tot .tk-e { color: var(--ok); font-size: 18px; }
.tk-done li.just { animation: just-ok 1.6s var(--ease-out); }
@keyframes just-ok { 0% { background: var(--ok-soft); box-shadow: 0 0 0 8px var(--ok-soft); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }
@media (max-width: 700px) {
  .c-team { padding: 4px 14px 30px; }
  .tk { grid-template-columns: 78px 1fr; gap: 12px; }
  .tk-th { height: 102px; }
  .tk-kpi { grid-template-columns: 1fr 1fr; }
  .tk-kpi > div:last-child { grid-column: 1 / -1; }
  .tk-form { flex-direction: column; }
  .tk-form input { flex: none; }
}

/* brief e note nella pagina del collaboratore */
.tk-brief { margin-top: 8px; padding: 10px 12px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.tk-brief b { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.tk-main .tk-brief p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-line; }
.tk-note { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.tk-note li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; padding-left: 10px; border-left: 2px solid var(--line-2); font-size: 13px; }
.tk-note li b { font-weight: 600; }
.tk-main .tk-note li p { color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.tk-note li span { grid-column: 2; font-size: 11.5px; color: var(--faint); }
.tk-file { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tk-file a, .tk-file span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.tk-file a:hover { border-color: var(--ink-2); }
.tk-costo label { display: inline-flex; align-items: center; gap: 8px; position: relative; }
.tk-costo span { font-size: 12px; color: var(--muted); }
.tk-costo input { width: 104px; height: 34px; padding: 0 26px 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 15px; font-weight: 700; text-align: right; outline: none; -moz-appearance: textfield; }
.tk-costo input::-webkit-outer-spin-button, .tk-costo input::-webkit-inner-spin-button { -webkit-appearance: none; }
.tk-costo input:focus { border-color: var(--ink); background: #fff; }
.tk-costo i { position: absolute; right: 9px; font-style: normal; font-size: 12px; color: var(--muted); }
.st-standby { background: #eeece8; color: #57534e; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.file { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.file a { color: inherit; }
.file a:hover b { text-decoration: underline; }
.file b { font-weight: 550; }
.file small { color: var(--faint); }
.file .ico { color: var(--muted); }
.file.img { padding: 4px 10px 4px 4px; }
.file-th { display: block; width: 56px; height: 56px; border-radius: 7px; overflow: hidden; flex: none; background: var(--bg-2); }
.file-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-files { margin-top: 8px; }
.tk-note .files { grid-column: 2; margin: 4px 0 2px; }
.tk-up { position: relative; height: 38px; gap: 6px; cursor: pointer; }
.cr-img { background: #f4f3ef; }

/* ---------- 21/10/2026: schede, calendario, storico, chat e icona sul telefono ---------- */
.tk-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); width: fit-content; max-width: 100%; overflow-x: auto; }
.tk-tabs button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 550; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tk-tabs button:hover { color: var(--ink); }
.tk-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.tk-tabs i { font-style: normal; font-size: 11.5px; font-weight: 650; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; display: inline-grid; place-items: center; }
.tk.lampo { animation: tk-lampo 1.6s var(--ease-out); }
@keyframes tk-lampo { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--sh-1); } }

.tk-chat { margin-top: 10px; display: grid; gap: 8px; }
.tk-chat .tk-note { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-chat .tk-note li { max-width: 86%; padding: 8px 12px 9px; border-radius: 4px 14px 14px 14px; background: var(--bg-2); display: grid; gap: 1px; justify-self: start; }
.tk-chat .tk-note li.mia { justify-self: end; border-radius: 14px 4px 14px 14px; background: var(--accent-soft); }
.tk-chat .tk-note b { font-size: 12px; font-weight: 600; }
.tk-chat .tk-note p { font-size: 14px; color: var(--ink); white-space: pre-line; line-height: 1.45; }
.tk-chat .tk-note span { font-size: 11px; color: var(--faint); }
.tk-nota { display: flex; gap: 6px; }
.tk-nota input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface-2); font: inherit; font-size: 14px; }
.tk-nota input:focus { outline: none; border-color: var(--ink); background: #fff; }
.tk-nota .btn { height: 36px; width: 36px; padding: 0; justify-content: center; border-radius: 50%; }

.tk-pag { font-size: 12px; font-weight: 550; color: var(--ok); background: var(--ok-soft); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.tk-dapag { font-size: 12px; color: var(--muted); background: var(--bg-2); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }

.tk-app { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.tk-app-i { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.tk-app > div:nth-child(2) { flex: 1; display: grid; gap: 4px; justify-items: start; }
.tk-app b { font-size: 14.5px; font-weight: 600; }
.tk-app p, .tk-app span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.tk-app span b { font-size: 13px; color: var(--ink); }

.cal-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-h h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-transform: capitalize; min-width: 150px; text-align: center; }
.cal-tot { margin-left: auto; font-size: 13px; color: var(--muted); }
.cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); gap: 1px; box-shadow: var(--sh-1); }
.cal-gg { background: var(--bg-2); font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; }
.cal-c { background: var(--surface); min-height: 96px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-c.vuota { background: var(--surface-2); }
.cal-c.passato .cal-n { color: var(--faint); }
.cal-n { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 2px 4px; }
.cal-c.oggi .cal-n { background: var(--accent); color: #fff; border-radius: 99px; width: fit-content; padding: 2px 8px; }
.cal-v { display: flex; align-items: center; gap: 4px; width: 100%; padding: 4px 6px; border: 0; border-radius: 7px; background: var(--bg-2); font: inherit; font-size: 12px; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; }
.cal-v span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-v i { font-style: normal; font-size: 11px; color: var(--muted); flex: none; }
.cal-v:hover:not([disabled]) { background: var(--ink); color: #fff; }
.cal-v:hover:not([disabled]) i { color: #fff; }
.cal-v.now { background: var(--accent-soft); color: var(--accent-ink); }
.cal-v.late { background: var(--danger-soft); color: var(--danger); }
.cal-v.fatto { background: var(--ok-soft); color: var(--ok); cursor: default; }
.cal-agenda { display: none; list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.cal-agenda li { display: flex; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.cal-agenda li:first-child { border-top: 0; }
.cal-agenda li > div:last-child { flex: 1; display: grid; gap: 4px; min-width: 0; }
.cal-agenda .cal-v { font-size: 13.5px; padding: 7px 10px; }
.cal-ad { width: 38px; flex: none; display: grid; justify-items: center; }
.cal-ad b { font-size: 19px; font-weight: 650; line-height: 1.1; }
.cal-ad span { font-size: 11px; color: var(--faint); text-transform: uppercase; }
.cal-agenda li.oggi .cal-ad b { color: var(--accent); }
.cal-agenda li.vuoto { color: var(--muted); font-size: 14px; }

.tk-sto { display: grid; gap: 8px; }
.sto-m { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); overflow: hidden; }
.sto-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.sto-h > div { flex: 1; display: grid; gap: 2px; }
.sto-h > div b { font-size: 15.5px; font-weight: 600; text-transform: capitalize; }
.sto-h > div span { font-size: 13px; color: var(--muted); }
.sto-d { padding: 0 16px 14px; display: grid; gap: 12px; }
.sto-d .tbl td small { display: block; color: var(--muted); font-size: 12px; }
.sto-a { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.c-empty-s { padding: 26px 18px; text-align: center; color: var(--muted); border-radius: 16px; border: 1px dashed var(--line-2); }

@media (max-width: 640px) {
  .cal-g { display: none; }
  .cal-agenda { display: block; }
  .tk-tabs { width: 100%; }
  .tk-tabs button { flex: 1; justify-content: center; padding: 0 8px; font-size: 13px; }
  .tk-tabs button span { overflow: hidden; text-overflow: ellipsis; }
  .sto-d .tbl th:first-child, .sto-d .tbl td:first-child { display: none; }
}
@media print { .tk-estratto { box-shadow: none; } }
.tk-chat .tk-note li { grid-template-columns: minmax(0, 1fr); border-left: 0; padding-left: 12px; }
.tk-chat .tk-note li span, .tk-chat .tk-note .files { grid-column: 1; }
.tk-main .tk-chat .tk-note li p { color: var(--ink); font-size: 14px; }
.tk-tabs .tab-s { display: none; }
.tk-meta { flex-wrap: wrap; }
.tk-d { white-space: nowrap; }
.sto-d .tbl th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 6px 0; border-bottom: 1px solid var(--line); }
.sto-d .tbl th.r { text-align: right; }
.sto-d .tbl td { vertical-align: top; padding-right: 10px; }
.sto-d .tbl td:last-child { padding-right: 0; }
@media (max-width: 640px) { .tk-tabs .tab-l { display: none; } .tk-tabs .tab-s { display: inline; } .tk-tabs button { min-width: 0; gap: 5px; } }
.tk-nota .tk-clip { height: 36px; min-width: 36px; padding: 0 9px; border-radius: 99px; gap: 4px; cursor: pointer; }
.tk-nota .tk-clip span:empty { display: none; }
.tk-nota .tk-clip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tk-chat .tk-note li .files { margin-top: 6px; }
.tk-chat .tk-note li .file.img .file-th img { max-height: 160px; }
