/* Portal FS Consulting — identidade visual alinhada com fortunesociety.ao
   Paleta extraída do site oficial (Blocksy):
   --theme-palette-color-1: #0F1E3F (azul-marinho, cor principal)
   --theme-palette-color-2: #DFD468 (dourado, destaque)
   --theme-palette-color-3: #3A4F66 (azul acinzentado)
   --theme-palette-color-4: #192a3d (azul-marinho escuro)
   Tipografia: Mulish
*/

:root {
    --fs-navy: #0F1E3F;
    --fs-navy-dark: #192a3d;
    --fs-gold: #DFD468;
    --fs-blue-gray: #3A4F66;
    --fs-gray-light: #e1e8ed;
    --fs-gray-lighter: #f2f5f7;
    --fs-off-white: #FAFBFC;
    --fs-white: #ffffff;
    --fs-danger: #b3261e;
    --fs-success: #1e6b3a;
    --fs-radius: 2px;

    /* Paleta "Drive" (barra lateral + área de trabalho, leva 5): a identidade
       navy/dourado acima mantém-se nos ecrãs de autenticação (login/registo),
       fiel à fortunesociety.ao; dentro do portal (Admin e Empresa), a
       navegação e os cartões seguem esta paleta teal/menta, alinhada com o
       design de referência que o cliente forneceu. */
    --fs-sidebar-bg: #123a40;
    --fs-sidebar-bg-2: #19454c;
    --fs-sidebar-bg-3: #1b555b;
    --fs-sidebar-text: #d7e9e7;
    --fs-sidebar-muted: #8fb3b0;
    --fs-sidebar-active-bg: #9cddd4;
    --fs-sidebar-active-fg: #123a40;
    --fs-teal: #1c7c80;
    --fs-teal-dark: #16696d;
    --fs-teal-pale: #e2f0ee;
    --fs-workspace-bg: #f6f8f7;
    --fs-ink: #183c41;
    --fs-ink-soft: #234448;
    --fs-muted: #74888a;
    --fs-border-soft: #e1eae7;
    --fs-radius-lg: 16px;
    --fs-radius-md: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Mulish', system-ui, sans-serif;
    color: var(--fs-navy-dark);
    background: var(--fs-workspace-bg);
    line-height: 1.5;
}

a { color: var(--fs-navy); }

.fs-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}
/* Dentro da barra lateral (Admin/Empresa autenticados), o espaçamento lateral
   já vem do "fs-main"/"fs-topbar", por isso o container aqui é só uma largura
   máxima de leitura, sem padding próprio nem repetição do espaçamento. */
.fs-workspace .fs-container {
    max-width: 1180px;
    padding: 0;
}

/* Estrutura do portal (Admin/Empresa): barra lateral + área de trabalho --- */
.fs-shell { display: flex; align-items: stretch; min-height: 100vh; }

.fs-sidebar {
    width: 268px;
    flex: none;
    background: var(--fs-sidebar-bg);
    color: var(--fs-sidebar-text);
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 20px 16px;
    /* Computador: barra lateral fixa e sempre visível. */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.fs-sidebar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 4px; }
.fs-sidebar__brand-mark {
    width: 38px; height: 38px; min-width: 38px;
    border-radius: 10px;
    background: var(--fs-white);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.fs-sidebar__brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.fs-sidebar__brand-title { font-weight: 800; font-size: 13px; letter-spacing: .02em; color: var(--fs-white); line-height: 1.3; }
.fs-sidebar__brand-subtitle { font-size: 11px; color: var(--fs-sidebar-muted); }

.fs-sidebar__section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--fs-sidebar-muted); padding: 0 10px; margin: 0 0 6px;
}
.fs-sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.fs-sidebar__nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 10px;
    color: var(--fs-sidebar-text); text-decoration: none;
    font-size: 14px; font-weight: 600;
}
.fs-sidebar__nav a .fs-icon { flex: none; opacity: .9; }
.fs-sidebar__nav a:hover { background: rgba(255,255,255,.08); }
.fs-sidebar__nav a.is-active { background: var(--fs-sidebar-active-bg); color: var(--fs-sidebar-active-fg); }
.fs-sidebar__nav a.is-active .fs-icon { opacity: 1; }
.fs-sidebar__nav a.fs-sidebar__logout { color: var(--fs-sidebar-muted); }
.fs-sidebar__nav a.fs-sidebar__logout:hover { color: var(--fs-white); }

.fs-sidebar__areas { display: flex; flex-direction: column; gap: 3px; }
.fs-sidebar__area {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 10px;
    color: var(--fs-sidebar-text); text-decoration: none;
    font-size: 13.5px; font-weight: 600;
}
.fs-sidebar__area:hover { background: rgba(255,255,255,.08); }
.fs-sidebar__area.is-active { background: rgba(255,255,255,.14); color: var(--fs-white); }
.fs-sidebar__area-chip {
    width: 26px; height: 26px; min-width: 26px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.fs-sidebar__area-chip .fs-icon { width: 14px; height: 14px; }

/* Árvore de sub-pastas por sector, na barra lateral (pedido do cliente,
   30/Set/2026 — "SETORES" com Contabilidade/Impostos/Relatório, etc.) */
.fs-sidebar__area-group { margin-bottom: 2px; }
.fs-sidebar__subfolders { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 36px; }
.fs-sidebar__subfolder {
    display: flex; align-items: center; gap: 7px;
    padding: 5px 8px; border-radius: 8px;
    color: var(--fs-sidebar-muted); text-decoration: none;
    font-size: 12.5px; font-weight: 500;
}
.fs-sidebar__subfolder span:not(.fs-sidebar__subfolder-hidden) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-sidebar__subfolder:hover { background: rgba(255,255,255,.08); color: var(--fs-white); }
.fs-sidebar__subfolder.is-active { background: rgba(255,255,255,.14); color: var(--fs-white); font-weight: 700; }
.fs-sidebar__subfolder .fs-icon { width: 13px; height: 13px; opacity: .8; flex: none; }
.fs-sidebar__subfolder-hidden { margin-left: auto; opacity: .7; flex: none; display: flex; }

.fs-sidebar__spacer { flex: 1; }

.fs-sidebar__security {
    background: linear-gradient(160deg, var(--fs-sidebar-bg-2), var(--fs-sidebar-bg-3));
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.fs-sidebar__security .fs-icon { flex: none; color: var(--fs-sidebar-active-bg); margin-top: 1px; }
.fs-sidebar__security strong { display: block; color: var(--fs-white); font-size: 12.5px; margin-bottom: 3px; }
.fs-sidebar__security p { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--fs-sidebar-muted); }

.fs-sidebar__user {
    display: flex; align-items: center; gap: 10px;
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 14px;
}
.fs-sidebar__user-avatar {
    width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
    background: var(--fs-sidebar-active-bg); color: var(--fs-sidebar-active-fg);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px; overflow: hidden;
}
.fs-sidebar__user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fs-sidebar__user-info { flex: 1; min-width: 0; }
.fs-sidebar__user-name { font-size: 13px; font-weight: 700; color: var(--fs-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-sidebar__user-email { font-size: 11px; color: var(--fs-sidebar-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-sidebar__user-logout { flex: none; display: flex; color: var(--fs-sidebar-muted); text-decoration: none; }
.fs-sidebar__user-logout:hover { color: var(--fs-white); }

/* Área de trabalho (conteúdo à direita da barra lateral) ------------------ */
.fs-workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.fs-topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 28px;
    position: sticky; top: 0; z-index: 5;
    background: rgba(246, 248, 247, .86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--fs-border-soft);
}
.fs-topbar__title { font-weight: 800; color: var(--fs-ink); font-size: 15px; }
.fs-topbar__spacer { flex: 1; }
.fs-topbar__badge {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    padding: 4px 10px; border-radius: 999px;
    background: var(--fs-teal-pale); color: var(--fs-teal-dark);
}
.fs-topbar__avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    background: var(--fs-teal-pale); color: var(--fs-teal-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px; overflow: hidden; text-decoration: none;
}
.fs-topbar__avatar img { width: 100%; height: 100%; object-fit: cover; }

.fs-topbar__bell {
    position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    color: var(--fs-ink); text-decoration: none;
}
.fs-topbar__bell:hover { background: var(--fs-teal-pale); }
.fs-topbar__bell-badge {
    position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px;
    padding: 0 3px; border-radius: 999px; background: #d64545; color: #fff;
    font-size: 10px; font-weight: 800; line-height: 15px; text-align: center;
}

.fs-notif-list { display: flex; flex-direction: column; gap: 2px; }
.fs-notif-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 4px; border-bottom: 1px solid var(--fs-border-soft);
}
.fs-notif-item:last-child { border-bottom: none; }
.fs-notif-item--unread { background: var(--fs-teal-pale); border-radius: var(--fs-radius-md); padding-left: 12px; padding-right: 12px; }
.fs-notif-item__icon {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--fs-teal-dark);
}
.fs-notif-item__body { display: flex; flex-direction: column; gap: 4px; }
.fs-notif-item__title { font-weight: 700; color: var(--fs-ink); text-decoration: none; }
a.fs-notif-item__title:hover { text-decoration: underline; }
.fs-notif-item__text { margin: 0; color: var(--fs-blue-gray); font-size: 13px; }
.fs-notif-item__date { font-size: 12px; color: var(--fs-blue-gray); }

/* Toggle do menu (checkbox invisível + label = sem dependência de JS) ---
   O checkbox usa o padrão "visually hidden": ocupa 1px, cortado com
   clip-path e sem margem visível — mais robusto do que "opacity:0" para
   garantir que nunca aparece nenhum quadrado do controlo nativo do
   browser, em qualquer combinação de zoom/escala de ecrã. */
.fs-nav-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.fs-topbar__toggle {
    display: none;
    align-items: center;
    cursor: pointer;
    color: var(--fs-ink);
    padding: 6px;
    border-radius: 8px;
    line-height: 0;
    flex: none;
}
.fs-topbar__toggle:hover { background: rgba(24,60,65,.08); }
.fs-topbar__toggle .fs-nav-toggle__icon-close { display: none; }
.fs-nav-toggle-input:checked ~ .fs-shell .fs-topbar__toggle .fs-nav-toggle__icon-open { display: none; }
.fs-nav-toggle-input:checked ~ .fs-shell .fs-topbar__toggle .fs-nav-toggle__icon-close { display: block; }
.fs-nav-toggle-input:focus-visible ~ .fs-shell .fs-topbar__toggle { outline: 2px solid var(--fs-teal); }

.fs-sidebar-backdrop { display: none; }

/* Main ----------------------------------------------------------------- */
.fs-main { padding: 26px 28px 60px; min-height: 60vh; flex: 1; }

.fs-footer {
    color: var(--fs-muted);
    font-size: 12px;
    padding: 16px 28px 24px;
}

/* Alerts ----------------------------------------------------------------*/
.fs-alert {
    padding: 12px 16px;
    border-radius: var(--fs-radius);
    margin-bottom: 18px;
    font-size: 14px;
    border-left: 4px solid;
}
.fs-alert--success { background: #e7f4ec; border-color: var(--fs-success); color: #12401f; }
.fs-alert--error   { background: #fbeae9; border-color: var(--fs-danger); color: #6f130d; }
.fs-alert--info    { background: #e9eef7; border-color: var(--fs-blue-gray); color: var(--fs-navy-dark); }

/* Cards / panels ----------------------------------------------------- */
.fs-card {
    background: var(--fs-white);
    border: 1px solid var(--fs-border-soft);
    border-radius: var(--fs-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(24, 60, 65, .04);
}
.fs-card h2, .fs-card h3 { margin-top: 0; color: var(--fs-ink); }

.fs-grid { display: grid; gap: 20px; }
.fs-grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fs-grid--3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.fs-stat {
    background: var(--fs-white);
    border: 1px solid var(--fs-border-soft);
    border-radius: var(--fs-radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fs-stat__icon {
    width: 38px; height: 38px; min-width: 38px;
    border-radius: 10px;
    background: var(--fs-teal-pale);
    color: var(--fs-teal-dark);
    display: flex; align-items: center; justify-content: center;
}
.fs-stat__label { font-size: 12px; color: var(--fs-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.fs-stat__value { font-size: 24px; font-weight: 800; color: var(--fs-ink); }
.fs-stat__meta { font-size: 12px; color: var(--fs-muted); }
.fs-stat--tone-recursos-humanos .fs-stat__icon { background: #c9e8e2; color: #1f5c50; }
.fs-stat--tone-contabilidade .fs-stat__icon { background: #e5daf3; color: #765b96; }
.fs-stat--tone-administrativo .fs-stat__icon { background: #f3dfbd; color: #a06d31; }

/* Cabeçalho de página (eyebrow + título + descrição) ---------------------- */
.fs-page-head { margin-bottom: 22px; }
.fs-page-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fs-teal-dark); margin: 0 0 6px; }
.fs-page-head h1 { margin: 0 0 6px; color: var(--fs-ink); font-size: 25px; }
.fs-page-sub { margin: 0; color: var(--fs-muted); font-size: 14px; max-width: 640px; }
.fs-section-title { font-size: 15px; font-weight: 800; color: var(--fs-ink); margin: 0 0 14px; }

/* Cartões de área (Contabilidade/Administrativo/Recursos Humanos) na Visão geral */
.fs-area-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--fs-white);
    border: 1px solid var(--fs-border-soft);
    border-radius: var(--fs-radius-lg);
    padding: 20px;
    text-decoration: none !important;
    color: inherit;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}
.fs-area-card:hover { box-shadow: 0 10px 24px rgba(24, 60, 65, .1); transform: translateY(-2px); border-color: var(--fs-teal-pale); }
.fs-area-card__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.fs-area-card__title { font-weight: 800; color: var(--fs-ink); font-size: 15px; }
.fs-area-card__desc { font-size: 13px; color: var(--fs-muted); line-height: 1.45; }
.fs-area-card__meta { font-size: 12px; color: var(--fs-muted); margin-top: 4px; font-weight: 700; }

/* Forms ------------------------------------------------------------- */
.fs-form { max-width: 480px; }
.fs-form--wide { max-width: 720px; }
.fs-field { margin-bottom: 16px; }
.fs-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.fs-field input[type=text],
.fs-field input[type=email],
.fs-field input[type=password],
.fs-field input[type=tel],
.fs-field input[type=date],
.fs-field input[type=number],
.fs-field select,
.fs-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--fs-border-soft);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
}
.fs-field input:focus,
.fs-field select:focus,
.fs-field textarea:focus { outline: none; border-color: var(--fs-teal); box-shadow: 0 0 0 3px var(--fs-teal-pale); }
.fs-field textarea { min-height: 90px; }
.fs-field small { display: block; margin-top: 4px; color: var(--fs-muted); font-size: 12px; }
.fs-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* Buttons -------------------------------------------------------------*/
.fs-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fs-teal);
    color: var(--fs-white) !important;
    border: none;
    padding: 11px 20px;
    border-radius: var(--fs-radius-md);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(28, 124, 128, .25);
}
.fs-btn:hover { background: var(--fs-teal-dark); }
.fs-btn--gold { background: var(--fs-gold); color: var(--fs-navy-dark) !important; box-shadow: none; }
.fs-btn--gold:hover { filter: brightness(0.95); }
.fs-btn--danger { background: var(--fs-danger); box-shadow: none; }
.fs-btn--secondary { background: var(--fs-blue-gray); box-shadow: none; }
.fs-btn--small { padding: 6px 14px; font-size: 12px; }
.fs-btn--ghost { background: transparent; color: var(--fs-ink) !important; border: 1px solid var(--fs-border-soft); box-shadow: none; font-weight: 600; }
.fs-btn--ghost:hover { background: var(--fs-teal-pale); border-color: var(--fs-teal-pale); }
.fs-btn .fs-icon { vertical-align: -3px; }

/* Tables --------------------------------------------------------------*/
.fs-table { width: 100%; border-collapse: collapse; background: var(--fs-white); }
.fs-table th, .fs-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--fs-border-soft);
    font-size: 14px;
}
.fs-table th { background: transparent; color: var(--fs-muted); text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; font-weight: 700; }
.fs-table-wrap { overflow-x: auto; border: 1px solid var(--fs-border-soft); border-radius: var(--fs-radius-lg); }
.fs-table-wrap .fs-table { border: none; }
.fs-table-wrap .fs-table tr:last-child td { border-bottom: none; }

.fs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.fs-badge--active { background: #e7f4ec; color: var(--fs-success); }
.fs-badge--suspended { background: #fbeae9; color: var(--fs-danger); }
.fs-badge--pending { background: #fdf3d9; color: #7a5b00; }
.fs-badge--approved { background: #e7f4ec; color: var(--fs-success); }
.fs-badge--rejected { background: #fbeae9; color: var(--fs-danger); }
.fs-badge--aberto { background: #fdf3d9; color: #7a5b00; }
.fs-badge--respondido { background: var(--fs-teal-pale); color: var(--fs-teal-dark); }
.fs-badge--resolvido { background: #e7f4ec; color: var(--fs-success); }
.fs-badge--hidden { background: #f1f1f1; color: var(--fs-muted); }
.fs-badge--type { background: var(--fs-teal-pale); color: var(--fs-teal-dark); }

/* Área de documentos — cabeçalho com logo/ícone da empresa, filtro e lixeira */
.fs-area-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.fs-area-header img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: var(--fs-white); border: 1px solid var(--fs-border-soft); padding: 4px; }
.fs-area-header h1 { margin: 0; color: var(--fs-ink); }
.fs-area-header .fs-trash-link { margin-left: auto; font-size: 13px; color: var(--fs-muted); }
.fs-filter-bar { display: flex; gap: 10px; align-items: end; margin-bottom: 14px; flex-wrap: wrap; }
.fs-filter-bar select { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--fs-border-soft); }

/* Trilho de navegação (breadcrumbs) completo nas áreas de documentos ------ */
.fs-breadcrumb-trail { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13px; color: var(--fs-muted); margin-bottom: 16px; }
.fs-breadcrumb-trail a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--fs-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 8px;
}
.fs-breadcrumb-trail a:hover { background: var(--fs-white); color: var(--fs-ink); }
.fs-breadcrumb-trail__current {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    color: var(--fs-ink);
    font-weight: 700;
}
.fs-breadcrumb-trail__sep { color: var(--fs-border-soft); display: inline-flex; margin: 0 1px; }

/* Alternador grelha/lista (estilo Drive) para pastas e documentos -------- */
.fs-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.fs-card__head h3 { margin: 0; }
.fs-view-toggle { display: inline-flex; border: 1px solid var(--fs-border-soft); border-radius: 10px; overflow: hidden; flex: none; }
.fs-view-toggle button {
    background: var(--fs-white);
    border: none;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--fs-muted);
}
.fs-view-toggle button + button { border-left: 1px solid var(--fs-border-soft); }
.fs-view-toggle button.is-active { background: var(--fs-teal); color: var(--fs-white); }

/* Grelha de pastas/documentos (tiles), alternativa à tabela/lista -------- */
.fs-drive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.fs-drive-tile {
    border: 1px solid var(--fs-border-soft);
    border-radius: var(--fs-radius-lg);
    background: var(--fs-white);
    padding: 18px 12px 16px;
    text-align: center;
    transition: box-shadow .15s, border-color .15s, transform .15s;
}
.fs-drive-tile:hover { border-color: var(--fs-teal-pale); box-shadow: 0 8px 20px rgba(24, 60, 65, .1); transform: translateY(-1px); }
.fs-drive-tile__icon {
    color: var(--fs-teal-dark);
    background: var(--fs-teal-pale);
    width: 46px; height: 46px;
    border-radius: 12px;
    margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
}
.fs-drive-tile--file .fs-drive-tile__icon { color: #c66d63; background: #fff0ed; }
.fs-drive-tile__name { font-weight: 700; font-size: 13px; color: var(--fs-ink); text-decoration: none; display: block; word-break: break-word; }
.fs-drive-tile__meta { font-size: 11px; color: var(--fs-muted); margin-top: 4px; }
.fs-drive-tile__badges { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.fs-drive-tile__actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fs-drive-tile__options-trigger {
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    margin: 8px auto 0;
    border: none;
    background: none;
    border-radius: 50%;
    color: var(--fs-muted);
    cursor: pointer;
}
.fs-drive-tile__options-trigger:hover,
.fs-drive-tile__options-trigger.is-active { background: var(--fs-teal-pale); color: var(--fs-teal-dark); }
/* Menu de contexto de pasta (3 pontos ou botão direito) — painel flutuante
   posicionado por JS (position: fixed), nunca aninhado no fluxo do cartão,
   por isso nunca é cortado pelo "overflow" da grelha de pastas. Desde
   30/Set/2026 é sempre uma lista limpa de acções (.fs-ctx-item) — nunca um
   formulário com campos visíveis dentro do próprio menu; Editar/Detalhes/
   Personalizar/Mover/Enviar abrem antes um modal à parte (.fs-modal-*). */
.fs-context-menu {
    /* Aspecto do menu de contexto do Windows 11: cantos arredondados, sombra suave, linhas compactas. */
    position: fixed;
    z-index: 1000;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(0, 0, 0, .09);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .16), 0 0 2px rgba(0, 0, 0, .14);
    width: 240px;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    padding: 4px;
    text-align: left;
    animation: fs-ctx-in .09s ease-out;
}
.fs-context-menu[hidden] { display: none; }
@keyframes fs-ctx-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
/* Item de menu simples (abre um modal) */
.fs-ctx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13.5px;
    color: var(--fs-ink);
    cursor: pointer;
}
.fs-ctx-item:hover,
.fs-ctx-item:focus-visible { background: rgba(0, 0, 0, .06); color: var(--fs-ink); outline: none; }
.fs-ctx-item--danger:hover,
.fs-ctx-item--danger:focus-visible { background: #fdeceb; color: #b3261e; }
.fs-ctx-item svg { flex: none; }
/* Envolve um <form> de acção imediata (Eliminar/Ocultar/Copiar — sem campos
   visíveis) para que o botão .fs-ctx-item lá dentro se comporte, visualmente,
   como qualquer outra linha da lista, e não como um bloco à parte. */
.fs-ctx-item-form { display: contents; }
.fs-drive-tile__opt-label { font-size: 11px; font-weight: 700; color: var(--fs-muted); text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 5px; margin: 0 0 5px; }
.fs-drive-tile__opt-block { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fs-border-soft); }
.fs-drive-tile__details { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--fs-ink); display: flex; flex-direction: column; gap: 6px; }
.fs-color-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-color-swatch {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .1);
    cursor: pointer;
    padding: 0;
}
.fs-color-swatch.is-active { outline: 2px solid var(--fs-teal-dark); outline-offset: 2px; }

/* Superfície de pastas + dica discreta de criação por botão direito -------*/
.fs-drive-surface { min-height: 44px; }
.fs-hint { font-size: 12px; font-weight: 400; color: var(--fs-muted); }

/* Modal partilhado (Editar/Detalhes/Personalizar/Mover/Enviar/Nova pasta/
   Carregar ficheiro) — um único contentor por página, preenchido por JS a
   partir do <template> da acção clicada no menu de contexto. Substitui, a
   partir de 30/Set/2026, os antigos formulários embutidos no próprio menu
   suspenso e o botão/cartão fixo "+ Novo". ----------------------------- */
.fs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(18, 34, 37, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
/* CRÍTICO: sem esta regra, o atributo HTML "hidden" do overlay é ignorado —
   "display:flex" acima tem a mesma especificidade que a regra nativa do
   browser "[hidden] { display: none }" e, por ordem de cascata, ganha,
   mesmo com o atributo "hidden" presente. Sem isto, o modal (vazio) fica
   sempre visível por cima de toda a página desde o carregamento, a
   bloquear todos os cliques — foi exactamente o erro reportado pelo
   cliente (30/Set, leva 8d): um modal em branco, sem título nem conteúdo,
   impossível de fechar, logo ao abrir a página. */
.fs-modal-overlay[hidden] { display: none; }
.fs-modal {
    background: var(--fs-white);
    border-radius: var(--fs-radius-lg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    overflow-y: auto;
}
.fs-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--fs-border-soft);
}
.fs-modal__head h3 { margin: 0; font-size: 16px; }
.fs-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: var(--fs-muted);
    padding: 0 4px;
}
.fs-modal__close:hover { color: var(--fs-ink); }
.fs-modal__body { padding: 18px; }
.fs-modal__body .fs-drive-tile__opt-block { margin-top: 0; padding-top: 0; border-top: none; }

/* Zona de carregamento com destaque ao arrastar ficheiros (drag-and-drop) - */
.fs-dropzone { position: relative; border: 2px dashed var(--fs-border-soft); border-radius: var(--fs-radius-md); padding: 6px; transition: border-color .15s, background-color .15s; }
.fs-dropzone.is-dragover { border-color: var(--fs-teal); background: var(--fs-teal-pale); }
.fs-dropzone__hint { font-size: 12px; color: var(--fs-muted); margin: 6px 2px 0; }

/* Tickets de suporte — conversa em bolhas -------------------------------*/
.fs-thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.fs-thread__msg {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: var(--fs-radius);
    background: var(--fs-gray-lighter);
    border: 1px solid var(--fs-gray-light);
}
.fs-thread__msg--admin { align-self: flex-start; }
.fs-thread__msg--empresa { align-self: flex-end; background: #e9eef7; border-color: #cdd8ea; }
.fs-thread__meta { font-size: 12px; color: var(--fs-blue-gray); margin-bottom: 6px; font-weight: 700; }
.fs-thread__body { white-space: pre-line; font-size: 14px; }
@media (max-width: 640px) {
    .fs-thread__msg { max-width: 100%; }
}

/* Auth screens ----------------------------------------------------------*/
.fs-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--fs-navy) 0%, var(--fs-navy-dark) 60%, #0a1428 100%);
    padding: 20px;
    position: relative;
}
/* Quando o Admin define uma imagem de fundo personalizada (Definições do
   portal), a imagem entra via "style" inline e este bloco só trata do
   enquadramento + um véu translúcido (tons da marca) por cima, para o
   texto e a caixa branca continuarem legíveis com qualquer fotografia. */
.fs-auth--bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.fs-auth--bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 30, 63, .88) 0%, rgba(25, 42, 61, .82) 60%, rgba(10, 20, 40, .90) 100%);
}
.fs-auth--bg .fs-auth__box {
    position: relative;
    z-index: 1;
}
.fs-auth__box {
    background: var(--fs-white);
    border-radius: var(--fs-radius);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}
.fs-auth__box--wide { max-width: 620px; }
.fs-auth__logo { display: block; height: 46px; margin: 0 auto 20px; }
.fs-auth__title { text-align: center; margin: 0 0 6px; color: var(--fs-navy); }
.fs-auth__subtitle { text-align: center; color: var(--fs-blue-gray); margin: 0 0 28px; font-size: 14px; }
.fs-auth__options { display: grid; gap: 14px; }
.fs-auth__option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 16px;
    border: 1px solid var(--fs-gray-light);
    border-radius: var(--fs-radius);
    text-decoration: none;
    color: var(--fs-navy) !important;
    font-weight: 700;
}
.fs-auth__option:hover { border-color: var(--fs-navy); background: var(--fs-gray-lighter); }
.fs-auth__links { text-align: center; margin-top: 20px; font-size: 13px; }

.fs-breadcrumb { font-size: 13px; color: var(--fs-muted); margin-bottom: 16px; }
.fs-breadcrumb a { color: var(--fs-muted); }

.fs-empty { color: var(--fs-muted); font-style: italic; padding: 20px 0; }

.fs-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Aviso de senha temporária gerada (leva 5): tem de ser impossível de não
   ver — o cliente queixou-se explicitamente de que a flash-message antiga
   "quase não se vê". Por isso: caixa grande, cor de destaque, senha em
   destaque tipográfico e nota a confirmar o envio por e-mail. ------------ */
.fs-reveal {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fdf8e4;
    border: 2px solid var(--fs-gold);
    border-left: 6px solid var(--fs-gold);
    border-radius: var(--fs-radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(15, 30, 63, .1);
}
.fs-reveal__icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--fs-gold);
    color: var(--fs-navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fs-reveal__body { flex: 1; min-width: 0; }
.fs-reveal__title { margin: 0 0 12px; font-size: 17px; font-weight: 800; color: var(--fs-navy-dark); }
.fs-reveal__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 14px;
}
.fs-reveal__row span { color: var(--fs-blue-gray); min-width: 140px; font-weight: 700; }
.fs-reveal__row strong { color: var(--fs-navy-dark); word-break: break-all; }
.fs-reveal__password {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 22px !important;
    font-weight: 800;
    letter-spacing: .04em;
    background: var(--fs-white);
    border: 1px dashed var(--fs-navy);
    border-radius: var(--fs-radius);
    padding: 5px 12px;
    display: inline-block;
}
.fs-reveal__note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--fs-navy-dark); }
.fs-reveal__note strong { color: var(--fs-navy-dark); }

/* Cabeçalho de perfil "estilo Facebook" (empresa e ADM) --------------------- */
.fs-profile-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--fs-sidebar-bg) 0%, var(--fs-sidebar-bg-3) 75%);
    border-radius: var(--fs-radius-lg);
    padding: 26px 24px;
    margin-bottom: 20px;
    color: var(--fs-white);
    flex-wrap: wrap;
}
.fs-profile-header__avatar {
    width: 84px;
    height: 84px;
    min-width: 84px;
    border-radius: 50%;
    background: var(--fs-white);
    border: 4px solid var(--fs-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--fs-teal-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.fs-profile-header__avatar img { width: 100%; height: 100%; object-fit: cover; }
.fs-profile-header__info { flex: 1; min-width: 180px; }
.fs-profile-header__info h1 { margin: 0 0 4px; color: var(--fs-white); font-size: 22px; }
.fs-profile-header__subtitle { margin: 0 0 8px; color: var(--fs-sidebar-muted); font-size: 13px; }
.fs-profile-header .fs-actions { margin-left: auto; }
.fs-profile-header .fs-btn { background: var(--fs-sidebar-active-bg); color: var(--fs-sidebar-active-fg) !important; box-shadow: none; }
.fs-profile-header .fs-btn:hover { filter: brightness(.95); }
.fs-profile-header .fs-btn--danger { background: var(--fs-danger); color: var(--fs-white) !important; }
.fs-profile-header .fs-btn--ghost {
    background: transparent;
    color: var(--fs-white) !important;
    border-color: rgba(255, 255, 255, .55);
}
.fs-profile-header .fs-btn--ghost:hover { background: rgba(255, 255, 255, .12); }

/* Área de empresa: fundo distintivo (definido pelo Admin em Definições) --- */
.fs-body-company { position: relative; }
.fs-body-company::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(246, 248, 247, .93), rgba(246, 248, 247, .93)),
        var(--fs-company-bg, none) center / cover no-repeat fixed;
    background-color: var(--fs-workspace-bg);
}

/* Painel do Admin (FS Consulting): fundo próprio, independente do da empresa --- */
.fs-body-admin { position: relative; }
.fs-body-admin::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(246, 248, 247, .93), rgba(246, 248, 247, .93)),
        var(--fs-admin-bg, none) center / cover no-repeat fixed;
    background-color: var(--fs-workspace-bg);
}

/* Responsividade --------------------------------------------------------- */
@media (max-width: 980px) {
    /* Ecrãs pequenos: a barra lateral passa a gaveta (botão ☰ no topo). */
    .fs-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        height: auto;
        z-index: 50;
        max-width: 86vw;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .22s ease, visibility 0s linear .22s;
    }
    .fs-nav-toggle-input:checked ~ .fs-shell .fs-sidebar {
        transform: translateX(0);
        visibility: visible;
        transition: transform .22s ease, visibility 0s;
        box-shadow: 12px 0 32px rgba(6, 20, 22, .35);
    }
    .fs-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(6, 20, 22, .4);
    }
    .fs-nav-toggle-input:checked ~ .fs-shell .fs-sidebar-backdrop { display: block; }
    .fs-topbar__toggle { display: flex; }
    .fs-topbar { padding: 14px 16px; }
    .fs-main { padding: 20px 16px 48px; }
}

@media (max-width: 640px) {
    .fs-auth__box { padding: 26px; }
    .fs-auth__box--wide { padding: 22px; }
    .fs-card { padding: 18px; }
    .fs-grid--3 { grid-template-columns: 1fr; }
    .fs-form > .fs-btn:last-child { width: 100%; text-align: center; }

    .fs-reveal { flex-direction: column; padding: 16px 16px 18px; }
    .fs-reveal__password { font-size: 18px !important; word-break: break-all; }
    .fs-reveal__row span { min-width: 0; }

    .fs-profile-header { flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; }
    .fs-profile-header__info { text-align: center; }
    .fs-profile-header .fs-actions { margin-left: 0; justify-content: center; width: 100%; }
}

@media (max-width: 420px) {
    .fs-topbar__badge { display: none; }
}

/* =====================================================================
   Portal HR (leva 9) — assiduidade, funcionários, terminais
   ===================================================================== */
.fs-sidebar__nav a.fs-sidebar__hr { background: rgba(156, 221, 212, .14); }
.hr-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.hr-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.hr-card-head h2 { margin: 0; }
.hr-weekday { font-size: 14px; font-weight: 600; color: var(--fs-muted); }
.hr-steps ol { margin: 8px 0 0 18px; padding: 0; line-height: 1.7; }
.hr-stats { margin-bottom: 24px; }
.hr-num--warn { color: #a06d31; }
.hr-num--bad { color: var(--fs-danger); }
.hr-plain-list { margin: 0; padding-left: 18px; line-height: 1.7; }
.hr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: 12px; }
.hr-days { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.hr-inline-form { display: flex; gap: 8px; margin-top: 10px; }
.hr-inline-form input { flex: 1; padding: 8px 10px; border: 1px solid var(--fs-border-soft); border-radius: 8px; font: inherit; }
.hr-lookup { list-style: none; margin: 0; padding: 0; }
.hr-lookup li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--fs-border-soft); }

/* Campos que o formulário base não cobre (hora, mês, select, textarea) */
.fs-field input[type=time], .fs-field input[type=month], .fs-field select, .fs-field textarea,
.fs-filter-bar input[type=date], .fs-filter-bar input[type=text], .fs-filter-bar input[type=month] {
    width: 100%; padding: 9px 11px; border: 1px solid var(--fs-border-soft); border-radius: 8px; font: inherit; background: #fff;
}
.fs-filter-bar .fs-field { margin-bottom: 0; }

/* Etiquetas de estado da assiduidade */
.hr-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #eef1f1; color: #4a5a5c; }
.hr-chip--presente { background: #e7f4ec; color: var(--fs-success); }
.hr-chip--atrasado { background: #fdf3d9; color: #7a5b00; }
.hr-chip--ausente { background: #fbeae9; color: var(--fs-danger); }
.hr-chip--ferias, .hr-chip--licenca { background: #e1ecf7; color: #1d4f7a; }
.hr-chip--falta_justificada { background: #efe6f7; color: #6a4a8a; }
.hr-chip--folga { background: #eef1f1; color: #5b6b73; }
.hr-chip--pendente { background: #f4f1e4; color: #7a6a30; }
.hr-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 14px; font-size: 14px; }
.hr-summary__total { margin-left: auto; color: var(--fs-muted); }

/* Avatares e fotografias */
.hr-avatar-cell { width: 48px; }
.hr-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.hr-avatar--blank { background: var(--fs-teal-pale); color: var(--fs-teal-dark); font-size: 12px; font-weight: 800; }
.hr-punch-photo { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--fs-border-soft); }

/* Alertas */
.hr-alerts { list-style: none; margin: 0; padding: 0; }
.hr-alert { padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 14px; }
.hr-alert--warn { background: #fdf3d9; }
.hr-alert--info { background: var(--fs-teal-pale); }
.hr-alert a { color: inherit; }

/* Mapa mensal */
.hr-month { max-height: 70vh; }
.hr-month__table th, .hr-month__table td { padding: 6px 4px; text-align: center; font-size: 12px; white-space: nowrap; }
.hr-month__table .hr-sticky { position: sticky; left: 0; background: #fff; text-align: left; min-width: 170px; z-index: 1; padding-left: 10px; }
.hr-day small { display: block; font-weight: 400; opacity: .7; }
.hr-day--we { background: #f3f6f5; }
.hr-cell { min-width: 28px; font-weight: 700; }
.hr-cell--presente { background: #e7f4ec; color: var(--fs-success); }
.hr-cell--atrasado { background: #fdf3d9; color: #7a5b00; }
.hr-cell--ausente { background: #fbeae9; color: var(--fs-danger); }
.hr-cell--ferias, .hr-cell--licenca { background: #e1ecf7; color: #1d4f7a; }
.hr-cell--falta_justificada { background: #efe6f7; color: #6a4a8a; }
.hr-cell--folga { color: #aab5b7; }

/* Código de emparelhamento do terminal */
.hr-pair__code { font-size: 38px !important; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

/* =====================================================================
   Melhorias de interface (portal-ui.js): campos, ficheiros, copiar
   ===================================================================== */

/* --- Campos de texto, selecção e área de texto: mais claros e confortáveis --- */
.fs-field input[type=text], .fs-field input[type=email], .fs-field input[type=password],
.fs-field input[type=tel], .fs-field input[type=date], .fs-field input[type=number],
.fs-field input[type=time], .fs-field input[type=month], .fs-field input[type=url],
.fs-field select, .fs-field textarea,
.fs-filter-bar input[type=date], .fs-filter-bar input[type=text], .fs-filter-bar input[type=month], .fs-filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid #cfdad9;
    border-radius: 12px;
    font: inherit;
    font-size: 15px;
    color: var(--fs-ink);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    box-shadow: 0 1px 0 rgba(24, 60, 65, .04);
}
.fs-field input:hover, .fs-field select:hover, .fs-field textarea:hover { border-color: #aebfbd; }
.fs-field input:focus, .fs-field select:focus, .fs-field textarea:focus,
.fs-filter-bar input:focus, .fs-filter-bar select:focus {
    outline: none; border-color: var(--fs-teal); box-shadow: 0 0 0 4px rgba(28, 124, 128, .15);
}
.fs-field input::placeholder, .fs-field textarea::placeholder { color: #8da2a0; }
.fs-field select {
    appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231c7c80' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.fs-field textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
.fs-field input:disabled, .fs-field select:disabled, .fs-field textarea:disabled { background: #f1f5f4; color: #7b8e8c; cursor: not-allowed; }
.fs-field label { font-size: 13.5px; letter-spacing: .01em; color: var(--fs-ink-soft); }
.fs-field input[type=checkbox], .fs-field input[type=radio], .hr-check input { accent-color: var(--fs-teal); width: 17px; height: 17px; }
.fs-form .fs-btn { min-height: 44px; }

/* --- Zona de ficheiro: arrastar OU escolher (um único componente em todo o portal) --- */
.fs-drop {
    position: relative; display: block; width: 100%;
    border: 2px dashed #b7cac8; border-radius: 14px; background: #f7fbfa;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.fs-drop:hover { border-color: var(--fs-teal); background: #f1f9f8; }
.fs-drop.is-dragover { border-color: var(--fs-teal); background: var(--fs-teal-pale); box-shadow: 0 0 0 4px rgba(28, 124, 128, .15); }
.fs-drop:focus-within { border-color: var(--fs-teal); box-shadow: 0 0 0 4px rgba(28, 124, 128, .15); }
.fs-drop.has-file { border-style: solid; border-color: #9cc9c5; background: #f1f9f8; }
.fs-drop__input {
    position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; min-height: 0 !important;
    margin: 0; padding: 0 !important; border: 0 !important; opacity: 0; cursor: pointer; z-index: 2; box-shadow: none !important;
}
.fs-drop__ui {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 22px 16px; pointer-events: none;
}
.fs-drop__ui[hidden], .fs-drop__chosen[hidden] { display: none; }
.fs-drop__icon { color: var(--fs-teal); display: inline-flex; }
.fs-drop__text { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--fs-ink); font-size: 14px; }
.fs-drop__or { color: var(--fs-muted); font-size: 12px; }
.fs-drop__btn {
    display: inline-block; margin-top: 2px; padding: 8px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
    background: var(--fs-teal); color: #fff; box-shadow: 0 1px 2px rgba(24, 60, 65, .2);
}
.fs-drop:hover .fs-drop__btn { background: var(--fs-teal-dark); }
.fs-drop__meta { color: var(--fs-muted); font-size: 12px; margin: 2px 0 0 !important; }
.fs-drop__chosen { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.fs-drop__thumb {
    flex: none; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: #e2f0ee; color: var(--fs-teal);
    display: inline-flex; align-items: center; justify-content: center; pointer-events: none;
}
.fs-drop__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-drop__info { flex: 1; min-width: 0; display: flex; flex-direction: column; pointer-events: none; }
.fs-drop__info strong { font-size: 14px; color: var(--fs-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-drop__info small { margin: 0 !important; color: var(--fs-muted); font-size: 12px; }
.fs-drop__remove {
    position: relative; z-index: 3; flex: none; border: 1px solid #cfdad9; background: #fff; color: var(--fs-ink);
    border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.fs-drop__remove:hover { background: #fbeae9; border-color: #e7b9b6; color: var(--fs-danger); }

/* --- Botão Copiar (códigos, senhas, ligações) --- */
.has-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fs-copy {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid var(--fs-teal); background: #fff; color: var(--fs-teal-dark); font: inherit; font-size: 13px; font-weight: 700;
    transition: background-color .15s, color .15s; vertical-align: middle; white-space: nowrap;
}
.fs-copy:hover { background: var(--fs-teal); color: #fff; }
.fs-copy.is-done { background: #e7f4ec; border-color: #7dbf95; color: var(--fs-success); }
.fs-copy.is-fail { background: #fbeae9; border-color: #e7b9b6; color: var(--fs-danger); }
.fs-alert .fs-copy { margin-left: 6px; }
.hr-pair__line { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hr-pair__line .fs-reveal__password { margin-right: 0; }
.hr-pair__line + .fs-reveal__note { margin-top: 10px; }

/* --- "+ Novo" departamento/local ao lado do campo --- */
.fs-addlink {
    display: inline-block; margin-top: 7px; padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--fs-teal-dark); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.fs-addlink:hover { color: var(--fs-teal); }
.fs-addrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.fs-addrow input {
    flex: 1 1 160px; min-height: 40px; padding: 8px 12px; border: 1.5px solid #cfdad9; border-radius: 10px; font: inherit; font-size: 14px;
}
.fs-addrow input:focus { outline: none; border-color: var(--fs-teal); box-shadow: 0 0 0 4px rgba(28, 124, 128, .15); }
.fs-addrow__msg { flex-basis: 100%; color: var(--fs-danger); font-size: 12px; margin: 0 !important; min-height: 0; }
.fs-addrow__msg:empty { display: none; }

/* ---- Portal HR: folha de salário ---- */
.pay-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-stat { font-size: 20px !important; }
.pay-table td, .pay-table th { vertical-align: top; }
.pay-table tfoot th { border-top: 2px solid var(--fs-teal-dark, #123a40); background: #f3f8f7; }
.pay-row--warn { background: #fff8e8; }
.pay-warn { color: #8a5a00; display: inline-flex; gap: 4px; align-items: center; }
.pay-actions { white-space: nowrap; }
.pay-actions .fs-btn { margin-right: 4px; }
.pay-missing { display: inline-block; margin: 2px 10px 2px 0; font-weight: 600; }
.pay-law__title { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pay-law__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pay-law__chips span { background: var(--fs-teal-pale, #e2f0ee); color: var(--fs-teal-dark, #123a40); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.pay-check label { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.pay-check input[type=checkbox] { margin-top: 3px; }
.pay-fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.pay-mini td, .pay-mini th { padding: 7px 8px; font-size: 14px; }
.pay-mini__sum td { font-weight: 700; border-top: 2px solid #cfdad8; }
.pay-mini__net td { font-weight: 800; font-size: 16px; background: #e7f4ec; }
.pay-how { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.pay-how li { margin-bottom: 6px; }
.pay-table th, .pay-table td { padding-left: 8px; padding-right: 8px; font-size: 13.5px; }
.pay-table thead th { font-size: 11px; letter-spacing: 0; text-transform: uppercase; white-space: normal; }
.pay-table .pay-actions .fs-btn { margin: 0 2px 0 0; padding-left: 9px; padding-right: 9px; }
.pay-table td:first-child { min-width: 150px; }

/* Avisos temporários (toasts) ------------------------------------------ */
.fs-toasts { position: fixed; top: 72px; right: 16px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.fs-toast { pointer-events: auto; position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 36px 14px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4;
    background: #fff; color: var(--fs-navy-dark, #12263f); border: 1px solid var(--fs-border-soft, #dfe6e4); border-left: 5px solid var(--fs-blue-gray, #6b7f99);
    box-shadow: 0 10px 28px rgba(15, 35, 50, .18); overflow: hidden; animation: fs-toast-in .28s ease-out both; }
.fs-toast--success { border-left-color: var(--fs-success, #2e8b57); }
.fs-toast--success .fs-toast__icon { color: var(--fs-success, #2e8b57); }
.fs-toast--error { border-left-color: var(--fs-danger, #c0392b); background: #fff7f6; }
.fs-toast--error .fs-toast__icon { color: var(--fs-danger, #c0392b); }
.fs-toast--warn { border-left-color: #c9954a; background: #fffaf0; }
.fs-toast--warn .fs-toast__icon { color: #b07a1e; }
.fs-toast--info .fs-toast__icon { color: var(--fs-blue-gray, #6b7f99); }
.fs-toast__icon { flex: none; margin-top: 1px; display: inline-flex; }
.fs-toast__body { flex: 1; min-width: 0; word-wrap: break-word; }
.fs-toast__body a { color: inherit; font-weight: 700; text-decoration: underline; }
.fs-toast__close { position: absolute; top: 4px; right: 6px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: #6b7a78; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.fs-toast__close:hover { background: rgba(0, 0, 0, .06); }
.fs-toast__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .22; transform-origin: left; animation: fs-toast-bar linear forwards; }
.fs-toast.is-paused .fs-toast__bar { animation-play-state: paused; }
.fs-toast.is-leaving { animation: fs-toast-out .25s ease-in both; }
@keyframes fs-toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes fs-toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes fs-toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .fs-toast, .fs-toast.is-leaving { animation: none; } .fs-toast__bar { animation: none; } }
@media (max-width: 640px) { .fs-toasts { top: 64px; right: 8px; left: 8px; width: auto; } }

/* Barra lateral: subpastas recolhíveis ------------------------------------ */
.fs-sidebar__area-group { position: relative; }
.fs-sidebar__sub-toggle { position: absolute; top: 5px; right: 4px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: transparent; color: inherit; opacity: .6; cursor: pointer; transition: transform .18s, opacity .15s, background .15s; }
.fs-sidebar__sub-toggle:hover, .fs-sidebar__sub-toggle:focus-visible { opacity: 1; background: rgba(255, 255, 255, .14); }
.fs-sidebar__area-group.is-open > .fs-sidebar__sub-toggle { transform: rotate(180deg); }
.fs-sidebar__area-group:not(.is-open) > .fs-sidebar__subfolders { display: none; }

/* Botão dourado e painéis (Portal HR) ------------------------------------ */
.fs-btn--gold { background: linear-gradient(90deg, #e6c27a, #c9954a); color: #1a1205; border-color: transparent; }
.fs-btn--gold:hover { filter: brightness(1.05); }
.hr-absence-panel { border-left: 4px solid #c9954a; }
.hr-inline-form { display: inline-block; margin-left: 8px; vertical-align: middle; }
.fs-fieldset { border: 1px solid var(--fs-border-soft, #dfe6e4); border-radius: var(--fs-radius, 10px); padding: 14px 16px 6px; margin: 4px 0 18px; background: #fbfdfc; }
.fs-fieldset > legend { font-weight: 800; padding: 0 8px; font-size: 14px; }
.fs-fieldset > legend small { font-weight: 600; color: var(--fs-muted, #5f7573); }
.fs-details { margin: 0 0 18px; border: 1px dashed var(--fs-border-soft, #cfdad8); border-radius: 10px; padding: 8px 14px; background: #fafcfb; font-size: 13.5px; }
.fs-details > summary { cursor: pointer; font-weight: 700; color: var(--fs-navy-dark, #12263f); }
.hr-absence-panel[hidden], [data-alerts-open][hidden] { display: none !important; }
.fs-card[hidden] { display: none !important; }
.hr-num--ok { color: var(--fs-success, #2e8b57); }
.hr-row--bad td { background: #fff7f6; }

/* Administrador dentro do Portal HR de uma empresa / alertas de segurança ------------------ */
.fs-admin-banner {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fff7e6; border: 1px solid #f0d9a8; color: #5c4310;
    border-radius: var(--fs-radius-md); padding: 10px 14px; margin-bottom: 18px; font-size: 13px;
}
.fs-admin-banner span { flex: 1; min-width: 220px; }
.fs-sidebar__badge {
    margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: #d64545; color: #fff; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center;
}
