@font-face {
  font-family: "Nohemi";
  src: url("/fonts/Nohemi-Regular.woff2") format("woff2"),
       url("/fonts/Nohemi-Regular.woff") format("woff"),
       url("/fonts/Nohemi-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nohemi";
  src: url("/fonts/Nohemi-Medium.woff2") format("woff2"),
       url("/fonts/Nohemi-Medium.woff") format("woff"),
       url("/fonts/Nohemi-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nohemi";
  src: url("/fonts/Nohemi-SemiBold.woff2") format("woff2"),
       url("/fonts/Nohemi-SemiBold.woff") format("woff"),
       url("/fonts/Nohemi-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nohemi";
  src: url("/fonts/Nohemi-Bold.woff2") format("woff2"),
       url("/fonts/Nohemi-Bold.woff") format("woff"),
       url("/fonts/Nohemi-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nohemi";
  src: url("/fonts/Nohemi-ExtraBold.woff2") format("woff2"),
       url("/fonts/Nohemi-ExtraBold.woff") format("woff"),
       url("/fonts/Nohemi-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Worksans";
  src: url("/fonts/WorkSans-Regular.woff2") format("woff2"),
       url("/fonts/WorkSans-Regular.woff") format("woff"),
       url("/fonts/WorkSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #15363f;
  --muted: #506268;
  --paper: #f5f7fa;
  --panel: #fff;
  --line: #e4ebf3;
  --green: #0050bd;
  --green-dark: #102128;
  --coral: #ff4239;
  --gold: #ff6077;
  --blue: #0050bd;
  --shadow: 0 12px 30px #0000001a;
  --font-body: "Worksans", Arial, sans-serif;
  --font-heading: "Nohemi", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

body[data-session-mode="salarie"] .app-shell {
  grid-template-columns: 1fr;
}

body[data-session-mode="salarie"] .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px 14px;
}

.brand-mark {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #e4ebf3;
  background: #102128;
  box-shadow: 0 8px 18px #0000001a;
}

.brand-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.brand-logo {
  width: 134px;
  height: auto;
  object-fit: contain;
  display: block;
}

.brand > div {
  grid-column: 1 / -1;
}

.brand p,
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand h1,
.page-header h2,
.panel h2,
.panel h3,
.tv-topbar h2 {
  margin: 0;
}

.brand h1 {
  font-size: 1.25rem;
  line-height: 1.1;
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

.tabs {
  display: grid;
  gap: 10px;
}

.tab-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.tab-link:hover {
  border-color: var(--green-dark);
}

.tab-link-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f5f7fa;
  color: var(--green-dark);
}

.tab-link.active {
  border-color: var(--green-dark);
  color: #fff;
  background: var(--green-dark);
}

.tab-link-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-link.active .tab-link-icon {
  border-color: #ffffff52;
  background: #ffffff03;
  color: #fff;
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
}

.status-dot.ready {
  background: var(--green);
}

main {
  min-width: 0;
  padding: 34px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-header,
.panel-heading,
.tv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-header {
  margin-bottom: 22px;
}

.page-header h2,
.employee-card h2,
.tv-topbar h2 {
  font-size: clamp(2rem, 3vw, 3.6rem);
  line-height: 1;
}

.header-actions,
.button-row,
.tv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

button,
.ghost-button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
}

.primary-button {
  color: #fff;
  background: #102128;
}

.secondary-button,
.ghost-button {
  color: var(--green-dark);
  background: #fff;
  border: 1px solid var(--line);
}

.danger-button {
  color: #fff;
  background: #ff4239;
}

.brand h1,
.page-header h2,
.panel h2,
.panel h3,
.tv-topbar h2,
.metric span {
  font-family: var(--font-heading);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  min-height: 118px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.metric span {
  display: block;
  min-height: 42px;
  color: var(--green-dark);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.metric p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.25fr);
  gap: 18px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 20px;
}

.manual-employee-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manual-employee-form .button-row {
  justify-content: flex-end;
  align-items: center;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.employee-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.employee-form-grid .field-photo {
  grid-column: 1 / -1;
}

.manual-employee-form .primary-button {
  min-width: 190px;
  min-height: 44px;
  border-radius: 10px;
}

.manual-employee-form .field {
  align-content: start;
  min-width: 0;
}

.manual-employee-form .field span {
  margin-bottom: 2px;
}

.manual-employee-form .field-photo {
  min-width: 0;
}

.manual-employee-form .file-picker {
  width: 100%;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 6px;
  overflow: hidden;
}

.manual-employee-form .file-picker-button {
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.manual-employee-form .file-picker-name {
  display: block;
  min-width: 0;
  padding-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-card .file-picker {
  grid-template-columns: auto minmax(0, 1fr);
}

.modal-card .file-picker-button {
  white-space: nowrap;
}

.modal-card .file-picker-name {
  padding-right: 6px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #e4ebf3;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px #ffffff03;
}

.lucca-sync-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f7fa;
}

.lucca-sync-box strong {
  display: block;
  margin-bottom: 4px;
}

.lucca-sync-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.employee-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  margin-top: 18px;
  overflow: auto;
}

.employee-row,
.assignment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.employee-row strong,
.assignment-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-action-button {
  display: inline-grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.icon-action-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-action-button--edit {
  color: var(--green-dark);
  background: #f5f7fa;
}

.icon-action-button--link {
  color: var(--green-dark);
  background: #fff;
}

.icon-action-button--delete {
  color: var(--coral);
  background: #fef8f1;
}

.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.file-picker-button {
  min-height: 34px;
  padding: 0 12px;
}

.file-picker-name {
  min-width: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #10212880;
  backdrop-filter: blur(2px);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: min(520px, 100%);
  padding: 20px;
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e4ebf3;
}

.modal-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.icon-close {
  display: inline-grid;
  width: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  color: var(--ink);
  background: #f5f7fa;
}

.icon-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-subtitle {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

#employee-photo-modal-form {
  display: grid;
  gap: 14px;
}

.modal-actions {
  justify-content: flex-end;
}

.modal-card--delete {
  width: min(460px, 100%);
}

.modal-card--delete .modal-head h3 {
  color: var(--coral);
}

body.modal-open {
  overflow: hidden;
}

.avatar {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green-dark);
  font-weight: 900;
  overflow: hidden;
}

.avatar.large {
  width: 84px;
  height: 84px;
  font-size: 2rem;
}

.avatar-initials {
  position: relative;
  z-index: 1;
}

.avatar img,
.tv-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.has-photo .avatar-initials,
.tv-avatar.has-photo .avatar-initials {
  display: none;
}

.draw-note {
  margin: 18px 0;
  padding: 14px;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  background: #fef8f1;
  color: #15363f;
  font-weight: 700;
}

.assignment-table {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.assignment-row {
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
}

.assignment-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #f5f7fa;
  color: var(--blue);
  font-weight: 900;
}

.completion-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fef8f1;
  color: #15363f;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.completion-badge.done {
  background: #f5f7fa;
  color: var(--green-dark);
}

.empty-state {
  padding: 24px;
  border: 1px dashed #e4ebf3;
  border-radius: 8px;
  background: #ffffff52;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.employee-workspace {
  display: grid;
  min-height: calc(100vh - 68px);
  place-items: center;
}

.employee-card {
  width: min(780px, 100%);
}

.employee-card form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.assigned-person {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 132px;
  padding: 22px;
  border-radius: 10px;
  background: #f5f7fa;
}

.assigned-person p {
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 800;
}

.assigned-person h3 {
  margin: 0;
  font-size: 1.7rem;
}

.quality-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-suggestions button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#quality-note {
  min-height: 96px;
  line-height: 1.45;
}

.form-state {
  min-height: 24px;
  color: var(--green-dark);
  font-weight: 800;
}

.tv-view.active {
  display: block;
  margin: -34px;
}

.tv-stage {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 20px;
  padding: 28px;
  color: #fff;
  background: #102128;
}

.tv-stage > .spotlight {
  min-height: 0;
  height: 100%;
}

.tv-topbar {
  position: relative;
  z-index: 1;
}

.tv-topbar--controls {
  justify-content: flex-end;
}

.tv-topbar .eyebrow,
.tv-topbar h2 {
  color: #fff;
}

.tv-actions {
  justify-content: flex-end;
}

.icon-button {
  display: grid;
  width: 46px;
  min-height: 46px;
  place-items: center;
  color: #fff;
  background: #ffffff03;
  border: 1px solid #ffffff52;
  border-radius: 10px;
}

.tv-actions .secondary-button {
  color: #fff;
  background: #ffffff03;
  border: 1px solid #ffffff52;
}

.spotlight {
  display: grid;
  align-items: center;
  min-height: 0;
}

.tv-empty-constellation {
  position: relative;
  width: min(96vmin, 720px);
  min-height: min(72vmin, 520px);
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
}

.tv-starfield {
  position: absolute;
  inset: 0;
  background: #0000;
  animation: tv-twinkle 10s ease-in-out infinite alternate;
}

.tv-constellation {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  isolation: isolate;
}

.tv-constellation::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #0000;
}

.tv-constellation-nodes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.tv-const-node {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  animation: tv-const-float 5.8s ease-in-out infinite;
  animation-delay: var(--tv-float-delay, 0s);
  filter: drop-shadow(0 6px 14px #0000001a);
}

.tv-const-node--spotlight {
  z-index: 2;
  filter:
    drop-shadow(0 0 12px #fef8f1) drop-shadow(0 8px 18px #0000001a);
  animation:
    tv-const-float 5.8s ease-in-out infinite,
    tv-const-spot-glow 2.6s ease-in-out infinite;
  animation-delay: var(--tv-float-delay, 0s), 0s;
}

.tv-const-node--spotlight .tv-avatar--const {
  transform: scale(1.06);
}

.tv-center-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.tv-hero-solo,
.tv-hero-stack {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: min(54vh, 500px);
}

.tv-hero-stack {
  min-height: min(60vh, 580px);
}

.tv-hero-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  width: min(96%, 820px);
  justify-content: center;
  pointer-events: none;
}

.tv-hero-wrap--out {
  z-index: 2;
}

.tv-hero-wrap--in {
  z-index: 3;
}

.tv-hero-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(14px, 2.2vw, 26px);
  width: 100%;
  max-width: min(94vw, 760px);
  margin: 0 auto;
  text-align: center;
  pointer-events: auto;
}

.tv-hero-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(12px, 1.9vw, 20px);
  width: 100%;
}

.tv-person-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: clamp(14px, 2.1vw, 20px);
  border: 1px solid #ffffff52;
  border-radius: 14px;
  background: #ffffff03;
  min-width: 0;
}

.tv-hero-media {
  position: relative;
  flex-shrink: 0;
}

.tv-hero-media::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #15363f;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

.tv-hero-media .tv-avatar--hero {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 8px 20px #0000001a;
}

.tv-hero-media .tv-avatar--hero img {
  border-radius: 50%;
}

.tv-hero-label {
  margin: 0;
  color: #ffffff52;
  font-size: clamp(0.66rem, 1.15vmin, 0.86rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tv-hero-nameblock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05em;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  text-align: center;
}

.tv-hero-firstname,
.tv-hero-lastname {
  display: block;
  font-weight: 800;
  letter-spacing: 0.012em;
  line-height: 1.06;
  color: #fff;
  text-align: inherit;
  text-transform: none;
  word-break: normal;
  overflow-wrap: normal;
  white-space: nowrap;
  text-shadow: 0 1px 2px #0000001a;
}

.tv-hero-firstname {
  font-size: clamp(1.62rem, 3.35vmin, 2.6rem);
  font-weight: 800;
}

.tv-hero-lastname {
  margin-top: 0.12rem;
  font-size: clamp(0.92rem, 1.7vmin, 1.34rem);
  color: #fef8f1;
  font-weight: 600;
  letter-spacing: 0.045em;
  opacity: 0.9;
}

.tv-hero-giver {
  margin: 2px 0 0;
  color: #fef8f1;
  font-size: clamp(0.78rem, 1.25vmin, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.tv-qualities-panel {
  display: grid;
  align-content: start;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: clamp(16px, 2vw, 22px);
  border-radius: 14px;
  background: #15363f;
  border: 1px solid #ffffff52;
  box-shadow: 0 10px 20px #0000001a;
}

.tv-qualities-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.55em;
  width: 100%;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid #ffffff52;
}

.tv-qualities-title {
  margin: 0;
  font-family: inherit;
  font-size: clamp(0.86rem, 1.45vmin, 1.02rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.tv-qualities-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.45vw, 14px);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tv-quality-item {
  display: grid;
  grid-template-columns: auto;
  align-content: start;
  justify-items: start;
  gap: 10px;
  border-radius: 12px;
  text-align: left;
  background: #102128;
  border: 1px solid #ffffff52;
  min-height: clamp(118px, 16vmin, 146px);
  padding: clamp(0.95rem, 2vmin, 1.2rem);
}

.tv-quality-badge {
  display: grid;
  place-items: center;
  width: clamp(2.1rem, 4.2vmin, 2.45rem);
  min-width: clamp(2.1rem, 4.2vmin, 2.45rem);
  height: clamp(2.1rem, 4.2vmin, 2.45rem);
  border-radius: 999px;
  font-size: clamp(0.72rem, 1.2vmin, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: #ed626f;
}

.tv-quality-text {
  display: block;
  min-width: 0;
  padding: 0;
  font-size: clamp(1.04rem, 2.2vmin, 1.36rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: 0.005em;
  color: #fff;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-shadow: none;
  background: #0000;
}

@media (min-width: 720px) {
  .tv-qualities-list {
    gap: clamp(10px, 1.45vw, 14px);
  }
}

@media (min-width: 900px) {
  .tv-hero-card {
    max-width: min(90vw, 960px);
    gap: clamp(18px, 2.6vw, 30px);
  }

  .tv-qualities-panel {
    padding: clamp(18px, 2.4vw, 24px);
  }
}

.tv-hero-card--exit {
  animation: tv-hero-exit 0.88s cubic-bezier(0.45, 0.02, 0.74, 0.36) forwards;
}

.tv-hero-card--enter {
  animation: tv-hero-enter 0.95s cubic-bezier(0.15, 1, 0.28, 1) both;
}

.tv-avatar {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 10px;
  background: #15363f;
  box-shadow: 0 10px 24px #0000001a;
  font-weight: 1000;
  overflow: hidden;
}

.tv-avatar--hero {
  width: min(30vmin, 220px);
  font-size: clamp(2.75rem, 7vmin, 4.5rem);
}

.tv-avatar--satellite {
  width: clamp(68px, 11.5vmin, 118px);
  border: 3px solid #ffffff52;
  font-size: clamp(1.35rem, 3.2vmin, 2.1rem);
  box-shadow: 0 8px 20px #0000001a;
}

.tv-avatar--const {
  width: clamp(36px, 5.2vmin, 62px);
  border-radius: 50%;
  border: 1.5px solid #ffffff52;
  font-size: clamp(0.68rem, 1.55vmin, 1.05rem);
  box-shadow: 0 3px 10px #0000001a;
}

.tv-avatar--const img {
  border-radius: 50%;
}

.spotlight-copy {
  min-width: 0;
}

.spotlight-copy p {
  margin: 0 0 10px;
  color: #ffffff52;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 800;
}

.spotlight-copy h3 {
  max-width: 12ch;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(4rem, 8.4vw, 8.5rem);
  line-height: 0.92;
}

.qualities {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}

.qualities span {
  display: inline-flex;
  align-items: center;
  min-height: 72px;
  padding: 0 24px;
  border: 1px solid #ffffff52;
  border-radius: 8px;
  background: #ffffff52;
  backdrop-filter: blur(10px);
  font-size: clamp(1.4rem, 3vw, 3rem);
  font-weight: 900;
}

.tv-meta {
  margin-top: 24px;
  color: #ffffff52;
  font-size: 1.1rem;
  font-weight: 800;
}

.ticker {
  display: flex;
  gap: 10px;
  min-height: 74px;
  overflow: hidden;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  padding: 10px;
  border: 1px solid #ffffff52;
  border-radius: 10px;
  background: #ffffff52;
}

.ticker-item.active {
  background: #ffffff52;
}

.ticker-item .avatar {
  background: #ffffff52;
}

.ticker-item strong {
  display: block;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-item span:last-child {
  color: #ffffff52;
  font-size: 0.82rem;
  font-weight: 800;
}

.ticker-item div:only-child strong {
  margin: 0;
}

@keyframes tv-hero-enter {
  from {
    opacity: 0;
    transform: translateX(calc(var(--tv-enter-dir, 1) * 120px)) scale(0.48);
    filter: blur(14px);
  }

  55% {
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes tv-hero-exit {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: translateX(calc(var(--tv-enter-dir, 1) * -100px)) scale(0.52);
    filter: blur(12px);
  }
}

@keyframes tv-const-float {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-8px);
  }
}

@keyframes tv-const-spot-glow {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.78;
  }
}

@keyframes tv-twinkle {
  from {
    opacity: 0.55;
    filter: saturate(0.95);
  }

  to {
    opacity: 1;
    filter: saturate(1.1);
  }
}

/* TV scene redesign */
.tv-view.active {
  margin: -34px;
}

.tv-stage {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: clamp(18px, 2.7vw, 34px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 15% 16%, rgba(255, 96, 119, 0.22), transparent 26%),
    radial-gradient(circle at 82% 78%, rgba(0, 80, 189, 0.3), transparent 31%),
    linear-gradient(135deg, #0a1b21 0%, #102128 47%, #12363f 100%);
}

.tv-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, #000 0 48%, transparent 82%);
}

.tv-topbar {
  position: absolute;
  top: clamp(14px, 1.8vw, 24px);
  right: clamp(14px, 1.8vw, 24px);
  z-index: 8;
}

.tv-topbar--controls {
  justify-content: flex-end;
}

.tv-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tv-actions .secondary-button,
.icon-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.icon-button {
  width: 40px;
}

.tv-actions .secondary-button {
  padding: 0 14px;
}

.tv-stage > .spotlight,
.spotlight {
  display: grid;
  align-items: stretch;
  min-height: 100vh;
  height: 100%;
}

.tv-empty-constellation {
  width: 100%;
  min-height: 100%;
}

.tv-constellation {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100vh;
  isolation: isolate;
}

.tv-constellation::before {
  content: "";
  position: absolute;
  inset: 8% 5%;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.025);
  transform: rotate(-1.2deg);
}

.tv-constellation-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tv-constellation-lines line {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 0.08;
  vector-effect: non-scaling-stroke;
}

.tv-constellation-lines line.is-active {
  stroke: rgba(255, 96, 119, 0.64);
  stroke-width: 0.22;
  stroke-dasharray: 6 7;
  animation: tv-line-pulse 2.8s ease-in-out infinite;
}

.tv-constellation-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.tv-const-node {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  opacity: 0.82;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.26));
  animation: tv-const-drift 7.2s ease-in-out infinite;
  animation-delay: var(--tv-float-delay, 0s);
}

.tv-const-node--spotlight {
  opacity: 0.18;
}

.tv-center-stage {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: clamp(72px, 7vw, 96px) clamp(16px, 2vw, 28px) clamp(34px, 4vw, 52px);
  pointer-events: none;
}

.tv-hero-solo,
.tv-hero-stack {
  position: relative;
  display: grid;
  width: min(920px, 100%);
  min-height: min(64vh, 540px);
  place-items: center;
}

.tv-hero-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.tv-hero-card {
  width: 100%;
  pointer-events: auto;
}

.tv-hero-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(390px, 1.12fr);
  align-items: stretch;
  gap: clamp(18px, 2.1vw, 28px);
}

.tv-person-panel,
.tv-qualities-panel {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(10, 27, 33, 0.72);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.tv-person-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(10px, 1.35vw, 16px);
  min-height: 380px;
  padding: clamp(22px, 2.4vw, 32px);
  overflow: hidden;
  text-align: center;
}

.tv-hero-label,
.tv-qualities-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--font-body);
  font-size: clamp(0.74rem, 1vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.08;
  text-transform: uppercase;
}

.tv-hero-nameblock {
  display: grid;
  gap: 0;
  justify-items: center;
  max-width: 100%;
  min-width: 0;
}

.tv-hero-firstname,
.tv-hero-lastname {
  display: block;
  max-width: 100%;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.92;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
  text-align: center;
}

.tv-hero-firstname {
  font-size: clamp(2.1rem, 3.35vw, 3.55rem);
}

.tv-hero-lastname {
  margin-top: 0.08em;
  font-size: clamp(1.34rem, 2.05vw, 2.08rem);
  color: #fef8f1;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tv-hero-giver {
  margin: 0;
  max-width: 100%;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(0.82rem, 1.05vw, 0.98rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.tv-hero-orbit {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  overflow: visible;
}

.tv-hero-orbit::before,
.tv-hero-orbit::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: clamp(184px, 16vw, 225px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.tv-hero-orbit::after {
  width: clamp(154px, 13vw, 190px);
  border-color: rgba(255, 96, 119, 0.42);
  animation: tv-orbit-turn 14s linear infinite;
}

.tv-hero-media {
  position: relative;
  z-index: 2;
  display: grid;
  margin: 0 auto clamp(2px, 0.7vw, 8px);
  place-items: center;
}

.tv-hero-media::after {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(from 90deg, #ff6077, #fef8f1, #0050bd, #ff6077);
  animation: tv-ring-spin 7s linear infinite;
}

.tv-hero-media .tv-avatar--hero {
  position: relative;
  z-index: 1;
  border: 5px solid #fef8f1;
  border-radius: 50%;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.tv-hero-media .tv-avatar--hero img {
  border-radius: 50%;
}

.tv-avatar {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #15363f;
  font-family: var(--font-heading);
  font-weight: 800;
}

.tv-avatar--hero {
  width: clamp(146px, 14.6vw, 190px);
  border-radius: 50%;
  font-size: clamp(3rem, 6vw, 5.6rem);
}

.tv-avatar--const {
  width: clamp(42px, 5.2vw, 72px);
  border: 2px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  font-size: clamp(0.78rem, 1.3vw, 1.08rem);
}

.tv-avatar--const img {
  border-radius: 50%;
}

.tv-qualities-panel {
  display: grid;
  align-content: start;
  min-height: 380px;
  padding: clamp(22px, 2.4vw, 32px);
  background: rgba(21, 54, 63, 0.78);
}

.tv-qualities-head {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 clamp(16px, 2vw, 24px);
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.tv-qualities-title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  letter-spacing: 0.08em;
}

.tv-qualities-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(10px, 1vw, 12px);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tv-quality-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: clamp(12px, 1.2vw, 16px);
  min-height: clamp(74px, 7.2vw, 86px);
  padding: clamp(12px, 1.2vw, 16px) clamp(14px, 1.6vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(16, 33, 40, 0.86);
}

.tv-quality-badge {
  display: grid;
  width: clamp(2.5rem, 3.2vw, 3rem);
  height: clamp(2.5rem, 3.2vw, 3rem);
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #ff6077;
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 0.95vw, 0.9rem);
  font-weight: 900;
}

.tv-quality-text {
  display: block;
  min-width: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.05vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.06;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tv-anecdote {
  margin-top: clamp(12px, 1.3vw, 16px);
  padding: clamp(12px, 1.3vw, 16px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 14px;
  background: rgba(16, 33, 40, 0.72);
}

.tv-anecdote-title {
  margin: 0 0 8px;
  color: #fef8f1;
  font-size: clamp(0.74rem, 0.9vw, 0.84rem);
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tv-anecdote-text {
  margin: 0;
  color: #fff;
  font-size: clamp(0.98rem, 1.12vw, 1.15rem);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tv-hero-card--enter {
  animation: tv-hero-arrive 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tv-hero-card--exit {
  animation: tv-hero-leave 0.72s cubic-bezier(0.42, 0, 0.74, 0.35) forwards;
}

.ticker {
  display: none;
}

@keyframes tv-hero-arrive {
  from {
    opacity: 0;
    transform: translateX(calc(var(--tv-enter-dir, 1) * 120px)) scale(0.82);
    filter: blur(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes tv-hero-leave {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: translateX(calc(var(--tv-enter-dir, 1) * -110px)) scale(0.82);
    filter: blur(12px);
  }
}

@keyframes tv-const-drift {
  0%,
  100% {
    transform: translate(-50%, -50%) translate3d(0, 0, 0);
  }

  50% {
    transform: translate(-50%, -50%) translate3d(8px, -10px, 0);
  }
}

@keyframes tv-line-pulse {
  0%,
  100% {
    opacity: 0.28;
    stroke-dashoffset: 0;
  }

  50% {
    opacity: 0.95;
    stroke-dashoffset: -14;
  }
}

@keyframes tv-ring-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes tv-orbit-turn {
  to {
    transform: translate(-50%, -50%) rotate(1turn);
  }
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--green-dark);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-panel {
    margin-top: 0;
  }

  .metric-grid,
  .admin-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  main {
    padding: 18px;
  }

  .page-header,
  .panel-heading,
  .tv-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .admin-layout,
  .inline-form,
  .quality-grid,
  .tv-constellation {
    max-height: none;
  }

  .quality-grid {
    grid-template-columns: 1fr;
  }

  .employee-form-grid {
    grid-template-columns: 1fr;
  }

  .manual-employee-form .button-row {
    align-items: stretch;
    flex-direction: row;
  }

  .manual-employee-form .primary-button {
    width: 100%;
    min-width: 0;
  }

  .tv-avatar--hero {
    width: min(44vw, 200px);
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .assignment-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .employee-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .employee-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .assignment-row .completion-badge {
    grid-column: 1 / -1;
  }

  .tv-view.active {
    margin: 0;
  }

  .tv-stage {
    padding: 18px;
  }

  .lucca-sync-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .tv-hero-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tv-person-panel {
    justify-items: center;
    min-height: auto;
    padding: 16px;
  }

  .tv-hero-label {
    text-align: center;
  }

  .tv-hero-nameblock {
    margin-inline: auto;
    max-width: min(92vw, 26rem);
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .tv-avatar--hero {
    width: min(38vw, 172px);
  }

  .tv-hero-firstname,
  .tv-hero-lastname {
    white-space: nowrap;
  }

  .tv-hero-firstname {
    font-size: clamp(1.42rem, 5.9vw, 2.04rem);
  }

  .tv-hero-lastname {
    font-size: clamp(0.74rem, 3.1vw, 1.06rem);
    letter-spacing: 0.05em;
  }

  .tv-qualities-head {
    justify-content: center;
    text-align: center;
  }

  .tv-qualities-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tv-quality-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tv-quality-text {
    font-size: clamp(1.05rem, 4.2vw, 1.42rem);
    line-height: 1.38;
  }

  .tv-qualities-panel {
    min-height: auto;
    padding: 14px 16px;
  }

  .tv-anecdote {
    margin-top: 10px;
    padding: 12px;
  }

  .tv-anecdote-text {
    font-size: 0.96rem;
  }

  .tv-const-node {
    opacity: 0.38;
  }
}

/* Employee form refinement */
.employee-workspace {
  position: relative;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(24px, 4vw, 54px);
  overflow: hidden;
  background:
    radial-gradient(circle at 9% 18%, rgba(255, 96, 119, 0.12), transparent 28%),
    radial-gradient(circle at 86% 82%, rgba(0, 80, 189, 0.11), transparent 32%),
    linear-gradient(135deg, #f8fafb 0%, #eef4f6 100%);
}

.employee-workspace::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(16, 33, 40, 0.06);
  border-radius: 24px;
  pointer-events: none;
}

.employee-card {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(16, 33, 40, 0.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 33, 40, 0.12);
}

.employee-card .panel-heading {
  min-height: 172px;
  padding: clamp(28px, 4vw, 44px);
  color: #fff;
  background:
    radial-gradient(circle at 85% 28%, rgba(255, 96, 119, 0.34), transparent 22%),
    linear-gradient(135deg, #102128 0%, #15363f 70%, #0050bd 150%);
}

.employee-card .eyebrow {
  color: rgba(255, 255, 255, 0.66);
}

.employee-card h2 {
  max-width: 10em;
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.92;
}

.employee-card form {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(360px, 1.14fr);
  gap: clamp(18px, 2.4vw, 28px);
  margin: 0;
  padding: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(90deg, rgba(245, 247, 250, 0.82) 0 36%, #fff 36% 100%);
}

.employee-card form > .field:first-child,
.employee-card .assigned-person {
  grid-column: 1;
}

.employee-card .quality-suggestions,
.employee-card .quality-grid,
.employee-card .field-note,
.employee-card .button-row {
  grid-column: 2;
}

.employee-card .field span {
  color: #506268;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.employee-card input,
.employee-card select,
.employee-card textarea {
  border-color: rgba(16, 33, 40, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.employee-card input:focus,
.employee-card select:focus,
.employee-card textarea:focus {
  border-color: #0050bd;
  box-shadow: 0 0 0 4px rgba(0, 80, 189, 0.1);
}

.employee-card input:disabled,
.employee-card select:disabled,
.employee-card textarea:disabled {
  color: rgba(80, 98, 104, 0.74);
  background: #f5f7fa;
}

.assigned-person {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 156px;
  padding: clamp(18px, 2.4vw, 24px);
  overflow: hidden;
  border: 1px solid rgba(16, 33, 40, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 247, 250, 0.84)),
    #f5f7fa;
}

.assigned-person::after {
  content: "";
  position: absolute;
  right: -56px;
  bottom: -72px;
  width: 150px;
  aspect-ratio: 1;
  border: 28px solid rgba(255, 96, 119, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.assigned-person .avatar.large {
  width: clamp(74px, 8vw, 96px);
  height: clamp(74px, 8vw, 96px);
  border: 4px solid #fff;
  border-radius: 22px;
  box-shadow: 0 18px 36px rgba(16, 33, 40, 0.16);
}

.assigned-person p {
  color: #506268;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assigned-person h3 {
  max-width: 100%;
  color: #102128;
  font-size: clamp(1.45rem, 2.4vw, 2.25rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.quality-suggestions {
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(16, 33, 40, 0.08);
  border-radius: 16px;
  background: #f8fafb;
}

.quality-suggestions button {
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(16, 33, 40, 0.1);
  color: #102128;
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 33, 40, 0.04);
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.quality-suggestions button:hover {
  border-color: rgba(255, 96, 119, 0.48);
  color: #0050bd;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(16, 33, 40, 0.08);
}

.quality-grid {
  counter-reset: quality;
  gap: 14px;
}

.quality-grid .field {
  counter-increment: quality;
  position: relative;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(16, 33, 40, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 33, 40, 0.06);
}

.quality-grid .field::before {
  content: counter(quality, decimal-leading-zero);
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 2px;
  border-radius: 50%;
  color: #fff;
  background: #ff6077;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 900;
}

.quality-grid .field span {
  position: absolute;
  top: 23px;
  left: 62px;
}

.quality-grid input {
  min-height: 54px;
  padding-inline: 0;
  border: 0;
  border-bottom: 1px solid rgba(16, 33, 40, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-heading);
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  font-weight: 700;
}

.quality-grid input:focus {
  border-color: #0050bd;
  box-shadow: none;
}

.quality-grid input:disabled {
  background: transparent;
}

.quality-grid input::placeholder,
#quality-note::placeholder {
  color: rgba(80, 98, 104, 0.62);
  opacity: 1;
}

#quality-note {
  min-height: 116px;
}

.employee-card .button-row {
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding-top: 16px;
  border-top: 1px solid rgba(16, 33, 40, 0.08);
}

.employee-card .primary-button {
  min-width: 180px;
  min-height: 48px;
  border-radius: 999px;
  background: #102128;
  box-shadow: 0 14px 30px rgba(16, 33, 40, 0.18);
}

.employee-card .primary-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.employee-card .form-state {
  color: #0050bd;
}

.tv-hero-nameblock {
  width: 100%;
  overflow: hidden;
}

.tv-hero-firstname,
.tv-hero-lastname {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}

@media (max-width: 920px) {
  .employee-card form {
    grid-template-columns: 1fr;
    background: #fff;
  }

  .employee-card form > .field:first-child,
  .employee-card .assigned-person,
  .employee-card .quality-suggestions,
  .employee-card .quality-grid,
  .employee-card .field-note,
  .employee-card .button-row {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .employee-workspace {
    min-height: auto;
    padding: 0;
    background: #fff;
  }

  .employee-workspace::before {
    display: none;
  }

  .employee-card {
    border-radius: 0;
    box-shadow: none;
  }

  .employee-card .panel-heading {
    min-height: 142px;
    padding: 24px;
  }

  .employee-card form {
    padding: 18px;
  }

  .assigned-person {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .quality-grid {
    grid-template-columns: 1fr;
  }

  .employee-card .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-card .primary-button {
    width: 100%;
  }
}

/* Employee form correction */
.employee-workspace {
  display: grid;
  min-height: calc(100vh - 68px);
  padding: clamp(24px, 4vw, 48px);
  overflow: visible;
  place-items: center;
  background: #f5f7fa;
}

.employee-workspace::before,
.assigned-person::after {
  display: none;
  content: none;
}

.employee-card {
  width: min(1120px, 100%);
  overflow: hidden;
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 33, 40, 0.08);
}

.employee-card .panel-heading {
  min-height: 0;
  padding: clamp(28px, 3vw, 38px) clamp(30px, 4vw, 48px);
  background: #102128;
}

.employee-card h2 {
  max-width: none;
  color: #fff;
  font-size: clamp(2.2rem, 3.35vw, 3.75rem);
  line-height: 0.96;
  white-space: nowrap;
}

.employee-card form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin: 0;
  padding: clamp(26px, 3.6vw, 42px) clamp(30px, 4vw, 48px);
  background: #fff;
}

.employee-card form > .field:first-child,
.employee-card .assigned-person,
.employee-card .quality-suggestions,
.employee-card .quality-grid,
.employee-card .field-note,
.employee-card .button-row {
  grid-column: 1;
}

.employee-card form > .field:first-child {
  width: min(440px, 100%);
}

.employee-card .field span {
  color: #506268;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.employee-card input,
.employee-card select,
.employee-card textarea {
  border-color: #dfe7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.employee-card input:focus,
.employee-card select:focus,
.employee-card textarea:focus {
  border-color: #0050bd;
  box-shadow: 0 0 0 3px rgba(0, 80, 189, 0.1);
}

.assigned-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 128px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #f8fafb;
}

.assigned-person .avatar.large {
  width: 82px;
  height: 82px;
  border: 3px solid #fff;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(16, 33, 40, 0.12);
}

.assigned-person p {
  margin: 0 0 6px;
  color: #506268;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assigned-person h3 {
  max-width: 100%;
  margin: 0;
  color: #102128;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.96;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.quality-suggestions {
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quality-suggestions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dfe7ec;
  border-radius: 999px;
  color: #102128;
  background: #fff;
  box-shadow: none;
}

.quality-suggestions button:hover {
  border-color: #0050bd;
  color: #0050bd;
  transform: none;
  box-shadow: none;
}

.quality-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quality-grid .field {
  min-height: 132px;
  padding: 16px;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #f8fafb;
  box-shadow: none;
}

.quality-grid .field::before {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  background: #ff6077;
}

.quality-grid .field span {
  top: 22px;
  left: 58px;
}

.quality-grid input {
  min-height: 50px;
  border-bottom-color: #dfe7ec;
  background: transparent;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
}

#quality-note {
  min-height: 112px;
  background: #fff;
}

.employee-card .button-row {
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid #e4ebf3;
}

.employee-card .primary-button {
  min-width: 178px;
  min-height: 48px;
  border-radius: 10px;
  background: #102128;
  box-shadow: none;
}

.employee-card .primary-button:not(:disabled):hover {
  transform: none;
}

.employee-card .form-state {
  color: #0050bd;
}

@media (max-width: 760px) {
  .employee-workspace {
    min-height: auto;
    padding: 0;
  }

  .employee-card {
    border-radius: 0;
    box-shadow: none;
  }

  .employee-card .panel-heading,
  .employee-card form {
    padding: 22px;
  }

  .employee-card h2 {
    font-size: clamp(2rem, 9vw, 3rem);
    white-space: normal;
  }

  .assigned-person {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    text-align: left;
  }

  .assigned-person h3 {
    font-size: clamp(1.45rem, 6.4vw, 2rem);
  }

  .quality-grid {
    grid-template-columns: 1fr;
  }

  .employee-card .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-card .primary-button {
    width: 100%;
  }
}
