/* IOMI r17 — resumo dos Termos no registo, plano da Carteira, fotografia de perfil, ícones,
   utilizadores, departamentos do apoio e distribuição do trabalho. */

/* ---------- Resumo dos Termos (registo e convites) ---------- */
.terms-dialog {
  width: min(40rem, calc(100vw - 2rem)); max-height: min(85vh, 46rem); padding: 0;
  border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(0, 27, 58, 0.6);
}
.terms-dialog[open] { display: flex; flex-direction: column; }
.terms-dialog::backdrop { background: rgba(0, 27, 58, 0.55); }
.terms-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.terms-dialog-head h2 { margin: 0; font-family: var(--serif); font-size: 1.35rem; color: var(--brand); }
.terms-dialog-x { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; }
.terms-dialog-x .icon { width: 1.1rem; height: 1.1rem; }
.terms-dialog-body { padding: 1.1rem 1.25rem; overflow-y: auto; }
.terms-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.terms-points li { position: relative; padding-left: 1.25rem; line-height: 1.55; }
.terms-points li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--seal); }
.terms-dialog-body h3 { margin: 1.4rem 0 0.4rem; font-size: 1rem; color: var(--brand); }
.terms-dialog-body h3:focus { outline: none; }
.terms-dialog-note { margin-top: 1rem; font-size: 0.875rem; color: var(--ink-soft); }
.terms-dialog-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0.75rem 0 0; }
.terms-dialog-links a { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.terms-dialog-links .icon { width: 1rem; height: 1rem; }
.terms-dialog-foot { padding: 0.9rem 1.25rem 1.1rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }

/* ---------- Carteira: resumo do plano escolhido ---------- */
.vault-summary { margin: 1.25rem 0 0; padding: 0.85rem 1rem; border-left: 3px solid var(--seal); background: var(--seal-tint); border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600; color: var(--brand); }
[data-plan-only][hidden] { display: none !important; }

/* ---------- Ícones: os mesmos do site, traço azul-marinho com detalhe dourado ---------- */
.i .a { stroke: var(--icon-accent, var(--seal)); }
.i .af { fill: var(--icon-accent, var(--seal)); stroke: none; }
.btn-primary { --icon-accent: #E3C47E; }
:root[data-theme="planta"] .btn-primary { --icon-accent: #061A33; }
.nav a .i { --icon-accent: var(--seal); }

/* Atalhos do início: quadrados com aro dourado, como os ícones do site. */
.tile-icon {
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F4EA 100%);
  box-shadow: inset 0 0 0 1px #E6D6B3, 0 10px 22px -16px rgba(1, 43, 87, 0.55);
}
.tile-icon .i { stroke-width: 1.6; }
.tile.is-alert .tile-icon { background: linear-gradient(180deg, #FBF5E7 0%, #F2E3C2 100%); box-shadow: inset 0 0 0 1.5px rgba(196, 152, 65, 0.75); }
.tile:hover .tile-icon { box-shadow: inset 0 0 0 1px var(--seal), 0 12px 24px -16px rgba(1, 43, 87, 0.6); }
:root[data-theme="planta"] .tile-icon { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(217, 178, 94, 0.45); }

/* ---------- Fotografia de perfil ---------- */
.avatar-img { object-fit: cover; padding: 0; background: var(--brand-tint); }
.avatar-link { display: inline-flex; border-radius: 50%; }
.avatar-link .avatar { width: 2.25rem; height: 2.25rem; }
.avatar-sm { width: 2rem !important; height: 2rem !important; font-size: 0.72rem !important; flex: none; }
.avatar-xl { width: 6.5rem !important; height: 6.5rem !important; font-size: 1.9rem !important; flex: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--seal); }
.avatar-edit { display: flex; gap: 1.5rem; align-items: flex-start; margin-top: 1rem; }
.avatar-edit-body { display: grid; gap: 0.75rem; }
.avatar-edit-body .hint { margin: 0; max-width: 38em; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.file-pick { position: relative; overflow: hidden; cursor: pointer; display: inline-flex; align-items: center; gap: 0.45rem; }
.file-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-pick:focus-within { outline: 3px solid var(--seal-deep); outline-offset: 2px; }
.person-cell { display: inline-flex; align-items: center; gap: 0.65rem; }
@media (max-width: 520px) { .avatar-edit { flex-direction: column; } }

/* ---------- Dimensão da empresa e tipo de conta (escolhas em cartão) ---------- */
.segment-options { display: grid; gap: 0.5rem; margin-top: 0.4rem; }
@media (min-width: 720px) { .segment-options { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); } }
.segment-option { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.85rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; line-height: 1.35; }
.segment-option:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-tint); }
.segment-option input { margin-top: 0.15rem; accent-color: var(--brand); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
[data-type-only][hidden] { display: none !important; }

/* ---------- Responsáveis, departamentos e distribuição ---------- */
.page-actions { margin-top: 1rem; }
.page-actions .btn { display: inline-flex; align-items: center; gap: 0.45rem; }
.assign-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; margin: 0.75rem 0 1rem; }
.assign-bar label { font-weight: 600; font-size: 0.9rem; }
.assign-bar .input { width: auto; min-width: 14rem; max-width: 100%; }
.dept-chip { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--seal-tint); color: var(--seal-deep); font-size: 0.78rem; font-weight: 600; margin-right: 0.25rem; }
.work-table th .sub { display: block; font-weight: 400; font-size: 0.8rem; color: var(--ink-faint); }
.work-table .input { min-width: 13rem; }
.work-all { border-left: 3px solid var(--seal); padding-left: 1rem; }
.work-all h2 { margin-bottom: 0.35rem; }
.work-all .section-lede { margin-top: 0; }
:root[data-theme="planta"] .segment-option { background: transparent; }
:root[data-theme="planta"] .dept-chip { background: rgba(217, 178, 94, 0.14); color: #E3C47E; }

/* ---------- Ajuda rápida (r16) no telemóvel: só o retrato, para não tapar formulários ---------- */
@media (max-width: 640px) {
  .iomi-assist__launcher { min-height: 0; padding: 4px; gap: 0; }
  .iomi-assist__launcher > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .iomi-assist__launcher img { width: 46px; height: 46px; }
  body { padding-bottom: 4.5rem; }
}

/* ---------- Ajuda: vídeos da aplicação ---------- */
.help-video-links { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.help-video-links a { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.6rem 1rem; border: 1px solid #E6D6B3; border-radius: 999px; background: linear-gradient(180deg, #FFFFFF 0%, #F8F4EA 100%); color: var(--brand); font-weight: 600; text-decoration: none; }
.help-video-links a:hover { border-color: var(--seal); }
.help-video-links .i { width: 1.3rem; height: 1.3rem; }
