/* New Day Consulting Group house style. */

:root {
  --navy: #0D1B2A;
  --rust: #C4632A;
  --cream: #F5F0E8;
  --green: #2E7D52;
  --grid: #e6e9ec;
  --axis: #9aa7b2;
  --white: #ffffff;
  --danger: #a12d22;
}

* { box-sizing: border-box; }

/*
 * The app hides things with the `hidden` attribute, but an author `display`
 * rule beats the browser default for [hidden]. Anything given display: flex
 * below would otherwise stay on screen while marked hidden.
 */
[hidden] { display: none !important; }

body {
  margin: 0;
  padding: 24px 20px 40px;
  background: var(--cream);
  color: var(--navy);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.wrap { max-width: 1240px; margin: 0 auto; }

/* Header ------------------------------------------------------------------ */

.cf-header {
  background: var(--navy);
  color: var(--cream);
  border-radius: 10px;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.cf-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.cf-header p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--axis);
}

.cf-header-who { display: flex; align-items: center; gap: 10px; }

.cf-header-who label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--axis);
  white-space: nowrap;
}

.cf-header-who input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(245, 240, 232, 0.35);
  color: var(--cream);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  font-family: inherit;
  min-width: 180px;
}

.cf-header-who input::placeholder { color: var(--axis); }

.cf-header-who input:focus {
  outline: none;
  border-color: var(--rust);
  background: rgba(255, 255, 255, 0.14);
}

/* Tabs -------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 4px;
  margin: 16px 0 18px;
  border-bottom: 2px solid var(--grid);
}

.tab {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--axis);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 10px 18px;
  cursor: pointer;
}

.tab:hover { color: var(--navy); }

.tab.is-active {
  color: var(--navy);
  border-bottom-color: var(--rust);
}

/* Cards ------------------------------------------------------------------- */

.cf-card {
  background: var(--white);
  border: 1px solid var(--navy);
  border-radius: 10px;
  padding: 18px 20px 20px;
  margin-bottom: 18px;
}

.cf-card h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rust);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-head h2 { margin: 0; border-bottom: none; padding-bottom: 0; }

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

.hint {
  margin: -4px 0 14px;
  font-size: 12.5px;
  color: var(--axis);
}

.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
}

/* Forms ------------------------------------------------------------------- */

.entry-form,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.inline-form {
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--grid);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 150px;
  min-width: 0;
}

.field-date { flex: 0 0 150px; }
.field-hours { flex: 0 0 130px; }
.field-loe { flex: 0 0 150px; }
.field-client { flex: 1 1 180px; }
.field-project { flex: 1 1 200px; }
.field-desc { flex: 2 1 240px; }
.field-submit { flex: 0 0 auto; display: flex; flex-direction: row; gap: 8px; }

.field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.field .opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--axis);
}

.inline-add {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--rust);
  padding: 0;
}

input[type="text"],
input[type="date"],
input[type="number"],
select {
  font-family: inherit;
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--grid);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  height: 36px;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 2px rgba(196, 99, 42, 0.15);
}

select:disabled { background: var(--cream); color: var(--axis); }

.filters select {
  width: auto;
  min-width: 130px;
  max-width: 220px;
  background: var(--cream);
}

/* Inline panel (add a project while logging time) -------------------------- */

.inline-panel {
  margin-top: 16px;
  padding: 14px 16px 4px;
  background: var(--cream);
  border: 1px dashed var(--rust);
  border-radius: 8px;
}

.inline-panel-head {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--navy);
}

.inline-panel .inline-form { border-bottom: none; padding-bottom: 12px; margin-bottom: 0; }

/* Buttons ----------------------------------------------------------------- */

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  padding: 0 16px;
  height: 36px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary { background: var(--rust); border-color: var(--rust); color: var(--white); }
.btn-primary:hover { background: #ab5423; border-color: #ab5423; }

.btn-ghost { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--cream); }

.btn-link {
  background: none;
  border: none;
  padding: 0 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--axis);
  cursor: pointer;
}

.btn-link:hover { color: var(--rust); text-decoration: underline; }
.btn-link.danger:hover { color: var(--danger); }

/* House table ------------------------------------------------------------- */

.ndc-sum { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.3; }

.ndc-sum thead th {
  background: var(--navy);
  color: var(--cream);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: left;
  padding: 6px 8px;
  white-space: nowrap;
}

.ndc-sum thead tr th:first-child { border-top-left-radius: 6px; }
.ndc-sum thead tr th:last-child { border-top-right-radius: 6px; }
.ndc-sum thead tr:last-child th { border-bottom: 2px solid var(--rust); }

.ndc-sum tbody td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--grid);
  vertical-align: top;
}

.ndc-sum tbody tr:hover { background: var(--cream); }

.ndc-sum tfoot th {
  padding: 6px 8px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-top: 2px solid var(--navy);
  text-align: left;
  color: var(--navy);
}

.ndc-sum .num, .ndc-sum tfoot .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ndc-sum .col-date { width: 78px; }
.ndc-sum .col-actions { width: 104px; text-align: right; }
.ndc-sum .col-share { width: 190px; }
.ndc-sum td.col-actions { text-align: right; white-space: nowrap; }

/* The description is the substance of an entry, so it shows in full. */
.ndc-sum td.desc {
  color: #46586b;
  min-width: 260px;
  max-width: 620px;
  line-height: 1.3;
  padding-top: 4px;
  padding-bottom: 4px;
}

.desc-wrap { position: relative; margin: 0; }

.desc-text {
  display: block;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ndc-sum tr.archived td { color: var(--axis); }

/* Client grouping rows in the summary */
.ndc-sum tr.group-row td {
  background: var(--cream);
  font-weight: 700;
  border-bottom: 1px solid var(--axis);
}

.ndc-sum tr.group-row:hover td { background: #ede7dc; }
.ndc-sum td.indent { padding-left: 26px; }

.mine { font-weight: 600; }
.muted { color: var(--axis); font-size: 11.5px; }
.over-text { color: var(--danger); font-weight: 600; }

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 9px;
  white-space: nowrap;
}

.tag-active { background: rgba(46, 125, 82, 0.12); color: var(--green); }
.tag-archived { background: var(--grid); color: var(--axis); }

/* LOE bar ----------------------------------------------------------------- */

.col-share { white-space: nowrap; }

.bar {
  background: var(--grid);
  border-radius: 3px;
  height: 8px;
  width: 120px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--rust);
  border-radius: 3px;
}

.bar.done span { background: var(--green); }
.bar.over span { background: var(--danger); }

.pct {
  display: inline-block;
  margin-left: 8px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--axis);
  vertical-align: middle;
  min-width: 34px;
}

.pct.done { color: var(--green); font-weight: 600; }
.pct.over { color: var(--danger); font-weight: 700; }

/* Inline edit row --------------------------------------------------------- */

.edit-row td { background: var(--cream); }


/* Misc -------------------------------------------------------------------- */

.empty {
  margin: 14px 2px 2px;
  color: var(--axis);
  font-size: 13px;
  font-style: italic;
}


.foot-credit {
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  color: var(--axis);
  margin: 26px 0 0;
}

@media (max-width: 860px) {
  .ndc-sum td.desc, .ndc-sum th:nth-child(5) { display: none; }
  .cf-header-who { width: 100%; }
  .cf-header-who input { flex: 1; min-width: 0; }
  .tabs { overflow-x: auto; }
}

/* ======================================================================= */
/* Portal additions: gate, roles, statuses, notes                          */
/* ======================================================================= */

/* Sign in gate ------------------------------------------------------------ */

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card {
  background: var(--white);
  border: 1px solid var(--navy);
  border-radius: 10px;
  padding: 0 0 20px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.gate-head {
  background: var(--navy);
  color: var(--cream);
  padding: 22px 26px;
  margin-bottom: 22px;
}

.gate-head h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.gate-head p {
  margin: 2px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rust);
  font-weight: 600;
}

.gate-form { padding: 0 26px; }
.gate-form .field { margin-bottom: 14px; flex: none; }

.gate-note {
  margin: 0 0 16px;
  font-size: 13px;
  color: #46586b;
  line-height: 1.5;
}

.btn-block { width: 100%; margin-top: 4px; }

.gate-error {
  margin: 14px 0 0;
  padding: 9px 12px;
  border-radius: 6px;
  background: #fbeceb;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
}

.gate-credit {
  margin: 20px 26px 0;
  padding-top: 16px;
  border-top: 1px solid var(--grid);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--axis);
}

.hint-sm { font-size: 11.5px; color: var(--axis); }

/* Header user block ------------------------------------------------------- */

.cf-header-user {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.whoami {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(245, 240, 232, 0.15);
  color: var(--cream);
}

.role-badge.is-admin { background: var(--rust); color: var(--white); }

.btn-link.light { color: rgba(245, 240, 232, 0.75); }
.btn-link.light:hover { color: var(--cream); }

.btn-outline {
  background: transparent;
  border-color: rgba(245, 240, 232, 0.45);
  color: var(--cream);
}

.btn-outline:hover { background: rgba(245, 240, 232, 0.12); }

/* Status tags ------------------------------------------------------------- */

.tag-active { background: rgba(46, 125, 82, 0.12); color: var(--green); }
.tag-on-hold { background: rgba(196, 99, 42, 0.14); color: var(--rust); }
.tag-complete { background: rgba(13, 27, 42, 0.08); color: var(--navy); }
.tag-cancelled { background: var(--grid); color: var(--axis); }
.tag-admin { background: var(--rust); color: var(--white); }
.tag-member { background: rgba(13, 27, 42, 0.08); color: var(--navy); }

.ndc-sum tr.closed td { color: var(--axis); }
.muted-cell { color: #46586b; font-size: 12.5px; }

.field-role, .field-status { flex: 0 0 190px; }


/* Temp password callout --------------------------------------------------- */

.temp-password code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--white);
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 7px 12px;
  color: var(--navy);
  user-select: all;
}

@media (max-width: 860px) {
  .cf-header-user { width: 100%; justify-content: space-between; }
}

/* Adjustments and the date range filter ---------------------------------- */

.tag-adjust { background: rgba(13, 27, 42, 0.85); color: var(--cream); }

.ndc-sum tr.adjust-row td { background: rgba(13, 27, 42, 0.03); }
.ndc-sum tr.adjust-row:hover td { background: var(--cream); }

.date-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--axis);
  white-space: nowrap;
}

.date-filter input {
  width: auto;
  min-width: 140px;
  background: var(--cream);
}

.sub-head {
  margin: 26px 0 4px;
  padding-top: 18px;
  border-top: 1px solid var(--grid);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--navy);
}

.inline-form.no-rule { border-bottom: none; padding-bottom: 0; }

/* Billed marking ---------------------------------------------------------- */

.ndc-sum .col-billed { width: 52px; text-align: center; }
.ndc-sum td.col-billed { text-align: center; }

.ndc-sum td.col-billed input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
  margin: 0;
}

.ndc-sum tr.billed-row td { color: var(--axis); }
.ndc-sum tr.billed-row td.desc { color: var(--axis); }

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 9px 14px;
  background: var(--cream);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--navy);
}

.bulk-bar span { flex: 1 1 auto; font-weight: 600; }
.bulk-bar .btn { height: 32px; font-size: 12px; }

.tag-billed { background: rgba(46, 125, 82, 0.12); color: var(--green); }

/* Edit overlays ----------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  background: rgba(13, 27, 42, 0.55);
  overflow-y: auto;
}

.modal-card {
  background: var(--white);
  border: 1px solid var(--navy);
  border-radius: 10px;
  padding: 16px 18px 20px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 18px 50px rgba(13, 27, 42, 0.35);
}

.modal-card .field { margin-bottom: 14px; flex: none; }

.check-block {
  margin: 4px 0 14px;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  align-items: flex-start;
}

.check-block input { margin-top: 1px; accent-color: var(--rust); }

.modal-meta {
  margin: 0 0 16px;
  font-size: 11.5px;
  color: var(--axis);
}

.modal-error {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 6px;
  background: #fbeceb;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
}

.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

.assign-list {
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid var(--grid);
  border-radius: 6px;
  padding: 4px;
}

.assign-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.assign-row:hover { background: var(--cream); }
.assign-row input { accent-color: var(--rust); margin: 0; }
.assign-row.closed span { color: var(--axis); }
.assign-email { margin-left: auto; font-size: 11.5px; color: var(--axis); }

/* Descriptions are narrative work summaries, so they get room to breathe. */

textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--grid);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  min-height: 36px;
  line-height: 1.4;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 2px rgba(196, 99, 42, 0.15);
}



/* Descriptions are narrative work summaries, so they get room to breathe. */

textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--grid);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  min-height: 36px;
  line-height: 1.4;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--rust);
  box-shadow: 0 0 0 2px rgba(196, 99, 42, 0.15);
}



/* Notes on a description cell -------------------------------------------- */

.ndc-sum td.note-cell { cursor: pointer; position: relative; }


/* The corner flag a spreadsheet uses to say "there is a comment here". */
.ndc-sum td.note-cell.has-note::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 12px 12px 0;
  border-style: solid;
  border-color: transparent var(--rust) transparent transparent;
}


.ndc-sum tr.has-notes td { border-bottom: 1px solid var(--grid); }

.note-pop {
  position: fixed;
  z-index: 60;
  width: 380px;
  max-width: calc(100vw - 20px);
  background: var(--white);
  border: 1px solid var(--navy);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(13, 27, 42, 0.28);
  padding: 16px 18px 18px;
}

.note-pop-on {
  margin: 8px 0 10px;
  font-size: 11.5px;
  font-style: italic;
  color: var(--axis);
  line-height: 1.35;
}

.note-pop-thread { max-height: 260px; overflow-y: auto; margin-bottom: 10px; }
.note-pop-empty { margin: 0 0 4px; font-size: 12.5px; color: var(--axis); font-style: italic; }

.note-msg {
  border-left: 3px solid var(--grid);
  padding: 6px 0 6px 10px;
  margin-bottom: 9px;
}

.note-msg.from-admin { border-left-color: var(--rust); }
.note-msg.from-member { border-left-color: var(--green); }

.note-msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.note-msg-who { font-size: 12px; font-weight: 700; color: var(--navy); }
.note-msg-at { font-size: 11px; color: var(--axis); }
.note-msg-head .btn-link { margin-left: auto; font-size: 11px; }
.note-msg-body { font-size: 13px; line-height: 1.45; color: var(--navy); white-space: pre-wrap; }

#note-pop-form { display: flex; flex-direction: column; gap: 8px; }
#note-pop-form textarea { min-height: 54px; font-size: 13px; }
#note-pop-form .btn { align-self: flex-start; height: 32px; font-size: 12px; }

.note-pop-locked {
  margin: 0;
  font-size: 12px;
  color: var(--axis);
  font-style: italic;
}

/* Copying a description ---------------------------------------------------- */



.copy-btn {
  position: absolute;
  top: -2px;
  right: 0;
  background: var(--white);
  border: none;
  border-radius: 4px;
  padding: 2px;
  cursor: pointer;
  color: var(--axis);
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
  line-height: 0;
  box-shadow: -6px 0 6px -2px var(--white);
}

.note-cell.has-note .copy-btn { right: 13px; }

.copy-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ndc-sum td.note-cell:hover .copy-btn,
.copy-btn:focus-visible { opacity: 0.45; }

.ndc-sum td.note-cell:hover .copy-btn:hover { opacity: 1; color: var(--rust); }
.ndc-sum td.note-cell .copy-btn.copied { color: var(--green); opacity: 1; }

/* Keep the note marker clear of the copy button. */


/* Rows are taller now, so numbers and actions sit at the top of the row. */
.ndc-sum td.num, .ndc-sum td.col-actions, .ndc-sum td.col-billed { vertical-align: top; }

/* Tighter rows: buttons and links stop padding the line height out. */
.ndc-sum td .btn-link { padding: 0 4px; font-size: 11.5px; line-height: 1.3; }
.ndc-sum td.col-actions { white-space: nowrap; padding-top: 6px; }
.ndc-sum td.num { padding-top: 6px; }
.ndc-sum td.col-billed { padding-top: 6px; }
.ndc-sum td.col-billed input[type="checkbox"] { width: 14px; height: 14px; }
.ndc-sum .col-share { width: 165px; }
.ndc-sum .bar { width: 100px; }
.muted { font-size: 11px; }

/* Editing an entry: the whole row width, nothing clipped ------------------ */

.ndc-sum tr.edit-row td {
  background: var(--cream);
  padding: 0;
}

.edit-panel {
  padding: 14px 14px 16px;
  border-left: 3px solid var(--rust);
}

.edit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.edit-field > span {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--navy);
}

.edit-field input,
.edit-field select,
.edit-field textarea {
  height: 34px;
  font-size: 13px;
  background: var(--white);
}

.edit-static {
  height: 34px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.edit-person { flex: 0 0 150px; }
.edit-date   { flex: 0 0 160px; }
.edit-client { flex: 1 1 220px; }
.edit-project{ flex: 1 1 240px; }
.edit-hours  { flex: 0 0 130px; }

/* The description gets the full width and grows, since it is the long field. */
.edit-desc { display: flex; flex-direction: column; gap: 4px; }
.edit-desc textarea {
  height: auto;
  min-height: 120px;
  line-height: 1.45;
  resize: vertical;
}

.edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.edit-actions .btn { height: 34px; }

/* ======================================================================= */
/* One overlay language: gate, edit overlays, confirm, note popover        */
/* ======================================================================= */

/* Every floating surface shares this header: title left, close right,     */
/* rust rule underneath.                                                   */
.overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--rust);
}

.overlay-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--navy);
}

.overlay-close {
  background: none;
  border: none;
  font-size: 19px;
  line-height: 1;
  color: var(--axis);
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.12s ease;
}

.overlay-close:hover { color: var(--danger); }

.modal-card.is-narrow { max-width: 400px; }

.modal-message {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--navy);
}

/* A destructive confirm reads as destructive. */
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn-danger:hover { background: #8c261d; border-color: #8c261d; }

/* ======================================================================= */
/* One callout language: banners, flags, and inline notices               */
/* ======================================================================= */

.callout,
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 3px solid var(--axis);
  border-radius: 0 6px 6px 0;
  background: var(--cream);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--navy);
}

.callout p, .banner p { margin: 0; flex: 1 1 300px; }

.callout.is-ok    { border-left-color: var(--green); background: rgba(46, 125, 82, 0.08); }
.callout.is-warn  { border-left-color: var(--rust);  background: rgba(196, 99, 42, 0.08); }
.callout.is-error { border-left-color: var(--danger); background: #fbeceb; color: var(--danger); }

.banner { font-weight: 600; }
.banner.ok    { border-left-color: var(--green); background: rgba(46, 125, 82, 0.08); color: var(--green); }
.banner.error { border-left-color: var(--danger); background: #fbeceb; color: var(--danger); }

/* The generated password keeps its own emphasis inside the callout. */
.callout code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--white);
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 6px 11px;
  color: var(--navy);
  user-select: all;
}

/* The gate card follows the same rules, in its navy form. */
.gate-head { border-bottom: 2px solid var(--rust); }

/* Inline panels are callouts that happen to hold a form. */
.inline-panel {
  background: var(--cream);
  border: none;
  border-left: 3px solid var(--rust);
  border-radius: 0 6px 6px 0;
}

.inline-panel-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

/* Small explanatory blurbs read the same everywhere. */
.hint, .hint-sm, .modal-meta, .note-pop-empty, .note-pop-locked, .empty {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--axis);
}

.empty, .note-pop-empty, .note-pop-locked { font-style: italic; }

/* ======================================================================= */
/* Tooltips, in the house style rather than the browser's grey box         */
/* ======================================================================= */

[data-tip] { position: relative; }

[data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;

  width: max-content;
  max-width: 250px;
  padding: 7px 10px;

  background: var(--navy);
  color: var(--cream);
  border-radius: 6px;
  border-left: 3px solid var(--rust);
  box-shadow: 0 6px 18px rgba(13, 27, 42, 0.3);

  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0.1px;
  text-transform: none;
  text-align: left;
  white-space: normal;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0s linear 0.32s;
}

[data-tip]:hover::before,
[data-tip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.2s, 0s;
}

/* Anything hard against the right edge opens leftwards so it cannot clip. */
.ndc-sum td.num[data-tip]::before,
.ndc-sum td.col-billed[data-tip]::before,
.ndc-sum th.col-billed[data-tip]::before,
.copy-btn[data-tip]::before {
  left: auto;
  right: 0;
  transform: none;
}

/* A tall description cell anchors its tooltip above its first line. */
.ndc-sum td.note-cell[data-tip]::before {
  bottom: auto;
  top: -6px;
  transform: translate(-50%, -100%);
}
