.cfg-public-shell {
  max-width: 1480px;
  margin: 0 auto;
}

.cfg-app {
  display: grid;
  gap: 18px;
  color: #0f172a;
}

.cfg-hero {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 18px;
  padding: 26px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f766e 0%, #0f172a 100%);
  color: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
}

.cfg-hero h2 {
  margin: 6px 0 10px;
  color: #fff;
  font-size: 2rem;
  line-height: 1.1;
}

.cfg-hero p {
  margin: 0 0 14px;
  color: rgba(255,255,255,.86);
}

.cfg-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #99f6e4;
}

.cfg-hero-side {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
}

.cfg-hero-value {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.cfg-flash,
.cfg-login-message {
  border-radius: 16px;
  padding: 12px 14px;
  background: #ecfeff;
  color: #155e75;
  border: 1px solid #a5f3fc;
}

.cfg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cfg-tab-btn {
  border: 1px solid #d7dde7;
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(15,23,42,.04);
}

.cfg-tab-btn.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.cfg-grid {
  display: grid;
  gap: 16px;
}

.cfg-grid.kpi {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cfg-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.cfg-card h3,
.cfg-card h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

.cfg-kpi-value {
  font-size: 1.8rem;
  line-height: 1.1;
  font-weight: 800;
  color: #0f172a;
}

.cfg-kpi-help {
  color: #64748b;
  margin-top: 8px;
  font-size: 12px;
}

.cfg-two-col {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.4fr 1fr;
}

.cfg-three-col {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

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

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

.cfg-btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 118, 110, .18);
}

.cfg-btn:hover {
  transform: translateY(-1px);
}

.cfg-btn.secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.cfg-btn.warn {
  background: #b45309;
}

.cfg-btn.danger {
  background: #b91c1c;
}

.cfg-btn.small {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 10px;
  box-shadow: none;
}

.cfg-btn-block {
  width: 100%;
  justify-content: center;
}

.cfg-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.cfg-hero .cfg-pill {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.cfg-pill.is-warning {
  background: #fef3c7;
  color: #92400e;
}

.cfg-table-wrap {
  overflow: auto;
}

table.cfg-table {
  width: 100%;
  border-collapse: collapse;
}

table.cfg-table th,
table.cfg-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

table.cfg-table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  position: sticky;
  top: 0;
}

.cfg-input,
.cfg-select,
.cfg-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 42px;
  background: #fff;
  box-sizing: border-box;
}

.cfg-input-lg {
  min-height: 50px;
  font-size: 1.05rem;
}

.cfg-textarea {
  min-height: 150px;
}

.cfg-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.cfg-list {
  margin: 0;
  padding-left: 18px;
}

.cfg-muted {
  color: #64748b;
}

.cfg-good-text {
  color: #0f766e;
  font-weight: 700;
}

.cfg-danger-text {
  color: #b91c1c;
  font-weight: 700;
}

.cfg-chart {
  width: 100%;
  min-height: 260px;
}

.cfg-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cfg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
}

.cfg-legend-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #334155;
  font-size: 12px;
}

.cfg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.cfg-month-panels {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
}

.cfg-month-list {
  display: grid;
  gap: 8px;
}

.cfg-month-btn {
  text-align: left;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
}

.cfg-month-btn.active {
  border-color: #0f766e;
  box-shadow: inset 0 0 0 2px #0f766e;
}

.cfg-callout {
  background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 100%);
  border: 1px solid #bae6fd;
  border-radius: 22px;
  padding: 18px;
}

.cfg-code-block {
  white-space: pre-wrap;
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 16px;
  overflow: auto;
  max-height: 560px;
}

.cfg-login-wrap {
  min-height: 60vh;
  display: grid;
  place-items: center;
}

.cfg-login-card {
  max-width: 520px;
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, .08);
}

.cfg-login-card h2 {
  margin: 8px 0 10px;
}

.cfg-login-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .cfg-three-col,
  .cfg-two-col,
  .cfg-hero {
    grid-template-columns: 1fr;
  }

  .cfg-month-panels {
    grid-template-columns: 1fr;
  }

  .cfg-hero-side {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .cfg-card,
  .cfg-callout,
  .cfg-hero,
  .cfg-login-card {
    padding: 16px;
    border-radius: 18px;
  }

  .cfg-hero h2 {
    font-size: 1.6rem;
  }

  table.cfg-table th,
  table.cfg-table td {
    padding: 8px 9px;
  }
}

.cfg-table-wrap {
  overflow-x: auto;
}

.cfg-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.cfg-card-finance {
  padding: 18px;
}

.cfg-card-finance-header,
.cfg-card-finance-footer,
.cfg-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.cfg-card-finance-header > div {
  flex: 1 1 220px;
}

.cfg-month-grid,
.cfg-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.cfg-item-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cfg-stack-list {
  display: grid;
  gap: 12px;
}

.cfg-item-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
}

.cfg-input,
.cfg-textarea,
.cfg-select {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.cfg-card-finance-footer {
  margin-top: 16px;
}

.cfg-card-finance-footer .cfg-kpi-value {
  font-size: 1.5rem;
}

@media (max-width: 700px) {
  .cfg-month-grid,
  .cfg-item-grid {
    grid-template-columns: 1fr;
  }
  .cfg-card-finance-header,
  .cfg-card-finance-footer,
  .cfg-item-actions {
    align-items: stretch;
  }
}

.cfg-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
}

.cfg-modal {
  width: min(680px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}

.cfg-modal-header,
.cfg-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cfg-modal-header {
  margin-bottom: 16px;
}

.cfg-modal-header h3 {
  margin: 0;
}

.cfg-modal-close {
  border: 1px solid #cbd5e1;
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.cfg-modal-actions {
  margin-top: 18px;
  justify-content: flex-end;
  flex-wrap: wrap;
}


.cfg-card-detail-links { display:flex; flex-wrap:wrap; gap:10px; }
.cfg-card-detail-group { border:1px solid #e2e8f0; border-radius:18px; padding:14px; margin-top:14px; }
.cfg-card-detail-header { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:10px; }
.cfg-card-detail-header h4 { margin:0; }

.cfg-btn.success {
  background: #15803d;
}

.cfg-pill.is-success {
  background: #dcfce7;
  color: #166534;
}

.cfg-inline-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.cfg-month-money-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfg-status-placeholder {
  font-size: 12px;
  color: #64748b;
  padding: 4px 2px 0;
}

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