﻿:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #17221d;
  --muted: #68756f;

  --brand: #244f3c;
  --brand-deep: #193b2d;
  --brand-soft: #e7f0eb;

  --border: #dce4df;

  --sidebar-width: 260px;

  --shadow:
    0 8px 26px
    rgba(22, 44, 34, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    Inter,
    "Segoe UI",
    Arial,
    Helvetica,
    sans-serif;

  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}


/* -------------------------------------------------------
   Application shell
------------------------------------------------------- */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    var(--sidebar-width)
    minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;

  position: sticky;
  top: 0;

  display: flex;
  flex-direction: column;

  padding: 22px 16px 18px;

  background:
    linear-gradient(
      180deg,
      var(--brand-deep),
      var(--brand)
    );

  color: white;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;

  padding:
    0 8px 22px;

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.13);
}

.brand-mark {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border:
    1px solid
    rgba(255, 255, 255, 0.28);

  border-radius: 12px;

  background:
    rgba(255, 255, 255, 0.1);

  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 24px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-product {
  margin-top: 2px;
  font-size: 12px;
  color:
    rgba(255, 255, 255, 0.72);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;

  margin-top: 18px;
}

.nav-group-label {
  margin:
    18px 10px
    7px;

  color:
    rgba(255, 255, 255, 0.5);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item {
  min-height: 40px;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 9px 11px;

  border-radius: 9px;

  color:
    rgba(255, 255, 255, 0.8);

  text-decoration: none;

  font-size: 13px;
  font-weight: 500;

  transition:
    background 120ms ease,
    color 120ms ease;
}

.nav-item:hover {
  background:
    rgba(255, 255, 255, 0.08);

  color: white;
}

.nav-item.active {
  background:
    rgba(255, 255, 255, 0.14);

  color: white;
}

.nav-icon {
  width: 18px;
  display: inline-grid;
  place-items: center;

  opacity: 0.82;
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 8px 0;
}

.environment-pill {
  display: inline-flex;

  padding:
    6px 9px;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.1);

  color:
    rgba(255, 255, 255, 0.78);

  font-size: 11px;
}

.sidebar-version {
  margin-top: 10px;

  color:
    rgba(255, 255, 255, 0.46);

  font-size: 11px;
}


/* -------------------------------------------------------
   Header / workspace
------------------------------------------------------- */

.app-main {
  min-width: 0;
}

.app-header {
  min-height: 86px;

  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  padding:
    18px 28px;

  border-bottom:
    1px solid
    var(--border);

  background:
    rgba(255, 255, 255, 0.94);

  backdrop-filter: blur(12px);
}

.app-header h1 {
  margin:
    3px 0 0;

  font-size: 24px;
  font-weight: 700;
}

.eyebrow {
  color: var(--muted);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-state {
  display: flex;
  align-items: center;
  gap: 7px;

  color: var(--muted);

  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;

  border-radius: 999px;

  background: #c59545;
}

.icon-button {
  min-width: 42px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding:
    0 10px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background: white;

  color: var(--brand);

  text-decoration: none;

  font-size: 11px;
  font-weight: 700;
}

.workspace {
  padding:
    26px 28px
    42px;
}

.workspace-section {
  display: none;
}

.workspace-section.active {
  display: block;
}


/* -------------------------------------------------------
   Dashboard
------------------------------------------------------- */

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;

  padding:
    28px 30px;

  border:
    1px solid
    var(--border);

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      white,
      #f2f7f4
    );

  box-shadow: var(--shadow);
}

.welcome-panel h2 {
  margin:
    5px 0 8px;

  font-size: 27px;
}

.welcome-panel p {
  max-width: 700px;

  margin: 0;

  color: var(--muted);

  line-height: 1.55;
}

.welcome-badge {
  width: 68px;
  height: 68px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border-radius: 50%;

  background: var(--brand);

  color: white;

  font-size: 20px;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  margin:
    28px 0
    14px;
}

.section-heading h2 {
  margin:
    3px 0 4px;

  font-size: 20px;
}

.section-heading p {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
}

.metric-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 14px;
}

.metric-card,
.panel {
  border:
    1px solid
    var(--border);

  background:
    var(--surface);

  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 132px;

  padding: 18px;

  border-radius: 14px;
}

.metric-label {
  color: var(--muted);

  font-size: 12px;
  font-weight: 600;
}

.metric-value {
  margin-top: 14px;

  font-size: 29px;
  font-weight: 700;

  letter-spacing: -0.025em;
}

.metric-detail {
  margin-top: 8px;

  color: var(--muted);

  font-size: 11px;
}

.content-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;

  margin-top: 14px;
}

.panel {
  border-radius: 14px;
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 14px;
}

.panel-header h3 {
  margin: 0;

  font-size: 15px;
}

.panel-header p {
  margin:
    4px 0 0;

  color: var(--muted);

  font-size: 11px;
}

.empty-state {
  display: grid;
  place-items: center;

  min-height: 120px;

  padding: 22px;

  border:
    1px dashed
    #ccd8d1;

  border-radius: 12px;

  background:
    var(--surface-soft);

  color: var(--muted);

  text-align: center;

  font-size: 12px;
}

.empty-state.large {
  min-height: 340px;
}


/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */

@media (
  max-width: 1100px
) {

  :root {
    --sidebar-width: 220px;
  }

  .metric-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


@media (
  max-width: 760px
) {

  .app-shell {
    display: block;
  }

  .sidebar {
    min-height: auto;
    position: static;
  }

  .nav {
    display: grid;

    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .nav-group-label {
    grid-column: 1 / -1;
  }

  .sidebar-footer {
    display: none;
  }

  .app-header {
    position: static;

    padding:
      16px 18px;
  }

  .session-state {
    display: none;
  }

  .workspace {
    padding:
      18px;
  }

  .welcome-panel {
    align-items: flex-start;
  }

  .welcome-badge {
    display: none;
  }

  .metric-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

}


/* -------------------------------------------------------
   Authentication / session
------------------------------------------------------- */

.user-session {
  display: flex;
  align-items: center;
  gap: 9px;

  min-width: 170px;
}

.user-avatar {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border-radius: 50%;

  background:
    var(--brand-soft);

  color:
    var(--brand);

  font-size: 11px;
  font-weight: 700;
}

.user-copy {
  min-width: 0;
}

.user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  color: var(--ink);

  font-size: 12px;
  font-weight: 700;
}

.user-role {
  margin-top: 2px;

  color: var(--muted);

  font-size: 10px;
}

.logout-button {
  width: auto;

  margin-left: 4px;

  padding:
    7px 9px;

  border:
    1px solid
    var(--border);

  border-radius: 7px;

  background: white;

  color: var(--muted);

  cursor: pointer;

  font-size: 10px;
}

.logout-button:hover {
  color: var(--brand);

  border-color:
    #b9cbc1;
}


.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: grid;
  place-items: center;

  padding: 24px;

  background:
    rgba(17, 32, 25, 0.58);

  backdrop-filter:
    blur(7px);

  transition:
    opacity 150ms ease;
}

.login-overlay.hidden {
  display: none;
}

.login-card {
  width: min(
    420px,
    100%
  );

  padding:
    30px;

  border:
    1px solid
    rgba(255, 255, 255, 0.3);

  border-radius: 18px;

  background: white;

  box-shadow:
    0 26px 70px
    rgba(14, 28, 21, 0.28);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;

  padding-bottom: 22px;

  border-bottom:
    1px solid
    var(--border);
}

.login-brand-mark {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background:
    var(--brand);

  color: white;

  font-family:
    Georgia,
    serif;

  font-size: 23px;
  font-weight: 700;
}

.login-brand-name {
  color:
    var(--brand-deep);

  font-size: 17px;
  font-weight: 700;
}

.login-brand-product {
  margin-top: 2px;

  color: var(--muted);

  font-size: 11px;
}

.login-heading {
  margin:
    24px 0 20px;
}

.login-heading h2 {
  margin: 0;

  font-size: 23px;
}

.login-heading p {
  margin:
    7px 0 0;

  color: var(--muted);

  font-size: 12px;
}

.field-label {
  display: block;

  margin:
    14px 0 6px;

  color:
    #46534d;

  font-size: 11px;
  font-weight: 700;
}

.login-card input {
  width: 100%;

  padding:
    11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  outline: none;

  background: white;

  color: var(--ink);
}

.login-card input:focus {
  border-color:
    #87a899;

  box-shadow:
    0 0 0 3px
    rgba(62, 112, 87, 0.11);
}

.primary-button {
  width: 100%;

  border: 0;

  border-radius: 9px;

  background:
    var(--brand);

  color: white;

  cursor: pointer;

  font-weight: 700;
}

.primary-button:hover {
  background:
    var(--brand-deep);
}

.primary-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.login-submit {
  margin-top: 18px;

  padding:
    11px 14px;
}

.login-error {
  min-height: 17px;

  margin-top: 9px;

  color: #9b2f2f;

  font-size: 11px;
}

.login-footer {
  margin-top: 22px;

  color:
    #89958f;

  text-align: center;

  font-size: 10px;
}


@media (
  max-width: 760px
) {

  .user-copy,
  .logout-button {
    display: none;
  }

  .user-session {
    min-width: auto;
  }

}


/* -------------------------------------------------------
   Live dashboard data
------------------------------------------------------- */

.dashboard-list {
  display: grid;
  gap: 7px;
}

.dashboard-row {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding:
    12px 13px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background:
    var(--surface-soft);

  text-align: left;
}

.dashboard-row-button {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.dashboard-row-button:hover {
  border-color:
    #b9cbc1;

  background:
    #f3f8f5;
}

.dashboard-row-main {
  min-width: 0;
}

.dashboard-row-title {
  color: var(--ink);

  font-size: 12px;
  font-weight: 700;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-row-copy {
  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-row-side {
  display: flex;
  align-items: center;
  gap: 9px;

  flex: 0 0 auto;
}

.dashboard-row-date {
  color: var(--muted);
  font-size: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;

  padding:
    4px 7px;

  border-radius: 999px;

  font-size: 9px;
  font-weight: 700;
}

.status-badge.success {
  background: #dff1e6;
  color: #23633f;
}

.status-badge.warning {
  background: #f8ecd5;
  color: #8a5b16;
}

.status-badge.neutral {
  background: #e9edeb;
  color: #5e6964;
}

.metric-positive {
  color: #276846;
}

.metric-negative {
  color: #a33f36;
}

.error-state {
  color: #9b2f2f;
  background: #fff8f7;
  border-color: #ebcfcb;
}


@media (
  max-width: 760px
) {

  .dashboard-row {
    align-items: flex-start;
  }

  .dashboard-row-side {
    flex-direction: column;
    align-items: flex-end;
  }

}


/* -------------------------------------------------------
   Management modules
------------------------------------------------------- */

.module-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 14px;
}

.module-search {
  flex: 1 1 420px;
  max-width: 520px;
}

.module-search input,
.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background: white;

  color: var(--ink);

  padding:
    9px 10px;

  outline: none;
}

.module-search input:focus,
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color:
    #87a899;

  box-shadow:
    0 0 0 3px
    rgba(62, 112, 87, 0.1);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.primary-action,
.secondary-action,
.text-button {
  width: auto;

  border: 0;

  cursor: pointer;

  font: inherit;
}

.primary-action {
  padding:
    9px 13px;

  border-radius: 8px;

  background:
    var(--brand);

  color: white;

  font-size: 11px;
  font-weight: 700;
}

.primary-action:hover {
  background:
    var(--brand-deep);
}

.secondary-action {
  padding:
    9px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background: white;

  color: var(--ink);

  font-size: 11px;
}

.text-button {
  padding: 0;

  background: transparent;

  color: var(--brand);

  font-size: 11px;
  font-weight: 700;
}

.module-stat-row {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 10px;

  margin-bottom: 14px;
}

.module-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding:
    12px 14px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background:
    var(--surface);
}

.module-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.module-stat strong {
  color: var(--ink);
  font-size: 18px;
}

.module-table-panel {
  padding: 0;
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;

  border-collapse:
    collapse;

  font-size: 11px;
}

.data-table th {
  padding:
    11px 13px;

  border-bottom:
    1px solid
    var(--border);

  background:
    #f7f9f8;

  color:
    var(--muted);

  text-align: left;

  font-size: 9px;
  font-weight: 700;

  letter-spacing:
    0.06em;

  text-transform:
    uppercase;
}

.data-table td {
  padding:
    12px 13px;

  border-bottom:
    1px solid
    #edf1ef;

  vertical-align:
    middle;
}

.data-table tbody tr:hover {
  background:
    #fafcfb;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-primary {
  color: var(--ink);
  font-weight: 700;
}

.table-secondary {
  margin-top: 3px;

  color: var(--muted);

  font-size: 9px;
}

.table-action-cell {
  width: 55px;
  text-align: right;
}

.table-empty {
  padding: 32px !important;

  color: var(--muted);

  text-align: center;
}


/* -------------------------------------------------------
   Modal / detail view
------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;

  display: grid;
  place-items: center;

  padding: 24px;

  background:
    rgba(16, 31, 24, 0.5);

  backdrop-filter:
    blur(5px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width:
    min(
      720px,
      100%
    );

  max-height:
    calc(100vh - 48px);

  overflow-y: auto;

  padding: 24px;

  border-radius: 16px;

  background: white;

  box-shadow:
    0 28px 80px
    rgba(14, 28, 21, 0.28);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  padding-bottom: 16px;

  border-bottom:
    1px solid
    var(--border);
}

.modal-header h2 {
  margin:
    4px 0 0;

  font-size: 21px;
}

.modal-close {
  width: 32px;
  height: 32px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background: white;

  color: var(--muted);

  cursor: pointer;

  font-size: 20px;
}

.modal-form {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 13px;

  margin-top: 18px;
}

.modal-form label {
  display: grid;
  gap: 6px;

  color:
    #46534d;

  font-size: 10px;
  font-weight: 700;
}

.modal-form-full {
  grid-column:
    1 / -1;
}

.modal-form textarea {
  min-height: 85px;
  resize: vertical;
}

.modal-check {
  display: flex !important;
  flex-direction: row;
  align-items: center;

  font-weight: 500 !important;
}

.modal-check input {
  width: auto;
}

.form-error {
  min-height: 15px;

  color: #9b2f2f;

  font-size: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  margin-top: 18px;
}

.detail-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 10px;

  margin-top: 18px;
}

.detail-field {
  padding: 12px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background:
    var(--surface-soft);
}

.detail-field > span:first-child {
  display: block;

  margin-bottom: 6px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 700;

  text-transform:
    uppercase;

  letter-spacing:
    0.05em;
}

.detail-field strong {
  font-size: 12px;
}

.detail-block {
  margin-top: 18px;
}

.detail-block h3 {
  margin:
    0 0 8px;

  font-size: 13px;
}

.detail-block p {
  margin: 0;

  color:
    #4d5b54;

  font-size: 11px;
  line-height: 1.55;
}

.detail-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 8px;
}

.detail-block-header h3 {
  margin: 0;
}

.detail-list {
  display: grid;
  gap: 7px;
}

.detail-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 10px 11px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);

  font-size: 11px;
}

.detail-contact {
  color: var(--muted);
  font-size: 10px;
}


@media (
  max-width: 760px
) {

  .module-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .module-search {
    max-width: none;
  }

  .toolbar-actions {
    justify-content: flex-end;
  }

  .module-stat-row {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .modal-form {
    grid-template-columns: 1fr;
  }

  .modal-form-full {
    grid-column: auto;
  }

  .detail-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


/* -------------------------------------------------------
   Projects / opportunities
------------------------------------------------------- */

.toolbar-select {
  width: auto;

  min-width: 145px;

  padding:
    8px 10px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background: white;

  color: var(--ink);

  font-size: 11px;
}

.project-workspace-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 18px;

  padding:
    14px 15px;

  border:
    1px solid
    var(--border);

  border-radius: 11px;

  background:
    linear-gradient(
      135deg,
      #f7faf8,
      #edf4f0
    );
}

.project-workspace-label {
  color:
    var(--brand);

  font-size: 12px;
  font-weight: 700;
}

.project-workspace-meta {
  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;
}

.scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding:
    11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);

  cursor: pointer;
}

.scope-row:hover {
  border-color:
    #b9cbc1;

  background:
    #f2f7f4;
}

.scope-row-side {
  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--muted);

  font-size: 10px;
}

.compact-empty {
  min-height: 82px;
}


@media (
  max-width: 760px
) {

  .toolbar-select {
    width: 100%;
  }

  .scope-row {
    align-items: flex-start;
  }

  .scope-row-side {
    flex-direction: column;
    align-items: flex-end;
  }

}


/* -------------------------------------------------------
   Scope workspace
------------------------------------------------------- */

.scope-financial-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 9px;

  margin-top: 10px;
}

.scope-financial-card {
  padding: 11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    #fafcfb;
}

.scope-financial-card span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;

  letter-spacing:
    0.05em;

  text-transform:
    uppercase;
}

.scope-financial-card strong {
  color: var(--ink);

  font-size: 12px;
}

.interactive-row {
  cursor: pointer;
}

.interactive-row:hover {
  border-color:
    #b9cbc1;

  background:
    #f2f7f4;
}

.form-hint {
  color: var(--muted);

  font-size: 9px;
}


@media (
  max-width: 760px
) {

  .scope-financial-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


/* -------------------------------------------------------
   Billing / receivables
------------------------------------------------------- */

.billing-metric-grid {
  margin-bottom: 16px;
}

.billing-tabs {
  display: flex;
  gap: 3px;

  margin-bottom: 14px;

  padding: 4px;

  width: fit-content;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    #f6f8f7;
}

.billing-tab {
  padding:
    7px 12px;

  border: 0;

  border-radius: 6px;

  background:
    transparent;

  color: var(--muted);

  cursor: pointer;

  font-size: 10px;
  font-weight: 700;
}

.billing-tab.active {
  background: white;

  color: var(--brand);

  box-shadow:
    0 1px 4px
    rgba(20, 40, 30, 0.08);
}

.status-badge.danger {
  background:
    #fbe8e6;

  color:
    #9a3029;
}

.invoice-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin-top: 18px;

  padding:
    13px 14px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background:
    var(--surface-soft);
}

.invoice-financial-grid {
  display: grid;

  grid-template-columns:
    repeat(
      6,
      minmax(0, 1fr)
    );

  gap: 8px;

  margin-top: 10px;
}

.invoice-financial-grid > div {
  padding: 11px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background: white;
}

.invoice-financial-grid span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;

  text-transform:
    uppercase;

  letter-spacing:
    0.04em;
}

.invoice-financial-grid strong {
  font-size: 12px;
}

.invoice-balance {
  background:
    #eef5f1 !important;

  border-color:
    #c4d8cd !important;
}

.invoice-line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding:
    10px 11px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background:
    var(--surface-soft);
}

.invoice-line-amount {
  flex: 0 0 auto;

  color: var(--ink);

  font-weight: 700;
}

.migration-note,
.billing-history-note {
  margin-top: 16px;

  padding:
    13px 14px;

  border:
    1px solid
    #d9d3b7;

  border-radius: 10px;

  background:
    #fcfaef;
}

.migration-note strong,
.billing-history-note strong {
  color:
    #635b32;

  font-size: 11px;
}

.migration-note p,
.billing-history-note p {
  margin:
    5px 0 0;

  color:
    #716a49;

  font-size: 10px;

  line-height: 1.5;
}

.billing-history-note {
  margin:
    18px;
}

.payment-balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 18px;

  padding:
    13px 14px;

  border:
    1px solid
    #c4d8cd;

  border-radius: 10px;

  background:
    #eef5f1;
}

.payment-balance-banner span {
  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
}

.payment-balance-banner strong {
  font-size: 18px;

  color: var(--brand);
}


@media (
  max-width: 900px
) {

  .invoice-financial-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

}


@media (
  max-width: 600px
) {

  .invoice-financial-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


/* -------------------------------------------------------
   Invoice creation / line management
------------------------------------------------------- */

.invoice-starting-line {
  margin-top: 4px;

  padding: 14px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background:
    var(--surface-soft);
}

.invoice-line-form-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 12px;
}

.invoice-line-form-grid label {
  display: grid;
  gap: 6px;
}

.invoice-line-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.line-delete-button {
  width: 24px;
  height: 24px;

  border:
    1px solid
    #e1c3c0;

  border-radius: 6px;

  background:
    #fff8f7;

  color:
    #9a3029;

  cursor: pointer;

  font-size: 15px;
  line-height: 1;
}

.line-delete-button:hover {
  background:
    #fbe8e6;
}


@media (
  max-width: 760px
) {

  .invoice-line-form-grid {
    grid-template-columns:
      1fr;
  }

}


/* -------------------------------------------------------
   Costs / travel / expenses
------------------------------------------------------- */

.costs-tabs {
  margin-top: 16px;
}

.cost-register-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;
}

.register-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  padding:
    14px 15px;

  border-bottom:
    1px solid
    var(--border);
}

.register-heading h3 {
  margin: 0;

  font-size: 13px;
}

.register-heading p {
  margin:
    3px 0 0;

  color: var(--muted);

  font-size: 9px;
}

.register-heading > strong {
  color: var(--brand);

  font-size: 15px;
}

.approval-card-list {
  display: grid;

  gap: 8px;

  padding: 14px;
}

.approval-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  width: 100%;

  padding:
    12px 13px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background: white;

  color: var(--ink);

  cursor: pointer;

  text-align: left;
}

.approval-card:hover {
  border-color:
    #b8cbc0;

  background:
    #f5f9f7;
}

.approval-card strong {
  display: block;

  font-size: 11px;
}

.approval-card span {
  display: block;

  margin-top: 3px;

  color: var(--muted);

  font-size: 9px;
}


@media (
  max-width: 1100px
) {

  .cost-register-grid {
    grid-template-columns:
      1fr;
  }

}


/* -------------------------------------------------------
   Travel voucher review
------------------------------------------------------- */

.expense-review-lines {
  margin-top: 18px;
}

.expense-review-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding:
    11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.expense-review-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.expense-review-controls select,
.expense-review-controls input {
  width: 112px;

  padding:
    6px 7px;

  border:
    1px solid
    var(--border);

  border-radius: 6px;

  background: white;

  font-size: 10px;
}

.review-action-form {
  margin-top: 18px;
}


@media (
  max-width: 760px
) {

  .expense-review-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .expense-review-controls {
    width: 100%;
  }

}


/* -------------------------------------------------------
   Employees / Paychex
------------------------------------------------------- */

.unmatched-panel {
  margin-top: 14px;
}

input[type="file"] {
  font-size: 10px;
}


/* -------------------------------------------------------
   Cash / compensation
------------------------------------------------------- */

.cash-analysis-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;
}

.cash-analysis-wide {
  grid-column:
    1 / -1;
}

.finance-breakdown {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 9px;

  padding: 14px;
}

.finance-breakdown > div {
  padding:
    11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.finance-breakdown span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;

  letter-spacing:
    0.04em;

  text-transform:
    uppercase;
}

.finance-breakdown strong {
  font-size: 12px;
}

.cash-setup-note,
.compensation-data-note {
  margin: 14px;
}

.compensation-principles {
  display: grid;
  gap: 9px;

  padding: 14px;
}

.compensation-principles > div {
  padding:
    11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.compensation-principles strong {
  display: block;

  margin-bottom: 3px;

  color: var(--brand);

  font-size: 11px;
}

.compensation-principles span {
  color: var(--muted);

  font-size: 9px;
}


@media (
  max-width: 900px
) {

  .cash-analysis-grid {
    grid-template-columns:
      1fr;
  }

  .cash-analysis-wide {
    grid-column: auto;
  }

  .finance-breakdown {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

}


/* -------------------------------------------------------
   Finance policy controls
------------------------------------------------------- */

.policy-total {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding:
    12px 13px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.policy-total span {
  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
}

.policy-total strong {
  color: var(--brand);

  font-size: 16px;
}


/* -------------------------------------------------------
   Reports / Administration
------------------------------------------------------- */

.report-control-panel {
  margin-bottom: 14px;
}

.report-controls {
  display: grid;

  grid-template-columns:
    minmax(220px, 2fr)
    minmax(140px, 1fr)
    minmax(140px, 1fr)
    auto;

  gap: 10px;

  align-items: end;

  padding: 14px;
}

.report-controls label {
  display: grid;
  gap: 5px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 700;
}

.report-controls select,
.report-controls input {
  width: 100%;

  padding: 8px 9px;

  border:
    1px solid
    var(--border);

  border-radius: 7px;

  background: white;

  font-size: 10px;
}

.report-summary-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(150px, 1fr)
    );

  gap: 9px;

  padding: 14px;
}

.report-summary-card {
  padding: 11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.report-summary-card span,
.report-values-grid span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;

  letter-spacing: .04em;

  text-transform: uppercase;
}

.report-summary-card strong,
.report-values-grid strong {
  font-size: 12px;
}

.report-values-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(170px, 1fr)
    );

  gap: 9px;

  padding: 14px;
}

.report-values-grid > div {
  padding: 11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.report-table-wrap {
  max-height: 540px;
}

.reference-data-list {
  display: grid;
  gap: 12px;

  padding: 14px;
}

.reference-data-group {
  padding: 11px 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.reference-data-group > strong {
  display: block;

  margin-bottom: 8px;

  font-size: 10px;
}

.reference-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.reference-chip-list span {
  padding:
    4px 7px;

  border:
    1px solid
    var(--border);

  border-radius: 999px;

  background: white;

  color: var(--muted);

  font-size: 8px;
}


@media (
  max-width: 800px
) {

  .report-controls {
    grid-template-columns:
      1fr;
  }

}


/* -------------------------------------------------------
   Argus brand logo
------------------------------------------------------- */

.brand-logo {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  object-fit: cover;

  border-radius: 8px;

  display: block;
}

.login-brand-logo {
  width: 46px;
  height: 46px;

  flex: 0 0 46px;

  object-fit: cover;

  border-radius: 9px;

  display: block;
}


/* -------------------------------------------------------
   Argus brand logo
------------------------------------------------------- */

.brand-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.login-brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}


/* Contract Documents UI */

.contract-document-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  margin-bottom: 10px;
}

.contract-document-heading h3 {
  margin: 0 0 4px;
}

.contract-document-heading p {
  margin: 0;

  color: var(--muted);

  font-size: 10px;
}

.contract-document-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.contract-document-list {
  display: grid;
  gap: 8px;
}

.contract-document-empty {
  padding: 18px;

  border:
    1px dashed
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);

  color: var(--muted);

  font-size: 11px;
  text-align: center;
}

.contract-document-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  padding: 12px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background: white;
}

.contract-document-main {
  min-width: 0;
}

.contract-document-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.contract-document-title-row strong {
  font-size: 12px;
}

.contract-document-primary {
  padding:
    2px 6px;

  border:
    1px solid
    #bfd4c8;

  border-radius: 999px;

  background:
    #eef5f1;

  color:
    var(--brand-deep);

  font-size: 8px;
  font-weight: 800;

  text-transform:
    uppercase;

  letter-spacing:
    0.04em;
}

.contract-document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;

  margin-top: 5px;

  color: var(--muted);

  font-size: 9px;
}

.contract-document-source {
  margin-top: 4px;

  color:
    #55645d;

  font-size: 9px;
}

.contract-document-notes {
  margin-top: 6px;

  color:
    #4d5b54;

  font-size: 10px;
  line-height: 1.45;
}

.contract-document-actions {
  display: flex;
  align-items: center;
  gap: 10px;

  flex-shrink: 0;
}

.contract-document-delete {
  width: auto;

  padding: 0;

  border: 0;

  background:
    transparent;

  color:
    #9b2f2f;

  cursor: pointer;

  font: inherit;
  font-size: 10px;
  font-weight: 700;
}

.contract-document-delete:hover {
  text-decoration:
    underline;
}

.contract-document-help {
  color: var(--muted);

  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}

.contract-document-primary-check {
  align-self: end;

  min-height: 37px;
}

@media (
  max-width: 760px
) {
  .contract-document-heading,
  .contract-document-row {
    flex-direction: column;
  }

  .contract-document-heading-actions,
  .contract-document-actions {
    width: 100%;
    justify-content: flex-start;
  }
}


/* Travel Voucher Supporting Documents */

.voucher-expense-document-list {
  display: grid;
  gap: 10px;
}

.voucher-expense-card {
  padding: 12px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  background: white;
}

.voucher-expense-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.voucher-supporting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-top: 12px;
  padding-top: 9px;

  border-top:
    1px solid
    var(--border);

  color: var(--muted);

  font-size: 9px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voucher-document-list {
  display: grid;
  gap: 6px;

  margin-top: 7px;
}

.voucher-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 8px 9px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background:
    var(--surface-soft);
}

.voucher-document-main {
  min-width: 0;
}

.voucher-document-main strong {
  display: block;

  overflow-wrap: anywhere;

  font-size: 10px;
}

.voucher-document-meta {
  margin-top: 3px;

  color: var(--muted);

  font-size: 8px;
}

.voucher-document-notes {
  margin-top: 4px;

  color:
    #4d5b54;

  font-size: 9px;
  line-height: 1.4;
}

.voucher-document-actions {
  display: flex;
  align-items: center;
  gap: 9px;

  flex-shrink: 0;
}

.voucher-document-empty {
  padding: 8px 9px;

  border:
    1px dashed
    var(--border);

  border-radius: 7px;

  color: var(--muted);

  font-size: 9px;
}

.voucher-document-delete {
  width: auto;

  padding: 0;

  border: 0;

  background: transparent;

  color: #9b2f2f;

  cursor: pointer;

  font: inherit;
  font-size: 9px;
  font-weight: 700;
}

.voucher-document-delete:hover {
  text-decoration: underline;
}

.voucher-document-summary-copy {
  margin:
    -3px 0 9px !important;
}

.voucher-document-summary {
  display: grid;
  gap: 6px;
}

.voucher-document-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 9px 10px;

  border:
    1px solid
    var(--border);

  border-radius: 8px;

  background:
    var(--surface-soft);
}

.voucher-document-summary-row strong {
  font-size: 10px;
}

.voucher-document-expense-context {
  display: flex;
  flex-direction: column;
  gap: 4px;

  margin-top: 16px;
  padding: 11px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);

  font-size: 10px;
}

.voucher-document-expense-context span {
  color: var(--muted);
}

.voucher-review-document-line {
  align-items: flex-start;
}

.voucher-review-line-main {
  flex: 1;
  min-width: 0;
}

@media (
  max-width: 760px
) {
  .voucher-expense-card-heading,
  .voucher-document-row,
  .voucher-document-summary-row,
  .voucher-review-document-line {
    flex-direction: column;
    align-items: stretch;
  }

  .voucher-document-actions {
    justify-content: flex-start;
  }
}


/* User Account Administration */

.user-admin-panel {
  margin-bottom: 16px;
}

.user-admin-password-required {
  display: inline-block;

  padding: 3px 7px;

  border-radius: 999px;

  background:
    #fff4de;

  color:
    #84591c;

  font-size: 8px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-admin-credential-card {
  display: grid;
  gap: 12px;

  margin-top: 18px;
}

.user-admin-credential-card > div {
  padding: 13px;

  border:
    1px solid
    var(--border);

  border-radius: 9px;

  background:
    var(--surface-soft);
}

.user-admin-credential-card span {
  display: block;

  margin-bottom: 6px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-admin-credential-card strong {
  font-size: 12px;
}

.user-admin-password-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.user-admin-password-value code {
  overflow-wrap: anywhere;

  font-size: 14px;
  font-weight: 700;
}

/* Role-aware navigation */
.nav-item[hidden] {
  display: none !important;
}
