/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #5d6b82;
  --line: #dce5ef;
  --paper: #ffffff;
  --surface: #eef5f6;
  --brand: #08786f;
  --brand-dark: #075e57;
  --blue: #2563eb;
  --rose: #c2415b;
  --gold: #bd7c18;
  --shadow: 0 24px 80px rgba(27, 48, 71, 0.14);
  --soft-shadow: 0 12px 34px rgba(27, 48, 71, 0.10);
  --panel-shadow: 0 16px 48px rgba(27, 48, 71, 0.12);
}

/* Polished application refresh */
:root {
  --ink: #132238;
  --muted: #607086;
  --line: #d8e2ea;
  --paper: #ffffff;
  --surface: #f3f7f8;
  --brand: #0b7f73;
  --brand-dark: #064b48;
  --blue: #2f6fd6;
  --rose: #bd3452;
  --gold: #c88a25;
  --shadow: 0 18px 52px rgba(21, 39, 58, 0.12);
  --soft-shadow: 0 10px 28px rgba(21, 39, 58, 0.09);
  --panel-shadow: 0 12px 34px rgba(21, 39, 58, 0.10);
}

body.app-body {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(230, 241, 242, 0.92)),
    var(--surface);
}

.app-shell {
  width: min(1360px, calc(100% - 28px));
  padding: 16px 0 32px;
}

.app-content {
  padding-left: 264px;
}

.sidebar {
  inset: 12px auto 12px 14px;
  width: 232px;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(8, 92, 84, 0.98), rgba(8, 53, 61, 0.98)),
    #08353d;
  box-shadow: 0 18px 44px rgba(8, 43, 50, 0.22);
}

.sidebar-brand {
  gap: 10px;
  padding: 2px 4px 8px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  box-shadow: 0 8px 18px rgba(8, 120, 111, 0.24);
}

.sidebar-nav {
  gap: 7px;
}

.sidebar-label {
  margin: 4px 8px 0;
  font-size: 0.7rem;
}

.side-link {
  min-height: 46px;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  font-weight: 840;
}

.side-icon,
.side-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 12px;
}

.sidebar-user {
  gap: 10px;
  padding: 11px;
  border-radius: 18px;
}

.sidebar-user-main {
  gap: 10px;
}

.sidebar-user strong {
  max-width: 126px;
  font-size: 0.92rem;
}

.sidebar-user small {
  font-size: 0.76rem;
}

.sidebar-verticals span {
  padding: 4px 7px;
  font-size: 0.68rem;
}

.sidebar-logout {
  min-height: 42px;
  font-size: 0.92rem;
}

.page-header,
.profile-identity,
.profile-vertical-card,
.metric,
.table-panel,
.empty-state,
.formula-panel {
  border-radius: 18px;
  border-color: rgba(216, 226, 234, 0.92);
  box-shadow: var(--panel-shadow);
}

.page-header {
  gap: 14px;
  margin-bottom: 12px;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 248, 0.96)),
    #fff;
}

.page-header h1 {
  font-size: clamp(1.9rem, 3.2vw, 3.05rem);
  line-height: 1.02;
}

.muted {
  margin-top: 5px;
}

.header-card {
  min-width: 190px;
  padding: 15px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #142135, #0b5250);
}

.header-card strong {
  font-size: 1.18rem;
}

.profile-panel {
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.64fr);
  gap: 10px;
  margin-bottom: 12px;
}

.profile-identity,
.profile-vertical-card {
  padding: 14px 16px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  font-size: 1.2rem;
  box-shadow: 0 10px 22px rgba(8, 120, 111, 0.20);
}

.profile-identity h2 {
  font-size: clamp(1.18rem, 2vw, 1.6rem);
}

.vertical-chip-list {
  gap: 6px;
}

.vertical-chip {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.toolbar {
  margin-bottom: 10px;
}

.filter-form {
  min-width: min(340px, 100%);
}

.action-plan-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  width: 100%;
}

.action-plan-filter-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.records-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.records-filter-toolbar .toolbar-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  min-width: 190px;
}

.records-filter-toolbar .secondary-button {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  white-space: nowrap;
}

.filter-label {
  margin: 0 0 6px 4px;
  font-size: 0.72rem;
}

.input,
.select {
  min-height: 46px;
  padding: 10px 16px;
}

.metric-grid {
  gap: 10px;
  margin-bottom: 10px;
}

.metric {
  min-height: 88px;
  padding: 14px 16px;
}

.metric::before {
  width: 5px;
}

.metric::after {
  right: -44px;
  top: -56px;
  width: 118px;
  height: 118px;
}

.metric span {
  font-size: 0.86rem;
}

.metric strong {
  font-size: clamp(1.34rem, 2vw, 1.82rem);
}

.submission-panel {
  margin-bottom: 14px;
}

.import-panel {
  margin-bottom: 14px;
}

.import-form {
  padding: 0 16px 16px;
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-info-upload-grid {
  grid-template-columns: minmax(280px, 640px);
}

.project-info-page-header {
  min-height: 124px;
  margin-bottom: 12px;
  padding: 24px 32px;
}

.project-info-page-header h1 {
  font-size: clamp(2.15rem, 4vw, 3rem);
}

.project-info-compact-panel {
  margin-bottom: 10px;
}

.project-info-compact-panel .table-heading {
  min-height: 46px;
  padding: 12px 18px 8px;
}

.project-info-compact-panel .table-heading h2 {
  font-size: 1.18rem;
}

.project-info-import-row {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto auto;
  align-items: end;
  gap: 10px;
  padding: 0 14px 12px;
}

.project-info-import-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.project-info-import-row .input {
  min-height: 40px;
  padding: 7px 10px;
}

.project-info-import-row .submit-plan-button,
.project-info-export-button {
  min-height: 40px;
  align-self: end;
}

.project-info-filter-panel {
  margin-bottom: 10px;
  padding: 14px 16px;
}

.project-info-filter-panel .budget-utilization-filter-form {
  gap: 14px;
}

.project-info-filter-panel .select {
  min-height: 42px;
}

.project-info-sheet-panel {
  overflow: hidden;
  margin-top: 8px;
}

.project-info-table-wrap {
  max-height: calc(100vh - 420px);
  min-height: 360px;
  overflow: auto;
  position: relative;
  isolation: isolate;
  border-top: 1px solid rgba(216, 226, 234, 0.9);
  background: linear-gradient(180deg, #f7fffd, #eefaf7);
}

.project-info-table {
  min-width: 2440px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.project-info-table th:nth-child(1),
.project-info-table td:nth-child(1) { width: 82px; }
.project-info-table th:nth-child(2),
.project-info-table td:nth-child(2) { width: 260px; }
.project-info-table th:nth-child(3),
.project-info-table td:nth-child(3) { width: 145px; }
.project-info-table th:nth-child(4),
.project-info-table td:nth-child(4) { width: 95px; }
.project-info-table th:nth-child(5),
.project-info-table td:nth-child(5) { width: 135px; }
.project-info-table th:nth-child(n+6):nth-child(-n+19),
.project-info-table td:nth-child(n+6):nth-child(-n+19) { width: 96px; }
.project-info-table th:nth-child(20),
.project-info-table td:nth-child(20) { width: 118px; }
.project-info-table th:nth-child(n+21),
.project-info-table td:nth-child(n+21) { width: 150px; }

.project-info-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 11px 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #08786f, #2563eb);
  background-clip: padding-box;
  border-bottom: 0;
  font-size: 0.72rem;
  line-height: 1.25;
}

.project-info-table th:first-child,
.project-info-table td:first-child {
  left: 0;
  position: sticky;
  background-clip: padding-box;
}

.project-info-table th:first-child {
  z-index: 8;
  background: linear-gradient(135deg, #064b48, #08786f);
  box-shadow: 10px 0 18px rgba(8, 45, 58, 0.12);
}

.project-info-table td:first-child {
  z-index: 4;
  background: #edfafa;
  box-shadow: 10px 0 18px rgba(8, 45, 58, 0.08);
}

.project-info-table td {
  height: 58px;
  padding: 10px 12px;
  vertical-align: middle;
  background: #ffffff;
  font-size: 0.84rem;
  line-height: 1.35;
}

.project-info-text-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info-text-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-info-table tbody tr:nth-child(odd) td {
  background: #f8fbff;
}

.project-info-table tbody tr:nth-child(odd) td:first-child {
  background: #e9f8f7;
}

.project-info-table tbody tr:hover td {
  background: #eefdf7;
}

.project-info-table tbody tr:hover td:first-child {
  background: #dff8f3;
}

.numeric-cell {
  text-align: right;
  white-space: nowrap;
  color: #075e57;
  font-weight: 800;
}

.import-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.report-master-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-master-card {
  min-width: 0;
  overflow: hidden;
}

.report-master-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 0 16px 14px;
}

.report-master-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.master-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 72px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(244, 248, 250, 0.7);
}

.approval-button-row,
.approval-return-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.approval-button-row {
  min-width: 360px;
}

.table-panel {
  border-radius: 18px;
}

.table-heading {
  gap: 12px;
  padding: 14px 16px;
}

.login-card h2,
.table-heading h2 {
  font-size: 1.28rem;
}

.table-search {
  width: min(260px, 42vw);
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.table-count,
.status-badge {
  min-height: 32px;
  padding: 7px 11px;
  font-size: 0.82rem;
}

table {
  min-width: 1040px;
}

th,
td {
  padding: 10px 12px;
}

th {
  font-size: 0.72rem;
  background: #f4f8fa;
}

td {
  font-size: 0.88rem;
}

.code-pill {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 0.8rem;
}

.fund-input,
.remark-input,
.summary-month-input {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 14px;
  font-size: 0.86rem;
}

.fund-input {
  width: 132px;
}

.summary-month-input {
  width: 116px;
}

.remark-input {
  width: 190px;
}

.fund-total-panel {
  gap: 10px;
  padding: 14px 16px;
}

.fund-total-panel div {
  min-height: 62px;
  padding: 11px 14px;
  border-radius: 16px;
}

.fund-total-panel strong {
  font-size: 1.08rem;
}

.submit-panel,
.approval-panel {
  padding: 14px 16px;
}

.submit-plan-button,
.return-button {
  min-height: 42px;
  min-width: 128px;
}

.overall-total-panel {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 18px;
}

.empty-state,
.formula-panel {
  padding: 24px;
}

.login-screen {
  min-height: calc(100vh - 32px);
}

.login-panel {
  width: min(980px, 100%);
  min-height: 540px;
  padding: 10px;
  border-radius: 42px;
  box-shadow: 0 26px 74px rgba(18, 48, 66, 0.15);
}

.login-copy {
  padding: clamp(28px, 5vw, 54px);
  border-radius: 34px 18px 18px 34px;
}

.login-card {
  padding: clamp(24px, 3.4vw, 38px);
  border-radius: 18px 34px 34px 18px;
}

.login-logo {
  margin-bottom: 28px;
}

.login-copy h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.login-stats {
  gap: 8px;
  margin-top: 28px;
}

.login-stats div {
  min-height: 78px;
  padding: 13px;
  border-radius: 18px;
}

.credential-card {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 18px;
}

@media (max-width: 1120px) {
  .app-content {
    padding-left: 246px;
  }

  .sidebar {
    width: 218px;
  }

  .admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-master-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 12px;
  }

  .app-content {
    padding-left: 0;
    padding-top: 94px;
  }

  .sidebar {
    inset: 8px 8px auto 8px;
    min-height: 72px;
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
  }

  .sidebar-nav {
    gap: 6px;
  }

  .side-link {
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 12px;
    font-size: 0.88rem;
  }

  .side-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .sidebar-logout {
    min-height: 42px;
    min-width: 84px;
  }

  .page-header,
  .table-heading,
  .profile-identity {
    gap: 10px;
    padding: 14px;
  }

  .profile-panel,
  .metric-grid,
  .admin-grid,
  .fund-total-panel,
  .import-grid,
  .report-master-grid,
  .report-master-form {
    grid-template-columns: 1fr;
  }

  .table-actions {
    justify-content: stretch;
  }

  .table-search {
    width: 100%;
  }

  .login-panel {
    grid-template-columns: 1fr;
    border-radius: 28px;
  }

  .login-copy,
  .login-card {
    border-radius: 22px;
  }

  .login-stats {
    grid-template-columns: 1fr;
  }
}

body.app-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 14% 8%, rgba(8, 120, 111, 0.20), transparent 34%),
    radial-gradient(ellipse at 86% 20%, rgba(37, 99, 235, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(218, 235, 237, 0.85)),
    var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

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

.app-content {
  flex: 1;
  min-width: 0;
  padding-left: 292px;
}

.sidebar {
  position: fixed;
  inset: 16px auto 16px 18px;
  z-index: 20;
  width: 256px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(13, 91, 86, 0.96), rgba(10, 46, 55, 0.98)),
    #0b3f42;
  box-shadow: 0 24px 58px rgba(8, 43, 50, 0.24);
  color: #fff;
}

.sidebar-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand {
  color: var(--brand-dark);
}

.sidebar-brand {
  color: #fff;
  padding: 4px;
}

.sidebar-brand .brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-brand .brand-copy strong {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.sidebar-brand .brand-copy small {
  margin-top: 0;
  max-width: 148px;
  color: rgba(220, 245, 240, 0.88);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: normal;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #1b9b8f 45%, #f5b44b);
  box-shadow: 0 10px 22px rgba(8, 120, 111, 0.28);
  font-weight: 900;
}

.brand strong,
.brand small,
.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.brand small,
.sidebar-brand small {
  margin-top: -2px;
  font-size: 0.78rem;
  font-weight: 650;
}

.brand small {
  color: var(--muted);
}

.sidebar-brand small {
  color: rgba(255, 255, 255, 0.66);
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.sidebar-label {
  margin: 8px 10px 2px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-section {
  display: grid;
  gap: 8px;
}

.sidebar-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.sidebar-section-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-section-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.72);
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}

.sidebar-section.is-open .sidebar-section-caret {
  transform: rotate(45deg);
}

.sidebar-section-menu {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sidebar-section.is-open .sidebar-section-menu {
  display: grid;
}

.side-link {
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  color: #fff;
  background: #dc2626;
  font-size: 0.74rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.side-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  transform: translateX(2px);
}

.side-link.active {
  color: #0b3f42;
  background: #fff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
}

.side-icon,
.side-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
}

.side-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.side-link.active .side-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #f0aa3e);
}

.sidebar-user {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding: 13px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.side-avatar {
  color: #0b3f42;
  background: #dff7f1;
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
}

.sidebar-user strong {
  max-width: 142px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user small {
  color: rgba(255, 255, 255, 0.62);
}

.sidebar-verticals {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sidebar-verticals span {
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  color: #dff7f1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
}

.sidebar-logout {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 850;
  cursor: pointer;
}

.nav-link,
.logout-button,
.primary-button {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.nav-link,
.logout-button {
  background: var(--paper);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
}

.nav-link:hover,
.logout-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.12);
}

.primary-button {
  width: 100%;
  color: #fff;
  min-height: 52px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  border-color: var(--brand);
  box-shadow: 0 16px 34px rgba(8, 120, 111, 0.26);
}

.flash {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.flash-alert {
  color: #8a1f11;
  background: #fff1ed;
  border: 1px solid #ffdad1;
}

.flash-notice {
  color: #0b5b52;
  background: #e9fbf7;
  border: 1px solid #c7efe7;
}

.login-screen {
  position: relative;
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.login-orbit {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.login-orbit-one {
  width: min(560px, 64vw);
  height: 210px;
  left: -110px;
  top: 70px;
  transform: rotate(-24deg);
  border: 34px solid rgba(8, 120, 111, 0.13);
}

.login-orbit-two {
  width: min(480px, 58vw);
  height: 170px;
  right: -120px;
  bottom: 70px;
  transform: rotate(18deg);
  border: 28px solid rgba(189, 124, 24, 0.15);
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.82fr);
  gap: 10px;
  align-items: stretch;
  min-height: 610px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 58px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 30px 90px rgba(18, 48, 66, 0.16);
  backdrop-filter: blur(24px);
}

.login-copy,
.login-card,
.table-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(220, 229, 239, 0.88);
  border-radius: 22px;
  box-shadow: var(--panel-shadow);
}

.login-copy {
  padding: clamp(34px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 48px 26px 26px 48px;
  background:
    linear-gradient(135deg, rgba(8, 120, 111, 0.95), rgba(9, 78, 88, 0.94)),
    var(--brand-dark);
  color: #fff;
  overflow: hidden;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-bottom: 42px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 850;
}

.login-copy h1,
.page-header h1 {
  max-width: 760px;
  font-size: clamp(2.1rem, 4.8vw, 4.3rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.login-copy .eyebrow,
.login-copy .muted {
  color: rgba(255, 255, 255, 0.78);
}

.login-copy .muted {
  max-width: 580px;
  font-size: 1.04rem;
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.login-stats div {
  min-height: 96px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.login-stats strong,
.login-stats span {
  display: block;
}

.login-stats span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 46px);
  align-self: stretch;
  border-radius: 26px 48px 48px 26px;
  box-shadow: none;
}

.login-card h2,
.table-heading h2 {
  font-size: 1.5rem;
  font-weight: 850;
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.login-card-head p {
  color: var(--muted);
  margin-top: 2px;
}

.lock-badge {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #dff7f1;
  font-weight: 900;
}

.eyebrow {
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.muted {
  color: var(--muted);
  margin-top: 8px;
}

.credential-card {
  display: grid;
  gap: 5px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #ead6aa;
  border-radius: 26px;
  background: linear-gradient(135deg, #fff8ea, #fffdf7);
  color: #61420f;
}

.form-stack {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.form-stack label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 700;
}

.input,
.select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.03);
}

.input:focus,
.select:focus {
  outline: 3px solid rgba(8, 120, 111, 0.16);
  border-color: rgba(8, 120, 111, 0.52);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px 26px;
  border: 1px solid rgba(220, 229, 239, 0.82);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 248, 247, 0.92)),
    #fff;
  box-shadow: var(--panel-shadow);
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
}

.profile-identity,
.profile-vertical-card {
  border: 1px solid rgba(220, 229, 239, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--panel-shadow);
}

.profile-identity {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand) 52%, #f1b34b);
  box-shadow: 0 14px 28px rgba(8, 120, 111, 0.22);
  font-size: 1.45rem;
  font-weight: 900;
}

.profile-identity h2 {
  margin-top: 2px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 900;
}

.profile-vertical-card {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(8, 120, 111, 0.08), rgba(37, 99, 235, 0.06)),
    #fff;
}

.profile-vertical-card > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-vertical-card > strong {
  color: var(--muted);
}

.vertical-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vertical-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #e5f5f2;
  border: 1px solid #c8ebe4;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.2;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3.7rem);
}

.header-card {
  min-width: 220px;
  padding: 18px 20px;
  border-radius: 28px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.header-card span,
.header-card strong {
  display: block;
}

.header-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-card strong {
  margin-top: 6px;
  font-size: 1.35rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 14px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  padding: 5px;
  border: 1px solid rgba(220, 229, 239, 0.9);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.segment {
  padding: 11px 18px;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  color: var(--muted);
}

.segment.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  box-shadow: 0 10px 20px rgba(8, 120, 111, 0.20);
}

.filter-form {
  min-width: min(360px, 100%);
}

.filter-label {
  display: block;
  margin: 0 0 8px 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  position: relative;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(220, 229, 239, 0.9);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--brand);
}

.metric-teal::before { background: var(--brand); }
.metric-blue::before { background: var(--blue); }
.metric-gold::before { background: var(--gold); }
.metric-rose::before { background: var(--rose); }
.metric-ink::before { background: #0f172a; }

.metric::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -44px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(8, 120, 111, 0.08);
}

.metric span {
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  position: relative;
  z-index: 1;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.1;
}

.table-panel {
  overflow: hidden;
  border-radius: 24px;
}

.table-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 251, 0.96));
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.table-search {
  width: min(280px, 44vw);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.04);
}

.table-search:focus {
  outline: 3px solid rgba(8, 120, 111, 0.14);
  border-color: rgba(8, 120, 111, 0.52);
}

.table-count {
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #dff7f1;
  font-weight: 850;
}

.responsive-table {
  width: 100%;
  overflow-x: auto;
}

.has-column-filters th.column-filter-header {
  position: relative;
  padding-right: 38px;
}

.column-filter-button {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(143, 162, 176, 0.62);
  border-radius: 6px;
  background: #ffffff;
  color: #526879;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.column-filter-button::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid currentColor;
}

.column-filter-button::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 10px;
  width: 4px;
  height: 5px;
  border-radius: 0 0 2px 2px;
  background: currentColor;
}

.column-filter-button:hover,
.has-active-column-filter .column-filter-button {
  border-color: rgba(8, 120, 111, 0.44);
  background: #e8faf6;
  color: var(--brand-dark);
}

.column-filter-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 7px;
  display: grid;
  gap: 7px;
  width: 190px;
  padding: 9px;
  border: 1px solid rgba(190, 202, 212, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(20, 31, 43, 0.18);
  text-align: left;
  text-transform: none;
}

.column-filter-popover[hidden] {
  display: none;
}

.column-filter-sort-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.column-filter-sort {
  min-height: 30px;
  border: 1px solid rgba(191, 205, 215, 0.95);
  border-radius: 6px;
  padding: 5px 8px;
  background: #f7fafb;
  color: #435463;
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.column-filter-sort:hover,
.column-filter-popover[data-sort-direction="asc"] .column-filter-sort[data-sort-direction="asc"],
.column-filter-popover[data-sort-direction="desc"] .column-filter-sort[data-sort-direction="desc"] {
  border-color: rgba(8, 120, 111, 0.38);
  background: #e8faf6;
  color: var(--brand-dark);
}

.column-filter-operator,
.column-filter-input {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(191, 205, 215, 0.95);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.column-filter-operator {
  padding: 5px 8px;
}

.column-filter-input {
  padding: 6px 8px;
}

.column-filter-input:disabled {
  color: #8a98a5;
  background: #eef3f6;
}

.column-filter-clear {
  justify-self: end;
  min-height: 30px;
  border: 1px solid rgba(210, 219, 226, 0.95);
  border-radius: 6px;
  padding: 5px 10px;
  background: #f7fafb;
  color: #435463;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.column-filter-clear:hover {
  border-color: rgba(8, 120, 111, 0.38);
  color: var(--brand-dark);
}

.sticky-table-wrap {
  max-height: 68vh;
  overflow: auto;
  position: relative;
  overscroll-behavior: contain;
}

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 4;
  color: #475467;
  background: #f7fafc;
  background-clip: padding-box;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.94);
}

tbody tr:hover td {
  background: #f1fbf8;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #e5f5f2;
  font-weight: 850;
}

.money-cell {
  font-weight: 850;
  color: #19354d;
}

.fund-input,
.remark-input,
.summary-month-input {
  width: 150px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: #0f172a;
  background: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.04);
}

.remark-input {
  width: 220px;
  font-weight: 650;
}

.fund-input:focus,
.remark-input:focus,
.summary-month-input:focus {
  outline: 3px solid rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.52);
}

.summary-month-input {
  width: 132px;
  font-size: 0.9rem;
}

.summary-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}

.summary-status.is-balanced {
  color: #075e57;
  background: #e5f8f2;
}

.summary-status.is-warning {
  color: #9f3412;
  background: #fff4e6;
}

.fund-total-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fbfc, #eef8f6);
}

.fund-total-panel div {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(220, 229, 239, 0.9);
}

.fund-total-panel span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fund-total-panel strong {
  margin-top: 5px;
  font-size: 1.28rem;
}

.total-status {
  align-items: center;
  text-align: center;
  font-weight: 900;
}

.total-status.is-balanced {
  color: #075e57;
  background: #e5f8f2;
  border-color: #bfe9de;
}

.total-status.is-warning {
  color: #9f3412;
  background: #fff4e6;
  border-color: #fed7aa;
}

.submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.submit-panel p {
  color: var(--muted);
  font-weight: 750;
}

.submit-panel p.is-submitted {
  color: var(--brand-dark);
}

.submit-plan-button {
  min-width: 140px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  box-shadow: 0 14px 28px rgba(8, 120, 111, 0.22);
  font-weight: 900;
  cursor: pointer;
}

.return-button {
  min-width: 132px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #a7374f, #d14b64);
  box-shadow: 0 14px 28px rgba(194, 65, 91, 0.20);
  font-weight: 900;
  cursor: pointer;
}

.submit-plan-button:disabled {
  cursor: not-allowed;
  color: #667085;
  background: #e5eaf0;
  box-shadow: none;
}

.submission-panel {
  margin-bottom: 24px;
}

.empty-state {
  padding: 38px;
  border: 1px solid rgba(220, 229, 239, 0.9);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.empty-state h2 {
  font-size: 1.5rem;
  font-weight: 900;
}

.formula-panel {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid rgba(220, 229, 239, 0.9);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.formula-panel h2 {
  font-size: 1.35rem;
  font-weight: 900;
}

.formula-panel p {
  max-width: 980px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.formula-panel strong {
  color: var(--ink);
  font-weight: 900;
}

.overall-total-panel {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #075e57);
  box-shadow: var(--soft-shadow);
}

.approval-panel {
  display: grid;
  gap: 14px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.approval-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.approval-remark {
  width: min(420px, 100%);
}

.approval-note {
  padding: 14px 18px;
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: #f8fbfc;
}

.approval-note span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.approval-note p {
  margin-top: 6px;
  font-weight: 750;
}

.approval-request-panel .approval-panel {
  align-items: stretch;
  gap: 12px;
}

.approval-bulk-form {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.approval-bulk-form .approval-remark {
  flex: 1;
  min-width: 0;
}

.approval-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 16px 14px;
}

.approval-summary-only .approval-summary-strip {
  margin-top: 14px;
}

.approval-summary-note {
  margin: 0 16px 14px;
}

.approval-summary-strip div {
  padding: 12px 14px;
  border: 1px solid #dbe8ef;
  border-radius: 14px;
  background: #fbfefe;
}

.approval-summary-strip span,
.approval-summary-strip strong {
  display: block;
}

.approval-summary-strip span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.approval-summary-strip strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 950;
}

.approval-summary-only {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #fff;
}

.approval-summary-heading {
  padding: 2px 4px 0;
}

.approval-total-hero {
  display: grid;
  gap: 5px;
  min-width: min(360px, 100%);
  padding: 18px 20px;
  border: 1px solid #bfe9de;
  border-radius: 18px;
  background: linear-gradient(135deg, #083c3a, #0f8b7a);
  box-shadow: 0 14px 34px rgba(7, 94, 87, 0.16);
  text-align: right;
}

.approval-total-hero span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.approval-total-hero strong {
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1;
}

.approval-overview-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid #dbe8ef;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fcfb);
  box-shadow: 0 10px 28px rgba(15, 29, 50, 0.05);
}

.approval-overview-copy {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.approval-vertical-title {
  margin: 0;
  color: #0f1d32;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.approval-records-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  min-width: 0;
  flex: 1 1 420px;
}

.approval-record-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}

.approval-record-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(216, 226, 234, 0.95);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--soft-shadow);
}

.approval-record-tab.active {
  border-color: #84d8cf;
  background: #e8f7f4;
  color: #075e57;
}

.approval-record-tab strong {
  display: inline-grid;
  min-width: 34px;
  min-height: 30px;
  place-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(7, 94, 87, 0.1);
  color: #075e57;
}

.approval-record-tab em {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  margin-left: -6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--rose);
  color: #ffffff;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(189, 52, 82, 0.24);
}

.approval-records-filter-field {
  min-width: min(280px, 100%);
  flex: 1 1 220px;
}

.approval-records-toolbar {
  margin-bottom: 8px;
}

.approval-records-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.approval-records-table-bar .table-search {
  max-width: 260px;
}

.approval-records-panel {
  margin-top: 0;
  padding-top: 0;
}

.approval-records-panel .table-heading {
  display: none;
}

.approval-records-panel.table-panel {
  padding: 12px 14px 14px;
}

.status-report-summary.metric-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-report-panel {
  margin-bottom: 16px;
  border: 1px solid #dce7ee;
  background: #ffffff;
}

.status-report-panel .table-heading {
  display: flex;
}

.status-report-panel .sticky-table-wrap {
  max-height: 72vh;
}

.status-report-panel table {
  min-width: 1680px;
}

.status-report-panel th,
.status-report-panel td {
  vertical-align: middle;
}

.status-report-panel th:first-child,
.status-report-panel td:first-child {
  width: 72px;
}

.status-report-panel th:nth-child(2),
.status-report-panel td:nth-child(2) {
  width: 240px;
}

.fco-report-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 210px;
}

.fco-report-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #08786f, #1d4ed8);
  font-size: 0.95rem;
  font-weight: 950;
  text-transform: uppercase;
}

.fco-report-cell strong,
.fco-report-cell small {
  display: block;
}

.fco-report-cell strong {
  color: #102035;
  font-size: 0.92rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.fco-report-cell small {
  margin-top: 4px;
  color: #66748a;
  font-size: 0.78rem;
  font-weight: 800;
}

.month-submission-cell,
.approval-month-cell {
  min-width: 190px;
}

.month-submission-cell .status-badge {
  gap: 6px;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
}

.month-submission-cell .status-badge small {
  padding-left: 6px;
  border-left: 1px solid currentColor;
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.78;
}

.submission-audit-lines {
  display: grid;
  gap: 3px;
  max-width: 220px;
  margin-top: 7px;
  color: #344054;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.35;
}

.submission-audit-lines span {
  overflow-wrap: anywhere;
}

.missing-projects {
  max-width: 180px;
  margin-top: 7px;
  color: #475467;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.missing-projects span {
  display: block;
  margin-bottom: 2px;
  color: #92400e;
  font-weight: 950;
}

.code-pill-alert {
  color: #92400e;
  background: #fff7ed;
}

.approval-records-table td,
.approval-records-table th {
  vertical-align: middle;
}

.approval-records-table th:nth-child(1),
.approval-records-table td:nth-child(1) {
  width: 72px;
}

.approval-vertical-cell {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-remark-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #667085;
}

.approval-status-cell {
  min-width: 190px;
  max-width: 240px;
}

.approval-records-table th:nth-child(5),
.approval-records-table td:nth-child(5),
.approval-records-table th:nth-child(6),
.approval-records-table td:nth-child(6) {
  min-width: 190px;
}

.approval-status-cell .status-badge {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
  text-align: left;
}

.approval-status-subline {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.35;
}

.page-header-compact {
  margin-bottom: 8px;
}

.approval-meta-grid,
.approval-summary-only .approval-summary-strip {
  margin: 0;
}

.approval-meta-grid div {
  min-height: 78px;
  padding: 15px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fcfb);
}

.approval-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.approval-context-grid .approval-summary-note {
  margin: 0;
}

.approval-month-total-panel {
  padding: 16px;
  border: 1px solid #dbe8ef;
  border-radius: 18px;
  background: #fbfefe;
}

.approval-vertical-panel {
  padding: 16px;
  border: 1px solid #dbe8ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfefe, #ffffff);
}

.approval-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.approval-section-heading > span {
  color: #66748a;
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.approval-section-heading h3 {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
}

.approval-vertical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.approval-vertical-grid article {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e1ebf2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.approval-vertical-grid article > div > span {
  display: block;
  color: #66748a;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.approval-vertical-grid article > div > strong {
  display: block;
  margin-top: 4px;
  color: #102035;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.25;
}

.approval-vertical-grid dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.approval-vertical-grid dl div {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f6f9fb;
}

.approval-vertical-grid dt {
  color: #66748a;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.approval-vertical-grid dd {
  margin-top: 4px;
  color: #075e57;
  font-size: 1rem;
  font-weight: 950;
}

.approval-vertical-grid dd .project-count-badge {
  min-width: 38px;
  min-height: 30px;
}

.approval-vertical-grid article > p {
  padding-top: 12px;
  border-top: 1px solid #edf3f6;
  color: #075e57;
  font-size: 1.15rem;
  font-weight: 950;
  text-align: right;
}

.approval-month-total-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
}

.approval-month-total-grid article {
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border: 1px solid #e1ebf2;
  border-radius: 14px;
  background: #fff;
}

.approval-month-total-grid article.is-edited-cell {
  border-color: #f3c56e;
  background: #fff8e8;
}

.approval-month-total-grid span,
.approval-month-total-grid strong,
.approval-month-total-grid small {
  display: block;
}

.approval-month-total-grid span {
  color: #66748a;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.approval-month-total-grid strong {
  margin-top: 8px;
  color: #102035;
  font-size: 0.95rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.approval-month-total-grid small {
  margin-top: 6px;
  color: #9a4f00;
  font-size: 0.75rem;
  font-weight: 950;
  line-height: 1.25;
}

.approval-summary-only .activity-summary-table {
  margin-top: 0;
  overflow: auto;
}

.approval-summary-only .activity-summary-table table {
  min-width: 1540px;
  table-layout: fixed;
}

.approval-summary-only .activity-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f9fb;
}

.approval-summary-only .activity-summary-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
}

.approval-summary-only .activity-summary-table th:first-child,
.approval-summary-only .activity-summary-table td:first-child {
  width: 86px;
}

.approval-summary-only .activity-summary-table th:nth-child(2),
.approval-summary-only .activity-summary-table td:nth-child(2) {
  width: 220px;
}

.approval-summary-only .activity-summary-table th:nth-child(3),
.approval-summary-only .activity-summary-table td:nth-child(3) {
  width: 108px;
  text-align: center;
}

.approval-summary-only .activity-summary-table th:nth-child(4),
.approval-summary-only .activity-summary-table td:nth-child(4) {
  width: 150px;
}

.approval-summary-only .activity-summary-table th:nth-child(n + 5),
.approval-summary-only .activity-summary-table td:nth-child(n + 5) {
  width: 145px;
}

.approval-summary-only .activity-summary-table td {
  vertical-align: top;
}

.activity-name-cell strong {
  display: -webkit-box;
  max-height: 5.4em;
  overflow: hidden;
  color: #102035;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.approval-action-panel {
  position: sticky;
  bottom: 18px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cfe2dc;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.approval-action-copy h3 {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 950;
}

.approval-action-copy p:last-child {
  margin-top: 5px;
  color: #66748a;
  font-weight: 750;
}

.approval-action-forms {
  display: grid;
  gap: 10px;
}

.approval-action-forms .approval-bulk-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 10px;
  margin-top: 0;
}

.approval-action-forms .remark-input {
  width: 100%;
}

.submission-status-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 16px 14px;
  padding: 12px 14px;
  border: 1px solid #dbe8ef;
  border-radius: 14px;
  background: #fbfefe;
}

.submission-status-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.submission-status-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pending {
  color: #92400e;
  background: #fff7ed;
}

.status-forwarded {
  color: #1d4ed8;
  background: #eff6ff;
}

.status-approved {
  color: #075e57;
  background: #e5f8f2;
}

.status-returned {
  color: #9f1239;
  background: #fff1f2;
}

.status-superseded {
  color: #6d3f00;
  background: #fff7d6;
}

.status-not_submitted {
  color: #475467;
  background: #eef2f6;
}

.overall-total-panel span,
.overall-total-panel strong {
  display: block;
}

.overall-total-panel span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.overall-total-panel strong {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .toolbar,
  .page-header,
  .table-heading,
  .profile-panel,
  .profile-identity {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-panel {
    grid-template-columns: 1fr;
  }

  .profile-identity {
    display: grid;
    justify-items: start;
  }

  .table-actions {
    justify-content: stretch;
  }

  .table-search {
    width: 100%;
  }

  .app-frame {
    display: block;
  }

  .app-content {
    padding-left: 0;
    padding-top: 118px;
  }

  .sidebar {
    inset: 10px 10px auto 10px;
    width: auto;
    min-height: 86px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 28px;
    overflow-x: auto;
  }

  .sidebar-brand small,
  .sidebar-label,
  .sidebar-user {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
  }

  .side-link {
    white-space: nowrap;
  }

  .sidebar-logout {
    width: auto;
    min-width: 92px;
    padding: 0 14px;
  }

  .login-panel,
  .metric-grid,
  .admin-grid,
  .fund-total-panel {
    grid-template-columns: 1fr;
  }

  .submit-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .login-panel {
    min-height: auto;
    padding: 8px;
    border-radius: 32px;
  }

  .login-copy,
  .login-card {
    border-radius: 26px;
  }

  .login-stats {
    grid-template-columns: 1fr;
  }

  .login-screen {
    place-items: start;
  }

  .login-copy h1,
  .page-header h1 {
    font-size: 2.25rem;
  }

  .header-card {
    min-width: 0;
  }

  .login-orbit {
    opacity: 0.45;
  }
}

/* Final UI refresh: tighter, cleaner application layout */
:root {
  --ink: #111827;
  --muted: #5f6f86;
  --line: #d9e3ec;
  --paper: #ffffff;
  --surface: #f5f8fb;
  --brand: #08786f;
  --brand-dark: #064b48;
  --blue: #2f6fd6;
  --rose: #b83b55;
  --gold: #bf832a;
  --shadow: 0 18px 52px rgba(21, 39, 58, 0.12);
  --soft-shadow: 0 10px 26px rgba(21, 39, 58, 0.09);
  --panel-shadow: 0 12px 32px rgba(21, 39, 58, 0.10);
}

body.app-body {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(226, 238, 244, 0.9)),
    #edf5f7;
}

.app-shell {
  width: min(1380px, calc(100% - 28px));
  padding: 16px 0 30px;
}

.app-content {
  padding-left: 264px;
}

.sidebar {
  inset: 12px auto 12px 14px;
  width: 232px;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: linear-gradient(180deg, #08625d 0%, #08343d 100%);
  box-shadow: 0 18px 42px rgba(8, 43, 50, 0.22);
}

.sidebar-brand {
  gap: 10px;
  padding: 2px 4px 8px;
}

.brand-mark {
  width: 38px;
  height: 38px;
}

.sidebar-nav {
  gap: 7px;
}

.sidebar-label {
  margin: 4px 8px 0;
  font-size: 0.7rem;
}

.side-link {
  min-height: 46px;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
}

.side-icon,
.side-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 12px;
}

.sidebar-user {
  gap: 10px;
  padding: 11px;
  border-radius: 18px;
}

.sidebar-user-main {
  gap: 10px;
}

.sidebar-user strong {
  max-width: 126px;
  font-size: 0.92rem;
}

.sidebar-user small {
  font-size: 0.76rem;
}

.sidebar-verticals span {
  padding: 4px 7px;
  font-size: 0.68rem;
}

.sidebar-logout {
  min-height: 42px;
  font-size: 0.92rem;
}

.toolbar,
.page-header,
.profile-panel,
.table-panel,
.empty-state,
.formula-panel,
.login-panel {
  border-radius: 20px;
  box-shadow: var(--panel-shadow);
}

.page-header {
  gap: 14px;
  margin-bottom: 12px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.94);
}

.page-header h1 {
  font-size: clamp(1.9rem, 3.1vw, 3rem);
  line-height: 1.02;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 0.72rem;
}

.muted {
  margin-top: 5px;
}

.header-card {
  min-width: 188px;
  padding: 15px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #111827, #075e57);
}

.header-card strong {
  font-size: 1.18rem;
}

.profile-panel {
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.64fr);
  gap: 12px;
  margin-bottom: 12px;
}

.profile-identity,
.profile-vertical-card {
  min-height: auto;
  padding: 16px 18px;
  border-radius: 18px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
}

.profile-identity h2 {
  font-size: clamp(1.6rem, 2.2vw, 2.25rem);
}

.profile-meta,
.profile-vertical-list {
  gap: 7px;
}

.profile-meta span,
.profile-vertical-list span {
  padding: 7px 10px;
}

.toolbar {
  gap: 14px;
  margin: 8px 0 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.78);
}

.toolbar select,
.table-search,
.approval-remark,
.month-input,
.text-input {
  min-height: 40px;
  border-radius: 16px;
}

.metric-grid,
.admin-grid,
.fund-total-panel {
  gap: 12px;
  margin: 12px 0 14px;
}

.metric {
  min-height: 112px;
  padding: 17px 18px;
  border-radius: 18px;
}

.metric strong,
.stat-card strong,
.fund-total-card strong {
  font-size: clamp(1.45rem, 2.35vw, 2.15rem);
}

.stat-card,
.fund-total-card,
.match-card {
  min-height: 84px;
  padding: 15px 18px;
  border-radius: 18px;
}

.table-panel {
  margin-top: 12px;
  border-radius: 20px;
  overflow: hidden;
}

.table-heading {
  gap: 12px;
  padding: 18px 20px;
}

.table-heading h2 {
  font-size: 1.35rem;
}

.row-count,
.status-badge {
  min-height: 34px;
  padding: 7px 12px;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  vertical-align: top;
}

.data-table th {
  font-size: 0.72rem;
}

.data-table td {
  font-size: 0.9rem;
}

.code-pill {
  min-width: 28px;
  min-height: 28px;
  padding: 5px 8px;
}

.month-input {
  width: 138px;
  padding: 0 13px;
}

.submit-panel,
.approval-panel,
.overall-total-panel {
  padding: 16px 20px;
}

.primary-button,
.secondary-button,
.nav-link,
.logout-button,
.sidebar-logout {
  min-height: 42px;
  padding: 10px 18px;
}

.login-screen {
  min-height: 100vh;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(225, 239, 244, 0.92)),
    #eef6f7;
}

.login-panel {
  width: min(1040px, 100%);
  min-height: 610px;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.7fr);
  gap: 10px;
  padding: 10px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
}

.login-copy,
.login-card {
  border-radius: 28px;
}

.login-copy {
  padding: clamp(28px, 5vw, 52px);
}

.login-copy h1 {
  font-size: clamp(2.6rem, 5.4vw, 5rem);
}

.login-card {
  width: min(100%, 390px);
  padding: 26px;
}

.login-card h2 {
  font-size: 1.65rem;
}

.login-tabs {
  padding: 5px;
  border-radius: 999px;
}

.login-tab {
  min-height: 38px;
}

.login-field input {
  min-height: 48px;
  border-radius: 16px;
}

.login-submit {
  min-height: 48px;
}

@media (max-width: 1120px) {
  .app-content {
    padding-left: 0;
    padding-top: 108px;
  }

  .sidebar {
    inset: 10px 10px auto;
    width: auto;
    min-height: 76px;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
  }

  .sidebar-label,
  .sidebar-user,
  .sidebar-brand small {
    display: none;
  }

  .side-link {
    white-space: nowrap;
  }

  .sidebar-logout {
    width: auto;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 12px;
  }

  .page-header,
  .toolbar,
  .table-heading,
  .profile-panel,
  .profile-identity,
  .submit-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-panel,
  .metric-grid,
  .admin-grid,
  .fund-total-panel,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .page-header h1,
  .login-copy h1 {
    font-size: 2.25rem;
  }

  .table-search,
  .toolbar select,
  .month-input,
  .text-input {
    width: 100%;
  }

  .login-screen {
    padding: 12px;
  }

  .login-panel {
    min-height: auto;
    border-radius: 26px;
  }

  .login-copy,
  .login-card {
    border-radius: 22px;
  }
}

/* Colorful product UI pass */
:root {
  --ink: #111827;
  --muted: #66748a;
  --line: #d8e3ef;
  --paper: #ffffff;
  --surface: #f7fbff;
  --brand: #008577;
  --brand-dark: #043c46;
  --aqua: #12b8a6;
  --blue: #3478f6;
  --violet: #7057d8;
  --rose: #d04768;
  --gold: #d89021;
  --sky: #36a3ff;
  --shadow: 0 22px 56px rgba(24, 44, 70, 0.14);
  --soft-shadow: 0 12px 30px rgba(24, 44, 70, 0.10);
  --panel-shadow: 0 14px 34px rgba(24, 44, 70, 0.11);
}

body.app-body {
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(237, 249, 247, 0.95) 0%, rgba(244, 248, 255, 0.92) 38%, rgba(255, 247, 235, 0.78) 72%, rgba(255, 242, 246, 0.72) 100%),
    #f7fbff;
}

.app-shell {
  width: min(1440px, calc(100% - 26px));
  padding: 14px 0 28px;
}

.app-content {
  padding-left: 252px;
}

.sidebar {
  inset: 12px auto 12px 12px;
  width: 224px;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 26px;
  background:
    linear-gradient(155deg, rgba(0, 133, 119, 0.98) 0%, rgba(5, 71, 88, 0.98) 48%, rgba(17, 24, 39, 0.98) 100%);
  box-shadow: 0 22px 50px rgba(5, 54, 67, 0.26);
}

.brand-mark,
.side-link.active .side-icon,
.side-avatar {
  background: linear-gradient(135deg, #15c6af 0%, #58a6ff 52%, #f2b84b 100%);
}

.brand-mark {
  width: 40px;
  height: 40px;
  color: #fff;
  box-shadow: 0 10px 20px rgba(18, 184, 166, 0.24);
}

.sidebar-brand strong {
  font-size: 0.96rem;
}

.side-link {
  min-height: 45px;
  padding: 8px 10px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
}

.side-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.side-link.active {
  color: #043c46;
  background: linear-gradient(135deg, #ffffff 0%, #f1fffb 100%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15);
}

.side-icon,
.side-avatar {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border-radius: 13px;
}

.side-avatar {
  color: #fff;
}

.sidebar-user {
  padding: 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.13);
}

.sidebar-verticals span {
  color: #ffffff;
  background: rgba(18, 184, 166, 0.22);
}

.sidebar-logout {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
}

.page-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 255, 251, 0.96) 42%, rgba(242, 247, 255, 0.98) 100%);
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--aqua), var(--blue), var(--gold));
}

.page-header h1 {
  font-size: clamp(2rem, 3.3vw, 3.35rem);
  letter-spacing: 0;
}

.eyebrow {
  color: #00695f;
}

.header-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: linear-gradient(135deg, #111827 0%, #064b48 58%, #0b8276 100%);
  box-shadow: 0 16px 28px rgba(7, 94, 87, 0.22);
}

.toolbar,
.profile-identity,
.profile-vertical-card,
.table-panel,
.empty-state,
.formula-panel,
.metric,
.stat-card,
.fund-total-card,
.match-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--panel-shadow);
}

.profile-panel {
  gap: 12px;
  margin-bottom: 14px;
}

.profile-identity,
.profile-vertical-card {
  border-radius: 22px;
}

.profile-avatar {
  background: linear-gradient(135deg, var(--brand), var(--sky), var(--gold));
  color: #fff;
}

.profile-meta span,
.profile-vertical-list span,
.row-count,
.code-pill {
  border: 1px solid rgba(18, 184, 166, 0.16);
  color: #00695f;
  background: linear-gradient(135deg, #e5fff8, #edf7ff);
}

.toolbar {
  margin: 10px 0 14px;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.toolbar select,
.table-search,
.approval-remark,
.month-input,
.text-input,
.login-field input {
  border: 1px solid #d8e5f0;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 5px 14px rgba(24, 44, 70, 0.05);
}

.toolbar select:focus,
.table-search:focus,
.approval-remark:focus,
.month-input:focus,
.text-input:focus,
.login-field input:focus {
  border-color: #12b8a6;
  box-shadow: 0 0 0 4px rgba(18, 184, 166, 0.14);
  outline: none;
}

.metric-grid,
.admin-grid,
.fund-total-panel {
  gap: 14px;
}

.metric {
  position: relative;
  min-height: 110px;
  border-radius: 22px;
  overflow: hidden;
}

.metric::before {
  width: 6px;
  border-radius: 999px;
}

.metric::after {
  background: linear-gradient(135deg, rgba(18, 184, 166, 0.11), rgba(52, 120, 246, 0.08));
}

.metric-teal::before { background: linear-gradient(180deg, var(--aqua), var(--brand)); }
.metric-blue::before { background: linear-gradient(180deg, var(--sky), var(--blue)); }
.metric-gold::before { background: linear-gradient(180deg, #ffc35a, var(--gold)); }
.metric-rose::before { background: linear-gradient(180deg, #f26a8d, var(--rose)); }
.metric-ink::before { background: linear-gradient(180deg, #111827, var(--violet)); }

.metric span,
.stat-card span,
.fund-total-card span {
  color: #66748a;
}

.metric strong,
.stat-card strong,
.fund-total-card strong {
  color: #0f1d32;
}

.table-panel {
  border-radius: 24px;
}

.table-heading {
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 250, 251, 0.98));
}

.table-heading h2 {
  color: #0f1d32;
}

.table-wrap {
  background: #fff;
}

.data-table th {
  color: #344862;
  background: linear-gradient(180deg, #f7fbff, #eef5f9);
}

.data-table tbody tr:nth-child(odd) {
  background: #f0fbf8;
}

.data-table tbody tr:hover {
  background: #fff8e8;
}

.data-table td {
  border-color: #e7eef5;
}

.primary-button,
.login-submit {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #008577 0%, #3478f6 100%);
  box-shadow: 0 14px 28px rgba(52, 120, 246, 0.22);
}

.primary-button:hover,
.login-submit:hover {
  box-shadow: 0 18px 34px rgba(0, 133, 119, 0.24);
}

.secondary-button {
  color: #064b48;
  background: linear-gradient(135deg, #ffffff, #effdf8);
}

.submit-panel {
  background: linear-gradient(135deg, #ffffff, #f4fffb);
}

.bulk-submit-panel {
  margin-top: 18px;
  border: 1px solid #d8e2ea;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(21, 39, 58, 0.08);
}

.overall-total-panel {
  border-radius: 22px;
  background: linear-gradient(135deg, #111827 0%, #075e57 56%, #008577 100%);
}

.status-pending {
  color: #9a4f00;
  background: #fff4df;
}

.status-approved {
  color: #00695f;
  background: #e5fff8;
}

.status-returned {
  color: #a2193d;
  background: #fff0f4;
}

.status-superseded {
  color: #6d3f00;
  background: #fff7d6;
}

.login-screen {
  background:
    linear-gradient(120deg, rgba(230, 255, 249, 0.92), rgba(239, 246, 255, 0.95) 46%, rgba(255, 246, 230, 0.9));
}

.login-panel {
  min-height: 625px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 26px 70px rgba(24, 44, 70, 0.16);
}

.login-copy {
  color: #fff;
  background:
    linear-gradient(145deg, rgba(0, 133, 119, 0.96), rgba(52, 120, 246, 0.9) 58%, rgba(208, 71, 104, 0.86));
}

.login-copy .eyebrow,
.login-copy .muted {
  color: rgba(255, 255, 255, 0.82);
}

.login-copy h1 {
  color: #fff;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.16);
}

.login-stats div {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
}

.login-card {
  border: 1px solid rgba(216, 229, 240, 0.9);
  box-shadow: 0 18px 40px rgba(24, 44, 70, 0.12);
}

.login-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--blue));
}

.login-helper {
  background: linear-gradient(135deg, #effdf8, #f6f8ff);
}

@media (max-width: 1120px) {
  .app-content {
    padding-left: 0;
    padding-top: 104px;
  }

  .sidebar {
    inset: 10px 10px auto;
    width: auto;
    min-height: 74px;
    border-radius: 24px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 16px, 1180px);
  }

  .page-header,
  .table-panel,
  .toolbar,
  .profile-identity,
  .profile-vertical-card {
    border-radius: 18px;
  }

  .page-header {
    padding: 18px;
  }

  .page-header h1,
  .login-copy h1 {
    font-size: 2.15rem;
  }

  .data-table th,
  .data-table td {
    padding: 12px 14px;
  }

  .month-input,
  .text-input {
    min-width: 128px;
  }

  .login-panel {
    border-radius: 28px;
  }
}

.project-insight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px 18px 0;
  background: #fff;
}

.cell-change-value.is-hidden {
  display: none;
}

.is-edited-cell {
  background: #fff8e8;
}

.overall-summary-heading > strong.is-edited-cell {
  padding: 8px 12px;
  border-radius: 12px;
}

.summary-month-input.is-edited {
  border-color: #f2a93b;
  background: #fff3cd;
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.18);
}

.cell-change-value {
  display: block;
  margin-top: 6px;
  color: #9a4f00;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

.cell-change-value span {
  display: block;
}

.is-edited-cell .cell-change-value {
  color: #9a4f00;
}

.change-card,
.month-summary-card,
.overall-summary-panel {
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f7fbfc);
  box-shadow: 0 10px 24px rgba(21, 39, 58, 0.07);
}

.change-card,
.month-summary-card {
  padding: 16px;
}

.insight-heading,
.overall-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.insight-heading span,
.overall-summary-grid span,
.month-total-grid span {
  color: #66748a;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-heading strong {
  color: #0f1d32;
  font-size: 1rem;
  text-align: right;
}

.change-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.change-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #e4edf3;
  border-radius: 14px;
  background: #fff;
}

.change-item > strong {
  color: #102035;
  font-size: 0.92rem;
}

.change-item > span,
.change-item p,
.empty-change,
.compact-muted {
  color: #607086;
  font-size: 0.84rem;
  font-weight: 700;
}

.change-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.change-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.change-chip.is-plus {
  color: #075e57;
  background: #e5fff8;
}

.change-chip.is-minus {
  color: #9a4f00;
  background: #fff4df;
}

.month-total-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.month-total-grid div,
.overall-summary-grid article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e4edf3;
  border-radius: 14px;
  background: #fff;
}

.month-total-grid strong,
.overall-summary-grid strong {
  display: block;
  margin-top: 5px;
  color: #102035;
  font-size: 0.92rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.overall-summary-panel {
  margin-top: 8px;
  padding: 20px;
}

.overall-summary-heading {
  align-items: center;
}

.overall-summary-heading h2 {
  color: #0f1d32;
  font-size: 1.35rem;
}

.overall-summary-heading > strong {
  color: #075e57;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  text-align: right;
}

.activity-summary-table {
  margin-top: 16px;
  border: 1px solid #e4edf3;
  border-radius: 16px;
  background: #fff;
}

.summary-total-row td {
  border-top: 2px solid #cfe2dc;
  background: #f4fbf8;
  font-weight: 950;
}

.summary-total-row .code-pill {
  width: auto;
  padding: 0 10px;
  color: #fff;
  background: #075e57;
}

.summary-total-row .project-count-badge {
  cursor: default;
}

.project-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 34px;
  border: 1px solid #bfe9de;
  border-radius: 999px;
  color: #075e57;
  background: #e5fff8;
  font-weight: 950;
  cursor: pointer;
}

.project-count-badge:hover,
.project-count-badge:focus {
  outline: 3px solid rgba(18, 184, 166, 0.18);
  border-color: #12b8a6;
}

.activity-modal.is-hidden {
  display: none;
}

.activity-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.activity-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.activity-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 94vw);
  max-height: min(620px, 86vh);
  overflow: hidden;
  border: 1px solid rgba(216, 226, 234, 0.95);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
}

.activity-modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e4edf3;
  background: linear-gradient(135deg, #ffffff, #effdf8);
}

.activity-modal-heading h2 {
  color: #0f1d32;
  font-size: 1.35rem;
}

.modal-close-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #102035;
  background: #eef2f6;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
}

.modal-table {
  max-height: calc(min(620px, 86vh) - 84px);
  overflow: auto;
}

.modal-table table {
  min-width: 0;
  table-layout: fixed;
}

.modal-table th,
.modal-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

.modal-table th:first-child,
.modal-table td:first-child {
  width: 72px;
}

.modal-table th:nth-child(3),
.modal-table td:nth-child(3) {
  width: 180px;
  text-align: right;
}

.overall-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.overall-month-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding-top: 16px;
  border-top: 1px solid #e4edf3;
}

@media (max-width: 1120px) {
  .project-insight-grid {
    grid-template-columns: 1fr;
  }

  .approval-context-grid,
  .approval-action-panel {
    grid-template-columns: 1fr;
  }

  .approval-month-total-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overall-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overall-month-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .project-insight-grid {
    padding: 12px 12px 0;
  }

  .month-total-grid,
  .overall-summary-grid,
  .overall-month-grid {
    grid-template-columns: 1fr;
  }

  .overall-summary-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .overall-summary-heading > strong {
    text-align: left;
  }

  .approval-summary-only {
    padding: 16px;
  }

  .approval-overview-bar {
    flex-direction: column;
  }

  .approval-total-hero {
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .approval-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .approval-month-total-grid {
    grid-template-columns: 1fr;
  }

  .approval-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .approval-action-panel {
    position: static;
    padding: 14px;
  }

  .approval-action-forms .approval-bulk-form {
    grid-template-columns: 1fr;
  }
}

/* 2026 workspace refresh: clean, responsive, low-card application UI */
:root {
  --ink: #182230;
  --muted: #667085;
  --line: #d7e0ea;
  --paper: #ffffff;
  --surface: #f4f7fa;
  --brand: #078477;
  --brand-dark: #063f45;
  --blue: #316ad7;
  --rose: #c13d5a;
  --gold: #c98421;
  --sky: #2f9ce8;
  --shadow: 0 22px 58px rgba(24, 39, 56, 0.13);
  --soft-shadow: 0 10px 28px rgba(24, 39, 56, 0.08);
  --panel-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 14px 34px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body.app-body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8fbfd 0%, #eef5f4 48%, #f7f3ec 100%),
    var(--surface);
  font-size: 15px;
}

.app-shell {
  width: min(1460px, calc(100% - 32px));
  padding: 18px 0 34px;
}

.app-content {
  padding-left: 254px;
}

.sidebar {
  inset: 14px auto 14px 14px;
  width: 224px;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #063f45 0%, #0b2530 100%);
  box-shadow: 0 18px 44px rgba(11, 37, 48, 0.22);
}

.sidebar-brand {
  padding: 6px 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand .brand-copy strong {
  font-size: 1.08rem;
  letter-spacing: 0.1em;
}

.sidebar-brand .brand-copy small {
  max-width: 140px;
  color: rgba(214, 240, 234, 0.9);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b9a7, #2f9ce8 64%, #f3b748);
}

.side-link {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
}

.side-link:hover {
  transform: translateX(1px);
  background: rgba(255, 255, 255, 0.09);
}

.side-link.active {
  color: #063f45;
  background: #ffffff;
  box-shadow: none;
}

.side-icon,
.side-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 9px;
}

.side-icon {
  background: rgba(255, 255, 255, 0.12);
}

.side-link.active .side-icon,
.side-avatar {
  background: linear-gradient(135deg, var(--brand), var(--sky));
}

.sidebar-user {
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.page-header,
.toolbar,
.table-panel,
.profile-identity,
.profile-vertical-card,
.empty-state,
.formula-panel,
.overall-summary-panel,
.activity-summary-table,
.approval-month-total-panel,
.approval-vertical-panel,
.change-card,
.month-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--panel-shadow);
}

.page-header {
  align-items: stretch;
  margin-bottom: 14px;
  padding: 0;
  overflow: hidden;
}

.page-header > div:first-child {
  flex: 1;
  padding: 24px 26px;
  border-left: 6px solid var(--brand);
  background: linear-gradient(90deg, #ffffff 0%, #f5faf9 100%);
}

.page-header::before {
  content: none;
}

.page-header h1 {
  max-width: none;
  color: #101828;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.05;
}

.eyebrow {
  color: #087066;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.header-card {
  min-width: 210px;
  display: grid;
  align-content: center;
  padding: 20px 22px;
  border-radius: 0;
  background: linear-gradient(135deg, #182230, #075e57);
  box-shadow: none;
}

.toolbar {
  justify-content: flex-start;
  margin: 0 0 14px;
  padding: 16px 18px;
  box-shadow: var(--soft-shadow);
}

.filter-form {
  width: min(440px, 100%);
}

.input,
.select,
.table-search,
.fund-input,
.remark-input,
.summary-month-input,
.approval-remark {
  border-radius: 8px;
  border-color: #cfd9e4;
  box-shadow: none;
}

.input,
.select {
  min-height: 46px;
}

.input:focus,
.select:focus,
.table-search:focus,
.fund-input:focus,
.remark-input:focus,
.summary-month-input:focus,
.approval-remark:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(7, 132, 119, 0.14);
  outline: none;
}

.metric-grid {
  gap: 10px;
  margin: 0 0 14px;
}

.metric {
  min-height: 96px;
  padding: 16px 18px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.metric::before {
  width: 4px;
  border-radius: 0;
}

.metric::after {
  content: none;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

.metric strong {
  color: #101828;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.profile-panel {
  gap: 10px;
  margin-bottom: 14px;
  box-shadow: none;
}

.profile-identity,
.profile-vertical-card {
  padding: 18px 20px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-radius: 12px;
}

.vertical-chip,
.code-pill,
.table-count,
.status-badge,
.summary-status,
.project-count-badge {
  border-radius: 8px;
}

.vertical-chip,
.code-pill,
.table-count,
.project-count-badge {
  color: #075e57;
  background: #e8f7f4;
  border: 1px solid #bfe4dc;
}

.table-panel {
  margin-top: 12px;
  overflow: hidden;
}

.table-heading {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.table-heading h2 {
  color: #101828;
  font-size: 1.28rem;
  line-height: 1.2;
}

.table-search {
  min-height: 40px;
  width: min(300px, 42vw);
}

.responsive-table {
  background: #ffffff;
}

table,
.approval-summary-only .activity-summary-table table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td,
.modal-table th,
.modal-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef4;
}

th {
  color: #344054;
  background: #f5f7fa;
  font-size: 0.72rem;
}

td {
  color: #243042;
  background: #ffffff;
  font-size: 0.9rem;
}

tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

tbody tr:hover td {
  background: #f3fbf9;
}

.money-cell {
  color: #153449;
}

.fund-total-panel {
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.fund-total-panel div {
  min-height: 76px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

.fund-total-panel div:last-child {
  border-right: 0;
}

.submit-panel,
.approval-panel {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.submit-plan-button,
.return-button,
.primary-button {
  min-height: 44px;
  border-radius: 8px;
  box-shadow: none;
}

.submit-plan-button {
  background: linear-gradient(135deg, #08786f, #0a635d);
}

.return-button {
  background: linear-gradient(135deg, #b42342, #d04768);
}

.overall-total-panel,
.approval-total-hero {
  border-radius: 8px;
  background: linear-gradient(135deg, #182230, #075e57);
}

.overall-summary-panel,
.approval-summary-only {
  padding: 20px;
}

.approval-summary-strip div,
.approval-month-total-grid article,
.approval-vertical-grid article,
.approval-note,
.submission-status-card {
  border-radius: 8px;
  box-shadow: none;
}

.approval-month-total-grid article {
  min-height: 78px;
}

.approval-action-panel {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
}

.activity-modal-panel {
  border-radius: 8px;
}

.activity-modal-heading {
  background: #ffffff;
}

.modal-close-button {
  border-radius: 8px;
}

.login-screen {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(6, 63, 69, 0.08), rgba(47, 156, 232, 0.08)),
    #f6f8fb;
}

.login-orbit {
  display: none;
}

.login-panel {
  width: min(1040px, 100%);
  min-height: 590px;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-copy,
.login-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-copy {
  background:
    linear-gradient(135deg, rgba(6, 63, 69, 0.96), rgba(8, 132, 119, 0.92)),
    #063f45;
}

.login-copy h1 {
  font-size: clamp(2.4rem, 4.8vw, 4.6rem);
}

.login-card {
  width: 100%;
  max-width: none;
}

.credential-card {
  border-radius: 8px;
  background: #fff8e8;
}

@media (max-width: 1120px) {
  .app-content {
    padding-left: 0;
    padding-top: 98px;
  }

  .sidebar {
    inset: 10px 10px auto;
    width: auto;
    min-height: 72px;
    flex-direction: row;
    align-items: center;
    border-radius: 14px;
    overflow-x: auto;
  }

  .sidebar-nav {
    display: flex;
    gap: 6px;
  }

  .sidebar-label,
  .sidebar-user,
  .sidebar-brand small {
    display: none;
  }

  .side-link {
    white-space: nowrap;
  }

  .sidebar-logout {
    width: auto;
    min-width: 86px;
  }

  .approval-month-total-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 8px;
  }

  .app-content {
    padding-top: 92px;
  }

  .page-header,
  .toolbar,
  .table-heading,
  .profile-identity,
  .submit-panel,
  .overall-summary-heading,
  .approval-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header > div:first-child {
    padding: 20px;
  }

  .header-card {
    min-width: 0;
    width: 100%;
  }

  .metric-grid,
  .admin-grid,
  .metric-grid-compact,
  .fund-total-panel,
  .profile-panel,
  .approval-context-grid,
  .approval-action-panel,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .fund-total-panel div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fund-total-panel div:last-child {
    border-bottom: 0;
  }

  .table-actions {
    width: 100%;
    justify-content: stretch;
  }

  .table-search,
  .approval-remark,
  .remark-input,
  .fund-input,
  .summary-month-input {
    width: 100%;
  }

  table {
    min-width: 920px;
  }

  .approval-summary-only .activity-summary-table table {
    min-width: 1320px;
  }

  .login-screen {
    padding: 10px;
  }

  .login-panel {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .app-content {
    padding-top: 86px;
  }

  .sidebar {
    min-height: 66px;
    padding: 8px;
  }

  .sidebar-brand span:last-child,
  .side-icon {
    display: none;
  }

  .side-link {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .sidebar-logout {
    min-height: 38px;
    font-size: 0.82rem;
  }

  .page-header h1,
  .login-copy h1 {
    font-size: 2rem;
  }

  .approval-summary-strip,
  .approval-month-total-grid {
    grid-template-columns: 1fr;
  }
}

/* Dense approval/workspace finish */
.app-frame .app-shell {
  width: calc(100% - 18px);
  max-width: none;
  margin-left: 0;
  margin-right: 18px;
}

.approval-summary-only {
  gap: 14px;
  padding: 18px;
}

.approval-summary-heading {
  padding: 0;
}

.approval-summary-heading .muted,
.approval-section-heading .eyebrow + h3 {
  margin-top: 2px;
}

.approval-summary-strip {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.approval-summary-strip div {
  min-height: 66px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.approval-summary-strip div:last-child {
  border-right: 0;
}

.mis-pending-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.mis-pending-board article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 118px;
  padding: 14px 16px;
  border: 1px solid rgba(216, 226, 234, 0.95);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.mis-pending-board span,
.mis-pending-board small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mis-pending-board strong {
  min-width: 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.mis-pending-board div {
  grid-row: span 2;
  display: grid;
  min-width: 86px;
  min-height: 66px;
  place-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #e8f7f4;
  color: #075e57;
}

.mis-pending-board b {
  font-size: 1.45rem;
  line-height: 1;
}

.mis-pending-board em {
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mis-pending-board p {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.mis-pending-board.is-empty article {
  grid-template-columns: 1fr;
  min-height: 88px;
}

.approval-month-total-panel,
.approval-vertical-panel {
  padding: 16px;
}

.approval-month-total-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.approval-month-total-grid article {
  min-height: 70px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.approval-month-total-grid article:nth-child(6n) {
  border-right: 0;
}

.approval-month-total-grid article:nth-last-child(-n + 6) {
  border-bottom: 0;
}

.approval-month-total-grid article.is-edited-cell {
  background: #fff8e8;
}

.approval-month-total-grid strong {
  font-size: 0.92rem;
}

.approval-vertical-grid {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.approval-vertical-grid article {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.approval-vertical-grid article:nth-child(3n) {
  border-right: 0;
}

.approval-summary-only .activity-summary-table {
  margin-top: 0;
}

.approval-summary-only .activity-summary-table table {
  min-width: 1360px;
}

.approval-summary-only .activity-summary-table th:nth-child(2),
.approval-summary-only .activity-summary-table td:nth-child(2) {
  width: 240px;
}

.activity-name-cell strong {
  max-height: none;
  -webkit-line-clamp: 3;
}

.approval-action-panel {
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
}

.approval-action-copy {
  display: none;
}

.shared-approval-remark {
  width: 100%;
  min-height: 44px;
}

.approval-action-forms {
  display: flex;
  gap: 10px;
}

.approval-action-forms .approval-bulk-form {
  display: block;
}

.approval-action-forms .submit-plan-button,
.approval-action-forms .return-button {
  min-width: 140px;
}

.empty-state {
  display: grid;
  min-height: 132px;
  place-items: center start;
  padding: 26px;
}

.empty-state .muted:empty,
.table-heading .muted:empty {
  display: none;
}

.records-search-toolbar {
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
}

.records-global-search {
  width: min(420px, 100%);
}

.record-status-strip {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.status-forwarded {
  color: #1d4ed8;
  background: #eff6ff;
}

.record-status-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.record-status-item > div {
  min-width: 0;
}

.record-status-item strong {
  display: block;
  color: #101828;
  font-size: 0.95rem;
}

.record-status-context {
  margin: 0 0 4px;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.record-status-projects {
  margin: 0 0 6px;
  color: #667085;
  font-size: 0.82rem;
  line-height: 1.45;
}

.record-status-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

[data-record-table-panel] {
  margin-top: 10px;
}

[data-record-table-panel] .table-heading {
  min-height: 72px;
  padding: 14px 18px;
}

[data-record-table-panel] .table-heading h2 {
  font-size: 1.2rem;
}

[data-record-table-panel] .table-heading .muted {
  margin-top: 4px;
  font-size: 0.88rem;
}

@media (max-width: 1320px) {
  .approval-vertical-grid article:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .approval-vertical-grid article:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 1120px) {
  .app-frame .app-shell {
    width: min(100% - 20px, 1180px);
    margin: 0 auto;
  }

  .approval-month-total-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .approval-month-total-grid article:nth-child(6n),
  .approval-month-total-grid article:nth-last-child(-n + 6) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .approval-month-total-grid article:nth-child(3n) {
    border-right: 0;
  }

  .approval-month-total-grid article:nth-last-child(-n + 3) {
    border-bottom: 0;
  }

  .approval-action-panel {
    grid-template-columns: 1fr;
  }

  .approval-action-forms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .approval-action-forms .submit-plan-button,
  .approval-action-forms .return-button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .approval-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .approval-summary-strip div {
    border-bottom: 1px solid var(--line);
  }

  .approval-summary-strip div:nth-child(2n) {
    border-right: 0;
  }

  .approval-month-total-grid,
  .approval-vertical-grid,
  .approval-action-forms {
    grid-template-columns: 1fr;
  }

  .approval-month-total-grid article,
  .approval-month-total-grid article:nth-child(3n),
  .approval-month-total-grid article:nth-last-child(-n + 3),
  .approval-vertical-grid article,
  .approval-vertical-grid article:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .approval-month-total-grid article:last-child,
  .approval-vertical-grid article:last-child {
    border-bottom: 0;
  }
}

/* Final approval layout guard */
html,
body.app-body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-frame,
.app-content,
.app-frame .app-shell,
.overall-summary-panel,
.approval-summary-only,
.approval-project-records,
.approval-project-records .table-panel {
  min-width: 0;
  max-width: 100%;
}

.app-content {
  overflow-x: hidden;
}

.approval-project-records {
  display: grid;
  gap: 12px;
}

.approval-project-records .table-heading {
  align-items: flex-start;
}

.approval-project-records .table-heading > div:first-child {
  min-width: 0;
}

.approval-summary-heading > div:first-child {
  min-width: 0;
}

.approval-project-records .table-heading h2,
.approval-project-records .table-heading .muted,
.approval-summary-heading h2 {
  overflow: hidden;
  text-overflow: ellipsis;
}

.approval-project-total {
  flex: 0 0 auto;
  min-width: 220px;
  max-width: min(340px, 42vw);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  text-align: right;
}

.approval-project-total span {
  display: block;
  color: #53627a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.approval-project-total strong {
  display: block;
  margin-top: 6px;
  color: #102035;
  font-size: 1.05rem;
  line-height: 1.15;
  white-space: nowrap;
}

.approval-project-records .responsive-table,
.approval-summary-only .activity-summary-table {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.approval-project-records table {
  width: max-content;
  min-width: 1180px;
}

.approval-summary-only .activity-summary-table table {
  width: max-content;
}

.approval-project-records th,
.approval-project-records td {
  padding: 10px 12px;
  font-size: 0.82rem;
}

.approval-project-records th:nth-child(1),
.approval-project-records td:nth-child(1) {
  min-width: 72px;
}

.approval-project-records th:nth-child(2),
.approval-project-records td:nth-child(2),
.approval-project-records th:nth-child(3),
.approval-project-records td:nth-child(3),
.approval-project-records th:nth-child(4),
.approval-project-records td:nth-child(4) {
  min-width: 180px;
  max-width: 240px;
  overflow-wrap: anywhere;
}

.approval-project-records .money-cell {
  white-space: nowrap;
}

.approval-total-hero {
  flex: 0 1 360px;
  min-width: 0;
  max-width: min(360px, 42vw);
  overflow: hidden;
}

.approval-total-hero strong {
  font-size: clamp(1.35rem, 2vw, 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-action-panel {
  max-width: 100%;
}

@media (min-width: 1121px) {
  .approval-action-panel {
    width: calc(100vw - 292px);
  }
}

@media (max-width: 820px) {
  .approval-project-records .table-heading {
    gap: 10px;
  }

  .approval-project-total,
  .approval-total-hero {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .approval-project-records table {
    min-width: 1120px;
  }
}

.action-plan-table-wrap {
  max-height: 68vh;
  overflow: auto;
  position: relative;
}

.action-plan-table {
  min-width: 1600px;
}

.action-plan-table.is-compact-dimensions {
  min-width: 1380px;
}

.action-plan-table th.month-col,
.action-plan-table td.month-col {
  min-width: 66px;
  padding: 10px 6px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.78rem;
}

.action-plan-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  vertical-align: top;
  background: #f7fafc;
  background-clip: padding-box;
}

.action-plan-record-table thead th,
.activity-summary-table thead th {
  z-index: 5;
  background-clip: padding-box;
}

.month-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.15;
}

.action-plan-month-input {
  width: 56px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  text-align: center;
  font-size: 0.82rem;
  background: #ffffff;
}

.action-plan-month-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(6, 63, 69, 0.12);
}

.action-plan-target-form .submit-panel {
  justify-content: space-between;
  align-items: center;
}

.metric-text {
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 700;
}

.action-plan-table th:not(.month-col):nth-child(1),
.action-plan-table td:not(.month-col):nth-child(1) {
  min-width: 140px;
}

.action-plan-table th:nth-child(2),
.action-plan-table td:nth-child(2) {
  min-width: 260px;
}

.action-plan-table th:nth-child(3),
.action-plan-table td:nth-child(3) {
  min-width: 180px;
}


/* Action plan target balance + approval trail */
.balance-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbfb, #eef5f6);
}

.balance-bar.is-unbalanced {
  border-left-color: var(--rose);
  background: linear-gradient(180deg, #fdf5f7, #fbeef1);
}

.balance-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 104px;
}

.balance-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.balance-item strong {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}

.balance-bar.is-unbalanced [data-difference-total] {
  color: var(--rose);
}

.balance-note {
  flex: 1 1 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.balance-bar.is-unbalanced .balance-note {
  color: var(--rose);
  font-weight: 600;
}

/* Submit row sits alone in its own panel, so it needs no separating rule. */
.action-plan-submit-form .submit-panel {
  border-top: 0;
  align-items: flex-end;
  gap: 22px;
}

.action-plan-submit-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.balance-alert {
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(189, 52, 82, 0.28);
  border-radius: 12px;
  background: #fdf2f4;
  color: var(--rose);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.submit-plan-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  filter: grayscale(0.25);
}

@media (max-width: 820px) {
  .balance-bar {
    gap: 12px 18px;
    padding: 13px 14px;
  }

  .balance-item {
    min-width: 88px;
  }

  .balance-item strong {
    font-size: 1.02rem;
  }

  .action-plan-submit-form .submit-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .action-plan-submit-form .submit-plan-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .balance-item {
    flex: 1 1 44%;
  }

  .balance-note {
    flex-basis: 100%;
  }
}

/* Action plan record polish */
.action-plan-record-summary {
  margin-bottom: 14px;
}

.action-plan-record-card .table-heading {
  align-items: flex-start;
}

.record-change-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.record-change-strip span {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 226, 234, 0.92);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f4faf9);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.record-change-strip strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.action-plan-record-table {
  min-width: 1760px;
}

.action-plan-record-table .cell-change-value {
  display: inline-flex;
  width: max-content;
  max-width: 122px;
  white-space: nowrap;
}

.record-approval-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-top: 1px solid rgba(216, 226, 234, 0.82);
  background: #ffffff;
}

.approval-records-panel table {
  min-width: 1480px;
}

.approval-type-pill {
  white-space: nowrap;
}

.approval-action-cell {
  display: grid;
  min-width: 132px;
  gap: 8px;
}

.approval-review-button {
  min-height: 38px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #bfe4dc;
  border-radius: 8px;
  background: #e8f7f4;
  color: #075e57;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.approval-review-primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.approval-change-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  border-top: 1px solid rgba(216, 226, 234, 0.92);
  background: #f8fbfb;
}

.approval-change-overview.has-changes {
  background: #fff8e8;
}

.approval-change-overview div {
  display: grid;
  gap: 2px;
  min-width: 100px;
}

.approval-change-overview span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.approval-change-overview strong {
  color: var(--ink);
  font-size: 1rem;
}

.approval-change-overview p {
  flex: 1 1 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.action-plan-review-panel {
  width: min(94vw, 1440px);
  max-height: min(720px, 90vh);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
}

.action-plan-review-table table {
  min-width: 1640px;
}

.action-plan-review-panel .modal-table {
  flex: 1 1 auto;
  max-height: none;
}

.action-plan-review-panel .activity-modal-heading {
  padding: 14px 16px;
}

.approval-modal-footer {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(216, 226, 234, 0.92);
  background: #ffffff;
}

.approval-decision-actions {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.approval-decision-remark {
  width: 100%;
  min-height: 42px;
  background: #ffffff;
}

.approval-decision-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 244px;
}

.approval-decision-form {
  display: block;
  min-width: 0;
}

.approval-decision-form .submit-plan-button,
.approval-decision-form .return-button {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
}

.table-actions {
  min-width: 0;
}

.side-link > span:not(.side-icon):not(.nav-alert-badge) {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.side-link .nav-alert-badge {
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1;
}

.responsive-table {
  border-top: 1px solid rgba(216, 226, 234, 0.82);
}

.responsive-table table th,
.responsive-table table td {
  vertical-align: top;
}

.is-edited-cell {
  background: #fff8e6;
}

.achievement-header {
  align-items: stretch;
}

.achievement-header .muted {
  max-width: 760px;
  margin: 8px 0 0;
}

.achievement-context {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.achievement-context article {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid rgba(191, 228, 220, 0.95);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #eefbf8 100%);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.achievement-context span,
.achievement-context small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.achievement-context strong {
  color: var(--ink);
  font-size: 1rem;
}

.achievement-return-panel {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(159, 18, 57, 0.07);
}

.achievement-return-panel .table-heading {
  background: linear-gradient(180deg, #fff7f8 0%, #ffffff 100%);
  border-bottom: 1px solid #ffe4e6;
}

.achievement-return-panel table {
  min-width: 1180px;
}

.achievement-return-remark {
  max-width: 380px;
}

.achievement-return-remark p,
.achievement-return-note {
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.achievement-open-return-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 112px;
  text-decoration: none;
}

.achievement-return-entry-modal {
  z-index: 90;
}

.achievement-return-entry-panel {
  width: min(1320px, 96vw);
  max-height: min(840px, 92vh);
}

.achievement-return-entry-body {
  max-height: calc(min(840px, 92vh) - 84px);
  overflow: auto;
  background: #f8fbfa;
}

.achievement-return-modal-form {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.achievement-return-modal-form .table-heading {
  position: sticky;
  top: 0;
  z-index: 3;
}

.achievement-return-modal-form .achievement-submit-panel {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0;
  border-top: 1px solid #d7e4e1;
  background: #ffffff;
  box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.08);
}

.achievement-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(191, 228, 220, 0.9);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf8 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.achievement-filter-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.achievement-filter-form .select {
  min-height: 44px;
  border-radius: 10px;
  border-color: #c5ddd6;
  background: #ffffff;
}

.achievement-metrics .metric strong {
  overflow-wrap: anywhere;
}

.achievement-entry-panel {
  overflow: hidden;
  border: 1px solid rgba(191, 228, 220, 0.95);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.achievement-entry-panel .table-heading {
  padding: 18px 20px 14px;
  background: linear-gradient(180deg, #f7fcfa 0%, #ffffff 100%);
  border-bottom: 1px solid #e3efec;
}

.achievement-excel-edit-panel .achievement-entry-table {
  border-collapse: separate;
  border-spacing: 0;
}

.achievement-excel-edit-panel .achievement-entry-table th {
  background: #eef3f8;
}

.achievement-excel-edit-panel .achievement-entry-table th,
.achievement-excel-edit-panel .achievement-entry-table td {
  border-right: 1px solid #d9e3ea;
}

.achievement-excel-edit-panel .achievement-entry-table th:last-child,
.achievement-excel-edit-panel .achievement-entry-table td:last-child {
  border-right: 0;
}

.achievement-excel-edit-panel .achievement-input,
.achievement-excel-edit-panel .achievement-remark-input {
  border-radius: 4px;
  border-color: #b9c9d6;
  box-shadow: inset 0 0 0 1px rgba(185, 201, 214, 0.45);
}

.achievement-toolbar .toolbar-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: min(390px, 100%);
}

.achievement-excel-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.achievement-excel-upload-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.achievement-excel-file-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
}

.achievement-return-alert {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #ffe4e6;
  background: #fff7f8;
}

.achievement-return-alert-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.achievement-return-alert-heading strong {
  display: block;
  color: #9f1239;
  font-size: 0.95rem;
  font-weight: 950;
}

.achievement-return-alert-heading p {
  margin: 3px 0 0;
}

.achievement-return-alert-list {
  display: grid;
  gap: 8px;
}

.achievement-return-alert-list article {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(254, 205, 211, 0.9);
}

.achievement-return-alert-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.achievement-return-alert-list article > strong {
  color: #881337;
  font-size: 0.86rem;
  font-weight: 900;
}

.achievement-return-alert-list article > p {
  margin: 0;
  color: #5f6f7e;
  font-size: 0.8rem;
  font-weight: 800;
}

.achievement-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #d7f0ea;
  color: #064f47;
  font-size: 0.82rem;
  font-weight: 800;
}

.achievement-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #0a6f62;
  box-shadow: 0 0 0 4px rgba(10, 111, 98, 0.2);
}

.achievement-table-wrap table {
  min-width: 1280px;
}

.achievement-entry-table thead th {
  background: #eef7f4;
  color: #4a5d6b;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #d7e4e1;
}

.achievement-entry-table td {
  min-width: 120px;
  vertical-align: top;
  border-bottom: 1px solid #edf2f5;
}

.achievement-entry-table td:nth-child(4),
.achievement-entry-table td:nth-child(5),
.achievement-entry-table td:nth-child(6),
.achievement-entry-table td:nth-child(8) {
  min-width: 220px;
}

.achievement-entry-table tbody tr:hover td {
  background: #f8fbfa;
}

.achievement-entry-table tbody tr.achievement-row-has-target td {
  background: linear-gradient(90deg, #c8ebe3 0%, #d7f0ea 45%, #e3f5f0 100%);
  border-bottom: 1px solid #9fd4c7;
  color: #0f2f2b;
}

.achievement-entry-table tbody tr.achievement-row-has-target:hover td {
  background: linear-gradient(90deg, #b7e4da 0%, #ccece4 45%, #daf3ed 100%);
}

.achievement-entry-table tbody tr.achievement-row-has-target td:first-child {
  position: relative;
  box-shadow: inset 6px 0 0 #0a6f62;
}

.achievement-entry-table tbody tr.achievement-row-has-target .code-pill {
  background: #0f8f7f;
  color: #ffffff;
  font-weight: 800;
}

.achievement-entry-table tbody tr.achievement-row-has-target td strong,
.achievement-entry-table tbody tr.achievement-row-has-target td div {
  color: #0c2e29;
}

.achievement-target-cell {
  color: #8aa0ad;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
}

.achievement-target-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: #8aa0ad;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.achievement-target-cell.has-target .achievement-target-pill,
.achievement-entry-table tbody tr.achievement-row-has-target .achievement-target-cell.has-target .achievement-target-pill {
  background: #0a6f62;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 8px 16px rgba(10, 111, 98, 0.28);
}

.achievement-input-cell {
  text-align: right;
}

.achievement-input {
  width: 132px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #c8d7e3;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: right;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}

.achievement-input.is-priority {
  border: 2px solid #0a6f62;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(10, 111, 98, 0.18);
}

.achievement-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 143, 127, 0.16);
  outline: none;
}

.achievement-input.is-priority:focus {
  transform: translateY(-1px);
  border-color: #086057;
  box-shadow: 0 0 0 4px rgba(10, 111, 98, 0.28);
}

.achievement-file-cell,
.achievement-remark-cell {
  min-width: 180px;
  vertical-align: top;
}

.achievement-file-stack {
  display: grid;
  gap: 6px;
  min-width: 200px;
}

.achievement-local-previews:empty {
  display: none;
}

.achievement-local-previews {
  display: grid;
  gap: 8px;
}

.achievement-local-preview-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.achievement-local-preview-item.is-clickable .achievement-file-thumb-button,
.achievement-local-preview-item.is-clickable .achievement-file-type-badge,
.achievement-local-preview-item.is-clickable .achievement-file-link {
  cursor: pointer;
}

.achievement-local-preview-item img,
.achievement-local-preview-item .achievement-file-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #c5d8e4;
  background: #f4faf8;
}

.achievement-local-preview-badge {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid #c5d8e4;
  background: #f4faf8;
  color: #0a6f62;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
}

.achievement-local-preview-name {
  color: #0a6f62;
  font-size: 0.82rem;
  font-weight: 800;
  word-break: break-word;
}

.achievement-file-input {
  width: 100%;
  max-width: 220px;
  font: inherit;
  font-size: 0.82rem;
}

.achievement-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.achievement-file-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.achievement-file-thumb-button,
.achievement-file-type-badge {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid #c5d8e4;
  border-radius: 10px;
  background: #f4faf8;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.achievement-file-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.achievement-file-type-badge {
  color: #0a6f62;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.achievement-file-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.achievement-file-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #0a6f62;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  word-break: break-word;
  cursor: pointer;
}

.achievement-file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.achievement-file-action {
  border: 0;
  background: transparent;
  padding: 0;
  color: #35586b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.achievement-file-remove {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8a3b3b;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.file-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.file-preview-modal.is-hidden {
  display: none;
}

.file-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 32, 0.72);
}

.file-preview-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(8, 24, 32, 0.35);
}

.file-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #d7e4ec;
  background: #f7fbfc;
}

.file-preview-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.file-preview-body {
  min-height: 280px;
  max-height: calc(88vh - 64px);
  overflow: auto;
  background: #101820;
  display: grid;
  place-items: center;
  padding: 16px;
}

.file-preview-image {
  max-width: 100%;
  max-height: calc(88vh - 96px);
  object-fit: contain;
  border-radius: 8px;
}

.file-preview-frame {
  width: min(900px, 100%);
  height: min(70vh, 720px);
  border: 0;
  background: #ffffff;
  border-radius: 8px;
}

.file-preview-media {
  width: min(900px, 100%);
  max-height: min(70vh, 720px);
}

.file-preview-fallback {
  color: #ffffff;
  text-align: center;
  line-height: 1.5;
}

.file-preview-fallback a {
  color: #8de0d4;
  font-weight: 800;
}

.achievement-remark-input {
  width: 100%;
  min-width: 160px;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid #c8d7e3;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.achievement-remark-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 143, 127, 0.16);
  outline: none;
}

.achievement-remark-input:disabled,
.achievement-file-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.achievement-submit-panel {
  grid-template-columns: 1fr auto;
}

.achievement-submit-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.achievement-submit-remark {
  min-height: 42px;
}

.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #bcd1de;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.approval-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.approval-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid #d7e5ec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.approval-tab.active {
  border-color: #60d3c6;
  background: #eafaf7;
  color: #075e57;
}

.approval-tab strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #dff7f1;
  color: #075e57;
  font-size: 0.78rem;
}

.achievement-approval-table table,
.achievement-review-table table {
  min-width: 1320px;
}

.achievement-approval-table {
  overflow: auto;
}

.achievement-approval-table th:nth-child(1),
.achievement-approval-table td.achievement-sticky-project {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 150px;
  background: #fff;
  box-shadow: 8px 0 10px -8px rgba(15, 23, 42, 0.18);
}

.achievement-approval-table th:nth-child(2),
.achievement-approval-table td.achievement-sticky-fco {
  position: sticky;
  left: 150px;
  z-index: 2;
  min-width: 150px;
  background: #fff;
  box-shadow: 8px 0 10px -8px rgba(15, 23, 42, 0.12);
}

.achievement-approval-table thead th:nth-child(1),
.achievement-approval-table thead th:nth-child(2) {
  z-index: 3;
  background: #f7fafc;
}

.achievement-review-table {
  border-radius: 0;
}

.achievement-review-table table {
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
}

.achievement-review-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f7f6;
  color: #4a5d6b;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #d7e4e1;
}

.achievement-review-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f5;
  font-size: 0.92rem;
  vertical-align: top;
}

.achievement-review-table tbody tr:hover td {
  background: #f8fbfa;
}

.achievement-review-table .col-sno {
  width: 64px;
  text-align: center;
}

.achievement-review-table .col-theme {
  min-width: 220px;
  max-width: 280px;
}

.achievement-review-table .col-activity {
  min-width: 260px;
  max-width: 340px;
}

.achievement-review-table .col-project-activity {
  min-width: 240px;
}

.achievement-review-table .col-unit {
  width: 110px;
  white-space: nowrap;
  color: #5b6b78;
}

.achievement-review-table .col-num {
  width: 110px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.achievement-review-table tfoot td {
  position: sticky;
  bottom: 0;
  background: #eef8f5;
  border-top: 1px solid #c5ddd6;
  font-weight: 800;
  padding: 12px 14px;
}

.achievement-review-total-row td:first-child {
  text-align: right;
  color: #0f5c55;
}

.achievement-review-total-row .col-num {
  color: var(--brand-dark);
}

.action-plan-review-panel.achievement-review-panel,
.action-plan-review-modal .action-plan-review-panel {
  width: min(96vw, 1280px);
}

.action-plan-review-modal .approval-change-overview {
  margin: 0 16px 12px;
  border-radius: 12px;
}

.import-history-panel {
  overflow: hidden;
}

.collapsible-panel .table-heading {
  gap: 16px;
}

.collapsible-panel.is-collapsed .table-heading {
  border-bottom: 0;
}

.collapsible-content {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.collapsible-tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
}

.panel-toggle-button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #b8d8d2;
  border-radius: 8px;
  color: #075e57;
  background: #eefaf7;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.panel-toggle-button:hover {
  border-color: #078477;
  background: #ddf4ef;
  transform: translateY(-1px);
}

.panel-toggle-button:focus-visible {
  outline: 3px solid rgba(7, 132, 119, 0.18);
  outline-offset: 2px;
}

.import-history-panel table {
  min-width: 1040px;
}

.import-history-panel .approval-review-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 104px;
  text-decoration: none;
}

.import-error {
  margin-top: 6px;
  color: #a23b00;
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 820px) {
  .collapsible-tools {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .collapsible-tools .table-search,
  .panel-toggle-button {
    width: 100%;
  }
}

.budget-utilization-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
  gap: 16px;
  width: 100%;
}

.budget-utilization-filter-form label {
  display: grid;
  gap: 8px;
}

.budget-excel-panel {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(360px, 1fr);
  gap: 12px;
  margin: 12px 0;
}

.budget-excel-card {
  display: grid;
  align-content: end;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e6ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.budget-excel-card .secondary-button,
.budget-excel-card .submit-plan-button,
.budget-utilization-import-form .input {
  min-height: 38px;
  border-radius: 10px;
}

.budget-utilization-import-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.budget-utilization-import-form .filter-label {
  grid-column: 1 / -1;
}

.budget-utilization-import-form .submit-plan-button {
  padding: 9px 12px;
  white-space: nowrap;
}

.budget-utilization-metrics {
  margin: 14px 0;
}

.budget-audit-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.budget-audit-strip > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dce7ee;
  border-radius: 8px;
  background: #ffffff;
}

.budget-audit-strip span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.budget-audit-strip strong {
  color: #102035;
  font-size: 0.98rem;
}

.budget-audit-strip small {
  color: #475467;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.budget-utilization-panel {
  overflow: hidden;
}

.budget-utilization-table-wrap {
  max-height: calc(100vh - 410px);
  min-height: 260px;
  overflow: auto;
}

.budget-utilization-table {
  min-width: 1420px;
  border-collapse: separate;
  border-spacing: 0;
}

.budget-utilization-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f8fb;
}

.budget-utilization-table th:first-child,
.budget-utilization-table td:first-child {
  width: 72px;
  text-align: center;
}

.budget-utilization-table td {
  vertical-align: top;
}

.budget-utilization-table .money-cell {
  min-width: 150px;
}

.budget-prior-month-cell {
  background: #f3faf8;
  color: #0a6f62;
}

.budget-report-table {
  min-width: 1240px;
}

.budget-audit-line {
  display: block;
  max-width: 210px;
  margin-top: 5px;
  color: #475467;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}

.budget-quarter-heading,
.budget-quarter-cell {
  background: #eef4ff;
  color: #1d4f91;
}

.mis-budget-header {
  border-color: #cfe5df;
  background: #f8fcfb;
}

.mis-budget-panel {
  border-color: #cfe0e8;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.mis-budget-panel .table-heading {
  gap: 16px;
  border-bottom: 1px solid #dbe8ee;
  background: #ffffff;
}

.mis-budget-panel .table-actions {
  flex-wrap: wrap;
}

.mis-budget-table-wrap {
  max-height: calc(100vh - 350px);
  min-height: 360px;
  background: #ffffff;
  scrollbar-gutter: stable;
}

.mis-budget-table {
  min-width: 2240px;
  table-layout: fixed;
}

.mis-budget-table th,
.mis-budget-table td {
  padding: 12px 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mis-budget-table th {
  color: #243247;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: normal;
}

.mis-budget-table tbody tr:nth-child(odd) td {
  background: #f7fcfa;
}

.mis-budget-table tbody tr:hover td {
  background: #eef8f4;
}

.mis-budget-table th:nth-child(1),
.mis-budget-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  text-align: center;
}

.mis-budget-table th:nth-child(2),
.mis-budget-table td:nth-child(2) {
  position: sticky;
  left: 84px;
  z-index: 3;
  width: 170px;
  min-width: 170px;
  box-shadow: 10px 0 18px rgba(15, 23, 42, 0.08);
}

.mis-budget-table th:nth-child(1),
.mis-budget-table th:nth-child(2) {
  z-index: 5;
}

.mis-budget-table td:nth-child(2) strong {
  display: block;
  color: #102035;
  font-weight: 900;
}

.mis-budget-table th:nth-child(3),
.mis-budget-table td:nth-child(3) {
  width: 250px;
  min-width: 250px;
}

.mis-budget-table th:nth-child(4),
.mis-budget-table td:nth-child(4) {
  width: 110px;
  min-width: 110px;
  text-align: center;
}

.mis-budget-table th:nth-child(5),
.mis-budget-table td:nth-child(5),
.mis-budget-table th:nth-child(11),
.mis-budget-table td:nth-child(11),
.mis-budget-table th:nth-child(12),
.mis-budget-table td:nth-child(12) {
  width: 160px;
  min-width: 160px;
}

.mis-budget-table th:nth-child(6),
.mis-budget-table td:nth-child(6) {
  width: 130px;
  min-width: 130px;
}

.mis-budget-table th:nth-child(7),
.mis-budget-table td:nth-child(7),
.mis-budget-table th:nth-child(8),
.mis-budget-table td:nth-child(8),
.mis-budget-table th:nth-child(10),
.mis-budget-table td:nth-child(10) {
  width: 165px;
  min-width: 165px;
}

.mis-budget-table th:nth-child(9),
.mis-budget-table td:nth-child(9) {
  width: 150px;
  min-width: 150px;
}

.mis-budget-table .month-allocation-heading,
.mis-budget-table .month-allocation-cell {
  width: 180px;
  min-width: 180px;
}

.mis-budget-table .month-utilized-heading,
.mis-budget-table .month-utilized-cell {
  width: 190px;
  min-width: 190px;
}

.mis-budget-table .budget-quarter-heading,
.mis-budget-table .budget-quarter-cell {
  width: 150px;
  min-width: 150px;
}

@media (max-width: 900px) {
  .mis-budget-table-wrap {
    max-height: calc(100vh - 300px);
    min-height: 380px;
  }

  .mis-budget-table {
    min-width: 1960px;
  }

  .mis-budget-table th,
  .mis-budget-table td {
    padding: 10px 12px;
  }

  .mis-budget-table th:nth-child(1),
  .mis-budget-table td:nth-child(1) {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
  }

  .mis-budget-table th:nth-child(2),
  .mis-budget-table td:nth-child(2) {
    left: 72px;
    width: 150px;
    min-width: 150px;
  }
}

.budget-utilization-input {
  width: 130px;
  border-radius: 10px;
}

.budget-utilization-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid #dde8eb;
  background: #f8fbfa;
}

.budget-utilization-submit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.budget-utilization-submit .submit-plan-button {
  min-width: 160px;
}

.budget-utilization-submit .secondary-button {
  min-width: 130px;
}

.budget-utilization-table .summary-status {
  min-width: 58px;
  justify-content: center;
}

.pis-upload-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pis-master-grid {
  grid-template-columns: minmax(260px, 520px);
}

.document-link-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-file-list {
  display: grid;
  gap: 10px;
  min-width: 260px;
  margin: 0;
  padding: 0;
}

.report-file-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d7e7ef;
  border-radius: 8px;
  background: #fbfefd;
}

.report-file-label {
  color: #5c7088;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-file-card .achievement-file-item {
  grid-template-columns: 48px minmax(0, 1fr);
}

.report-file-card .achievement-file-thumb-button,
.report-file-card .achievement-file-type-badge {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.report-file-card .achievement-file-link {
  max-width: 220px;
  font-size: 0.82rem;
}

.report-info-filter-toolbar .budget-utilization-filter-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.report-info-stack {
  display: grid;
  gap: 10px;
}

.report-info-section .table-heading {
  background: linear-gradient(90deg, rgba(10, 111, 98, 0.08), rgba(255, 255, 255, 0));
}

.page-header:has(+ .table-panel.import-panel),
.page-header:has(+ .toolbar) {
  margin-bottom: 8px;
}

.import-panel .table-heading {
  padding-bottom: 10px;
}

.import-panel .import-form {
  padding-bottom: 0;
}

.table-panel + .toolbar,
.toolbar + .table-panel,
.metric-grid + .report-info-stack {
  margin-top: 8px;
}

.project-info-sheet-panel .table-heading {
  background: linear-gradient(90deg, rgba(8, 120, 111, 0.12), rgba(47, 111, 214, 0.08));
}

.report-info-section .responsive-table table {
  min-width: 1280px;
}

.report-info-date-label {
  display: block;
  margin-bottom: 4px;
  color: #5c7088;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-info-section .report-file-list {
  min-width: 230px;
}

@media (max-width: 760px) {
  .action-plan-filter-form,
  .records-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .records-filter-toolbar .toolbar-actions {
    width: 100%;
  }

  .project-info-import-row {
    grid-template-columns: 1fr;
  }

  .project-info-import-row .submit-plan-button,
  .project-info-export-button {
    width: 100%;
  }
}

@media (max-width: 1120px) {
  .record-change-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-utilization-filter-form {
    grid-template-columns: 1fr;
  }

  .pis-upload-grid,
  .pis-master-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .record-change-strip {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .budget-utilization-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .budget-utilization-submit-actions {
    justify-content: stretch;
  }

  .budget-excel-panel {
    grid-template-columns: 1fr;
  }

  .budget-utilization-import-form {
    grid-template-columns: 1fr;
  }

  .budget-utilization-submit-actions .submit-plan-button,
  .budget-utilization-submit-actions .secondary-button {
    width: 100%;
  }

  .page-header h1 {
    font-size: clamp(1.55rem, 8vw, 2.3rem);
  }

  .header-card {
    width: 100%;
    min-width: 0;
  }

  .submit-panel,
  .approval-panel,
  .record-approval-panel {
    gap: 12px;
  }

  .record-approval-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .approval-modal-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .approval-decision-actions {
    grid-template-columns: 1fr;
  }

  .approval-decision-buttons {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .achievement-filter-form {
    grid-template-columns: 1fr;
  }

  .achievement-return-entry-modal {
    padding: 10px;
  }

  .achievement-return-entry-panel {
    width: 96vw;
    max-height: 92vh;
  }

  .achievement-return-entry-body {
    max-height: calc(92vh - 78px);
  }

  .achievement-submit-panel {
    grid-template-columns: 1fr;
  }

  .achievement-submit-actions,
  .approval-tabs {
    grid-template-columns: 1fr;
  }

  .achievement-input {
    width: 136px;
  }
}

/* Sidebar polish: keep the menu clean on every page and viewport. */
.app-content {
  padding-left: 276px;
}

.sidebar {
  width: 246px;
  height: calc(100vh - 28px);
  max-height: calc(100vh - 28px);
  overflow: hidden;
}

.sidebar-nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.sidebar-brand {
  min-width: 0;
}

.sidebar-brand .brand-copy {
  min-width: 0;
}

.sidebar-brand .brand-copy small {
  max-width: 160px;
}

.sidebar-section-toggle {
  border-radius: 10px;
}

.sidebar-section-menu {
  gap: 6px;
}

.side-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}

.side-link > span:not(.side-icon):not(.nav-alert-badge) {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-link .nav-alert-badge {
  margin-left: 0;
  justify-self: end;
}

.side-icon,
.side-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.sidebar-user {
  min-width: 0;
}

.sidebar-user-main {
  min-width: 0;
}

.sidebar-user strong,
.sidebar-user small {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submit-plan-button,
.return-button,
.approval-review-button,
.panel-toggle-button {
  white-space: nowrap;
}

.table-heading {
  min-width: 0;
}

.table-heading > div:first-child {
  min-width: 0;
}

.table-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 1120px) {
  .app-content {
    padding-left: 0;
    padding-top: 104px;
  }

  .sidebar {
    width: auto;
    height: auto;
    max-height: 82px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
  }

  .sidebar-nav {
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    gap: 8px;
    overflow: visible;
  }

  .sidebar-section {
    flex: 0 0 auto;
  }

  .sidebar-section-toggle {
    min-height: 44px;
    white-space: nowrap;
  }

  .sidebar-section-menu {
    display: flex;
  }

  .sidebar-section:not(.is-open) .sidebar-section-menu {
    display: none;
  }

  .side-link {
    display: flex;
    min-width: max-content;
  }

  .side-link > span:not(.side-icon):not(.nav-alert-badge) {
    display: inline;
    overflow: visible;
    white-space: nowrap;
  }
}

@media (max-width: 820px) {
  .app-content {
    padding-top: 96px;
  }

  .sidebar {
    inset: 8px 8px auto;
    padding: 10px;
  }

  .sidebar-brand {
    padding: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .sidebar-section-toggle {
    min-height: 40px;
    padding: 7px 10px;
  }

  .side-link {
    min-height: 40px;
    padding: 6px 9px;
  }

  .table-heading {
    align-items: stretch;
  }

  .table-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .submit-plan-button,
  .return-button,
  .approval-review-button,
  .panel-toggle-button {
    max-width: 100%;
    white-space: normal;
  }
}

/* Vertical Action Plan Record toolbar: keep export button out of filter fields. */
.records-filter-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  align-items: end;
  justify-content: stretch;
  gap: 14px;
}

.records-filter-toolbar .action-plan-filter-form,
.records-filter-toolbar .achievement-record-filter-form,
.records-filter-toolbar .approval-records-filter {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.records-filter-toolbar .action-plan-filter-form label,
.records-filter-toolbar .achievement-record-filter-form label,
.records-filter-toolbar .approval-records-filter-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: initial;
}

.records-filter-toolbar .action-plan-filter-form .filter-label,
.records-filter-toolbar .achievement-record-filter-form .filter-label,
.records-filter-toolbar .approval-records-filter .filter-label {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.records-filter-toolbar .action-plan-filter-form .select,
.records-filter-toolbar .achievement-record-filter-form .select,
.records-filter-toolbar .approval-records-filter .select {
  min-height: 38px;
  height: 37px;
  padding: 7px 24px 7px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  background-color: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.03);
}

.records-filter-toolbar .toolbar-actions,
.records-filter-toolbar .secondary-button {
  width: 100%;
  min-width: 0;
}

.records-filter-toolbar .secondary-button {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.toolbar .action-plan-filter-form,
.toolbar .achievement-record-filter-form,
.toolbar .approval-records-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 7px;
  align-items: end;
  width: 100%;
  min-width: 0;
}

.toolbar .action-plan-filter-form label,
.toolbar .achievement-record-filter-form label,
.toolbar .approval-records-filter-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: initial;
}

.toolbar .action-plan-filter-form .filter-label,
.toolbar .achievement-record-filter-form .filter-label,
.toolbar .approval-records-filter .filter-label {
  margin: 0 0 0 3px;
  font-size: 0.63rem;
  letter-spacing: 0.06em;
}

.toolbar .action-plan-filter-form .select,
.toolbar .achievement-record-filter-form .select,
.toolbar .approval-records-filter .select {
  min-height: 37px;
  height: 37px;
  padding: 7px 24px 7px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  background-color: #ffffff;
}

.toolbar .action-plan-filter-form .select:focus,
.toolbar .achievement-record-filter-form .select:focus,
.toolbar .approval-records-filter .select:focus {
  border-color: #20c7b2;
  box-shadow: 0 0 0 3px rgba(32, 199, 178, 0.14), 0 8px 18px rgba(15, 23, 42, 0.05);
}

.select.is-placeholder {
  color: #66748a;
}

@media (max-width: 980px) {
  .records-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .records-filter-toolbar .action-plan-filter-form,
  .records-filter-toolbar .achievement-record-filter-form,
  .records-filter-toolbar .approval-records-filter {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .records-filter-toolbar .action-plan-filter-form,
  .records-filter-toolbar .achievement-record-filter-form,
  .records-filter-toolbar .approval-records-filter {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .status-report-summary.metric-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .status-report-summary.metric-grid-compact {
    grid-template-columns: 1fr;
  }
}

/* Application-wide responsive finish */
:root {
  --app-bg-top: #f7fbfc;
  --app-bg-mid: #eef6f4;
  --app-bg-low: #f8f5ee;
  --app-focus: rgba(9, 128, 115, 0.16);
}

body.app-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, var(--app-bg-top) 0%, var(--app-bg-mid) 46%, var(--app-bg-low) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-frame {
  min-height: 100vh;
}

.app-shell {
  width: min(100% - 28px, 1480px);
}

.page-header,
.toolbar,
.table-panel,
.profile-panel,
.metric-grid,
.admin-grid,
.approval-tabs,
.achievement-context,
.record-status-strip {
  width: 100%;
}

.page-header {
  min-width: 0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 36px rgba(16, 24, 40, 0.08);
}

.page-header > div:first-child {
  min-width: 0;
}

.page-header h1,
.table-heading h2,
.profile-identity h2,
.empty-state h2 {
  overflow-wrap: anywhere;
}

.page-header .muted,
.profile-identity .muted,
.table-heading .muted {
  max-width: 920px;
}

.header-card {
  flex: 0 0 auto;
}

.metric-grid,
.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metric {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.metric span,
.metric strong {
  min-width: 0;
}

.metric strong {
  overflow-wrap: anywhere;
}

.metric-teal {
  background: linear-gradient(135deg, #ffffff 0%, #eefbf7 100%);
}

.metric-blue {
  background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
}

.metric-gold {
  background: linear-gradient(135deg, #ffffff 0%, #fff7e6 100%);
}

.metric-rose {
  background: linear-gradient(135deg, #ffffff 0%, #fff0f3 100%);
}

.metric-ink {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.toolbar {
  align-items: end;
  gap: 14px;
}

.filter-form,
.action-plan-filter-form,
.budget-utilization-filter-form,
.achievement-filter-form {
  min-width: 0;
}

.filter-label,
.achievement-filter-form span,
.budget-utilization-filter-form span {
  color: #405166;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.input,
.select,
.table-search,
.fund-input,
.remark-input,
.summary-month-input,
.approval-remark,
.achievement-input,
.achievement-remark-input,
.budget-utilization-input {
  max-width: 100%;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.secondary-button,
.primary-button,
.submit-plan-button,
.return-button,
.approval-review-button,
.panel-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.secondary-button:hover,
.primary-button:hover,
.submit-plan-button:hover,
.return-button:hover,
.approval-review-button:hover,
.panel-toggle-button:hover {
  transform: translateY(-1px);
}

.secondary-button:focus-visible,
.primary-button:focus-visible,
.submit-plan-button:focus-visible,
.return-button:focus-visible,
.approval-review-button:focus-visible,
.panel-toggle-button:focus-visible,
.side-link:focus-visible,
.sidebar-section-toggle:focus-visible {
  outline: 3px solid var(--app-focus);
  outline-offset: 2px;
}

.table-panel {
  border-radius: 10px;
}

.table-heading {
  gap: 14px;
}

.table-heading > div:first-child {
  display: grid;
  gap: 4px;
}

.responsive-table {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
}

.responsive-table table {
  width: 100%;
}

.responsive-table th,
.responsive-table td {
  line-height: 1.38;
}

.responsive-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.responsive-table td {
  overflow-wrap: anywhere;
}

.code-pill,
.vertical-chip,
.table-count,
.status-badge,
.summary-status {
  max-width: 100%;
  line-height: 1.2;
}

.fund-total-panel {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fund-total-panel strong,
.header-card strong {
  overflow-wrap: anywhere;
}

.profile-panel {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
}

.profile-identity,
.profile-vertical-card {
  min-width: 0;
}

.profile-vertical-card .vertical-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  align-content: center;
}

.sidebar {
  border-radius: 16px;
}

.sidebar-section-toggle {
  min-width: 0;
}

.sidebar-section-toggle span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-link.active {
  box-shadow: 0 10px 22px rgba(255, 255, 255, 0.08);
}

.flash {
  border-radius: 10px;
}

.submission-panel {
  margin-bottom: 14px;
}

.submission-panel .fund-total-panel {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.submission-panel .fund-total-panel div {
  min-height: 64px;
  justify-items: start;
  padding: 14px 18px;
}

.import-form {
  gap: 16px;
}

.import-panel .muted,
.import-error {
  max-width: 900px;
}

.fco-remove-button {
  min-height: 34px;
  width: auto;
  padding: 7px 12px;
  font-size: 0.78rem;
}

@media (min-width: 1121px) {
  .app-frame .app-shell {
    width: calc(100vw - 306px);
    max-width: 1520px;
    margin-left: 0;
    margin-right: 24px;
  }
}

@media (max-width: 1120px) {
  .app-shell,
  .app-frame .app-shell {
    width: min(100% - 20px, 1180px);
    margin-inline: auto;
  }

  .sidebar {
    box-shadow: 0 12px 30px rgba(8, 43, 50, 0.22);
  }

  .sidebar-brand {
    flex: 0 0 auto;
  }

  .sidebar-nav {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .app-shell,
  .app-frame .app-shell {
    width: min(100% - 14px, 760px);
  }

  .page-header {
    overflow: hidden;
  }

  .page-header > div:first-child {
    padding: 18px;
  }

  .page-header h1 {
    font-size: clamp(1.55rem, 8vw, 2.25rem);
    line-height: 1.08;
  }

  .header-card {
    padding: 16px 18px;
  }

  .toolbar,
  .table-heading,
  .submit-panel,
  .approval-panel,
  .record-approval-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .records-filter-toolbar,
  .action-plan-filter-form,
  .budget-utilization-filter-form,
  .achievement-filter-form {
    grid-template-columns: 1fr !important;
  }

  .toolbar-actions,
  .toolbar-actions .secondary-button,
  .table-search,
  .filter-form,
  .select,
  .input {
    width: 100%;
  }

  .metric-grid,
  .metric-grid-compact,
  .admin-grid,
  .profile-panel,
  .fund-total-panel {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 82px;
  }

  .table-heading {
    padding: 14px;
  }

  .table-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .table-count {
    justify-content: center;
    width: 100%;
  }

  .responsive-table {
    border-radius: 0;
  }

  .responsive-table table {
    min-width: 760px;
  }

  .action-plan-table,
  .action-plan-record-table {
    min-width: 1320px;
  }

  .approval-records-panel table,
  .achievement-approval-table table,
  .achievement-review-table table,
  .budget-utilization-table,
  .report-info-section .responsive-table table {
    min-width: 980px;
  }

  .profile-identity {
    align-items: flex-start;
  }

  .profile-avatar {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
  }

  .secondary-button,
  .primary-button,
  .submit-plan-button,
  .return-button,
  .approval-review-button,
  .panel-toggle-button {
    width: 100%;
    min-height: 42px;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  body.app-body {
    font-size: 14px;
  }

  .app-content {
    padding-top: 88px;
  }

  .sidebar {
    max-height: 72px;
    gap: 8px;
  }

  .sidebar-brand {
    min-width: 36px;
  }

  .sidebar-brand .brand-copy,
  .side-icon,
  .sidebar-section-caret {
    display: none;
  }

  .sidebar-section-toggle,
  .side-link {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .page-header > div:first-child,
  .toolbar,
  .profile-identity,
  .profile-vertical-card,
  .overall-summary-panel,
  .approval-summary-only,
  .import-form {
    padding: 14px;
  }

  .metric {
    padding: 13px 14px 13px 17px;
  }

  .metric strong {
    font-size: 1.35rem;
  }

  .header-card strong {
    font-size: 1.05rem;
  }

  .responsive-table table {
    min-width: 680px;
  }

  th,
  td,
  .modal-table th,
  .modal-table td {
    padding: 10px 11px;
    font-size: 0.82rem;
  }
}

/* MIS admin management screens */
.admin-hero {
  border-left: 5px solid #0b7f73;
}

.admin-editor-panel,
.admin-data-panel,
.compact-upload-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.action-plan-upload-panel {
  border: 1px solid rgba(185, 207, 220, 0.95);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(8, 38, 51, 0.07);
}

.action-plan-upload-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(216, 226, 234, 0.95);
  background: linear-gradient(135deg, #fbfefd 0%, #f4f9fb 100%);
}

.action-plan-upload-heading h2 {
  font-size: 1.18rem;
}

.action-plan-download-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 8px;
  width: 100%;
}

.action-plan-upload-panel .action-plan-download-button {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: none;
  line-height: 1.2;
  white-space: normal;
}

.action-plan-upload-panel .submit-plan-button.action-plan-download-button {
  min-width: 0;
  border: 1px solid #0b7f73;
  background: #0b7f73;
}

.action-plan-upload-form {
  padding: 16px 20px 18px;
}

.action-plan-upload-form .import-admin-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.action-plan-upload-form .input[type="file"] {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #ffffff;
}

.action-plan-upload-form .admin-form-footer {
  margin-top: 2px;
  padding-top: 14px;
}

.action-plan-upload-form .admin-form-footer .submit-plan-button {
  min-height: 44px;
  border-radius: 8px;
}

.admin-editor-panel.collapsible-panel,
.admin-data-panel.collapsible-panel {
  border-color: rgba(177, 200, 214, 0.95);
}

.admin-editor-panel.is-collapsed,
.admin-data-panel.is-collapsed {
  background: #fbfefd;
  box-shadow: 0 10px 26px rgba(8, 38, 51, 0.06);
}

.admin-editor-panel .collapsible-content {
  background: #ffffff;
}

.admin-master-form {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.admin-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-form-grid label > span,
.toggle-line span {
  color: #405166;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.employee-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
}

.fco-form-grid {
  grid-template-columns: minmax(240px, 1.2fr) minmax(140px, 0.5fr) minmax(220px, 1fr);
}

.fco-import-grid {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}

.fco-employee-picker-form {
  padding-bottom: 0;
}

.fco-employee-picker-grid {
  grid-template-columns: minmax(260px, 520px);
}

.import-admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.action-plan-row-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.action-plan-row-grid .wide-field {
  grid-column: span 2;
}

.month-input-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(72px, 1fr));
  gap: 8px;
}

.month-input-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.month-input-grid span {
  color: #405166;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.month-admin-input {
  min-height: 38px;
  padding: 7px 9px;
  text-align: right;
}

.admin-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 226, 234, 0.9);
}

.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
}

.toggle-line input,
.fco-check-card input {
  width: 17px;
  height: 17px;
  accent-color: #0b7f73;
}

.row-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-action-group form {
  margin: 0;
}

.admin-row-button {
  min-width: 78px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.is-disabled-row td {
  background: #f8fafc;
  color: #667085;
}

.is-disabled-row strong {
  color: #405166;
}

.fco-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow: auto;
  padding: 2px;
}

.fco-check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(216, 226, 234, 0.95);
  border-radius: 8px;
  background: #ffffff;
}

.fco-check-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fco-check-card strong,
.fco-check-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fco-check-card small {
  color: #66748a;
  font-weight: 800;
}

.employee-admin-table {
  min-width: 1220px;
}

.fco-access-table {
  min-width: 760px;
}

.action-plan-main-table {
  min-width: 1540px;
}

.pb-main-table {
  min-width: 1460px;
}

.parent-activity-table {
  min-width: 820px;
}

.action-plan-data-scroll,
.collapsible-content .responsive-table {
  max-height: min(640px, 68vh);
  overflow: auto;
}

.collapsible-content .responsive-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f7fb;
}

.action-plan-main-table th,
.action-plan-main-table td {
  padding: 11px 12px;
  vertical-align: top;
}

.action-plan-main-table .muted {
  margin-top: 4px;
  line-height: 1.35;
}

.action-plan-main-table td:nth-child(3),
.action-plan-main-table td:nth-child(4),
.action-plan-main-table td:nth-child(5),
.action-plan-main-table td:nth-child(6) {
  min-width: 210px;
}

@media (max-width: 980px) {
  .action-plan-upload-heading {
    grid-template-columns: 1fr;
  }

  .action-plan-download-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fco-form-grid,
  .fco-import-grid {
    grid-template-columns: 1fr;
  }

  .month-input-grid {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
  }

  .action-plan-row-grid .wide-field {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .admin-master-form {
    padding: 0 14px 14px;
  }

  .action-plan-download-actions,
  .action-plan-upload-form .import-admin-grid,
  .admin-form-grid,
  .month-input-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .row-action-group {
    align-items: stretch;
    flex-direction: column;
  }

  .row-action-group .secondary-button,
  .row-action-group .submit-plan-button,
  .row-action-group .return-button,
  .row-action-group form {
    width: 100%;
  }
}
