/* ===== Holiday Retirement — shared styles ===== */
:root {
  --teal:        #0c7b87;
  --teal-grad-a: #0e8190;
  --teal-grad-b: #0a6f7b;
  --teal-active: #0a6b76;
  --teal-text:   #16808c;
  --orange:      #e8732a;
  --orange-hover:#d9651d;
  --bg:          #f1f1f3;
  --card:        #ffffff;
  --ink:         #3a3a3c;
  --ink-soft:    #5a5a5c;
  --muted:       #9b9b9d;
  --label:       #b6b6b8;
  --line:        #e6e6e8;
  --line-soft:   #efeff1;
  --good:        #5e9440;
  --problem:     #e8a23c;
  --critical:    #b22433;
  --score:       #f0a828;
  --section-grn: #6e9b4a;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

/* ===== App shell ===== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px;
  flex: 0 0 256px;
  background: linear-gradient(180deg, var(--teal-grad-a), var(--teal-grad-b));
  color: #fff;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* ===== Topbar ===== */
.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px 0 38px;
  position: sticky;
  top: 0;
  z-index: 30;
  flex: 0 0 64px;
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.breadcrumb a { color: var(--teal-text); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--muted); }
.breadcrumb .current { color: var(--muted); }
.userbox {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 16px; cursor: pointer; position: relative;
  user-select: none;
}
.userbox .uname { font-weight: 400; color: var(--muted); white-space: nowrap; }
.userbox svg { stroke: var(--muted); }
.userbox .avatar { width: 24px; height: 24px; flex: 0 0 24px; }
.userbox .chev { width: 18px; height: 18px; flex: 0 0 18px; margin-left: 6px; }
.user-menu {
  position: absolute; top: 52px; right: 0;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 150px; padding: 6px 0; z-index: 40; display: none;
}
.user-menu.open { display: block; }
.user-menu a { display: block; padding: 9px 20px; font-size: 15px; color: var(--ink); }
.user-menu a:hover { background: var(--line-soft); }

/* ===== Content ===== */
.content { padding: 30px 40px 60px; flex: 1 1 auto; width: 100%; max-width: 1480px; margin: 0 auto; box-sizing: border-box; animation: hr-page-in .45s cubic-bezier(.22,.61,.36,1) both; }

/* subtle page-load entrance, applied to every page */
@keyframes hr-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .content { animation: none; }
}
.page-title { font-size: 28px; font-weight: 500; color: var(--ink); margin: 6px 0 26px; letter-spacing: .2px; }

/* ===== Sidebar logo + nav ===== */
.logo-wrap { padding: 30px 26px 26px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.16); margin-bottom: 6px; }
.logo-wrap svg { width: 200px; height: auto; }
.logo-wrap .logo-img { width: 100%; max-width: 188px; height: auto; display: block; margin: 0 auto; }
.nav-group { padding: 0 0 4px; }
.nav-heading {
  font-size: 12px; letter-spacing: 1.4px; color: rgba(255,255,255,.55);
  padding: 22px 30px 12px; text-transform: uppercase; font-weight: 500;
}
.nav-divider { height: 1px; background: rgba(255,255,255,.16); margin: 6px 30px 0; }
.nav-item {
  display: flex; align-items: center; gap: 18px;
  padding: 15px 30px; color: rgba(255,255,255,.92); font-size: 17px;
  border-left: 4px solid transparent; cursor: pointer;
}
.nav-item svg { width: 24px; height: 24px; flex: 0 0 24px; stroke: #fff; opacity: .95; }
.nav-item:hover { background: rgba(0,0,0,.08); }
.nav-item.active {
  background: var(--teal-active);
  border-left-color: var(--orange);
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 1px 12px rgba(0,0,0,.04);
}
.card-pad { padding: 26px 30px 30px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange); color: #fff; border: none;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  padding: 12px 22px; cursor: pointer; letter-spacing: .2px; border-radius: 8px;
}
.btn:hover { background: var(--orange-hover); }
.btn-lg { font-size: 16px; padding: 13px 26px; }
.btn-sm { font-size: 13px; padding: 8px 16px; font-weight: 600; }
.btn:disabled, .btn.is-disabled { background: #d8d8da; color: #fff; cursor: not-allowed; }

/* ===== Text links (in-content) ===== */
/* System rule: orange is for CTAs (buttons). Teal is the interactive color for text links & icons. */
.link-orange { color: var(--teal-text); font-size: 16px; }
.link-orange:hover { text-decoration: underline; }
.link-teal { color: var(--teal-text); font-size: 16px; }
.link-teal:hover { text-decoration: underline; }

/* ===== Status chips ===== */
.chip-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: .3px;
  padding: 5px 13px; border-radius: 999px; white-space: nowrap;
}
.chip-soft.good     { color: var(--good);      background: rgba(94,148,64,.14); }
.chip-soft.problem  { color: #b9791f;           background: rgba(232,162,60,.18); }
.chip-soft.critical { color: var(--critical);   background: rgba(178,36,51,.12); }
.chip-soft.open     { color: var(--teal-text);  background: rgba(22,128,140,.13); }
.chip-soft.closed   { color: var(--muted);      background: rgba(155,155,157,.16); }
.chip-soft.pending  { color: var(--orange);     background: rgba(232,115,42,.13); }
.chip-solid.good     { color: #fff; background: var(--good); }
.chip-solid.problem  { color: #fff; background: var(--problem); }
.chip-solid.critical { color: #fff; background: var(--critical); }
.chip-solid.open     { color: #fff; background: var(--teal); }
.chip-solid.closed   { color: #fff; background: #b6b6b8; }
.chip-solid.pending  { color: #fff; background: var(--orange); }

/* ===== Toggle (textless pill) ===== */
.toggle {
  position: relative; width: 60px; height: 34px; border: none; cursor: pointer;
  border-radius: 17px; background: var(--teal); padding: 0;
  display: flex; align-items: center; transition: background .18s;
}
.toggle .knob {
  position: absolute; right: 4px; width: 26px; height: 26px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: left .18s, right .18s;
}
.toggle .txt { display: none; }
.toggle.off { background: #c4c4c6; }
.toggle.off .knob { right: auto; left: 4px; }

/* ===== Status text ===== */
.st-good { color: var(--good); }
.st-problem { color: var(--problem); }
.st-critical { color: var(--critical); }

/* ===== Tables (generic) ===== */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  text-align: left; font-size: 12px; letter-spacing: .8px; color: var(--label);
  font-weight: 500; text-transform: uppercase; padding: 0 18px 14px;
}

/* scrollbar polish */
.sidebar::-webkit-scrollbar { width: 0; }

/* ===== Motion — subtle fade on every interactive state ===== */
.btn,
.link-orange, .link-teal, .breadcrumb a,
.nav-item,
.user-menu a,
.userbox svg, .userbox, .chev,
.tbl tbody tr, .ar-tbl tbody tr,
.row-card, .comm-row, .mgmt-row,
.actions svg, .act-edit, .act-del,
.edit-pencil, .edit-pencil svg,
.delete-link, .mgmt-row .name,
.card-close, .card-close svg,
.modal-x,
.sec-h .edit svg,
.chip-pill,
input, textarea, select {
  transition: background-color .2s ease, color .2s ease, stroke .2s ease,
              box-shadow .2s ease, border-color .2s ease, fill .2s ease,
              transform .12s ease, opacity .2s ease;
}
/* button press feedback */
.btn:active { transform: translateY(1px); }
/* radios / checkboxes settle smoothly */
input[type="radio"], input[type="checkbox"] { transition: box-shadow .15s ease; }
/* dropdown menu fade */
.user-menu {
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease; display: block;
  visibility: hidden;
}
.user-menu.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ===== Popovers ===== */
.pop {
  position: absolute; top: -6px; right: calc(100% + 8px); left: auto; width: 280px; z-index: 30;
  background: #fff; box-shadow: 0 6px 26px rgba(0,0,0,.18); padding: 16px 18px;
  font-size: 14px; color: var(--ink-soft); line-height: 1.45;
  opacity: 0; pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.li.has-pop:hover .pop { opacity: 1; pointer-events: auto; transform: translateX(0); }
.pop.problem  { border-left: 5px solid var(--problem); }
.pop.critical { border-left: 5px solid var(--critical); }
.pop .lbl { font-weight: 700; color: var(--ink); display: block; margin: 0 0 2px; }
.pop .lbl + div { margin-bottom: 12px; }
