﻿/* Highlander unified stylesheet
   Source of truth for app layout, components, employee images, and print helpers. */

/* Migrated legacy app foundation */
/* =========================================================
   Highlander Design System
   1. CSS Variables
   2. Base Layout
   3. Page Headers
   4. Cards
   5. Buttons
   6. Forms
   7. Tables
   8. Badges / Pills
   9. Photos / Avatars
   10. Dashboard Thumbnails
   11. Documents
   12. Print Utilities
   13. Responsive Helpers
   ========================================================= */

/* 1. CSS Variables */
:root {
  --ha-bg: #f5f7fb;
  --ha-panel: #ffffff;
  --ha-panel-soft: #f8fafc;
  --ha-text: #0f172a;
  --ha-muted: #64748b;
  --ha-border: rgba(15, 23, 42, 0.12);
  --ha-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --ha-radius-lg: 18px;
  --ha-radius-md: 12px;
  --ha-radius-sm: 8px;
  --ha-primary: #7c1d1d;
  --ha-primary-dark: #5f1515;
  --ha-gold: #d4a017;
  --ha-danger: #b91c1c;
  --ha-success: #15803d;

  --bg: #f4f7f9;
  --panel: #ffffff;
  --ink: #18232e;
  --muted: #647383;
  --line: #d8e1e8;
  --navy: #123047;
  --sky: #3e89b9;
  --green: #2f8f73;
  --amber: #c4832a;
  --shadow: 0 18px 38px rgba(18, 48, 71, 0.11);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 24px 18px;
  background: var(--navy);
  color: #f8fbfd;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand small { color: #bdd2df; font-size: .78rem; }
nav { display: grid; gap: 6px; }
nav a { padding: 11px 12px; border-radius: 8px; color: #cfe0ea; font-weight: 650; }
nav a.active, nav a:hover { background: rgba(255,255,255,.13); color: #fff; }
.nav-logout-form,
.inline-action-form {
  margin: 0;
}
.nav-logout-button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  background: transparent;
  color: #cfe0ea;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
}
.nav-logout-button:hover,
.nav-logout-button:focus-visible {
  background: rgba(255,255,255,.13);
  color: #fff;
  outline: none;
}
.app-shell { margin-left: 248px; padding: 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
.global-search-form {
  display: flex;
  align-items: center;
  width: min(360px, 36vw);
  min-width: 240px;
}
.global-search-form input {
  min-width: 0;
  height: 40px;
  border-radius: 8px 0 0 8px;
  background: #ffffff;
}
.global-search-form button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 0 12px;
  background: #eef4f7;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--sky);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.status-pill, .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}
.status-pill span { width: 9px; height: 9px; border-radius: 999px; background: var(--green); }
.hero-panel, .panel, .form-panel, .idea-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 26px;
  background:
    linear-gradient(115deg, rgba(18,48,71,.95), rgba(30,85,111,.9)),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(255,255,255,.08) 48px 49px);
  color: white;
}
.hero-panel h2 { max-width: 760px; margin-bottom: 0; font-size: clamp(1.45rem, 2.4vw, 2.3rem); line-height: 1.15; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}
.button.primary { border-color: var(--sky); background: var(--sky); color: #fff; }
.button.secondary { background: #eef4f7; }
.button.light { border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.12); color: #fff; }
.button.light:hover { background: rgba(255,255,255,.2); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.metric-card { border-left: 4px solid var(--sky); border-radius: 8px; padding: 18px; background: #fff; }
.metric-card span { display: block; font-size: 2rem; font-weight: 850; }
.metric-card p { margin-bottom: 0; color: var(--muted); font-weight: 700; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; margin-bottom: 18px; }
.panel, .form-panel { padding: 22px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.panel-header h3 { margin-bottom: 0; }
.timeline, .contact-lines { display: grid; gap: 10px; }
.timeline-item {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}
.timeline-item time, .timeline-item span, .idea-card span, .idea-row span, .card-topline, .contact-card small {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 750;
}
.idea-grid, .contact-grid, .tile-grid, .action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.idea-card, .contact-card, .company-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfe;
}
.company-tile {
  display: grid;
  min-height: 230px;
  align-content: start;
  gap: 10px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.company-tile:hover { border-color: var(--sky); box-shadow: 0 14px 28px rgba(18,48,71,.13); transform: translateY(-2px); }
.company-tile h3, .company-tile p { margin-bottom: 0; }
.company-tile p, .company-tile > span, .contact-card p { color: var(--muted); }
.company-tile strong { color: var(--navy); }
.idea-card h4, .contact-card h3 { margin: 6px 0 8px; }
.idea-grid.single { grid-template-columns: 1fr; }
.database-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.database-card {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfe;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.database-card:hover {
  border-color: var(--sky);
  box-shadow: 0 14px 28px rgba(18,48,71,.13);
  transform: translateY(-2px);
}
.database-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
}
a.database-card-content {
  color: inherit;
  text-decoration: none;
}
a.database-card-content:focus-visible {
  outline: 3px solid rgba(73, 154, 198, .35);
  outline-offset: 4px;
  border-radius: 6px;
}
.database-card-thumbnail {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: auto;
  z-index: 1;
  width: 108px;
  height: 108px;
  max-width: 108px;
  max-height: 108px;
  object-fit: contain;
  opacity: 0.25;
  filter: none;
  pointer-events: none;
}
.database-card-title {
  color: var(--navy);
  font-size: 1.05rem;
}
.database-card-description {
  margin-bottom: 0;
  color: var(--muted);
}
.source-type-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.database-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.database-card-actions .button {
  min-height: 36px;
  padding: 8px 10px;
}
.database-card-status {
  color: var(--sky);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}
.reminder-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}
.reminder-summary-grid .database-card {
  min-height: 108px;
  text-decoration: none;
}
.reminder-summary-grid .database-card-content {
  align-content: start;
}
.reminder-related-provider-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 10px 0 16px;
}
.reminder-related-provider-grid .database-card {
  min-height: 112px;
}
.reminder-related-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}
.reminder-related-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.reminder-related-result {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.reminder-related-result:hover,
.reminder-related-result:focus-visible {
  border-color: var(--sky);
  box-shadow: 0 10px 22px rgba(18,48,71,.12);
  outline: none;
}
.reminder-related-result strong {
  color: var(--navy);
}
.reminder-related-result span,
.reminder-related-result small {
  color: var(--muted);
}
.reminder-related-result em {
  color: var(--sky);
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}
.reminder-calendar-panel {
  display: grid;
  gap: 14px;
}
.reminder-calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.reminder-calendar-weekdays,
.reminder-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.reminder-calendar-weekdays span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}
.reminder-day-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 116px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdfe;
  color: var(--navy);
  text-decoration: none;
}
.reminder-day-card:hover {
  border-color: var(--sky);
}
.reminder-day-card.is-outside-month {
  opacity: .58;
}
.reminder-day-card.is-today {
  border-color: var(--green);
}
.reminder-day-card.is-selected {
  border-color: var(--sky);
  box-shadow: inset 0 0 0 2px rgba(62, 154, 197, .18);
}
.reminder-day-number,
.reminder-day-date {
  font-weight: 850;
}
.reminder-calendar-item,
.reminder-more-count {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reminder-calendar-item.is-completed,
.reminder-detail-card.is-completed {
  opacity: .62;
}
.reminder-calendar-item.is-completed {
  text-decoration: line-through;
}
.reminder-priority-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 999px;
  background: var(--amber);
}
.reminder-more-count {
  color: var(--sky);
  font-weight: 850;
}
.reminder-daily-view .reminder-day-card {
  min-height: 84px;
}
.reminder-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.reminder-detail-card {
  min-height: 0;
}
.card-topline { display: flex; justify-content: space-between; gap: 10px; }
.action-grid { margin-top: 16px; }
dl { display: grid; gap: 8px; margin: 14px 0 0; }
dt { color: var(--navy); font-weight: 850; }
dd { margin: 0 0 8px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 860px; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .82rem; text-transform: uppercase; }
.hl-sort-link-stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  gap: 0.15rem;
  line-height: 1.1;
  text-decoration: none;
}
.hl-sort-link-stacked .hl-sort-label {
  display: block;
  width: 100%;
  text-align: center;
}
.hl-sort-link-stacked .hl-sort-arrow {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.85em;
  line-height: 1;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.table-actions .button {
  min-height: 23px;
  padding: 4px 7px;
  font-size: 0.76rem;
  line-height: 1.1;
}
.receipt-lines {
  display: grid;
  gap: 8px;
  min-width: 220px;
}
.receipt-lines > strong,
.receipt-tool-context {
  display: block;
  color: var(--navy);
  font-weight: 850;
}
.receipt-lines ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}
.receipt-lines li {
  color: var(--ink);
}
.receipt-lines small,
.receipt-line-note {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.expense-line-items-table {
  table-layout: fixed;
  min-width: 720px;
}
.expense-line-items-table th,
.expense-line-items-table td {
  padding: 6px;
}
.expense-line-tool-column { width: 37%; }
.expense-line-amount-column { width: 13%; }
.expense-line-quantity-column { width: 10%; }
.expense-line-category-column { width: 20%; }
.expense-line-notes-column { width: 20%; }
.expense-line-items-table input,
.expense-line-items-table select {
  min-width: 0;
  padding: 8px 9px;
}
.form-panel { display: grid; gap: 16px; max-width: 1040px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-section {
  display: grid;
  gap: 14px;
}
.form-section h3 {
  margin-bottom: 0;
  color: var(--navy);
}
.form-grid-full {
  grid-column: 1 / -1;
}
.address-autocomplete-wrapper {
  position: relative;
}
.address-autocomplete-suggestions {
  display: none;
  position: absolute;
  z-index: 20;
  width: 100%;
  margin-top: 4px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}
.address-autocomplete-option {
  display: block;
  width: 100%;
  border: 0;
  padding: 10px 12px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font-size: .92rem;
  text-align: left;
}
.address-autocomplete-option:hover {
  background: #f3f4f6;
}
label { display: grid; gap: 7px; color: var(--navy); font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfdfe;
  font: inherit;
}
input[type="checkbox"] {
  width: auto;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 78px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 58px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: #eef4f7;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  transform: translateY(-50%);
}
.password-toggle:hover {
  background: #e4edf2;
}
.upload-widget {
  display: grid;
  gap: 7px;
}
.upload-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 13px;
  background: var(--navy);
  color: #ffffff;
  cursor: pointer;
  font-weight: 850;
  line-height: 1;
}
.upload-widget-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload-widget-input::file-selector-button {
  min-height: 36px;
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--navy);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}
.upload-widget-input:hover::file-selector-button {
  background: #0d263d;
}
.upload-widget small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.upload-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 22, 35, 0.45);
}
.upload-action-sheet-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 360px);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(8, 22, 35, 0.28);
}
.upload-sheet-option,
.upload-sheet-cancel {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}
.upload-sheet-option {
  background: var(--navy);
  color: #ffffff;
}
.upload-sheet-cancel {
  background: #eef3f7;
  color: var(--ink);
}
.tool-avatar-frame {
  width: 65px;
  height: 75px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--muted);
  background: #fbfdfe;
  flex-shrink: 0;
  text-align: center;
}
.tool-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbfdfe;
}

/* 2. Base Layout */
.page-shell {
  display: grid;
  gap: 18px;
}

/* 3. Page Headers */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.page-title {
  margin: 0;
  color: var(--ha-text);
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.15;
}
.page-subtitle {
  margin: 6px 0 0;
  color: var(--ha-muted);
}
.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* 4. Cards */
.ha-card {
  border: 1px solid var(--ha-border);
  border-radius: var(--ha-radius-sm);
  background: var(--ha-panel);
  box-shadow: var(--ha-shadow);
}
.ha-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}
.ha-card-title {
  margin: 0;
  color: var(--ha-text);
}
.ha-card-subtitle {
  margin: 4px 0 0;
  color: var(--ha-muted);
}
.ha-card-body {
  padding: 18px;
}
.ha-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--ha-border);
  border-radius: var(--ha-radius-sm);
  padding: 10px 14px;
  background: var(--ha-panel);
  color: var(--ha-text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}
.btn-primary {
  border-color: var(--ha-primary);
  background: var(--ha-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--ha-primary-dark);
}
.btn-secondary {
  background: var(--ha-panel-soft);
  color: var(--ha-text);
}
.btn-danger {
  border-color: var(--ha-danger);
  background: var(--ha-danger);
  color: #ffffff;
}
.btn-sm {
  min-height: 34px;
  padding: 7px 10px;
  font-size: .88rem;
}

/* 6. Forms */
.form-group {
  display: grid;
  gap: 7px;
}
.form-control {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--ha-radius-sm);
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfdfe;
  font: inherit;
}
.form-help {
  color: var(--ha-muted);
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.35;
}

/* 7. Tables */
.ha-table-wrap {
  overflow-x: auto;
}
.ha-table {
  width: 100%;
  border-collapse: collapse;
}
.ha-table th,
.ha-table td {
  border-bottom: 1px solid var(--ha-border);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}
.ha-table th {
  color: var(--ha-muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}
.ha-actions-cell {
  white-space: nowrap;
  text-align: right;
}

/* 8. Badges / Pills */
.ha-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ha-border);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--ha-panel);
  color: var(--ha-muted);
  font-size: .84rem;
  font-weight: 750;
}

/* 9. Photos / Avatars */
.ha-avatar-sm,
.ha-avatar-md,
.ha-avatar-lg,
.ha-photo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
}
.ha-avatar-sm {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.ha-avatar-md {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}
.ha-avatar-lg,
.ha-photo-frame {
  width: 180px;
  height: 180px;
  border-radius: var(--ha-radius-lg);
}
.ha-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 10. Dashboard Thumbnails */
.database-card-thumbnail {
  max-width: 108px;
  max-height: 108px;
  object-fit: contain;
}

/* 11. Documents */
.document-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 12. Print Utilities */
.no-print {
  display: initial;
}

@media print {
  .no-print,
  .sidebar,
  .hero-actions,
  .page-actions,
  .form-actions {
    display: none !important;
  }
  .app-shell {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .panel,
  .ha-card {
    box-shadow: none !important;
  }
}

/* 13. Responsive Helpers */
.ha-stack {
  display: grid;
  gap: 14px;
}
.ha-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--sky);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--sky);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}
textarea { resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.login-shell {
  max-width: 760px;
}
.login-form {
  padding-bottom: 26px;
}
.login-form .form-section {
  padding-bottom: 18px;
}
.login-form .form-grid {
  row-gap: 18px;
}
.login-form .login-actions {
  justify-content: flex-start;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}
.login-form .login-submit-button {
  min-height: 46px;
  min-width: 172px;
  gap: 10px;
  padding: 12px 22px;
  box-shadow: 0 10px 24px rgba(58, 131, 176, 0.24);
}
.login-form .login-submit-button:hover {
  background: #2f6f99;
  border-color: #2f6f99;
}
.login-submit-arrow {
  font-size: 1.05rem;
  line-height: 1;
}
.engine-category-section[hidden] { display: none; }
.engine-custom-manufacturer[hidden] { display: none; }
.company-logo-upload input { background: #ffffff; }
.form-error {
  border: 1px solid rgba(196, 62, 62, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(196, 62, 62, 0.08);
  color: #8f1f1f;
  font-weight: 800;
}
.app-feedback {
  border: 1px solid rgba(47, 143, 115, 0.24);
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(47, 143, 115, 0.1);
  color: var(--ha-success);
  font-weight: 800;
}
.app-feedback-success {
  border-color: rgba(47, 143, 115, 0.28);
}
.file-hint {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.employee-photo-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfe;
}
.employee-documents-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfe;
}
.employee-documents-section .table-wrap,
.employee-documents-panel .table-wrap {
  margin-bottom: 12px;
}
.employee-photo-upload {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.employee-photo-preview,
.employee-photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef4f7;
  color: var(--navy);
  font-weight: 850;
}
.employee-photo-frame {
  width: 180px;
  height: 180px;
  max-width: 100%;
  flex: 0 0 180px;
  border-radius: 8px;
}
.employee-photo-preview {
  width: 120px;
  height: 120px;
  max-width: 100%;
  flex: 0 0 120px;
  border-radius: 8px;
}
.employee-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.employee-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
}
.profile-summary-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.profile-summary-content {
  flex: 1 1 auto;
  min-width: 0;
}
.profile-summary-photo {
  flex: 0 0 auto;
}
.account-summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 28px;
  align-items: start;
}
.account-summary-main {
  min-width: 0;
}
.account-summary-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.account-summary-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.account-summary-list {
  display: grid;
  margin: 0;
}
.account-summary-list > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #edf2f5;
}
.account-summary-list > div:last-child {
  border-bottom: 0;
}
.account-summary-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}
.account-summary-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-weight: 850;
}
.account-summary-photo {
  display: grid;
  gap: 9px;
  justify-items: center;
  text-align: center;
}
.account-photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--navy);
  font-size: 2.6rem;
  font-weight: 850;
}
.account-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.account-summary-photo strong,
.account-summary-photo span {
  max-width: 190px;
  overflow-wrap: anywhere;
}
.account-summary-photo span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}
.search-results-summary {
  margin: 16px 0;
}
.search-results-group {
  margin-bottom: 16px;
}
.search-results-list {
  display: grid;
  gap: 10px;
}
.search-result-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fbfdfe;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.search-result-row:hover {
  border-color: var(--sky);
  box-shadow: 0 12px 24px rgba(18,48,71,.1);
  transform: translateY(-1px);
}
.search-result-type {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}
.search-result-row strong,
.search-result-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.personal-dashboard-section {
  margin-bottom: 16px;
}
.personal-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.personal-dashboard-list {
  display: grid;
  gap: 10px;
}
.personal-dashboard-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1.15fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fbfdfe;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.personal-dashboard-row:hover {
  border-color: var(--sky);
  box-shadow: 0 12px 24px rgba(18,48,71,.1);
  transform: translateY(-1px);
}
.personal-dashboard-row strong,
.personal-dashboard-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.document-panel { margin-bottom: 18px; }
.document-list { display: grid; gap: 12px; }
.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfe;
}
.document-row strong,
.document-row span {
  display: block;
}
.document-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}
.company-hero-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.company-dashboard-logo {
  width: 160px;
  max-width: 180px;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
}
.company-card-logo {
  width: 100%;
  max-width: 120px;
  max-height: 62px;
  height: auto;
  object-fit: contain;
  justify-self: start;
  margin-bottom: 2px;
}
.company-logo-placeholder {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 2.15rem;
  font-weight: 850;
  text-transform: uppercase;
}
.ideas-list { display: grid; gap: 16px; }
.idea-row { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 1.15fr); gap: 24px; padding: 22px; }
.empty, .empty-cell { color: var(--muted); font-weight: 700; }
.backup-dashboard {
  display: grid;
  gap: 18px;
  max-width: 1040px;
}
.backup-dashboard .hero-panel,
.backup-dashboard .form-panel,
.backup-dashboard .panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.backup-dashboard .form-grid > *,
.backup-dashboard label,
.backup-dashboard .form-actions,
.backup-dashboard .form-actions form {
  min-width: 0;
}
.backup-dashboard .form-grid > div {
  display: grid;
  gap: 10px;
}
.backup-dashboard input,
.backup-dashboard select {
  min-width: 0;
}
.backup-dashboard .form-actions {
  flex-wrap: wrap;
}
.backup-dashboard .panel .form-actions {
  justify-content: flex-start;
}
.backup-dashboard .button {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}
@media (max-width: 980px) {
  .sidebar { position: static; width: auto; }
  .app-shell { margin-left: 0; padding: 20px; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid, .two-column, .tile-grid, .idea-row, .database-grid { grid-template-columns: 1fr; }
  .database-grid.reminder-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-calendar-grid,
  .reminder-calendar-weekdays {
    gap: 6px;
  }
  .reminder-day-card {
    min-height: 96px;
    padding: 8px;
  }
  .reminder-calendar-item,
  .reminder-more-count {
    font-size: .72rem;
  }
}
@media (max-width: 700px) {
  .database-card-thumbnail {
    position: static;
    display: block;
    width: 110px;
    height: 110px;
    margin: 0 0 12px auto;
  }
}
@media (max-width: 640px) {
  .topbar, .hero-panel, .panel-header { align-items: flex-start; flex-direction: column; }
  .topbar-actions { align-items: stretch; width: 100%; flex-direction: column; }
  .global-search-form { width: 100%; min-width: 0; }
  .metric-grid, .idea-grid, .contact-grid, .action-grid, .form-grid { grid-template-columns: 1fr; }
  .database-grid.reminder-summary-grid { grid-template-columns: 1fr; }
  .reminder-calendar-toolbar,
  .reminder-calendar-toolbar .database-card-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .reminder-calendar-toolbar .button {
    width: 100%;
  }
  .reminder-calendar-weekdays {
    display: none;
  }
  .reminder-calendar-grid,
  .reminder-detail-list {
    grid-template-columns: 1fr;
  }
  .reminder-day-card {
    min-height: 0;
  }
  .company-hero-identity { align-items: flex-start; flex-direction: column; }
  .company-dashboard-logo { width: 140px; }
  .employee-photo-upload { align-items: flex-start; grid-template-columns: 1fr; }
  .profile-summary-panel { flex-direction: column-reverse; }
  .account-summary-panel { grid-template-columns: 1fr; }
  .account-summary-photo { justify-items: start; text-align: left; }
  .account-photo-frame { width: 160px; height: 160px; }
  .account-summary-list > div { grid-template-columns: 1fr; gap: 4px; }
  .search-result-row { grid-template-columns: 1fr; gap: 5px; }
  .personal-summary-grid { grid-template-columns: 1fr; }
  .personal-dashboard-row { grid-template-columns: 1fr; gap: 5px; }
  .document-row { align-items: flex-start; flex-direction: column; }
  .app-shell { padding: 16px; }
  .backup-dashboard .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .backup-dashboard .form-actions .button,
  .backup-dashboard .form-actions form,
  .backup-dashboard .form-grid > div > .button {
    width: 100%;
  }
  .backup-dashboard .panel,
  .backup-dashboard .form-panel {
    padding: 18px;
  }
}

.logo-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 22px 14px 18px;
  text-decoration: none;
}

.sidebar-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
  display: block;
}


.logo-brand img,
img.sidebar-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.sidebar-delete-form {
  margin-top: 12px;
}

.sidebar-delete-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(196, 62, 62, 0.18);
  color: #ffd8d8;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.sidebar-delete-button:hover {
  background: rgba(196, 62, 62, 0.3);
  color: #ffffff;
}

.company-tile-link {
  display: grid;
  gap: 10px;
}

.company-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.company-card-delete-form {
  margin: 0;
}

.company-card-delete-button {
  border: 1px solid rgba(255, 90, 90, 0.45);
  background: rgba(255, 90, 90, 0.08);
  color: #8f1f1f;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.company-card-delete-button:hover {
  background: rgba(255, 90, 90, 0.16);
  color: #5f1111;
}

.parent-delete-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.parent-delete-label {
  color: #f4c8c8;
  font-size: 0.78rem;
  font-weight: 800;
}

.parent-delete-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
}

.parent-delete-select option {
  color: #18232e;
}

.parent-delete-button {
  min-height: 38px;
  border: 1px solid rgba(255, 90, 90, 0.45);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 90, 90, 0.14);
  color: #ffd8d8;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.parent-delete-button:hover {
  background: rgba(255, 90, 90, 0.26);
  color: #ffffff;
}

.parent-delete-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.employee-photo-upload .employee-photo-preview {
  width: 120px !important;
  height: 120px !important;
  max-width: 120px !important;
  max-height: 120px !important;
  flex: 0 0 120px !important;
  overflow: hidden !important;
}

.employee-photo-frame > img.employee-photo,
.employee-photo-preview > img.employee-photo {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.inline-delete-form {
  display: inline;
}

/* Unified Highlander design system */
/* Highlander design tokens */
:root {
  --hl-bg: var(--bg);
  --hl-surface: var(--panel);
  --hl-surface-soft: #fbfdfe;
  --hl-text: var(--ink);
  --hl-muted: var(--muted);
  --hl-border: var(--line);
  --hl-primary: var(--sky);
  --hl-primary-dark: #2f6f99;
  --hl-success: var(--green);
  --hl-warning: var(--amber);
  --hl-danger: #b42323;
  --hl-print: #334155;
  --hl-shadow: var(--shadow);
  --hl-radius: 8px;
}

/* Page layout */
.hl-page {
  display: grid;
  gap: 18px;
}

.hl-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hl-page-header.hl-card {
  padding: 22px;
}

.hl-page-title {
  margin: 0;
  color: var(--hl-text);
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.15;
}

.hl-page-subtitle {
  margin: 6px 0 0;
  color: var(--hl-muted);
}

.hl-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cards */
.hl-card,
.hl-detail-card,
.hl-module-card {
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  background: var(--hl-surface);
  box-shadow: var(--hl-shadow);
}

.hl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.hl-card-title {
  margin: 0;
  color: var(--hl-text);
}

.hl-card-body {
  padding: 18px;
}

.panel > .hl-card-header,
.panel > .hl-card-body {
  padding: 0;
}

.hl-card-grid,
.hl-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hl-module-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

/* Tables */
.hl-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.hl-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.hl-table th,
.hl-table td {
  border-bottom: 1px solid var(--hl-border);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

.hl-table th {
  color: var(--hl-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hl-actions-cell {
  min-width: 150px;
  overflow: visible;
  text-align: right;
}

.hl-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Forms */
.hl-form {
  display: grid;
  gap: 16px;
}

.hl-form-section {
  display: grid;
  gap: 14px;
}

.hl-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hl-form-group {
  display: grid;
  gap: 7px;
}

.hl-label {
  color: var(--navy);
  font-weight: 800;
}

.hl-input,
.hl-select,
.hl-textarea {
  width: 100%;
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  padding: 11px 12px;
  color: var(--hl-text);
  background: var(--hl-surface-soft);
  font: inherit;
}

.hl-textarea {
  resize: vertical;
}

.hl-help-text {
  color: var(--hl-muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
}

/* Buttons */
.hl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  padding: 10px 14px;
  background: var(--hl-surface);
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.hl-btn-primary {
  border-color: var(--hl-primary);
  background: var(--hl-primary);
  color: #ffffff;
}

.hl-btn-primary:hover {
  background: var(--hl-primary-dark);
}

.hl-btn-secondary {
  background: #eef4f7;
}

.hl-btn-success {
  border-color: var(--hl-success);
  background: var(--hl-success);
  color: #ffffff;
}

.hl-btn-warning {
  border-color: var(--hl-warning);
  background: var(--hl-warning);
  color: #ffffff;
}

.hl-btn-danger {
  border-color: var(--hl-danger);
  background: var(--hl-danger);
  color: #ffffff;
}

.hl-btn-print {
  border-color: #b8c7d3;
  background: #ffffff;
  color: #1f3344;
}

.hl-btn-print:hover {
  background: #eef6fb;
  color: #102536;
}

.hero-panel .hl-btn {
  border-color: rgba(255, 255, 255, 0.42);
}

.hero-panel .hl-btn:not(.hl-btn-primary):not(.hl-btn-print) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.hl-btn-small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

/* Photos */
.hl-avatar-frame-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  max-height: 44px;
  overflow: hidden;
  border: 1px solid var(--hl-border);
  border-radius: 50%;
  background: #eef4f7;
  color: var(--navy);
  font-weight: 850;
}

.hl-avatar-sm {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: 100%;
  max-height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  overflow: hidden;
}

span.hl-avatar-sm {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-account-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  white-space: nowrap;
}

.user-account-identity > span {
  flex: 0 0 auto;
}

.hl-photo-md {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  background: #eef4f7;
}

.hl-photo-frame-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 225px;
  height: 225px;
  max-width: 225px;
  max-height: 225px;
  flex: 0 0 225px;
  overflow: hidden;
  border: 1px solid var(--hl-border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--navy);
  font-weight: 850;
}

.hl-photo-lg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
}

.hl-document-thumbnail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  background: #eef4f7;
}

.hl-document-thumbnail > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Badges */
.hl-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--hl-border);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--hl-surface);
  color: var(--hl-muted);
  font-size: 0.84rem;
  font-weight: 750;
  white-space: nowrap;
}

.hl-badge-active {
  border-color: rgba(47, 143, 115, 0.28);
  background: rgba(47, 143, 115, 0.1);
  color: #166649;
}

.hl-badge-inactive,
.hl-badge-muted {
  background: #eef4f7;
  color: var(--hl-muted);
}

.hl-badge-warning {
  border-color: rgba(196, 131, 42, 0.3);
  background: rgba(196, 131, 42, 0.12);
  color: #8a5a15;
}

.hl-badge-danger {
  border-color: rgba(178, 57, 57, 0.3);
  background: rgba(178, 57, 57, 0.12);
  color: #943030;
}

.inline-panel-header {
  margin-bottom: 14px;
}

.form-errors {
  border-color: rgba(178, 57, 57, 0.28);
  background: rgba(178, 57, 57, 0.08);
}

.form-errors p {
  margin: 0;
  color: #943030;
  font-weight: 700;
}

.document-reminder-fields {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: end;
}

.push-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.compact-metric {
  padding: 14px;
}

.compact-metric span {
  font-size: 1rem;
}

.push-current-device-form {
  margin-top: 14px;
}

.push-settings-panel .form-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: 100%;
}

.push-settings-panel .form-actions .button {
  min-width: 0;
  white-space: normal;
}

.embedded-form-panel {
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.push-unavailable-setting {
  opacity: 0.62;
}

@media (max-width: 720px) {
  .document-reminder-fields {
    grid-template-columns: 1fr;
  }

  .push-status-grid {
    grid-template-columns: 1fr;
  }

  .push-settings-panel .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .push-settings-panel .form-actions .button {
    width: 100%;
  }
}

/* Detail pages */
.hl-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hl-detail-card {
  padding: 22px;
}

.hl-detail-row {
  display: grid;
  gap: 4px;
  padding: 0 0 10px;
}

.hl-detail-label {
  color: var(--hl-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hl-detail-value {
  color: var(--hl-text);
  font-weight: 800;
}

/* Documents */
.hl-document-panel {
  display: grid;
  gap: 12px;
}

.hl-document-list {
  display: grid;
  gap: 12px;
}

.hl-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--hl-border);
  border-radius: var(--hl-radius);
  padding: 14px;
  background: var(--hl-surface-soft);
}

.hl-document-title {
  display: block;
  color: var(--hl-text);
  font-weight: 850;
}

.hl-document-meta {
  display: block;
  color: var(--hl-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

/* Print helpers */
.hl-no-print {
  display: initial;
}

.hl-print-page {
  background: #ffffff;
}

.hl-print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.hl-print-table {
  width: 100%;
  border-collapse: collapse;
}

@media print {
  .hl-no-print {
    display: none !important;
  }

  .hl-print-table th,
  .hl-print-table td {
    border-bottom: 1px solid #d8e1e8;
    padding: 8px;
  }
}

@media (max-width: 760px) {
  .hl-page-header,
  .hl-document-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hl-card-grid,
  .hl-dashboard-grid,
  .hl-detail-grid,
  .hl-form-grid {
    grid-template-columns: 1fr;
  }

  .hl-page-actions,
  .hl-action-group {
    justify-content: flex-start;
  }

  .hl-photo-frame-lg {
    width: 200px;
    height: 200px;
    max-width: 200px;
    max-height: 200px;
    flex-basis: 200px;
  }
}

.sidebar-delete-launch {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 2px solid #ff6b6b;
  border-radius: 8px;
  background: #b42323;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.delete-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 18, 28, 0.62);
}

.delete-modal-backdrop.is-open {
  display: flex;
}

.delete-modal {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(8, 18, 28, 0.32);
  overflow: hidden;
}

.delete-modal-header {
  padding: 20px 22px;
  background: #123047;
  color: #ffffff;
}

.delete-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.delete-modal-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.delete-modal-body p {
  margin: 0;
  color: #647383;
}

.delete-modal-warning {
  border: 1px solid rgba(180, 35, 35, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(180, 35, 35, 0.08);
  color: #7f1d1d;
  font-weight: 750;
}

.delete-modal-select {
  width: 100%;
  border: 1px solid #d8e1e8;
  border-radius: 8px;
  padding: 11px 12px;
  color: #18232e;
  background: #fbfdfe;
  font: inherit;
}

.delete-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 22px;
}

.delete-modal-cancel,
.delete-modal-submit {
  min-height: 40px;
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.delete-modal-cancel {
  border: 1px solid #d8e1e8;
  background: #eef4f7;
  color: #123047;
}

.delete-modal-submit {
  border: 1px solid #b42323;
  background: #b42323;
  color: #ffffff;
}

.employee-print-body {
  margin: 0;
  background: #f4f7f9;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
}

.print-page {
  width: min(100%, 11in);
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
}

.print-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.print-button,
.print-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.print-button {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.print-page h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

.printed-at {
  margin: 0 0 16px;
  color: #4b5563;
}

table.employee-print-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #ffffff;
}

.employee-print-table th,
.employee-print-table td {
  border: 1px solid #9ca3af;
  padding: 5px 6px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.employee-print-table th {
  background: #e5e7eb;
  font-weight: 700;
  text-align: left;
}

.employee-print-table th:nth-child(1),
.employee-print-table td:nth-child(1) {
  width: 14%;
}

.employee-print-table th:nth-child(2),
.employee-print-table td:nth-child(2) {
  width: 16%;
}

.employee-print-table th:nth-child(3),
.employee-print-table td:nth-child(3) {
  width: 10%;
}

.employee-print-table th:nth-child(4),
.employee-print-table td:nth-child(4) {
  width: 9%;
}

.employee-print-table th:nth-child(5),
.employee-print-table td:nth-child(5) {
  width: 7%;
}

.employee-print-table th:nth-child(6),
.employee-print-table td:nth-child(6) {
  width: 11%;
}

.employee-print-table th:nth-child(7),
.employee-print-table td:nth-child(7) {
  width: 8%;
}

.employee-print-table th:nth-child(8),
.employee-print-table td:nth-child(8) {
  width: 8%;
}

.employee-print-table th:nth-child(9),
.employee-print-table td:nth-child(9) {
  width: 17%;
}

@page {
  size: Letter landscape;
  margin: 0.35in;
}

@media print {
  .employee-print-body {
    background: #fff !important;
    color: #000 !important;
    font-size: 9pt;
  }

  .no-print {
    display: none !important;
  }

  .print-page {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  table.employee-print-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .employee-print-table th,
  .employee-print-table td {
    border: 1px solid #444;
    padding: 4px 5px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
  }

  .employee-print-table th {
    font-weight: 700;
    background: #eeeeee !important;
  }

  .employee-print-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

