/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --navy-900: #16324a;
  --navy-800: #1e4266;
  --navy-700: #2a5580;
  --navy-100: #dce9f5;
  --cream: #fdf3dd;
  --cream-deep: #f7e3b5;
  --amber: #b45309;
  --ink: #1c2733;
  --muted: #7d8b99;
  --line: #c9d6e2;
  --bg: #eef3f8;
  --white: #ffffff;
  --weekend: #e4e9ee;
  --weekend-text: #a5b1bc;
  --green: #157347;
  --red: #b3362b;

  --sidebar-w: 240px;
  --sidebar-w-collapsed: 70px;
  --header-h: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.shell {
  width: 100%;
  margin: 0;
  padding: 24px 32px 60px;
}

/* ---------- top banner ---------- */
.banner {
  background: var(--navy-900);
  color: var(--white);
  border-radius: 10px 10px 0 0;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.banner .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.banner .logo {
  height: 44px;
  width: auto;
  display: block;
}

.banner h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.banner .sub {
  font-size: 12px;
  color: var(--navy-100);
  margin-top: 3px;
}

/* ---------- project tabs ---------- */
.tabs {
  background: var(--navy-800);
  padding: 10px 16px 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.tab {
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px 8px 0 0;
  background: var(--navy-700);
  color: var(--navy-100);
}

.tab.active {
  background: var(--white);
  color: var(--navy-900);
}

.tab-add {
  background: transparent;
  border: 1px dashed var(--navy-100);
  color: var(--navy-100);
  border-radius: 8px 8px 0 0;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 0;
}

.tab-add:hover { background: var(--navy-700); }

.tab[draggable="true"] { cursor: -webkit-grab; cursor: grab; }
.tab.dragging { opacity: 0.4; }

/* ---------- panel ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 20px;
}

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

.week-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy-900);
  color: var(--white);
  border-radius: 8px;
  padding: 8px 12px;
}

.week-nav .label {
  font-size: 14px;
  font-weight: 700;
  min-width: 200px;
  text-align: center;
}

.icon-btn {
  background: var(--navy-700);
  color: var(--white);
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
}

.icon-btn:hover { background: var(--navy-800); }

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--navy-100);
  border-radius: 8px;
  padding: 4px;
}

.view-toggle button {
  border: none;
  background: transparent;
  color: var(--navy-800);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.view-toggle button.active {
  background: var(--navy-900);
  color: var(--white);
}

.view-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  font-style: italic;
}

/* ---------- read-only hour cell (team-member edit window, All tab) ---------- */
.hour-readonly {
  display: block;
  width: 100%;
  padding: 9px 4px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.hour-readonly.has-value { color: var(--ink); font-weight: 600; }

/* ---------- login ---------- */
.login-card {
  max-width: 340px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.login-card h2 {
  font-size: 18px;
  color: var(--navy-900);
}

.login-hint {
  font-size: 13px;
  color: var(--muted);
}

.login-card input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.login-card input:focus { outline: 2px solid var(--navy-700); }

.login-error {
  color: var(--red);
  font-size: 13px;
}

.login-notice {
  color: var(--green);
  font-size: 13px;
}

.login-switch {
  background: transparent;
  border: none;
  color: var(--navy-700);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

/* ---------- role badge / logout ---------- */
.role-badge {
  background: var(--navy-700);
  color: var(--navy-100);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 999px;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--navy-100);
  color: var(--navy-100);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-logout:hover { background: var(--navy-700); }

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

.btn {
  border: none;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary { background: var(--navy-800); color: var(--white); }
.btn-primary:hover { background: var(--navy-900); }
.btn-ghost {
  background: var(--white);
  color: var(--navy-800);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--navy-100); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid #ecc8c4; }
.btn-danger:hover { background: #fdf0ee; }

/* ---------- grid table ---------- */
.grid-wrap { overflow-x: auto; }

table.grid {
  border-collapse: collapse;
  width: 100%;
  min-width: 860px;
}

.grid th, .grid td {
  border: 1px solid var(--line);
  font-size: 13px;
}

.grid thead th {
  background: var(--navy-800);
  color: var(--white);
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.grid thead th.member-col { text-align: left; padding-left: 12px; min-width: 160px; max-width: 200px; width: 160px; }
.grid thead th.weekend-head { background: #55636f; color: #cfd7dd; }
.grid thead th.total-head { background: var(--navy-900); }

.grid td.member-cell {
  padding: 6px 12px;
  font-weight: 600;
  background: var(--navy-100);
  white-space: nowrap;
}

.member-cell .remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  margin-left: 8px;
  visibility: hidden;
}

tr:hover .member-cell .remove { visibility: visible; }
.member-cell .remove:hover { color: var(--red); }

.grid td.hour-cell { padding: 0; text-align: center; width: 72px; position: relative; }

.standoff-btn {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 10px;
  line-height: 16px;
  border-radius: 4px;
  opacity: 0.35;
  cursor: pointer;
}
.standoff-btn:hover { opacity: 1; background: var(--navy-100); }
.standoff-btn.has-note { opacity: 0.9; }
.standoff-btn.has-note::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

/* Hours typed but not yet saved — a Stand-off note is required first,
   see needsNote/setHour in TimeTracker.jsx. */
.standoff-btn.needs-note { opacity: 1; }
.standoff-btn.needs-note::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.hour-cell.needs-note { box-shadow: inset 0 0 0 2px var(--red); }

.standoff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 50, 74, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.standoff-modal {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(22, 50, 74, 0.25);
}
.standoff-modal h3 { margin: 0 0 4px; font-size: 15px; color: var(--navy-900); }
.standoff-hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.standoff-hint.required { color: var(--red); font-weight: 600; }
.standoff-modal textarea {
  width: 100%;
  border: 1px solid var(--navy-100);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.standoff-modal textarea:focus { outline: 2px solid var(--navy-700); outline-offset: -1px; }
.standoff-modal textarea[readonly] { background: var(--weekend); color: var(--muted); }
.standoff-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.hour-cell input {
  width: 100%;
  border: none;
  padding: 9px 4px;
  text-align: center;
  font-size: 13px;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
}

.hour-cell input:focus {
  outline: 2px solid var(--navy-700);
  outline-offset: -2px;
  background: #f2f8ff;
}

.hour-cell input::placeholder { color: #c3ccd4; }

.hour-cell.weekend { background: var(--weekend); }
.hour-cell.weekend input { color: var(--weekend-text); }

.hour-cell.editable { background: #eaf6ec; }
.hour-cell.editable input { color: var(--green); font-weight: 600; }
.hour-cell.editable input:not(:placeholder-shown) { color: var(--ink); }

/* Approved leave takes priority over the normal hour input/readonly cell. */
.hour-cell.on-leave { background: var(--navy-100); }
.on-leave-label {
  display: block;
  padding: 9px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--navy-700);
}

/* A past weekday with no hours logged and no leave on file. */
.hour-cell.missed { background: #fdeceb; }
.hour-cell.missed .hour-readonly { color: var(--red); font-weight: 600; }

.grid td.row-total {
  background: var(--cream);
  font-weight: 700;
  text-align: center;
  padding: 9px 6px;
  width: 84px;
}

.grid tfoot td {
  background: var(--cream);
  font-weight: 700;
  text-align: center;
  padding: 10px 6px;
  border-top: 2px solid var(--navy-900);
}

.grid tfoot td.foot-label {
  text-align: left;
  padding-left: 12px;
  color: var(--amber);
}

.grid tfoot td.grand {
  color: var(--amber);
  font-size: 14px;
  background: var(--cream-deep);
}

/* ---------- add member row ---------- */
.add-member {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.add-member input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  min-width: 220px;
  font-family: inherit;
}

.add-member input:focus { outline: 2px solid var(--navy-700); }

.add-member select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  min-width: 220px;
  font-family: inherit;
  background: var(--white);
}

.add-member select:focus { outline: 2px solid var(--navy-700); }

.member-picker-empty {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- member management ---------- */
.member-form {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.member-form h3 {
  font-size: 15px;
  color: var(--navy-900);
  margin-bottom: 10px;
}

.member-form-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.member-form-grid input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  min-width: 160px;
  font-family: inherit;
}

.member-form-grid input:focus { outline: 2px solid var(--navy-700); }

.member-unlinked {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}

.currency-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.exchange-rate-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--navy-100);
  border-radius: 8px;
  font-size: 13px;
  color: var(--navy-900);
}

.member-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.grid th.num-cell,
.grid td.num-cell {
  text-align: right;
}

/* Member Management's table — a bit more breathing room than the default
   timesheet grid, since several columns stack a currency-sub line under
   the main value. */
.member-table td {
  padding: 12px 8px;
  vertical-align: middle;
}
.member-table td.member-cell {
  padding: 12px 12px;
}

.row-icon-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.row-icon-btn:hover { background: var(--navy-100); color: var(--navy-900); }
.row-icon-btn.danger:hover { background: #fdf0ee; color: var(--red); }

/* ---------- empty state ---------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 14px;
}

.saved-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

@media (max-width: 640px) {
  .week-nav .label { min-width: 0; font-size: 12px; }
  .banner h1 { font-size: 16px; }
}

/* ============================================================
   App shell: sidebar + topbar layout
   ============================================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- sidebar ---------- */

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy-900);
  color: var(--navy-100);
  display: flex;
  flex-direction: column;
  transition: width 200ms ease;
  z-index: 40;
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  min-height: var(--header-h);
}

.sidebar-logo-img {
  height: 32px;
  width: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-logo-text { overflow: hidden; }

.sidebar-logo-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--white);
  white-space: nowrap;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: var(--navy-100);
  white-space: nowrap;
}

.sidebar.collapsed .sidebar-logo-text { display: none; }

.sidebar-mobile-close {
  display: none;
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--navy-100);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}

.sidebar-mobile-close:hover { background: var(--navy-800); }

.sidebar-nav {
  flex: 1 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-bottom {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item,
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--navy-100);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: background 180ms ease, color 180ms ease;
  font-family: inherit;
}

.sidebar-item svg,
.sidebar-collapse-btn svg { flex-shrink: 0; }

.sidebar-item:hover,
.sidebar-collapse-btn:hover { background: var(--navy-800); color: var(--white); }

.sidebar-item.active {
  background: var(--white);
  color: var(--navy-900);
}

.sidebar-item.danger:hover { background: #5c2620; color: #ffd9d3; }

.sidebar-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-item,
.sidebar.collapsed .sidebar-collapse-btn {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .sidebar-item-label { display: none; }

.sidebar-item:focus-visible,
.sidebar-collapse-btn:focus-visible,
.hamburger-btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Tooltip shown only when the sidebar is collapsed (desktop) */
.sidebar.collapsed [data-tooltip]:hover::after,
.sidebar.collapsed [data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
}

.sidebar-collapse-btn { color: var(--navy-100); }

/* ---------- mobile drawer + backdrop ---------- */

.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.25);
  }

  .sidebar.collapsed { width: 240px; }
  .sidebar.collapsed .sidebar-item-label,
  .sidebar.collapsed .sidebar-logo-text { display: flex; flex-direction: column; }
  .sidebar.collapsed .sidebar-logo-sub { display: block; }
  .sidebar.collapsed .sidebar-item,
  .sidebar.collapsed .sidebar-collapse-btn { justify-content: flex-start; padding: 10px 12px; }

  .sidebar.mobile-open { transform: translateX(0); }

  .sidebar-mobile-close { display: inline-flex; }
  .sidebar-collapse-btn { display: none; }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 32, 0.5);
    z-index: 39;
  }
}

/* ---------- topbar + content ---------- */

.app-main {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--navy-900);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}

.hamburger-btn:hover { background: var(--navy-100); }

.topbar-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-user {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.month-hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-800);
  background: var(--navy-100);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .month-hours-badge { display: none; }
}

.content { padding: 24px 32px 60px; }

@media (max-width: 900px) {
  .hamburger-btn { display: inline-flex; }
  .topbar-user { display: none; }
}

@media (max-width: 640px) {
  .content { padding: 16px 16px 40px; }
  .topbar { padding: 0 14px; }
}

/* ============================================================
   Projects module
   ============================================================ */

.back-link { margin-bottom: 14px; }

.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: var(--navy-100); }
.clickable-row td.member-cell { background: transparent; }
.clickable-row:hover td.member-cell { background: var(--navy-100); }

.summary-card { margin-bottom: 16px; }

.summary-title {
  font-size: 20px;
  color: var(--navy-900);
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.summary-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.summary-item.over-budget {
  background: #fdeceb;
  border-color: #ecc8c4;
}
.summary-item.over-budget .summary-value { color: var(--red); }

.summary-item.under-budget {
  background: #eaf6ec;
  border-color: #c7e6cd;
}
.summary-item.under-budget .summary-value { color: var(--green); }

/* Projects list table cells (Budget / Consumed Budget columns) */
.grid td.over-budget { background: #fdeceb; color: var(--red); font-weight: 700; }
.grid td.under-budget { background: #eaf6ec; color: var(--green); font-weight: 700; }

.summary-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-item select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  background: var(--white);
}

.btn-small { padding: 4px 8px; font-size: 11px; }

.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge.status-not_started { background: var(--navy-100); color: var(--navy-800); }
.status-badge.status-active { background: #d9f2e3; color: var(--green); }
.status-badge.status-done { background: var(--cream-deep); color: var(--amber); }
.status-badge.status-overdue { background: #fdeceb; color: var(--red); }

/* Project status */
.status-badge.status-on_hold { background: var(--cream); color: var(--amber); }

.status-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-badge.status-draft { background: var(--navy-100); color: var(--navy-800); }
.status-badge.status-closed { background: var(--weekend); color: var(--muted); }
.status-badge.status-archived { background: var(--weekend); color: var(--muted); font-style: italic; }

.status-badge.status-in_progress { background: var(--cream); color: var(--amber); }
.status-badge.status-submitted { background: var(--navy-100); color: var(--navy-700); }
.status-badge.status-manager_reviewed { background: var(--cream-deep); color: var(--amber); }
.status-badge.status-completed { background: #d9f2e3; color: var(--green); }

/* Leave Management module */
.status-badge.status-pending { background: var(--cream); color: var(--amber); }
.status-badge.status-approved { background: #d9f2e3; color: var(--green); }
.status-badge.status-rejected { background: #fdeceb; color: var(--red); }
.status-badge.status-cancelled { background: var(--weekend); color: var(--muted); }
.status-badge.status-emergency { background: #fdeceb; color: var(--red); font-size: 10px; padding: 2px 7px; }

.leave-balance-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--navy-100);
  overflow: hidden;
  margin-top: 6px;
}
.leave-balance-bar-fill { height: 100%; background: var(--navy-800); border-radius: 999px; }
.leave-balance-bar-fill.low { background: var(--amber); }
.leave-balance-bar-fill.critical { background: var(--red); }

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.panel-header h2, .panel-header h3 { margin: 0; }

.rating-scale {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.rating-option {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy-800);
  font-weight: 700;
  cursor: pointer;
}

.rating-option:hover { background: var(--navy-100); }
.rating-option.selected { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

.yes-no-toggle {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.yes-no-toggle button {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy-800);
  font-weight: 600;
  cursor: pointer;
}

.yes-no-toggle button:hover { background: var(--navy-100); }
.yes-no-toggle button.selected { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

.notification-bell {
  position: relative;
}

.notification-bell-btn {
  display: inline-flex;
  background: transparent;
  border: none;
  color: var(--navy-900);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  position: relative;
}

.notification-bell-btn:hover { background: var(--navy-100); }

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.4;
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(22, 50, 74, 0.15);
  z-index: 30;
}

.notification-item {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--navy-100); }
.notification-item.unread { background: var(--cream); font-weight: 600; }

.milestone-form { padding: 20px; background: var(--bg); border-radius: 10px; margin-bottom: 16px; }

.milestone-form-section { margin-bottom: 16px; }
.milestone-form-section:last-of-type { margin-bottom: 0; }

.milestone-form-grid-main {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  grid-gap: 14px;
  gap: 14px;
}

.milestone-form-grid-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

@media (max-width: 900px) {
  .milestone-form-grid-main { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

.milestone-form-section input,
.milestone-form-section textarea,
.milestone-form-section select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  background: var(--white);
}

.milestone-form-section textarea { resize: vertical; }

.milestone-form-section input:focus,
.milestone-form-section textarea:focus,
.milestone-form-section select:focus { outline: 2px solid var(--navy-700); }

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

/* Read-only appraisal question/answer (AssignmentFillForm) — the label
   keeps the small-caps treatment, but the answer itself needs normal
   case/weight and room to wrap long free-text responses, so it's a
   sibling rather than nested inside .field-label. */
.question-readonly { margin-bottom: 16px; }
.question-readonly-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin-bottom: 8px;
}
.question-readonly-answer {
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  color: var(--ink);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
}
.question-readonly-answer.empty { color: var(--muted); font-style: italic; }
.question-readonly-answer.compact {
  display: inline-block;
  background: var(--navy-100);
  color: var(--navy-800);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.member-estimate-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-estimate-input {
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
}

.member-estimate-input:focus { outline: 2px solid var(--navy-700); }

.milestone-table th,
.milestone-table td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }

.milestone-table tbody tr:hover td { background: #f5f9fc; }
.milestone-table tbody tr:hover td.member-cell { background: var(--navy-100); }

.notes-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

/* Shows the full comments/detail text (no truncation, no hover tooltip
   needed) — used by the milestone list, where cutting the text off was
   hiding content the user needs to see at a glance. Styled as a distinct
   content block (not just plain muted text) so two adjacent long-text
   columns stay visually separated and readable at a glance. */
.notes-cell.expand {
  max-width: 300px;
  min-width: 200px;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.notes-cell.expand.empty {
  color: var(--muted);
  font-style: italic;
  background: transparent;
  border-style: dashed;
}

.assigned-chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.assigned-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--navy-100);
  color: var(--navy-800);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.assigned-chip b { color: var(--navy-900); }
.assigned-chip b.over-estimate { color: var(--red); }
.assigned-chip b.under-estimate { color: var(--green); }

.chip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip-lock-badge {
  font-size: 11px;
  line-height: 1;
}

.chip-edit-btn {
  border: none;
  background: transparent;
  color: var(--navy-700);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  line-height: 1;
}

.chip-edit-btn:hover { color: var(--navy-900); }

/* ---------- rich text (milestone Detail / Comments) ---------- */

.richtext-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
  /* Reset — this sits inside a .field-label, whose uppercase/bold/
     letter-spacing styling would otherwise cascade into every typed
     character in the toolbar and editor below. */
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
}

.richtext-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.richtext-toolbar button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy-800);
  border-radius: 6px;
  min-width: 28px;
  height: 26px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.richtext-toolbar button:hover { background: var(--navy-100); }

.richtext-toolbar-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  margin: 2px 2px;
}

.richtext-heading-select {
  align-self: center;
  line-height: normal;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 4px 6px;
  cursor: pointer;
}

.richtext-color-input {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

.richtext-input {
  min-height: 90px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 400;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  outline: none;
}

.richtext-input:focus { background: #f2f8ff; }

.richtext-input:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.richtext-input p { margin: 0 0 8px; }
.richtext-input p:last-child { margin-bottom: 0; }
.richtext-input ul, .richtext-input ol { margin: 0 0 8px 20px; }
.richtext-input h1, .richtext-input h2, .richtext-input h3 { margin: 0 0 8px; color: var(--navy-900); }
.richtext-input a { color: var(--navy-700); }
.richtext-input hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.richtext-input blockquote {
  border-left: 3px solid var(--line);
  padding-left: 10px;
  color: var(--muted);
  margin: 0 0 8px;
}

/* Read-only rendering — used by the milestone table and anywhere else
   milestone Detail/Comments are shown, so formatting always looks the same
   as it did in the editor. */
.richtext-content { line-height: 1.55; }
.richtext-content p { margin: 0 0 8px; }
.richtext-content p:last-child { margin-bottom: 0; }
.richtext-content h1, .richtext-content h2, .richtext-content h3 { margin: 0 0 8px; color: var(--navy-900); }
.richtext-content ul, .richtext-content ol { margin: 0 0 8px 20px; }
.richtext-content a { color: var(--navy-700); }
.richtext-content hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.richtext-content blockquote {
  border-left: 3px solid var(--line);
  padding-left: 10px;
  color: var(--muted);
  margin: 0 0 8px;
}

.richtext-empty { color: var(--muted); font-style: italic; }

