:root {
  --ink: #17202a;
  --muted: #617080;
  --line: #d9e2ea;
  --paper: #f6f8fb;
  --white: #ffffff;
  --red: #c7362f;
  --teal: #0b8b87;
  --gold: #d59a2e;
  --green: #2c8a54;
  --blue: #276fbf;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.12);
}

/* Finance Global navigation group */
.control-nav .finance-nav-group {
  margin: 1px 0;
}

.control-nav .finance-nav-group-title {
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 3px;
  color: #dce5f2;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  list-style: none;
  user-select: none;
}

.control-nav .finance-nav-group-title::-webkit-details-marker {
  display: none;
}

.control-nav .finance-nav-group-title .nav-icon {
  width: 16px;
  flex: 0 0 16px;
  color: #b8c5d8;
}

.control-nav .finance-nav-group-title .nav-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-nav .finance-nav-group.active .finance-nav-group-title,
.control-nav .finance-nav-group.active .finance-nav-group-title .nav-icon,
.control-nav .finance-nav-group-title:hover {
  color: #ffffff;
}

.control-nav .finance-nav-group.active .finance-nav-group-title {
  background: rgba(255, 255, 255, 0.08);
}

.control-nav .finance-nav-label {
  width: auto;
  flex: 1;
  display: inline;
  color: inherit;
  text-align: left;
}

.control-nav .finance-nav-chevron {
  width: auto;
  flex: 0 0 auto;
  color: #a9b6c8;
  font-size: 15px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.control-nav .finance-nav-group[open] .finance-nav-chevron {
  transform: rotate(90deg);
}

.control-nav .finance-nav-submenu {
  display: grid;
  gap: 2px;
  margin: 2px 0 0 17px;
  padding-left: 8px;
  border-left: 1px solid rgba(184, 197, 216, 0.28);
}

.control-nav .finance-nav-submenu a {
  min-height: 28px;
  padding: 0 8px;
  font-size: 8.5px;
  font-weight: 750;
}

.control-nav .finance-nav-submenu a .nav-submenu-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fafc;
}

.login-body {
  min-height: 100vh;
  color: #263044;
  background:
    linear-gradient(135deg, rgba(31, 131, 216, 0.16), rgba(58, 67, 91, 0.18)),
    #eef5f8;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(430px, 100%);
  overflow: hidden;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 55px rgba(38, 48, 72, 0.18);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  color: #ffffff;
  background: #3a435b;
}

.login-brand img {
  width: 124px;
  height: 42px;
  object-fit: contain;
  padding: 4px 6px;
  border-radius: 4px;
  background: #ffffff;
}

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

.login-brand strong {
  font-size: 16px;
  line-height: 1.1;
}

.login-brand span {
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.login-form h1 {
  margin: 0 0 5px;
  color: #1f2937;
  font-size: 24px;
  letter-spacing: 0;
}

.login-form p {
  margin: 0;
  color: #697789;
  font-size: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #526172;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #d8e1ee;
  border-radius: 4px;
  color: #1f2937;
  background: #fbfdff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.login-form input:focus {
  outline: 2px solid rgba(31, 131, 216, 0.18);
  border-color: #1f83d8;
  background: #ffffff;
}

.login-form button {
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  background: #1f83d8;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.login-error {
  padding: 9px 10px;
  border: 1px solid #ffd2da;
  border-radius: 4px;
  color: #bb1d3a !important;
  background: #fff2f5;
  font-weight: 800;
}

a {
  color: inherit;
  text-decoration: none;
}

.visual-track {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.track-item {
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.track-item#spmk-link {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.track-item#spmk-link:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

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

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.topbar,
.hero-grid,
.minimal-topbar,
main {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.minimal-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 0 clamp(18px, 4vw, 56px);
}

.site-title {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.brand,
.nav-actions,
.hero-actions,
.step-top,
.pic-list {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  flex-wrap: wrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  letter-spacing: 0;
}

.nav-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-actions a,
.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(92vh - 70px);
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.06rem;
  line-height: 1.7;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.primary-button {
  border-radius: 8px;
  padding: 12px 18px;
  color: #151515;
  background: var(--gold);
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.workflow-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.workflow-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.workflow-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(360px, calc(100vw - 32px));
  padding: 22px;
  background: var(--white);
  box-shadow: 18px 0 50px rgba(23, 32, 42, 0.22);
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  z-index: 20;
  overflow-y: auto;
}

.workflow-drawer-open .workflow-drawer {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 32, 42, 0.44);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 19;
}

.workflow-drawer-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.drawer-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f7f9fb;
  font-weight: 900;
  cursor: pointer;
}

.drawer-menu {
  display: grid;
  gap: 10px;
}

.drawer-menu a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.drawer-menu strong,
.drawer-menu small {
  display: block;
}

.drawer-menu small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.process-visual {
  min-height: 420px;
  display: grid;
  align-content: center;
  gap: 22px;
}

.visual-track {
  display: grid;
  gap: 12px;
}

.visual-track span {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-left: 7px solid var(--gold);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.visual-track span:nth-child(2) {
  border-left-color: var(--teal);
  transform: translateX(22px);
}

.visual-track span:nth-child(3) {
  border-left-color: var(--red);
  transform: translateX(44px);
}

.visual-track span:nth-child(4) {
  border-left-color: var(--blue);
  transform: translateX(22px);
}

.visual-track span:nth-child(5) {
  border-left-color: var(--green);
}

.gauge {
  width: min(100%, 360px);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.gauge strong {
  display: block;
  font-size: 4rem;
  line-height: 1;
}

main {
  padding: 34px clamp(18px, 4vw, 56px) 64px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -82px;
  position: relative;
  z-index: 2;
}

.metrics article,
.step-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(23, 32, 42, 0.08);
}

.metrics article {
  padding: 20px;
}

.metrics span,
.document-box span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 2.2rem;
}

.section-heading,
.panel-heading {
  margin-top: 46px;
}

.section-heading h2,
.panel-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.flow-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.step-card {
  min-height: 236px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.step-top {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-weight: 900;
}

.status {
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--muted);
  background: #eef3f7;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.step-card[data-status="active"] .step-number,
.step-card[data-status="active"] .status {
  color: var(--white);
  background: var(--blue);
}

.step-card[data-status="review"] .step-number,
.step-card[data-status="review"] .status {
  color: #211600;
  background: var(--gold);
}

.step-card[data-status="decision"] .step-number,
.step-card[data-status="decision"] .status {
  color: var(--white);
  background: var(--red);
}

.step-card[data-status="complete"] .step-number,
.step-card[data-status="complete"] .status {
  color: var(--white);
  background: var(--green);
}

.step-card h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.step-card p,
.timeline-item p {
  color: var(--muted);
  line-height: 1.55;
}

.pic-list {
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.pic-list span {
  border-radius: 999px;
  padding: 6px 9px;
  color: #334252;
  background: #eef3f7;
  font-size: 0.76rem;
  font-weight: 800;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 22px;
}

.panel .panel-heading {
  margin-top: 0;
  margin-bottom: 20px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.timeline-item > span {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: var(--teal);
  font-weight: 900;
}

.timeline-item h3,
.timeline-item p {
  margin-bottom: 4px;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-weight: 800;
}

.bar-row i {
  display: block;
  height: 10px;
  width: calc((var(--value) / 6) * 100%);
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.document-box {
  margin-top: 24px;
  padding: 16px;
  border-radius: 8px;
  background: #f1f5f7;
}

.document-box strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.workflow-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.workflow-step {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.06);
  transition: all 0.3s ease;
}

.workflow-step:hover {
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.12);
  transform: translateY(-2px);
}

.workflow-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.workflow-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue);
  font-weight: 900;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.workflow-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
}

.workflow-subtitle {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.workflow-list {
  margin: 0;
  padding-left: 18px;
  list-style: none;
  font-size: 0.88rem;
  line-height: 1.6;
}

.workflow-list li {
  color: var(--muted);
  margin-bottom: 6px;
  position: relative;
  padding-left: 18px;
}

.workflow-list li:before {
  content: "▪";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 900;
  font-size: 0.7rem;
}

.workflow-list li strong {
  color: var(--ink);
  font-weight: 800;
}

.workflow-list ul {
  margin: 6px 0;
  padding-left: 12px;
  list-style: none;
}

.workflow-list ul li {
  color: var(--ink);
  font-size: 0.85rem;
  padding-left: 18px;
}

.inquiry-form {
  display: grid;
  gap: 20px;
}

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

.form-grid label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}

.form-grid label.full-width {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  min-height: 44px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.form-grid textarea {
  min-height: 160px;
  resize: vertical;
}

.success-box {
  padding: 18px 20px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #e9f7ef;
  border: 1px solid #c7ecd8;
  color: #1f5132;
  font-weight: 700;
}

/* Dashboard Styles */
.dashboard-metrics {
  margin-top: -46px;
  position: relative;
  z-index: 2;
}

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

.metric-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.08);
  transition: all 0.3s ease;
}

.metric-card:hover {
  box-shadow: 0 8px 28px rgba(23, 32, 42, 0.12);
  transform: translateY(-2px);
  border-color: var(--blue);
}

.metric-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.metric-icon {
  font-size: 1.8rem;
}

.metric-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.dashboard-section {
  margin-top: 40px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.project-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.06);
  transition: all 0.3s ease;
}

.project-card:hover {
  box-shadow: 0 6px 20px rgba(23, 32, 42, 0.12);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.project-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.project-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.project-status[data-status="active"] {
  background: #d1f4fd;
  color: var(--blue);
}

.project-status[data-status="completed"] {
  background: #d4edda;
  color: var(--green);
}

.project-client {
  margin: 4px 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.project-progress {
  margin-bottom: 12px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e8eef7;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.project-dates {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

.schedules-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.schedule-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition: all 0.3s ease;
}

.schedule-item:hover {
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.08);
}

.schedule-time {
  flex-shrink: 0;
}

.schedule-time .time {
  display: inline-block;
  padding: 10px 14px;
  background: var(--blue);
  color: var(--white);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.schedule-details {
  flex: 1;
}

.schedule-details h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.schedule-details p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.schedule-team {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.team-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #f0f4f9;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink);
}

.schedule-status {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.schedule-status[data-status="scheduled"] {
  background: #e7f3ff;
  color: var(--blue);
}

.schedule-status[data-status="in-progress"] {
  background: #fff4e7;
  color: var(--gold);
}

.invoices-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.invoice-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition: all 0.3s ease;
}

.invoice-item:hover {
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.08);
}

.invoice-info {
  flex: 1;
}

/* Main Dashboard Layout */
.main-dashboard {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  margin: 0 0 40px 0;
}

@media (max-width: 1200px) {
  .main-dashboard {
    grid-template-columns: 1fr;
  }
}

.dashboard-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Flowchart Styles */
.flowchart-container {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.08);
}

.flowchart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.flow-step {
  transition: all 0.3s ease;
}

.flow-step:hover rect {
  filter: brightness(1.1);
}

.legacy-workflow {
  display: none;
}

.workflow-page {
  margin-top: -42px;
  position: relative;
  z-index: 2;
}

.control-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 18px;
  align-items: start;
  margin-top: 28px;
  position: relative;
  z-index: 2;
}

.workflow-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.35fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.workflow-menu {
  position: sticky;
  top: 18px;
}

.workflow-menu-list {
  display: grid;
  gap: 8px;
}

.workflow-menu-list a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  transition: all 0.2s ease;
}

.workflow-menu-list a:hover,
.workflow-menu-list a.active {
  border-color: var(--blue);
  background: #eef6ff;
}

.menu-number,
.node-number {
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue);
  font-weight: 900;
}

.menu-number {
  width: 32px;
  height: 32px;
}

.workflow-menu-list strong,
.workflow-menu-list small {
  display: block;
}

.workflow-menu-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.workflow-main {
  display: grid;
  gap: 20px;
}

.process-map {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(23, 32, 42, 0.08);
}

.dashboard-process-map {
  box-shadow: none;
  border: 0;
  padding: 0;
}

.terminal-node {
  width: fit-content;
  min-width: 112px;
  justify-self: center;
  padding: 8px 18px;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  background: #f1fbf5;
  font-weight: 900;
  text-align: center;
}

.terminal-node.stop {
  border-color: var(--red);
  color: var(--red);
  background: #fff4f3;
}

.process-node {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 8px;
  background: #fbfcfd;
  transition: all 0.2s ease;
}

.process-node:hover,
.process-node.active {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.1);
}

.node-number {
  width: 38px;
  height: 38px;
}

.node-copy strong,
.node-copy small {
  display: block;
}

.node-copy small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.accent-blue {
  border-left-color: #276fbf;
}

.accent-orange {
  border-left-color: #ff7a1a;
}

.accent-pink {
  border-left-color: #ff1f8b;
}

.accent-green {
  border-left-color: #2c8a54;
}

.accent-purple {
  border-left-color: #5b2cc9;
}

.accent-teal {
  border-left-color: #0b8b87;
}

.decision-node,
.decision-box {
  border: 1px solid #8dd6af;
  border-radius: 8px;
  background: #f3fbf7;
  color: #1f5132;
}

.decision-node {
  display: grid;
  gap: 4px;
  width: min(100%, 420px);
  justify-self: center;
  padding: 12px 16px;
  text-align: center;
}

.decision-node span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.workflow-detail {
  display: grid;
  gap: 18px;
}

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

.process-status-strip article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.process-status-strip strong,
.process-status-strip span {
  display: block;
}

.process-status-strip span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.document-generator {
  position: sticky;
  top: 18px;
}

.document-form {
  display: grid;
  gap: 14px;
}

.document-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.document-form input,
.document-form select {
  min-height: 44px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.recent-documents {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.documents-list {
  display: grid;
  gap: 10px;
}

.document-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.document-row span,
.document-row small {
  color: var(--muted);
}

.document-row small {
  font-weight: 800;
}

.dashboard-summary {
  margin-top: -46px;
  position: relative;
  z-index: 2;
}

.simple-metrics {
  margin-top: 20px;
}

.dashboard-grid-simple {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.compact-list {
  grid-template-columns: 1fr;
}

.dashboard-action {
  display: inline-block;
  width: fit-content;
  margin-top: 16px;
}

.detail-title {
  display: flex;
  gap: 14px;
  align-items: center;
}

.detail-title h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  gap: 20px;
}

.detail-grid h3 {
  margin-bottom: 12px;
}

.decision-box {
  padding: 14px 16px;
  line-height: 1.6;
}

.output-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.output-dashboard article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.output-dashboard strong,
.output-dashboard span {
  display: block;
}

.output-dashboard span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.inline-link {
  margin-top: auto;
  color: var(--blue);
  font-weight: 800;
}

/* Metric Column Styles */
.metric-column {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.08);
  transition: all 0.3s ease;
}

.metric-column:hover {
  box-shadow: 0 8px 28px rgba(23, 32, 42, 0.12);
  border-color: var(--blue);
  transform: translateY(-2px);
}

.metric-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}

.metric-icon-large {
  font-size: 2.4rem;
}

.metric-header-top h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.metric-body {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--blue);
}

.stat-value.approved {
  color: var(--green);
}

.stat-value.pending {
  color: var(--gold);
}

.stat-value.available {
  color: var(--teal);
}

.stat-value.onduty {
  color: var(--red);
}

.stat-value.finance {
  color: var(--blue);
}

.stat-value.paid {
  color: var(--green);
}

.stat-value.outstanding {
  color: var(--red);
}

.metric-progress {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e8eef7;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

/* Charts Section */
.charts-section {
  margin: 40px 0;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.08);
}

.chart-container h3 {
  margin: 0 0 16px 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

.invoice-info h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.invoice-info p {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.invoice-info small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.invoice-status {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.invoice-status[data-status="paid"] {
  background: #d4edda;
  color: var(--green);
}

.invoice-status[data-status="pending"] {
  background: #fff3cd;
  color: #856404;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.team-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  text-align: center;
  transition: all 0.3s ease;
}

.team-card:hover {
  box-shadow: 0 6px 20px rgba(23, 32, 42, 0.12);
  transform: translateY(-2px);
}

.team-avatar {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: var(--white);
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.9rem;
}

.team-card h4 {
  margin: 8px 0 4px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.team-role {
  margin: 0 0 10px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator[data-status="active"] {
  background: var(--green);
}

.status-indicator[data-status="inactive"] {
  background: #ccc;
}

.notifications-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.notification-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #f8fbff;
  transition: all 0.3s ease;
}

.notification-item[data-type="warning"] {
  border-left-color: var(--gold);
  background: #fffbf7;
}

.notification-item[data-type="success"] {
  border-left-color: var(--green);
  background: #f0fdf5;
}

.notification-item[data-type="error"] {
  border-left-color: var(--red);
  background: #fef5f5;
}

.notification-icon {
  flex-shrink: 0;
  font-size: 1.4rem;
}

.notification-content {
  flex: 1;
}

.notification-content h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.notification-content p {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.notification-content small {
  display: block;
  font-size: 0.75rem;
  color: #999;
  font-weight: 600;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.workflow-container {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.workflow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(23, 32, 42, 0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.workflow-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.workflow-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 900;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.workflow-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
  flex: 1;
}

.workflow-subtitle {
  margin: 0 0 14px 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.workflow-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.workflow-list li {
  margin-bottom: 10px;
}

.workflow-list ul {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 18px;
}

.workflow-list ul li {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .workspace-grid,
  .workflow-layout,
  .control-workspace,
  .dashboard-grid-simple,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .workflow-menu,
  .document-generator {
    position: static;
  }

  .process-status-strip {
    grid-template-columns: 1fr;
  }

  .process-visual {
    min-height: 320px;
  }

  .metrics,
  .flow-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {

  /* Panel heading styling: uppercase for clarity */
  .panel-heading .eyebrow,
  .panel-heading h2 {
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .panel-heading h2 {
    font-size: 1rem;
    margin: 6px 0 0 0;
    color: var(--ink);
    font-weight: 800;
  }

  /* Make other panel labels and section headings uppercase for consistency */
  .document-box span,
  .detail-item .detail-label,
  .spmk-title h1,
  .spmk-section h2,
  .panel .panel-heading .eyebrow,
  .panel .panel-heading h2 {
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .topbar,
  .nav-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid {
    padding-top: 46px;
  }

  .visual-track span,
  .visual-track span:nth-child(n) {
    transform: none;
  }

  .metrics,
  .flow-board {
    grid-template-columns: 1fr;
  }

  .metrics {
    margin-top: -42px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

/* ===================== ADMIN DASHBOARD STYLES ===================== */

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

.admin-header {
  margin-bottom: 40px;
  padding: 40px;
  background: linear-gradient(135deg, #276fbf, #0b8b87);
  border-radius: 16px;
  color: white;
}

.admin-header-content h1 {
  margin: 0 0 8px 0;
  font-size: 2.4rem;
  font-weight: 900;
  color: white;
}

.admin-header-content p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.95;
  color: rgba(255, 255, 255, 0.9);
}

.admin-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.admin-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.admin-card:hover {
  box-shadow: 0 12px 32px rgba(23, 32, 42, 0.16);
  border-color: var(--blue);
  transform: translateY(-8px);
}

.card-header {
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(39, 111, 191, 0.05), rgba(11, 139, 135, 0.05));
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-icon {
  font-size: 2.4rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
}

.card-content {
  padding: 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-description {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat {
  padding: 12px;
  background: #f5f8fc;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--line);
}

.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--blue);
  margin-bottom: 4px;
}

.stat-number.approved {
  color: var(--green);
}

.stat-number.pending {
  color: var(--gold);
}

.stat-number.available {
  color: var(--teal);
}

.stat-number.onduty {
  color: var(--red);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.card-progress {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e8eef7;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 3px;
}

.progress-label {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}

.card-footer {
  padding: 16px 24px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
  text-align: right;
}

.view-more {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.admin-card:hover .view-more {
  transform: translateX(4px);
}

/* Quick Stats Section */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.stat-box {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.04);
  transition: all 0.3s ease;
}

.stat-box:hover {
  box-shadow: 0 8px 20px rgba(23, 32, 42, 0.08);
  transform: translateY(-2px);
}

.stat-box h3 {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.big-number {
  margin: 0 0 8px 0;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
}

.stat-indicator {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 600;
}

/* Detail Page Styles */
.detail-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

.detail-header {
  margin-bottom: 32px;
}

.back-button {
  display: inline-block;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: var(--blue);
  color: white;
}

.detail-header h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--ink);
}

.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.detail-stat-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.04);
  text-align: center;
}

.detail-stat-card:hover {
  box-shadow: 0 8px 20px rgba(23, 32, 42, 0.08);
  border-color: var(--blue);
}

.stat-icon {
  display: block;
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.detail-stat-card h3 {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.detail-stat-card .stat-value {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
  font-weight: 900;
  color: var(--blue);
}

.detail-stat-card .stat-value.approved {
  color: var(--green);
}

.detail-stat-card .stat-value.pending {
  color: var(--gold);
}

.detail-stat-card .stat-value.available {
  color: var(--teal);
}

.detail-stat-card .stat-value.onduty {
  color: var(--red);
}

.detail-stat-card .stat-value.paid {
  color: var(--green);
}

.detail-stat-card .stat-value.outstanding {
  color: var(--red);
}

.stat-trend {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.detail-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.04);
}

.detail-section h2 {
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
}

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table thead {
  background: #f5f8fc;
  border-bottom: 2px solid var(--line);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

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

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.approved {
  background: #d4edda;
  color: var(--green);
}

.badge.pending {
  background: #fff3cd;
  color: var(--gold);
}

.badge.paid {
  background: #d4edda;
  color: var(--green);
}

.btn-action {
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-action:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: #1e5a9e;
  box-shadow: 0 4px 12px rgba(39, 111, 191, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.btn-secondary:hover {
  background: var(--blue);
  color: white;
}

.charts-grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .admin-main {
    grid-template-columns: 1fr;
  }

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

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

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

  .admin-header-content h1 {
    font-size: 1.6rem;
  }

  .charts-grid-2col {
    grid-template-columns: 1fr;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }
}

/* ===================== CONTROL CENTER LAYOUT ===================== */

.control-body {
  background: #071121;
  color: #eef5ff;
}

.control-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  background:
    radial-gradient(circle at 80% 10%, rgba(43, 118, 226, 0.16), transparent 30rem),
    #071121;
}

.control-sidebar {
  min-height: 100vh;
  padding: 34px 36px;
  border-right: 1px solid rgba(148, 176, 215, 0.18);
  background: linear-gradient(180deg, #091525, #071221);
  position: sticky;
  top: 0;
}

.control-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.control-logo {
  display: block;
  width: 116px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(22, 198, 182, 0.12);
}

.control-brand strong,
.control-brand span {
  display: block;
}

.control-brand strong {
  font-size: 1.35rem;
}

.control-brand span {
  margin-top: 6px;
  color: #9fb2cc;
}

.sidebar-stepper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

.sidebar-stepper button {
  min-height: 52px;
  border: 1px solid rgba(148, 176, 215, 0.22);
  border-radius: 10px;
  color: #dce9fb;
  background: #12253c;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.control-nav {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  padding-right: 12px;
}

.control-nav a {
  min-height: 70px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border: 1px solid rgba(148, 176, 215, 0.14);
  border-radius: 10px;
  color: #dce9fb;
  background: #12253c;
  font-size: 1.02rem;
  font-weight: 900;
}

.control-nav a.active,
.control-nav a:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #2d7cf4, #16b6a4);
  color: #ffffff;
}

.control-main {
  min-width: 0;
  padding: 34px 48px 56px;
}

.control-topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.status-pill,
.time-pill {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid rgba(96, 140, 205, 0.35);
  border-radius: 28px;
  color: #ecf6ff;
  background: #132844;
  font-weight: 900;
}

.status-pill i {
  width: 14px;
  height: 14px;
  margin-right: 12px;
  border-radius: 999px;
  background: #28d17c;
}

.control-content {
  width: 100%;
  margin: 0;
  padding: 0;
}

.control-hero-card,
.control-panel,
.control-stat-card {
  border: 1px solid rgba(93, 136, 199, 0.34);
  border-radius: 10px;
  background: #132844;
  box-shadow: none;
}

.control-hero-card {
  min-height: 262px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 46px;
}

.control-kicker {
  margin-bottom: 12px;
  color: #a9c8ef;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-hero-card h1 {
  max-width: none;
  margin-bottom: 14px;
  color: #f4f8ff;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  letter-spacing: 0;
}

.control-hero-card p {
  max-width: 940px;
  margin-bottom: 0;
  color: #9eb8dc;
  font-size: 1.2rem;
  line-height: 1.55;
}

.control-primary {
  flex: 0 0 auto;
  min-height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  border-radius: 12px;
  color: #ffffff;
  background: #2e7ce8;
  font-weight: 900;
  font-size: 1.15rem;
}

.control-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.control-stat-card {
  min-height: 202px;
  padding: 34px 30px;
  border-top-width: 4px;
}

.control-stat-card.cyan {
  border-top-color: #22c8ff;
}

.control-stat-card.green {
  border-top-color: #17d66e;
}

.control-stat-card.amber {
  border-top-color: #ffad20;
}

.control-stat-card.purple {
  border-top-color: #a77cff;
}

.control-stat-card span,
.control-stat-card p {
  color: #9fb2cc;
}

.control-stat-card span {
  display: block;
  margin-bottom: 14px;
  font-weight: 900;
}

.control-stat-card strong {
  display: block;
  margin-bottom: 10px;
  color: #f5f9ff;
  font-size: 2rem;
}

.control-stat-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.control-board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.control-panel {
  padding: 34px 36px;
}

.control-panel h2 {
  margin-bottom: 24px;
  color: #f5f9ff;
  font-size: 1.7rem;
}

.workflow-lines,
.priority-list {
  display: grid;
  gap: 14px;
}

.workflow-lines a,
.priority-list > div {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border-radius: 10px;
  background: #08182b;
}

.workflow-lines strong {
  color: #f4f8ff;
}

.workflow-lines span,
.priority-list p {
  margin: 0;
  color: #9fb2cc;
  line-height: 1.45;
}

.priority {
  width: fit-content;
  padding: 8px 24px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.priority.high {
  background: #f12d2d;
}

.priority.medium {
  background: #f0a51f;
}

.priority.low {
  background: #229f6a;
}

.control-workspace-dark {
  margin-top: 0;
}

.control-workspace-dark .workflow-detail,
.control-workspace-dark .document-generator {
  color: #eef5ff;
}

.control-workspace-dark .workflow-subtitle,
.control-workspace-dark .workflow-list li,
.control-workspace-dark .document-row span,
.control-workspace-dark .document-row small {
  color: #9fb2cc;
}

.control-workspace-dark .workflow-list li:before {
  color: #33c9ff;
}

.control-workspace-dark .document-form input,
.control-workspace-dark .document-form select {
  border-color: rgba(148, 176, 215, 0.26);
  color: #eef5ff;
  background: #08182b;
}

.control-workspace-dark .document-row,
.control-workspace-dark .process-status-strip article {
  border-color: rgba(148, 176, 215, 0.22);
  background: #08182b;
}

@media (max-width: 1180px) {
  .control-shell {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .control-card-grid,
  .control-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .control-shell {
    grid-template-columns: 1fr;
  }

  .control-sidebar {
    position: static;
    min-height: auto;
  }

  .control-main {
    padding: 24px;
  }

  .control-hero-card,
  .control-workspace {
    grid-template-columns: 1fr;
  }

  .control-hero-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* AI processing */
.ai-processing-page {
  display: grid;
  gap: 10px;
}

.ai-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-top: 28px solid #081576;
  border-radius: 2px;
  color: #334054;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.08);
  position: relative;
}

.ai-page-header:before {
  content: "AI Processing";
  position: absolute;
  top: -20px;
  left: 10px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.ai-page-header h1 {
  margin: 0 0 5px;
  color: #1f2d3d;
  font-size: 20px;
  letter-spacing: 0;
}

.ai-page-header p {
  margin-bottom: 0;
  color: #687385;
  font-size: 9px;
}

.ai-status {
  padding: 7px 10px;
  border-radius: 2px;
  color: #08745f;
  background: #e7faf5;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.ai-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #00ad88;
}

.ai-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 10px;
}

.ai-input-panel,
.ai-result-panel {
  min-width: 0;
}

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

.ai-form-grid label {
  display: grid;
  gap: 4px;
  color: #536174;
  font-size: 8px;
  font-weight: 800;
}

.ai-form-grid input,
.ai-form-grid select,
.ai-form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe4ee;
  border-radius: 2px;
  padding: 0 7px;
  color: #334054;
  background: #ffffff;
  font: inherit;
  font-size: 9px;
}

.ai-form-grid input,
.ai-form-grid select {
  height: 28px;
}

.ai-form-grid textarea {
  padding-top: 7px;
  resize: vertical;
}

.ai-full-width {
  grid-column: 1 / -1;
}

.ai-run-button {
  width: 100%;
  min-height: 32px;
  margin-top: 10px;
  border: 0;
  border-radius: 2px;
  color: #ffffff;
  background: linear-gradient(90deg, #0874bd, #00ad88);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.ai-result-heading,
.ai-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-result-heading h2 {
  margin-bottom: 8px;
}

.risk-badge {
  padding: 5px 8px;
  border-radius: 2px;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
}

.risk-low { background: #00ad88; }
.risk-medium { background: #f0a126; }
.risk-high { background: #ed4c5c; }

.ai-score-card {
  justify-content: flex-start;
  padding: 12px;
  background: #f5f8fc;
}

.ai-score-ring {
  width: 74px;
  height: 74px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(#0874bd calc(var(--score) * 1%), #dfe7f1 0);
  box-shadow: inset 0 0 0 9px #ffffff;
  text-align: center;
}

.ai-score-ring strong {
  color: #1f2d3d;
  font-size: 18px;
}

.ai-score-ring span,
.ai-score-card span,
.ai-method-card span,
.ai-parameter-grid span {
  color: #7a8494;
  font-size: 8px;
}

.ai-score-card h3 {
  margin: 3px 0;
  color: #1f2d3d;
  font-size: 15px;
}

.ai-score-card small {
  color: #8791a0;
  font-size: 7px;
}

.ai-method-card {
  display: grid;
  gap: 4px;
  margin-top: 9px;
  padding: 10px;
  border-left: 3px solid #00ad88;
  background: #eafaf6;
}

.ai-method-card strong {
  color: #08745f;
  font-size: 10px;
}

.ai-parameter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.ai-parameter-grid article {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #e2e7f1;
  background: #fbfcff;
}

.ai-parameter-grid strong {
  color: #344055;
  font-size: 9px;
}

.ai-risk-list {
  margin-top: 10px;
}

.ai-risk-list h3 {
  margin-bottom: 5px;
  color: #1f2d3d;
  font-size: 10px;
}

.ai-risk-list p {
  margin-bottom: 4px;
  padding: 6px 8px;
  border-left: 3px solid #f0a126;
  color: #6c5a2d;
  background: #fff8e8;
  font-size: 8px;
}

.ai-empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #7a8494;
}

.ai-empty-state strong {
  color: #334054;
  font-size: 12px;
}

.ai-empty-state p {
  margin: 5px 0 0;
  font-size: 9px;
}

.ai-history h2 {
  margin-bottom: 9px;
}

@media (max-width: 980px) {
  .ai-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ai-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-form-grid,
  .ai-parameter-grid {
    grid-template-columns: 1fr;
  }
}

/* Finance invoice workspace */
.finance-page {
  display: grid;
  gap: 10px;
}

.finance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-top: 28px solid #081576;
  border-radius: 2px;
  color: #334054;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.08);
  position: relative;
}

.finance-header:before {
  content: "Finance";
  position: absolute;
  top: -20px;
  left: 10px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.balance-header:before {
  content: "Balance";
}

.cost-header:before {
  content: "Cost";
}

.finance-header h1 {
  margin: 0 0 5px;
  color: #1f2d3d;
  font-size: 20px;
  letter-spacing: 0;
}

.finance-header p {
  margin-bottom: 0;
  color: #687385;
  font-size: 9px;
}

.finance-status {
  padding: 7px 10px;
  border-radius: 2px;
  color: #08745f;
  background: #e7faf5;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.finance-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 10px;
  align-items: start;
}

.integration-flow {
  margin-bottom: 10px;
  padding: 14px;
}

.integration-flow-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.integration-flow-heading h2 {
  margin: 0;
  color: #1f2d3d;
  font-size: 15px;
}

.integration-flow-heading span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 2px;
  color: #08745f;
  background: #e7faf5;
  font-size: 8px;
  font-weight: 900;
}

.integration-step-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.integration-step {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #e2e7f1;
  border-left: 3px solid #b9c4d3;
  border-radius: 4px;
  color: #5c6878;
  background: #fbfdff;
}

.integration-step span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #9aa7b7;
  font-size: 8px;
  font-weight: 900;
}

.integration-step strong {
  overflow-wrap: anywhere;
  color: #344051;
  font-size: 9px;
}

.integration-step small {
  color: #8793a2;
  font-size: 8px;
  font-weight: 800;
}

.integration-step.done {
  border-left-color: #00ad88;
}

.integration-step.done span {
  background: #00ad88;
}

.integration-step.current {
  border-color: #0874bd;
  border-left-color: #0874bd;
  background: #eef7ff;
}

.integration-step.current span {
  background: #0874bd;
}

.po-success-box {
  margin: 8px 0 12px;
}

.po-edit-input {
  width: 100%;
  min-height: 28px;
  border: 1px solid #dfe4ee;
  border-radius: 3px;
  padding: 0 7px;
  color: #334054;
  background: #ffffff;
  font: inherit;
  font-size: 9px;
}

.po-edit-select {
  padding-right: 20px;
}

.po-save-button {
  min-height: 28px;
  border: 0;
  border-radius: 3px;
  padding: 0 9px;
  color: #ffffff;
  background: #0874bd;
  font: inherit;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

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

.invoice-form label {
  display: grid;
  gap: 4px;
  color: #536174;
  font-size: 8px;
  font-weight: 800;
}

.invoice-form input,
.invoice-form select,
.invoice-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dfe4ee;
  border-radius: 2px;
  padding: 0 7px;
  color: #334054;
  background: #ffffff;
  font: inherit;
  font-size: 9px;
}

.invoice-form input,
.invoice-form select {
  height: 28px;
}

.invoice-form textarea {
  padding-top: 7px;
  resize: vertical;
}

.invoice-full-width {
  grid-column: 1 / -1;
}

.invoice-subtitle {
  margin: 14px 0 7px;
  color: #1f2d3d;
  font-size: 10px;
}

.invoice-items {
  display: grid;
  gap: 5px;
}

.invoice-item-head,
.invoice-item-input {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 70px 70px minmax(110px, .45fr);
  gap: 5px;
}

.invoice-item-head {
  padding: 6px 7px;
  color: #ffffff;
  background: #081576;
  font-size: 8px;
  font-weight: 900;
}

.invoice-calculation-fields {
  margin-top: 10px;
}

.invoice-summary-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  color: #ffffff;
  background: linear-gradient(90deg, #081576, #0874bd);
}

.invoice-summary-preview span {
  font-size: 9px;
  font-weight: 800;
}

.invoice-summary-preview strong {
  font-size: 15px;
}

.invoice-payment-details {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid #e2e7f1;
  background: #fbfcff;
}

.invoice-payment-details summary {
  color: #0874bd;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.invoice-payment-details .invoice-form-grid {
  margin-top: 9px;
}

.invoice-create-button {
  width: 100%;
  min-height: 32px;
  margin-top: 10px;
  border: 0;
  border-radius: 2px;
  color: #ffffff;
  background: #00ad88;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.invoice-guide-list {
  display: grid;
  gap: 7px;
}

.invoice-guide-list article {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #e2e7f1;
  background: #fbfcff;
}

.invoice-guide-list strong {
  color: #344055;
  font-size: 9px;
}

.invoice-guide-list span,
.invoice-bank-card p {
  margin: 0;
  color: #7a8494;
  font-size: 8px;
  line-height: 1.45;
}

.invoice-bank-card {
  margin-top: 9px;
  padding: 10px;
  border-left: 3px solid #00ad88;
  background: #eafaf6;
}

.invoice-bank-card span {
  display: block;
  color: #568177;
  font-size: 8px;
}

.invoice-bank-card strong {
  display: block;
  margin: 4px 0;
  color: #08745f;
  font-size: 10px;
}

.invoice-history h2 {
  margin-bottom: 9px;
}

.invoice-status,
.invoice-print-link,
.invoice-edit-link,
.invoice-delete-button {
  display: inline-block;
  padding: 3px 6px;
  border: 0;
  border-radius: 2px;
  color: #ffffff;
  font-size: 7px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

.invoice-status-pending { background: #f0a126; }
.invoice-status-paid { background: #00ad88; }
.invoice-status-overdue { background: #ed4c5c; }
.invoice-print-link { background: #0874bd; }
.invoice-edit-link { background: #f0a126; }
.invoice-delete-button { background: #ed4c5c; }

.invoice-action-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.invoice-delete-form {
  display: inline;
  margin: 0;
}

.invoice-cancel-edit {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 7px;
  border: 1px solid #b9d8f7;
  border-radius: 2px;
  color: #0f4f9d;
  background: #e8f3ff;
  font-size: 9px;
  font-weight: 900;
}

.invoice-error {
  padding: 9px 12px;
  border-left: 3px solid #ed4c5c;
  color: #9e2835;
  background: #fff0f2;
  font-size: 9px;
  font-weight: 800;
}

.balance-workspace {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.cost-workspace {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.balance-summary-preview {
  background: linear-gradient(90deg, #0874bd, #00ad88);
}

.balance-form input[readonly] {
  color: #526172;
  background: #f4f8fb;
  cursor: default;
}

.cost-summary-preview {
  background: linear-gradient(90deg, #00ad88, #0874bd);
}

.balance-metric-stack {
  display: grid;
  gap: 8px;
}

.balance-metric-stack article {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e7f1;
  border-left: 3px solid #0874bd;
  background: #fbfcff;
}

.balance-metric-stack span {
  display: block;
  color: #7a8494;
  font-size: 8px;
  font-weight: 800;
}

.balance-metric-stack strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: #344055;
  font-size: 13px;
  line-height: 1.15;
}

.balance-history .workflow-table {
  min-width: 900px;
}

.cost-history .workflow-table {
  min-width: 680px;
}

.cost-history .workflow-table td:nth-child(2) span {
  display: block;
  margin-top: 3px;
  color: #7a8494;
  font-size: 8px;
  line-height: 1.35;
}

.cost-history .workflow-table td:last-child,
.balance-history .workflow-table td:last-child {
  color: #6d7886;
  text-align: left;
}

.cost-history .workflow-table td:last-child:not([colspan]),
.balance-history .workflow-table td:last-child:not([colspan]) {
  background: transparent;
}

@media (max-width: 980px) {
  .finance-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .finance-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-form-grid {
    grid-template-columns: 1fr;
  }

  .invoice-full-width {
    grid-column: auto;
  }

  .invoice-item-head {
    display: none;
  }

  .invoice-item-input {
    grid-template-columns: 1fr 1fr;
    padding: 8px;
    border: 1px solid #e2e7f1;
  }

  .invoice-item-input input:first-child {
    grid-column: 1 / -1;
  }
}

/* Automatic documentation archive */
.documentation-page,
.documentation-projects {
  display: grid;
  gap: 10px;
}

.documentation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-top: 22px solid #081576;
  border-radius: 2px;
  color: #334054;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.08);
  position: relative;
}

.documentation-header:before {
  content: "Documentation";
  position: absolute;
  top: -17px;
  left: 10px;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
}

.documentation-header h1 {
  margin: 0 0 5px;
  color: #1f2d3d;
  font-size: 20px;
  letter-spacing: 0;
}

.documentation-header p {
  margin-bottom: 0;
  color: #687385;
  font-size: 9px;
}

.documentation-root {
  max-width: 360px;
  padding: 7px 10px;
  overflow-wrap: anywhere;
  border-radius: 2px;
  color: #08745f;
  background: #e7faf5;
  font-size: 8px;
  font-weight: 800;
}

.documentation-project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.documentation-project-heading span {
  color: #7a8494;
  font-size: 8px;
  font-weight: 800;
}

.documentation-project-heading h2 {
  margin: 3px 0 0;
}

.documentation-project-heading > strong {
  padding: 5px 8px;
  color: #ffffff;
  background: #0874bd;
  font-size: 8px;
}

.documentation-file-list {
  display: grid;
  border: 1px solid #e2e7f1;
  background: #ffffff;
}

.documentation-file-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr) 110px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  color: #344055;
  border-bottom: 1px solid #edf1f7;
}

.documentation-file-row:last-child {
  border-bottom: 0;
}

.documentation-file-row:hover {
  background: #f7fbff;
}

.documentation-file-meta {
  overflow: hidden;
  color: #7a8494;
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documentation-file-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.documentation-file-action,
.documentation-delete-button {
  border: 0;
  background: transparent;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

.documentation-file-action {
  color: #0874bd;
  text-align: right;
  text-decoration: none;
}

.documentation-delete-button {
  padding: 0;
  color: #ed4c5c;
  font-family: inherit;
}

.documentation-delete-form {
  display: inline-flex;
  margin: 0;
}

.documentation-note {
  margin: 0;
  padding: 10px;
  color: #8a94a3;
  font-size: 8px;
}

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

.documentation-stage {
  min-width: 0;
  border: 1px solid #e2e7f1;
  background: #fbfcff;
}

.documentation-stage summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 8px;
  color: #344055;
  cursor: pointer;
  list-style: none;
}

.documentation-stage summary::-webkit-details-marker {
  display: none;
}

.folder-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 22px;
  color: #6d5200;
  background: #ffd55c;
  font-size: 7px;
  font-weight: 900;
}

.documentation-stage summary strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documentation-stage summary small {
  color: #7a8494;
  font-size: 7px;
}

.documentation-files {
  display: grid;
  gap: 4px;
  padding: 0 8px 8px;
}

.documentation-files a {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid #e8edf5;
  color: #4b596b;
  background: #ffffff;
}

.file-type {
  padding: 3px;
  color: #ffffff;
  background: #00ad88;
  font-size: 7px;
  font-weight: 900;
  text-align: center;
}

.file-name {
  overflow: hidden;
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documentation-files small,
.documentation-files p {
  margin: 0;
  color: #8a94a3;
  font-size: 7px;
}

.documentation-empty {
  text-align: center;
}

.documentation-empty p {
  margin-bottom: 0;
  color: #7a8494;
}

@media (max-width: 760px) {
  .documentation-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .documentation-stage-grid {
    grid-template-columns: 1fr;
  }

  .documentation-file-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .documentation-file-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .control-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-logo {
    width: 150px;
  }

  .control-card-grid,
  .control-board-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-stepper {
    grid-template-columns: 1fr;
  }
}

/* Compact cashier dashboard */
.control-body {
  background: #edf1f7;
  color: #202a36;
  font-size: 12px;
}

.control-shell {
  min-height: 100vh;
  grid-template-columns: 176px minmax(0, 1fr);
  background: #edf1f7;
}

.control-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 10px 8px;
  border-right: 0;
  background: #061462;
  color: #ffffff;
}

.control-brand {
  align-items: center;
  flex-direction: column;
  gap: 7px;
  margin: 8px 0 14px;
  padding: 4px 2px 12px;
  text-align: center;
}

.control-logo {
  width: 136px;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  background: #ffffff;
}

.control-brand strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.control-brand span {
  margin-top: 1px;
  color: #c9f8ff;
  font-size: 9.5px;
  font-weight: 900;
}

.control-nav {
  gap: 0;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.control-nav a {
  min-height: 34px;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.control-nav a span {
  width: 16px;
  color: #8ce6ff;
  text-align: center;
}

.control-nav a.active,
.control-nav a:hover {
  background: #0c2382;
  color: #ffffff;
}

.control-main {
  min-width: 0;
  padding: 0;
}

.control-topbar {
  min-height: 40px;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
  padding: 0 12px;
  border-bottom: 1px solid #d6dde8;
  background: #ffffff;
  color: #3b4655;
}

.topbar-left,
.status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-left strong {
  color: #0874bd;
  font-size: 9px;
  white-space: nowrap;
}

.topbar-left span {
  color: #31445c;
  font-size: 8px;
  white-space: nowrap;
}

.topbar-left select {
  width: 150px;
  height: 21px;
  border: 1px solid #d8dde7;
  border-radius: 2px;
  color: #808998;
  background: #ffffff;
  font: inherit;
  font-size: 8px;
}

.topbar-menu {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 2px;
  color: #ffffff;
  background: #43b5d2;
  font-size: 10px;
  line-height: 1;
}

.status-pill,
.time-pill {
  min-height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  color: #334054;
  background: transparent;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-pill i {
  width: 10px;
  height: 10px;
  margin-right: 6px;
  background: #14b86a;
}

.control-hero-card,
.control-panel,
.control-stat-card {
  border: 1px solid #cfd8e8;
  border-radius: 2px;
  color: #334054;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.08);
}

.control-hero-card {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-top: 28px solid #081576;
  position: relative;
}

.control-hero-card:before {
  content: "Dashboard";
  position: absolute;
  top: -20px;
  left: 10px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
}

.control-kicker {
  margin-bottom: 5px;
  color: #0874bd;
  font-size: 8px;
  letter-spacing: 0;
}

.control-hero-card h1 {
  margin-bottom: 7px;
  color: #1f2d3d;
  font-size: 20px;
  line-height: 1.15;
}

.control-hero-card p {
  max-width: 760px;
  color: #687385;
  font-size: 10px;
  line-height: 1.45;
}

.control-primary {
  min-height: 26px;
  padding: 0 12px;
  border-radius: 2px;
  background: #00ad88;
  font-size: 9px;
}

.control-card-grid {
  gap: 10px;
  margin-top: 10px;
}

.control-stat-card {
  min-height: 84px;
  padding: 12px;
}

.control-stat-card span,
.control-stat-card p {
  color: #7a8494;
}

.control-stat-card span {
  margin-bottom: 5px;
  font-size: 8px;
}

.control-stat-card strong {
  margin-bottom: 4px;
  color: #1f2d3d;
  font-size: 16px;
}

.control-stat-card p {
  font-size: 8px;
}

.control-board-grid {
  gap: 10px;
  margin-top: 10px;
}

.control-panel {
  padding: 12px;
}

.control-panel h2 {
  margin-bottom: 10px;
  color: #1f2d3d;
  font-size: 13px;
}

.workflow-lines,
.priority-list {
  gap: 7px;
}

.workflow-lines a,
.priority-list > div {
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e2e7f1;
  border-radius: 2px;
  background: #fbfcff;
}

.workflow-lines strong {
  color: #344055;
  font-size: 9px;
}

.workflow-lines span,
.priority-list p {
  color: #7a8494;
  font-size: 8px;
}

.priority {
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 8px;
}

.central-project-box,
.project-stage-table,
.project-table-wrap {
  margin-top: 12px;
}

.central-project-box {
  padding: 12px;
  border: 1px solid #e2e7f1;
  border-radius: 2px;
  background: #fbfcff;
}

.central-project-box h3,
.project-stage-table h3 {
  margin-bottom: 8px;
  color: #1f2d3d;
  font-size: 12px;
}

.central-project-box p {
  margin-bottom: 5px;
  color: #4b596b;
  font-size: 9px;
}

.workflow-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  color: #344055;
  font-size: 9px;
}

.project-table-wrap,
.project-stage-table {
  overflow-x: auto;
}

.workflow-table th,
.workflow-table td {
  padding: 7px 8px;
  border: 1px solid #e2e7f1;
  text-align: left;
  vertical-align: top;
}

.workflow-table th {
  color: #ffffff;
  background: #081576;
  font-weight: 900;
}

.workflow-table small {
  color: #7a8494;
}

.document-row small a {
  margin-left: 6px;
  color: #0f73d9;
  font-weight: 900;
}

.control-content {
  padding: 10px;
}

.transaction-window {
  overflow: hidden;
  border: 1px solid #cfd8e8;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.08);
}

.transaction-titlebar {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  color: #ffffff;
  background: #081576;
}

.transaction-titlebar strong {
  font-size: 9px;
}

.transaction-titlebar button {
  width: 18px;
  height: 18px;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.transaction-filters {
  display: grid;
  grid-template-columns: minmax(130px, 1.25fr) minmax(126px, 1fr) minmax(126px, 1fr) auto 56px;
  gap: 8px;
  align-items: end;
  padding: 12px 10px 6px;
}

.transaction-filters label,
.table-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.transaction-filters label {
  flex-direction: column;
  align-items: stretch;
}

.transaction-filters span,
.table-toolbar span {
  color: #7a8494;
  font-size: 8px;
  font-weight: 700;
}

.transaction-filters select,
.transaction-filters input,
.table-toolbar select,
.table-toolbar input {
  height: 22px;
  min-width: 0;
  border: 1px solid #dfe4ee;
  border-radius: 2px;
  color: #687385;
  background: #ffffff;
  font: inherit;
  font-size: 8px;
}

.transaction-filters select,
.transaction-filters input {
  width: 100%;
  padding: 0 6px;
}

.filter-actions {
  display: flex;
  gap: 4px;
}

.btn-ok,
.btn-reset,
.btn-cetak {
  height: 22px;
  border: 0;
  border-radius: 2px;
  color: #ffffff;
  font: inherit;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.btn-ok {
  width: 28px;
  background: #9aa5b3;
}

.btn-reset {
  width: 42px;
  background: #ff5562;
}

.btn-cetak {
  width: 56px;
  background: #00ad88;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px 8px;
}

.table-toolbar select {
  width: 44px;
}

.table-toolbar input {
  width: 124px;
  padding: 0 5px;
}

.transaction-table-wrap {
  padding: 0 10px;
  overflow-x: auto;
}

.transaction-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  color: #344055;
  font-size: 8px;
  table-layout: fixed;
}

.transaction-table th,
.transaction-table td {
  border: 1px solid #e2e7f1;
  padding: 5px 6px;
  text-align: center;
  vertical-align: middle;
}

.transaction-table th {
  color: #ffffff;
  background: #081576;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.15;
}

.transaction-table th:nth-child(1) {
  width: 34px;
}

.transaction-table th:nth-child(2) {
  width: 142px;
}

.transaction-table th:nth-child(3) {
  width: 210px;
}

.transaction-table tbody tr:nth-child(even) {
  background: #fbfcff;
}

.transaction-table td strong,
.transaction-table td span {
  display: block;
}

.transaction-table td strong {
  margin-bottom: 2px;
  color: #4b596b;
  font-size: 8px;
}

.transaction-table td span {
  color: #8b95a5;
  font-size: 7px;
}

.status-tag {
  width: fit-content;
  min-width: 32px;
  margin: 0 auto;
  padding: 2px 5px;
  border-radius: 2px;
  color: #ffffff !important;
  font-size: 7px !important;
  font-weight: 900;
}

.status-tag.paid {
  background: #02b894;
}

.status-tag.pending {
  background: #f0a126;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px 12px;
  color: #7a8494;
  font-size: 8px;
}

.pagination {
  display: flex;
  align-items: center;
}

.pagination button,
.pagination strong {
  min-width: 42px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e7f1;
  color: #8a94a3;
  background: #ffffff;
  font: inherit;
  font-size: 8px;
}

.pagination strong {
  min-width: 24px;
  color: #ffffff;
  background: #1bb4c6;
}

@media (max-width: 860px) {
  .control-shell {
    grid-template-columns: 1fr;
  }

  .control-sidebar {
    position: static;
    min-height: auto;
  }

  .control-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-topbar,
  .table-toolbar,
  .table-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .transaction-filters {
    grid-template-columns: 1fr 1fr;
  }

  .btn-cetak {
    width: 100%;
  }
}

.dashboard-headline,
.dashboard-kpi-card,
.dashboard-chart-panel,
.total-work-breakdown > div {
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.08);
}

.dashboard-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-top: 6px solid #00ad88;
}

.dashboard-headline h1 {
  margin: 0 0 7px;
  color: #1f2d3d;
  font-size: 26px;
  line-height: 1.15;
}

.dashboard-headline p {
  max-width: 860px;
  margin: 0;
  color: #687385;
  font-size: 11px;
  line-height: 1.5;
}

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

.dashboard-kpi-card {
  min-height: 106px;
  padding: 16px;
  border-top: 4px solid #0874bd;
}

.dashboard-kpi-card.cyan { border-top-color: #0874bd; }
.dashboard-kpi-card.green { border-top-color: #00ad88; }
.dashboard-kpi-card.amber { border-top-color: #f0a126; }
.dashboard-kpi-card.purple { border-top-color: #7b61ff; }

.dashboard-kpi-card span,
.dashboard-kpi-card p {
  color: #7a8494;
}

.dashboard-kpi-card span {
  display: block;
  margin-bottom: 7px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-kpi-card strong {
  display: block;
  margin-bottom: 6px;
  color: #1f2d3d;
  font-size: 20px;
  line-height: 1.15;
}

.dashboard-kpi-card p {
  margin: 0;
  font-size: 9px;
  line-height: 1.4;
}

.dashboard-chart-grid,
.dashboard-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 12px;
  margin-top: 12px;
}

.dashboard-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dashboard-panel-heading h2 {
  margin: 0;
}

.dashboard-panel-heading span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0874bd;
  background: #eaf6ff;
  font-size: 9px;
  font-weight: 900;
}

.chart-frame {
  position: relative;
  width: 100%;
  height: 360px;
}

.chart-frame-wide {
  height: 520px;
}

.job-status-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.job-status-summary div,
.total-work-breakdown > div {
  padding: 11px 12px;
  border: 1px solid #e2e7f1;
  border-radius: 8px;
  background: #fbfcff;
}

.job-status-summary strong,
.total-work-breakdown strong {
  display: block;
  color: #1f2d3d;
  font-size: 18px;
}

.job-status-summary span,
.total-work-breakdown span {
  color: #7a8494;
  font-size: 9px;
  font-weight: 800;
}

.total-work-breakdown {
  display: grid;
  gap: 10px;
}

@media (max-width: 1120px) {
  .integration-step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .integration-flow-heading {
    flex-direction: column;
  }

  .integration-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .dashboard-kpi-grid,
  .dashboard-chart-grid,
  .dashboard-work-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sales-chart-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .dashboard-headline {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-kpi-grid,
  .dashboard-chart-grid,
  .dashboard-work-grid,
  .job-status-summary {
    grid-template-columns: 1fr;
  }

  .chart-frame,
  .chart-frame-wide {
    height: 240px;
  }
}

.bast-page {
  display: grid;
  gap: 14px;
}

.bast-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.bast-form-panel,
.bast-preview-panel,
.bast-history {
  background: #ffffff;
}

.bast-form-panel h2,
.bast-preview-panel h2,
.bast-history h2 {
  margin: 0 0 16px;
  color: #1f2d3d;
}

.bast-form {
  display: grid;
  gap: 16px;
}

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

.bast-form label {
  display: grid;
  gap: 6px;
  color: #516071;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bast-form input,
.bast-form select,
.bast-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  padding: 10px 11px;
  color: #1f2d3d;
  background: #fbfcff;
  font: 500 13px/1.4 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bast-form textarea {
  min-height: 78px;
  resize: vertical;
}

.bast-form input:focus,
.bast-form select:focus,
.bast-form textarea:focus {
  outline: 2px solid rgba(8, 116, 189, 0.18);
  border-color: #0874bd;
  background: #ffffff;
}

.bast-full-width {
  grid-column: 1 / -1;
}

.bast-subtitle {
  margin: 4px 0 0;
  color: #1f2d3d;
  font-size: 15px;
}

.bast-mini-document {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: #1d2733;
  background: #fbfcff;
  font-family: "Times New Roman", Times, serif;
  line-height: 1.5;
}

.bast-mini-document h3 {
  margin: 0;
  text-align: center;
  font-size: 15px;
  text-decoration: underline;
}

.bast-mini-document strong {
  display: block;
  text-align: center;
}

.bast-mini-document p {
  margin: 0;
  text-align: justify;
  font-size: 13px;
}

.bast-mini-document table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bast-mini-document td {
  padding: 3px 0;
  vertical-align: top;
}

.bast-mini-document td:first-child {
  width: 58px;
}

.bast-mini-document td:nth-child(2) {
  width: 14px;
  text-align: center;
}

.bast-mini-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
  font-size: 12px;
}

.bast-mini-signatures strong {
  margin-top: 3px;
  text-align: left;
}

.bast-history .invoice-action-group {
  justify-content: flex-start;
}

.bast-pdf-link {
  background: #00ad88;
}

.bast-edit-link {
  background: #f0a126;
}

.bast-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bast-cancel-edit {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #475569;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.bast-update-message {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 7px;
  color: #08745f;
  background: #eaf8f2;
  font-size: 11px;
  font-weight: 800;
}

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

@media (max-width: 760px) {
  .bast-form-grid,
  .bast-mini-signatures {
    grid-template-columns: 1fr;
  }
}

/* Job Estimation Engine */
.job-estimation-page {
  display: grid;
  gap: 16px;
}

.ai-job-estimation-section {
  margin-top: 16px;
}

.job-estimation-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.job-estimation-header h1 {
  margin: 4px 0 6px;
  color: #1f2a3d;
  font-size: 28px;
}

.job-estimation-header p {
  margin: 0;
  color: #657286;
}

.job-estimation-status {
  min-width: 220px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #d8e8fb;
  background: #ffffff;
}

.job-estimation-status span,
.job-estimation-status strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-estimation-status span {
  color: #667085;
  font-size: 9px;
  font-weight: 900;
}

.job-estimation-status strong {
  color: #0874bd;
  font-size: 12px;
}

.job-estimation-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.job-estimation-form {
  display: grid;
  gap: 12px;
}

.job-estimation-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #dfe7f1;
  background: #fbfcff;
}

.job-estimation-form legend {
  padding: 0 7px;
  color: #0f4f9d;
  font-size: 10px;
  font-weight: 900;
}

.job-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.job-form-grid label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #30384a;
  font-size: 10px;
  font-weight: 800;
}

.job-form-grid label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-form-grid input,
.job-form-grid select,
.job-form-grid textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #cfd8e3;
  border-radius: 4px;
  color: #172033;
  background: #ffffff;
  font: inherit;
  font-weight: 600;
}

.job-form-grid textarea {
  min-height: 58px;
  resize: vertical;
}

.job-wide-field {
  grid-column: span 2;
}

.job-run-button {
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  background: #0874bd;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.job-kpi-grid,
.job-cost-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.job-kpi-grid article,
.job-cost-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe7f1;
  background: #fbfcff;
}

.job-kpi-grid span,
.job-cost-grid span {
  display: block;
  margin-bottom: 5px;
  color: #697789;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.job-kpi-grid strong,
.job-cost-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: #1f2a3d;
  font-size: 14px;
}

.job-kpi-grid small {
  display: block;
  margin-top: 4px;
  color: #00ad88;
  font-size: 8px;
  font-weight: 900;
}

.job-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.job-output-actions a,
.job-table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 3px;
  color: #ffffff;
  background: #0874bd;
  font-size: 8px;
  font-weight: 900;
  text-decoration: none;
}

.job-output-actions a:nth-child(2) {
  background: #f0a126;
}

.job-output-actions a:nth-child(n+3) {
  background: #00ad88;
}

.job-output-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #e2e7f1;
  background: #ffffff;
}

.job-output-summary p {
  margin: 0;
  color: #344055;
  font-size: 10px;
  font-weight: 700;
}

.job-output-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.job-output-summary div {
  min-width: 0;
}

.job-output-summary dt {
  color: #697789;
  font-size: 8px;
  font-weight: 900;
}

.job-output-summary dd {
  overflow: hidden;
  margin: 3px 0 0;
  color: #1f2a3d;
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-section-title {
  margin: 12px 0 7px;
}

.job-section-title h3,
.job-task-list h3,
.job-estimation-history h2 {
  margin: 0;
  color: #1f2a3d;
  font-size: 13px;
}

.job-cost-grid {
  margin-top: 12px;
}

.job-task-list {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e2e7f1;
  background: #fbfcff;
}

.job-task-list p {
  margin: 7px 0 0;
  color: #465367;
  font-size: 9px;
  font-weight: 700;
}

.job-empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  text-align: center;
}

.job-empty-state strong {
  color: #1f2a3d;
  font-size: 16px;
}

.job-empty-state p {
  max-width: 320px;
  margin: 7px auto 0;
  color: #697789;
}

@media (max-width: 1180px) {
  .job-estimation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .job-estimation-header,
  .job-estimation-status {
    align-items: flex-start;
    width: 100%;
  }

  .job-estimation-header {
    flex-direction: column;
  }

  .job-form-grid,
  .job-kpi-grid,
  .job-cost-grid,
  .job-output-summary dl {
    grid-template-columns: 1fr;
  }

  .job-wide-field {
    grid-column: auto;
  }
}

/* Documentation folder browser */
.documentation-page {
  display: grid;
  gap: 12px;
}

.documentation-header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 11px;
  border: 1px solid var(--admin-line, #dfe7ef);
  border-top: 0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(39, 61, 86, 0.06);
}

.documentation-header:before {
  display: none;
}

.documentation-header .eyebrow {
  display: inline;
  margin: 0;
  color: #78a7d2;
  font-size: 8px;
  font-weight: 800;
  text-transform: none;
}

.documentation-header h1 {
  display: inline;
  margin: 0;
  color: #5b6877;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.documentation-header h1:before {
  content: " > ";
  color: #9eb0c2;
  font-weight: 700;
}

.documentation-header p:not(.eyebrow) {
  display: none;
}

.documentation-folder-browser {
  display: grid;
  gap: 14px;
}

.documentation-project {
  padding: 14px 16px 18px;
  border: 1px solid #e1e8f0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(26, 42, 74, 0.06);
}

.documentation-project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.documentation-project-heading span {
  display: block;
  color: #8a95a5;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.documentation-project-heading h2 {
  margin: 3px 0 0;
  color: #374151;
  font-size: 12px;
}

.documentation-project-heading > strong {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 3px;
  color: #8190a2;
  background: #f4f8fb;
  font-size: 8px;
  font-weight: 900;
}

.documentation-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 18px 16px;
  align-items: start;
}

.documentation-category-root {
  min-height: 330px;
}

.documentation-category-grid {
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  align-items: start;
}

.documentation-category-folder summary {
  min-height: 92px;
}

.documentation-category-folder .folder-icon {
  width: 54px;
  height: 36px;
}

.documentation-category-folder .folder-icon:before {
  top: -8px;
  width: 24px;
  height: 10px;
}

.documentation-category-folder summary strong {
  font-size: 9px;
}

.documentation-stage-folder {
  min-width: 0;
  border: 0;
  background: transparent;
}

.documentation-stage-folder summary {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 5px;
  padding: 7px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #4b596b;
  cursor: pointer;
  list-style: none;
  text-align: center;
}

.documentation-stage-folder summary::-webkit-details-marker {
  display: none;
}

.documentation-stage-folder summary:hover,
.documentation-stage-folder[open] summary {
  border-color: #e3ebf4;
  background: #f8fbfe;
}

.folder-icon {
  position: relative;
  display: block;
  width: 45px;
  height: 30px;
  margin-top: 7px;
  border-radius: 3px;
  background: #f5c64d;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.07);
}

.folder-icon:before {
  content: "";
  position: absolute;
  top: -7px;
  left: 4px;
  width: 20px;
  height: 9px;
  border-radius: 3px 3px 0 0;
  background: inherit;
}

.folder-tone-0 { background: #3b82f6; }
.folder-tone-1 { background: #f6c344; }
.folder-tone-2 { background: #4b5563; }
.folder-tone-3 { background: #f0643b; }
.folder-tone-4 { background: #f08aa4; }
.folder-tone-5 { background: #8b5cf6; }

.documentation-stage-folder summary strong {
  max-width: 100%;
  overflow: hidden;
  color: #526172;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documentation-stage-folder summary small {
  color: #9aa5b4;
  font-size: 7px;
  font-weight: 800;
}

.documentation-stage-folder.documentation-category-folder summary {
  min-height: 92px;
}

.documentation-stage-folder.documentation-category-folder summary strong {
  font-size: 9px;
}

.documentation-stage-folder .documentation-files {
  display: grid;
  gap: 5px;
  margin-top: 7px;
  padding: 7px;
  border: 1px solid #e4ebf2;
  border-radius: 4px;
  background: #fbfdff;
}

.documentation-stage-folder .documentation-file-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 6px;
  border: 1px solid #e8edf5;
  border-radius: 3px;
  background: #ffffff;
}

.documentation-month-folder {
  border: 1px solid #e4ebf2;
  border-radius: 4px;
  background: #ffffff;
}

.documentation-month-folder summary {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  color: #344051;
  background: #eef7ff;
  cursor: pointer;
}

.documentation-month-folder summary strong {
  font-size: 8px;
}

.documentation-month-folder summary small {
  color: #0874bd;
  font-size: 7px;
  font-weight: 900;
}

.documentation-month-folder .documentation-file-row {
  margin: 5px;
}

.documentation-stage-folder .file-name,
.documentation-stage-folder .documentation-file-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.documentation-stage-folder .file-name {
  color: #435064;
  font-size: 8px;
  font-weight: 900;
}

.documentation-stage-folder .documentation-file-meta {
  color: #8a95a5;
  font-size: 7px;
  font-weight: 800;
}

.documentation-stage-folder .documentation-file-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.documentation-stage-folder .documentation-file-action,
.documentation-stage-folder .documentation-delete-button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  font-size: 7px;
  font-weight: 900;
  cursor: pointer;
}

.documentation-stage-folder .documentation-file-action {
  color: #1f83d8;
}

.documentation-stage-folder .documentation-delete-button {
  color: #ed4c5c;
}

.documentation-stage-folder .documentation-note {
  margin: 0;
  color: #8a95a5;
  font-size: 7px;
}

@media (max-width: 760px) {
  .documentation-project {
    padding: 12px;
  }

  .documentation-folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  }

  .documentation-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .documentation-category-grid {
    grid-template-columns: 1fr;
  }
}

/* Archive-style admin skin */
:root {
  --admin-sidebar: #3a435b;
  --admin-sidebar-dark: #333b51;
  --admin-blue: #1f83d8;
  --admin-line: #dfe7ef;
  --admin-page: #bdeaff;
  --admin-text: #495766;
}

.control-body {
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 4%, rgba(34, 177, 230, 0.46), transparent 28rem),
    linear-gradient(135deg, #e2f8ff 0%, #bdeaff 48%, #a8ddff 100%);
  color: var(--admin-text);
  font-size: 12px;
}

.control-shell {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 6%, rgba(22, 161, 220, 0.38), transparent 28rem),
    linear-gradient(135deg, #e2f8ff 0%, #bdeaff 48%, #a8ddff 100%);
}

.control-sidebar {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 100vh;
  padding: 0;
  border-right: 1px solid rgba(14, 23, 43, 0.18);
  background: var(--admin-sidebar);
  color: #d8e0ea;
  box-shadow: 4px 0 18px rgba(38, 48, 72, 0.12);
}

.control-brand {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #4a536b;
  text-align: center;
}

.control-logo {
  width: 132px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px 6px;
}

.control-brand strong {
  display: block;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: none;
}

.control-brand span {
  display: block;
  margin-top: 2px;
  color: #bec8d8;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0;
}

.control-nav {
  display: grid;
  gap: 1px;
  max-height: none;
  padding: 12px 9px 18px;
  overflow: visible;
}

.control-nav-section {
  margin: 10px 3px 4px;
  color: #aeb8ca;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.workflow-nav-chain {
  position: relative;
  display: grid;
  gap: 1px;
}

.workflow-nav-chain::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 16px;
  bottom: 16px;
  left: 17px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    #5cc8ff,
    #5cc8ff 55%,
    rgba(184, 197, 216, 0.35)
  );
}

.workflow-nav-chain > a,
.workflow-nav-chain > details {
  position: relative;
  z-index: 1;
}

.workflow-nav-chain > a .nav-icon,
.workflow-nav-chain > details .nav-icon {
  border-radius: 50%;
  background: #3f4b66;
  box-shadow: 0 0 0 3px #3f4b66;
}

.workflow-nav-chain > a.active .nav-icon,
.workflow-nav-chain > a:hover .nav-icon,
.workflow-nav-chain > details.active .nav-icon {
  background: #2e9bf0;
  box-shadow: 0 0 0 3px #2e9bf0;
}

.control-nav a {
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  color: #cbd3df;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.control-nav a span {
  width: 14px;
  flex: 0 0 14px;
  display: inline-grid;
  place-items: center;
  color: #a9b6c8;
  font-size: 10px;
  font-weight: 900;
}

.control-nav a .nav-icon {
  width: 16px;
  flex-basis: 16px;
  color: #b8c5d8;
}

.control-nav a .nav-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-nav a.active,
.control-nav a:hover {
  color: #ffffff;
  background: #2e9bf0;
}

.control-nav a.active span,
.control-nav a:hover span {
  color: #ffffff;
}

.control-main {
  min-width: 0;
  padding: 0;
}

.control-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  background: var(--admin-blue);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(22, 80, 132, 0.22);
}

.topbar-left,
.status-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-left strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-menu,
.topbar-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 3px;
  color: #dff0ff;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: default;
}

.topbar-menu {
  background: rgba(255, 255, 255, 0.1);
}

.topbar-icon {
  font-size: 12px;
}

.status-pill,
.time-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 0;
  border-radius: 3px;
  color: #eaf6ff;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-pill i {
  width: 11px;
  height: 11px;
  margin-right: 7px;
  background: #55e07d;
  box-shadow: 0 0 0 4px rgba(85, 224, 125, 0.18);
}

.topbar-logout {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 3px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 9px;
  font-weight: 900;
}

.topbar-logout:hover {
  background: rgba(255, 255, 255, 0.24);
}

.control-content {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background:
    radial-gradient(circle at 76% 0%, rgba(24, 164, 224, 0.24), transparent 22rem),
    linear-gradient(180deg, rgba(217, 245, 255, 0.82), rgba(180, 228, 255, 0.78));
}

.dashboard-content-wrap {
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  display: grid;
  gap: clamp(12px, 1vw, 16px);
  box-sizing: border-box;
  margin-right: auto;
  margin-left: auto;
  padding-right: clamp(16px, 1.4vw, 24px);
  padding-left: clamp(16px, 1.4vw, 24px);
}

.dashboard-headline,
.dashboard-kpi-card,
.dashboard-chart-panel,
.dashboard-table-panel,
.dashboard-quick-panel,
.control-panel,
.control-hero-card,
.control-stat-card,
.total-work-breakdown > div {
  border: 1px solid var(--admin-line);
  border-radius: 4px;
  color: var(--admin-text);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 9px 22px rgba(39, 61, 86, 0.08);
}

.dashboard-headline {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: clamp(14px, 1.4vw, 20px);
  padding: clamp(14px, 1.2vw, 18px) clamp(16px, 1.4vw, 22px);
  border-top: 0;
  border-color: #bfdcf2;
  border-radius: 12px;
  background:
    radial-gradient(circle at 87% 14%, rgba(41, 183, 231, 0.34), transparent 18rem),
    linear-gradient(115deg, rgba(250, 254, 255, 0.94) 0%, rgba(232, 248, 255, 0.92) 52%, rgba(190, 235, 255, 0.94) 100%);
  box-shadow: 0 18px 38px rgba(39, 61, 86, 0.1);
}

.dashboard-hero-copy {
  min-width: 0;
}

.dashboard-headline .control-kicker {
  display: block;
  margin: 0 0 6px;
  color: #1f365b;
  font-size: clamp(10px, 0.8vw, 13px);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-headline h1 {
  display: block;
  max-width: 860px;
  margin: 0;
  overflow-wrap: normal;
  color: #0a3e78;
  font-size: clamp(20px, 1.45vw, 28px);
  font-weight: 900;
  line-height: 1.06;
  text-transform: uppercase;
  white-space: normal;
}

.dashboard-headline h1 .title-ai {
  color: #1478d4;
}

.dashboard-headline h1:before {
  content: none;
}

.dashboard-headline p:not(.control-kicker):not(.dashboard-slogan) {
  display: none;
}

.dashboard-headline p.dashboard-slogan {
  display: block;
  margin: 7px 0 0;
  color: #37658d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.12vw, 18px);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
}

.dashboard-clock-card {
  align-self: center;
  justify-self: end;
  width: min(100%, 360px);
  max-width: 360px;
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 36px rgba(28, 95, 146, 0.14);
  transform: none;
}

.dashboard-clock-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: #506985;
  font-size: clamp(9px, 0.72vw, 11px);
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-clock-status {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #b9ecf6;
  border-radius: 999px;
  color: #0087a8;
  background: linear-gradient(180deg, #f8ffff, #e7fbff);
  font-size: clamp(9px, 0.72vw, 11px);
  font-weight: 800;
  text-transform: none;
  white-space: nowrap;
}

.dashboard-clock-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dashboard-clock-logout {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #0d82cf;
  font-size: 9px;
  font-weight: 900;
  text-transform: none;
}

.dashboard-clock-logout:hover {
  background: #0a6fb1;
}

.dashboard-clock-status i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #16afd0;
  box-shadow: 0 0 0 6px rgba(22, 175, 208, 0.12);
}

.dashboard-clock-card strong {
  color: #083f7c;
  font-size: clamp(26px, 2.45vw, 34px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
}

.control-primary {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 4px;
  color: #ffffff;
  background: #ff0b4f;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.control-primary:after {
  content: "+";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-left: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 16px;
  line-height: 1;
}

.dashboard-hero-cta {
  width: fit-content;
  min-height: 28px;
  margin-top: 10px;
  padding: 0 11px;
  border-radius: 999px;
  background: #0d82cf;
  font-size: 9px;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}

.dashboard-kpi-card {
  position: relative;
  min-width: 0;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  padding: 12px 52px 12px 14px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(35, 68, 105, 0.16);
  text-decoration: none;
}

.dashboard-kpi-card:focus-visible {
  outline: 3px solid rgba(8, 116, 189, 0.38);
  outline-offset: 3px;
}

.dashboard-kpi-card.cyan {
  background: linear-gradient(135deg, #2f92e5, #1678cf);
}

.dashboard-kpi-card.green {
  background: linear-gradient(135deg, #48cb26, #25a915);
}

.dashboard-kpi-card.amber {
  background: linear-gradient(135deg, #ff9925, #ff6418);
}

.dashboard-kpi-card.purple {
  background: linear-gradient(135deg, #7b61ff, #5a46dc);
}

.dashboard-kpi-card:after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.dashboard-kpi-card:before {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  color: #ffffff;
  font-size: 7px;
  font-weight: 900;
}

.dashboard-kpi-card.cyan:before {
  content: "IDR";
}

.dashboard-kpi-card.green:before {
  content: "CST";
}

.dashboard-kpi-card.amber:before {
  content: "BAL";
}

.dashboard-kpi-card.purple:before {
  content: "SUM";
}

.dashboard-kpi-card span,
.dashboard-kpi-card p,
.dashboard-kpi-card strong {
  color: #ffffff;
}

.dashboard-kpi-card span {
  display: block;
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 700;
  text-transform: none;
  opacity: 0.92;
}

.dashboard-kpi-card strong {
  display: block;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 5px;
  font-size: clamp(12px, 0.95vw, 16px);
  line-height: 1.15;
}

.dashboard-kpi-card p {
  margin: 0;
  font-size: 8px;
  line-height: 1.35;
  opacity: 0.86;
}

.dashboard-document-grid,
.dashboard-quick-grid {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.dashboard-document-grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: stretch;
}

.dashboard-quick-grid {
  grid-template-columns: minmax(0, 1fr);
}

.control-panel {
  min-width: 0;
  padding: 12px;
}

.dashboard-chart-panel,
.dashboard-table-panel,
.dashboard-quick-panel {
  overflow: hidden;
  padding: 0;
}

.dashboard-chart-panel {
  min-height: 322px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dashboard-panel-heading {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0 10px;
  border-bottom: 1px solid var(--admin-line);
  background: #ffffff;
}

.dashboard-panel-heading .eyebrow {
  display: none;
}

.dashboard-panel-heading h2,
.control-panel h2 {
  margin: 0;
  color: #5c6978;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-panel-heading span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 3px;
  color: #8b99a9;
  background: #f4f8fb;
  font-size: 8px;
  font-weight: 800;
}

.project-table-wrap {
  margin-top: 0;
  padding: 11px;
  overflow-x: auto;
}

.workflow-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  color: #6d7886;
  font-size: 9px;
}

.workflow-table th,
.workflow-table td {
  padding: 8px 9px;
  border: 1px solid #e4ebf2;
  text-align: left;
  vertical-align: middle;
}

.workflow-table th {
  color: #344051;
  background: #f7fafc;
  font-size: 8px;
  font-weight: 900;
}

.workflow-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.workflow-table td strong {
  color: #526172;
}

.workflow-table td:last-child {
  color: #ffffff;
  text-align: center;
  font-size: 8px;
  font-weight: 900;
}

.workflow-table td:last-child:not([colspan]) {
  background: linear-gradient(135deg, #35c94f, #15ab32);
}

.chart-frame {
  position: relative;
  width: 100%;
  height: clamp(218px, 16vw, 260px);
  min-height: 0;
  box-sizing: border-box;
  padding: 12px;
}

.chart-frame-wide {
  height: clamp(218px, 16vw, 260px);
}

.status-chart-panel .chart-frame {
  height: clamp(218px, 16vw, 260px);
}

.chart-frame canvas {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  display: block;
}

.job-status-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
  margin-top: 0;
}

.sales-target-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.job-status-summary div,
.sales-target-summary div,
.total-work-breakdown > div {
  min-width: 0;
  padding: 7px;
  border: 1px solid #e4ebf2;
  border-radius: 4px;
  background: #fbfdff;
  box-shadow: none;
}

.job-status-summary strong,
.sales-target-summary strong,
.total-work-breakdown strong {
  display: block;
  overflow-wrap: anywhere;
  color: #344051;
  font-size: 13px;
  line-height: 1.15;
}

.job-status-summary span,
.sales-target-summary span,
.total-work-breakdown span {
  display: block;
  margin-top: 3px;
  color: #8793a2;
  font-size: 8px;
  font-weight: 800;
}

.sales-target-summary .achieved {
  border-color: rgba(0, 173, 136, 0.32);
  background: #f2fffb;
}

.sales-target-summary .achieved strong {
  color: #00ad88;
}

.sales-target-summary small {
  display: block;
  margin-top: 4px;
  color: #8793a2;
  font-size: 8px;
  font-weight: 700;
}

.dashboard-kpi-card p {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 16px;
  padding: 0 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 1;
}

.total-work-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.total-work-breakdown > div:nth-child(1) {
  border-left: 4px solid #1f83d8;
}

.total-work-breakdown > div:nth-child(2) {
  border-left: 4px solid #35c94f;
}

.total-work-breakdown > div:nth-child(3) {
  border-left: 4px solid #ff9925;
}

.total-work-breakdown > div:nth-child(4) {
  border-left: 4px solid #ff0b4f;
}

@media (max-width: 1199px) {
  .dashboard-headline {
    grid-template-columns: 1fr;
  }

  .dashboard-clock-card {
    justify-self: start;
    width: min(100%, 360px);
    max-width: 360px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-document-grid,
  .dashboard-quick-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .control-shell {
    grid-template-columns: 1fr;
  }

  .control-sidebar {
    position: static;
    min-height: auto;
  }

  .control-brand {
    min-height: 52px;
  }

  .control-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-nav-section {
    grid-column: 1 / -1;
  }

  .control-topbar {
    position: static;
  }
}

@media (max-width: 767px) {
  .status-cluster {
    display: none;
  }

  .dashboard-content-wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .dashboard-headline {
    align-items: stretch;
    min-height: 0;
    gap: 16px;
    padding: 16px;
  }

  .dashboard-headline h1 {
    font-size: clamp(22px, 7vw, 30px);
    white-space: normal;
  }

  .dashboard-headline p.dashboard-slogan {
    font-size: clamp(15px, 4.4vw, 20px);
  }

  .dashboard-clock-card {
    width: 100%;
    max-width: none;
    min-height: 96px;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    transform: none;
  }

  .dashboard-clock-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .dashboard-clock-actions {
    flex-wrap: wrap;
  }

  .dashboard-clock-status {
    min-height: 30px;
  }

  .dashboard-clock-card strong {
    font-size: clamp(30px, 10.5vw, 40px);
  }

  .dashboard-kpi-grid,
  .dashboard-document-grid,
  .dashboard-quick-grid,
  .job-status-summary,
  .sales-target-summary,
  .total-work-breakdown {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-card {
    min-height: 76px;
  }

  .dashboard-kpi-card strong {
    font-size: clamp(14px, 4vw, 18px);
  }

  .chart-frame,
  .chart-frame-wide,
  .status-chart-panel .chart-frame {
    height: 235px;
  }
}

.status-pill,
.time-pill {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill i {
  width: 11px;
  height: 11px;
  margin-right: 7px;
}
