/* Spark Agency HR — the employee portal (v59): welcome header, cards in a grid, team, warnings, shared, contracts. */
@media screen {
  #employee-portal.pt-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: row dense;
    gap: 16px;
    align-items: start;
  }
  #employee-portal.pt-grid > * { grid-column: span 12; margin: 0 !important; min-width: 0; }
  @media (min-width: 900px) {
    #employee-portal.pt-grid > :is([data-pt="profile-todo"], [data-pt="today"], [data-pt="sign"], [data-pt="warnings"], [data-pt="live"], [data-pt="papers"],
      [data-pt="shared"], [data-pt="contracts"], [data-pt="card"], [data-pt="tickets"], [data-pt="payments"], [data-pt="attendance"], [data-pt="leave"], [data-pt="documents"]) { grid-column: span 6; }
  }
  /* the order of the cards */
  #employee-portal.pt-grid > [data-pt="hero"] { order: 0; }
  #employee-portal.pt-grid > [data-pt="stories"] { order: 1; }
  #employee-portal.pt-grid > [data-pt="profile-todo"] { order: 2; }
  #employee-portal.pt-grid > [data-pt="today"] { order: 3; }
  #employee-portal.pt-grid > [data-pt="sign"] { order: 4; }
  #employee-portal.pt-grid > [data-pt="warnings"] { order: 5; }
  #employee-portal.pt-grid > [data-pt="team"] { order: 6; }
  #employee-portal.pt-grid > [data-pt="live"] { order: 7; }
  #employee-portal.pt-grid > [data-pt="papers"] { order: 8; }
  #employee-portal.pt-grid > [data-pt="shared"] { order: 9; }
  #employee-portal.pt-grid > [data-pt="contracts"] { order: 10; }
  #employee-portal.pt-grid > [data-pt="card"] { order: 11; }
  #employee-portal.pt-grid > [data-pt="tickets"] { order: 12; }
  #employee-portal.pt-grid > [data-pt="profile"] { order: 20; }
  #employee-portal.pt-grid > [data-pt="salary"] { order: 21; }
  #employee-portal.pt-grid > [data-pt="payments"] { order: 22; }
  #employee-portal.pt-grid > [data-pt="attendance"] { order: 23; }
  #employee-portal.pt-grid > [data-pt="leave"] { order: 24; }
  #employee-portal.pt-grid > [data-pt="documents"] { order: 25; }
  #employee-portal.pt-grid > [data-pt="rights"] { order: 26; }
  #employee-portal.pt-grid > [data-pt="other"] { order: 30; }
  #employee-portal.pt-grid > [data-pt="password"] { order: 40; }

  #employee-portal .pt-card.panel { border-radius: 20px; border: 1px solid #dfe8ea; box-shadow: 0 1px 2px #0f2a360a, 0 10px 30px -18px #0f2a3640; padding: 20px 22px; }
  #employee-portal .pt-card.panel > h2, #employee-portal .pt-head h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 0 0 12px; }
  .pt-ico { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: #21345a; color: #fff; }
  [data-pt="warnings"] .pt-ico { background: #c2410c; }
  [data-pt="team"] .pt-ico, [data-pt="live"] .pt-ico { background: #0a9a9c; }
  [data-pt="shared"] .pt-ico, [data-pt="contracts"] .pt-ico { background: #4a90bf; }
  #employee-portal .pt-card.is-flash { animation: pt-flash 1.2s ease; }
  @keyframes pt-flash { 30% { box-shadow: 0 0 0 4px #4a90bf66; } }
  .pt-new { animation: pt-in .4s ease both; }
  @keyframes pt-in { from { opacity: 0; transform: translateY(8px); } }

  /* the welcome header */
  #employee-portal [data-pt="hero"].panel {
    position: relative; overflow: hidden; padding: 26px 28px 22px; border: 0; color: #fff;
    background: radial-gradient(70% 140% at 100% 0%, #4a90bf55 0%, transparent 60%), linear-gradient(135deg, #21345a 0%, #16304a 55%, #0f2a36 100%);
  }
  [data-pt="hero"]::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%; border: 34px solid #ffffff0d; pointer-events: none; }
  .pt-hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
  .pt-av { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: linear-gradient(135deg, #4a90bf, #0a9a9c); font-size: 26px; font-weight: 800; box-shadow: 0 0 0 4px #ffffff22; }
  .pt-hello h1 { margin: 0; color: #fff; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.1; }
  .pt-hi { margin: 0 0 2px; color: #b9d4ea; font-size: 15px; }
  .pt-sub { margin: 6px 0 0; color: #d7e4ef; font-size: 14px; line-height: 1.5; }
  .pt-years { margin: 8px 0 0; display: inline-block; padding: 4px 12px; border-radius: 99px; background: #ffffff18; color: #e8f1f8; font-size: 13px; }
  .pt-years b { color: #fff; }
  .pt-date { display: grid; grid-template-columns: auto auto; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 16px; background: #ffffff12; }
  .pt-date b { font-family: "Anton", "Manrope", sans-serif; font-weight: 400; font-size: 44px; line-height: 1; }
  .pt-date span { font-size: 13px; line-height: 1.35; color: #d7e4ef; }
  .pt-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
  .pt-chips:empty { display: none; }
  .pt-chip { display: inline-flex; align-items: center; gap: 7px; margin: 0; min-height: 0; padding: 8px 14px; border-radius: 99px; border: 1px solid #ffffff2e; background: #ffffff14; color: #fff; box-shadow: none; font-size: 13px; font-weight: 700; transition: background-color .15s, transform .15s; }
  .pt-chip:hover { background: #ffffff26; transform: translateY(-1px); }
  .pt-chip.is-good { background: #0a9a9c; border-color: #0a9a9c; }
  .pt-chip.is-warn { background: #f6c45333; border-color: #f6c45399; }
  .pt-chip.is-bad { background: #f43f5e; border-color: #f43f5e; }
  .pt-chip.is-new { background: #4a90bf; border-color: #4a90bf; }
  .pt-month { position: relative; z-index: 1; margin-top: 16px; padding-top: 14px; border-top: 1px solid #ffffff1f; color: #d7e4ef; }
  .pt-month input, .pt-month button { margin-top: 0; }
  .pt-month label { color: #d7e4ef; }
  @media (max-width: 640px) {
    .pt-hero-in { grid-template-columns: auto 1fr; }
    .pt-date { grid-column: 1 / -1; justify-self: start; }
    .pt-av { width: 58px; height: 58px; font-size: 21px; }
  }

  /* shared bits */
  .pt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .pt-month-tag { font-size: 12px; font-weight: 700; color: #4b6470; padding: 4px 10px; border-radius: 99px; background: #eef3f6; }
  .pt-empty { margin: 4px 0 0; color: #6b7f86; }
  .pt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .pt-row { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; min-height: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid #e3eaed; background: #fff; color: #10262f; box-shadow: none; text-align: start; font-weight: 400; transition: border-color .15s, background-color .15s, transform .15s; }
  .pt-row:hover { border-color: #4a90bf; background: #f5f9fc; transform: translateY(-1px); }
  .pt-row.is-unread { border-color: #f6c453; background: #fffbef; }
  .pt-row-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
  .pt-row-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-row-main small { color: #6b7f86; font-size: 12px; }
  .pt-kind { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #eef4fa; color: #21345a; }
  .pt-kind.is-ok { background: #e3f6f3; color: #0a7d7f; }
  .pt-lvl { flex: none; padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 800; background: #fde7d9; color: #9a3412; }
  .pt-lvl.is-second { background: #fed7aa; color: #9a3412; }
  .pt-lvl.is-final { background: #f43f5e; color: #fff; }
  .pt-st { flex: none; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #eef3f6; color: #4b6470; }
  .pt-st.is-ok { background: #e3f6f3; color: #0a7d7f; }
  .pt-st.is-bad { background: #ffe4e8; color: #be123c; }
  .pt-st.is-new { background: #e5f1f9; color: #21345a; }

  /* my team */
  .pt-team-top { position: relative; padding: 16px 18px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--c, #0a9a9c) 16%, #fff), #fff 70%); border: 1px solid color-mix(in srgb, var(--c, #0a9a9c) 35%, #fff); }
  .pt-team-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .pt-team-name i { width: 12px; height: 12px; border-radius: 50%; background: var(--c, #0a9a9c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, #0a9a9c) 25%, transparent); }
  .pt-team-name b { font-size: 18px; }
  .pt-rank { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; padding: 4px 12px; border-radius: 99px; background: #21345a; color: #fff; font-size: 12px; font-weight: 800; }
  .pt-rank.is-first { background: linear-gradient(135deg, #f6c453, #e0a21b); color: #3b2a00; }
  .pt-team-coins { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
  .pt-team-coins b { font-family: "Anton", "Manrope", sans-serif; font-weight: 400; font-size: 44px; line-height: 1; color: #10262f; font-variant-numeric: tabular-nums; }
  .pt-team-coins span { color: #4b6470; font-size: 13px; }
  .pt-target { margin-top: 10px; }
  .pt-bar { height: 10px; border-radius: 99px; background: #e5edf2; overflow: hidden; }
  .pt-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--c, #0a9a9c), #4a90bf); animation: pt-grow 1s cubic-bezier(.2,.8,.2,1) both; }
  .pt-target p { margin: 6px 0 0; font-size: 13px; color: #4b6470; }
  @keyframes pt-grow { from { width: 0; } }
  .pt-me-part { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  .pt-me-part div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #f4f8f9; }
  .pt-me-part b { font-size: 20px; color: #21345a; font-variant-numeric: tabular-nums; }
  .pt-me-part span { font-size: 12px; color: #6b7f86; }
  .pt-sub-h { margin: 16px 0 8px; font-size: 13px; text-transform: none; letter-spacing: 0; color: #4b6470; }
  .pt-race { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .pt-race li { display: grid; grid-template-columns: 22px minmax(70px, 1.1fr) 2fr auto; grid-template-areas: "n name bar coins" ". gap gap gap"; align-items: center; column-gap: 10px; row-gap: 2px; padding: 8px 10px; border-radius: 12px; }
  .pt-race li.is-mine { background: color-mix(in srgb, var(--c, #0a9a9c) 12%, #fff); box-shadow: inset 3px 0 0 var(--c, #0a9a9c); }
  .pt-race-n { grid-area: n; font-weight: 800; color: #6b7f86; }
  .pt-race-name { grid-area: name; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-race-bar { grid-area: bar; height: 8px; border-radius: 99px; background: #eef3f6; overflow: hidden; }
  .pt-race-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--c, #4a90bf); border-radius: 99px; animation: pt-grow 1s cubic-bezier(.2,.8,.2,1) both; }
  .pt-race b { grid-area: coins; font-variant-numeric: tabular-nums; }
  .pt-race em { grid-area: gap; font-style: normal; font-size: 12px; color: #6b7f86; }
  .pt-race em.is-ahead { color: #be123c; }
  .pt-race em.is-behind { color: #0a7d7f; }
  @media (max-width: 560px) {
    .pt-race li { grid-template-columns: 22px 1fr auto; grid-template-areas: "n name coins" ". bar bar" ". gap gap"; }
  }
  .pt-push { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff7e0; color: #5c4400; font-size: 14px; }
  .pt-push.is-top { background: #e3f6f3; color: #0a5f60; }
  .pt-mates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
  .pt-mates li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: #f6f9fa; font-size: 14px; }
  .pt-mates li span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e3eaed; font-size: 11px; font-weight: 800; flex: none; }
  .pt-mates li:nth-child(1) span { background: #f6c453; }
  .pt-mates li:nth-child(2) span { background: #d5dde3; }
  .pt-mates li:nth-child(3) span { background: #f0b68a; }
  .pt-mates li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
  .pt-mates li em { font-style: normal; font-variant-numeric: tabular-nums; color: #4b6470; }
  .pt-mates li.is-me { background: #21345a; color: #fff; }
  .pt-mates li.is-me em { color: #cfe0ee; }

  /* the reader */
  dialog.pt-view { width: min(900px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: #eef3f6; }
  dialog.pt-view::backdrop { background: #0f2a36a6; }
  .pt-view-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #dfe8ea; position: sticky; top: 0; z-index: 2; }
  .pt-view-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pt-spacer { flex: 1; }
  .pt-view-top button { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
  .pt-x { padding: 6px; min-height: 0; background: none; border: 0; box-shadow: none; color: #10262f; }
  .pt-view-body { padding: 18px; overflow: auto; max-height: calc(94vh - 60px); }
  .pt-ack { margin-top: 16px; padding: 16px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .pt-ack p { margin: 0; }
  .pt-ro { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: #4b6470; font-size: 13px; }
  .pt-file { display: grid; gap: 12px; justify-items: center; padding: 24px; background: #fff; border-radius: 14px; }
  .pt-file img, .pt-file video { max-width: 100%; max-height: 70vh; border-radius: 10px; }

  /* the office: send to employees */
  dialog.pt-send { width: min(620px, 96vw); }
  .pt-send-f { display: grid; gap: 12px; }
  .pt-send-f h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
  .pt-send-kind { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
  dialog.pt-send .pt-send-kind label { display: inline-flex !important; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
  dialog.pt-send input[type="radio"], dialog.pt-send input[type="checkbox"] { width: 18px !important; height: 18px; min-height: 0; flex: none; margin: 0 !important; padding: 0; }
  .pt-send-kind select { width: auto; }
  .pt-send-list { display: grid; gap: 4px; max-height: 300px; overflow: auto; padding: 4px; border: 1px solid #dfe8ea; border-radius: 12px; }
  dialog.pt-send .pt-send-row { display: flex !important; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; margin: 0; border-radius: 10px; cursor: pointer; font-weight: 400; }
  .pt-send-row:hover { background: #f4f8f9; }
  .pt-send-row input { width: auto; margin: 0; }
  dialog.pt-send .pt-send-row span { display: grid; flex: 1; min-width: 0; text-align: start; }
  dialog.pt-send .pt-send-find { display: block; margin: 0; }
  .pt-send-row small { color: #6b7f86; }
  .pt-send-row em { font-style: normal; font-size: 11px; color: #0a7d7f; }
  .pt-send-row em.is-warn { color: #b45309; }
  .pt-send-row.is-off { opacity: .55; cursor: not-allowed; }
  .pt-send-row[hidden] { display: none; }
  .pt-send-err { margin: 0; color: #be123c; }
  .pt-sent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .pt-sent li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f6f9fa; font-size: 13px; }
  .pt-sent li span:nth-child(2) { color: #6b7f86; }
  .pt-sent li .link { margin-inline-start: auto; }
  .dc-tool.is-warn { background: #c2410c; border-color: #c2410c; color: #fff; }

  @media (prefers-reduced-motion: reduce) { .pt-new, .pt-bar i, .pt-race-bar i, .pt-card.is-flash { animation: none !important; } }
}
