/* Decision Tower dashboard — recon-dashboard-inspired layout */
html { scroll-behavior: smooth; }
body {
  font-family: Segoe UI, Tahoma, sans-serif;
  margin: 0;
  background: #f4f4f9;
  color: #222;
  padding-top: var(--nav-height, 58px);
}
.wrap { max-width: 1400px; margin: 24px auto; padding: 0 20px 40px; }
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #333;
  color: #fff;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}.nav-brand { font-weight: 700; font-size: 1.1rem; }
.nav-meta { font-size: 0.85rem; color: #ccc; }
.card-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.card { background: #fff; border-radius: 8px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.label { color: #666; font-size: 12px; text-transform: uppercase; }
.value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.filters, .views, .toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; background: #fff; padding: 12px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.views { margin-top: 12px; }
.toolbar { margin-top: 12px; align-items: center; }
input, select, button { padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }
.btn { background: #ff8c00; color: #fff; border: none; cursor: pointer; font-weight: 600; }
.btn-dark { background: #374151; color: #fff; border: none; }
.btn-reset { background: #fff; color: #374151; border: 1px solid #d1d5db; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 6px; font-weight: 600; box-sizing: border-box; }
.filter-form input[type="date"],
.filter-form input[type="month"],
.filter-form input[type="search"],
.filter-form select,
.filter-form .filter-btn,
.filter-form .btn-reset {
  height: 36px;
  line-height: 1.2;
  font-size: 14px;
}
.filter-form .filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}
.view-btn { border: 1px solid #e5e7eb; background: #fff; color: #111827; padding: 9px 13px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 13px; }
.view-btn.active { background: #111827; color: #fff; border-color: #111827; }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #e5e7eb; color: #374151; font-weight: 700; }
.badge-live { background: #dcfce7; color: #166534; }
.badge-fixture { background: #fef3c7; color: #92400e; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #eee; font-size: 0.9rem; }
th { background: #111827; color: #fff; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.chart-card { background: #fff; border-radius: 8px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.chart-card h3 { margin: 0 0 10px; font-size: 16px; }
.chart-wrap { position: relative; width: 100%; height: 220px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
.chart-legend-hint { margin: 8px 0 6px; text-align: center; }
.chart-legend-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.chart-legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.chart-legend-btn:hover {
  border-color: #ff8c00;
  background: #fff7ed;
}
.chart-legend-btn.is-hidden {
  opacity: 0.6;
  background: #f3f4f6;
  border-color: #e5e7eb;
  text-decoration: line-through;
}
.chart-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}
.queue-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.queue-box { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); padding: 12px; }
.queue-box ul { margin: 8px 0 0; padding-left: 18px; font-size: 0.88rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.kpi-card { background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); padding: 14px; border-left: 4px solid #fb923c; }
.kpi-card .k { font-size: 12px; text-transform: uppercase; color: #6b7280; }
.kpi-card .v { font-size: 24px; font-weight: 700; margin-top: 6px; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-top: 12px; }
.subtle { color: #6b7280; font-size: 12px; }
.ai-shell { margin-top: 12px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); padding: 12px; }
.ai-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-input { flex: 1; min-width: 260px; }
.ai-answer { margin-top: 10px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; background: #fafafa; white-space: pre-wrap; line-height: 1.4; }
.ai-note { font-size: 12px; color: #6b7280; margin-top: 6px; }
.ai-suggest { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.ai-chip { border: 1px solid #d1d5db; background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.ai-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.ai-action-btn { border: 1px solid #d1d5db; background: #fff; border-radius: 6px; padding: 7px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.notify-panel { margin-top: 12px; background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); overflow: visible; }
.notify-panel-root { overflow: visible; }
.notify-panel-root > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.notify-panel-root > summary::-webkit-details-marker { display: none; }
.notify-summary-meta { font-size: 12px; color: #6b7280; font-weight: 600; }
.notify-summary-title, .notify-bucket-title { display: inline-flex; align-items: center; gap: 8px; }
.notify-help-icon { color: #9ca3af; font-size: 13px; cursor: help; }
.notify-help-icon:hover { color: #ff8c00; }
.hover-tip { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.hover-tip::before {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 30;
}
.hover-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #111827;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 30;
}
.hover-tip:hover::before,
.hover-tip:hover::after {
  opacity: 1;
  visibility: visible;
}
/* Bucket row tooltips: drop below icon so collapsed rows aren't clipped */
.notify-bucket .hover-tip::before {
  bottom: auto;
  top: calc(100% + 10px);
}
.notify-bucket .hover-tip::after {
  bottom: auto;
  top: calc(100% + 4px);
  border-top-color: transparent;
  border-bottom-color: #111827;
}
.notify-bucket {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.notify-bucket:has(.hover-tip:hover),
.notify-bucket.tip-active {
  z-index: 40;
}
.notify-bucket-summary {
  cursor: pointer;
  padding: 10px 12px;
  background: #f9fafb;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  position: relative;
  overflow: visible;
}
.notify-bucket-summary::-webkit-details-marker { display: none; }
.notify-schedule { border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; margin-bottom: 12px; background: #fafafa; }
.notify-schedule-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 10px 0; }
.notify-schedule-fields label { font-size: 12px; color: #374151; display: flex; flex-direction: column; gap: 4px; }
.notify-bucket-body { padding: 12px; border-top: 1px solid #e5e7eb; }
.recipient-block { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.recipient-block input[type="text"] { width: 100%; max-width: 520px; }
.recipient-branch-label { font-size: 13px; color: #374151; }
.notify-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.notify-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.notify-row:last-child { border-bottom: 0; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; }
.pill-unbilled { background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.pill-billed { background: #dcfce7; color: #166534; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
@media (max-width: 900px) {
  .card-row, .kpi-grid, .queue-grid, .chart-grid, .two-col, .admin-status-row { grid-template-columns: 1fr; }
  .chart-wide { grid-column: auto; }
  .admin-form-grid { grid-template-columns: 1fr; }
}

/* --- Mobile shell (phone + narrow tablet) --- */
:root {
  --nav-height: 58px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 10px 14px;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  flex: 0 1 auto;
  min-width: 0;
}

.chart-card {
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.chart-card-table {
  margin-top: 14px;
}

.chart-card-table .table-scroll {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.chart-card-table .table-scroll table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.chart-card-table th,
.chart-card-table td {
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.chart-card-table th:nth-child(3),
.chart-card-table td:nth-child(3),
.chart-card-table th:nth-child(5),
.chart-card-table td:nth-child(5),
.chart-card-table .num-col {
  text-align: right;
}

.chart-card-table .th-short {
  display: none;
}

.bucket-summary-table th:nth-child(1),
.bucket-summary-table td:nth-child(1) {
  width: 30%;
}

.bucket-summary-table th:nth-child(2),
.bucket-summary-table td:nth-child(2) {
  width: 10%;
}

.bucket-summary-table th:nth-child(3),
.bucket-summary-table td:nth-child(3) {
  width: 22%;
}

.bucket-summary-table th:nth-child(4),
.bucket-summary-table td:nth-child(4) {
  width: 14%;
}

.bucket-summary-table th:nth-child(5),
.bucket-summary-table td:nth-child(5) {
  width: 24%;
}

.nav-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.nav-brand-icon {
  color: #ff8c00;
  font-size: 1.2rem;
  line-height: 1;
}

.nav-brand-stack .nav-brand {
  line-height: 1.2;
}

.nav-brand-block {
  min-width: 0;
  flex: 1;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.nav-menu .nav-user,
.nav-menu .nav-meta-item {
  font-size: 0.85rem;
  color: #ccc;
}

.nav-subtitle {
  font-size: 0.78rem;
  line-height: 1.3;
}

.chart-wide {
  grid-column: 1 / span 2;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  margin-top: 0;
  min-width: 520px;
}

.views-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  padding-bottom: 4px;
}

.views-scroll .view-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.filters-shell {
  margin-bottom: 0;
  border: none;
}

.filters-shell-summary {
  display: none;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  padding: 12px 14px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 8px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
}

.filters-shell-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.filters-shell-chevron {
  display: none;
  color: #6b7280;
  font-size: 13px;
  transition: transform 0.15s ease;
}

.filters-shell.is-open .filters-shell-chevron {
  transform: rotate(180deg);
}

.filters-shell-summary::-webkit-details-marker {
  display: none;
}

.filters-shell-summary i {
  color: #ff8c00;
  margin-right: 8px;
}

@media (max-width: 900px) {
  body {
    padding-top: var(--nav-height, 56px);
  }

  .nav {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-bar {
    width: 100%;
  }

  .nav-toggle {
    display: none;
  }

  /* Collapsible mobile nav (hamburger) */
  .nav-shell-collapse .nav-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .nav-shell-collapse .nav-brand-stack {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .nav-shell-collapse .nav-toggle {
    display: inline-flex !important;
  }

  .nav-shell-collapse .nav-menu {
    display: none !important;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-shell-collapse .nav-menu.is-open {
    display: flex !important;
  }

  .nav-shell-collapse .nav-subtitle,
  .nav-shell-collapse .nav-menu .nav-meta-item,
  .nav-shell-collapse .nav-menu .badge {
    display: none !important;
  }

  .nav-shell-collapse .nav-menu .nav-user,
  .nav-shell-collapse .nav-menu .admin-nav-link {
    display: block;
    width: 100%;
    margin-right: 0;
    padding: 8px 4px;
    font-size: 0.9rem;
  }

  /* Legacy always-open mobile nav (pages without nav-shell-collapse) */
  .nav:not(.nav-shell-collapse) .nav-menu {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 0 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 8px;
  }

  .nav:not(.nav-shell-collapse) .nav-menu .nav-user,
  .nav:not(.nav-shell-collapse) .nav-menu .admin-nav-link,
  .nav:not(.nav-shell-collapse) .nav-menu .nav-meta-item,
  .nav:not(.nav-shell-collapse) .nav-menu .badge {
    display: block;
    width: 100%;
    margin-right: 0;
  }

  .nav:not(.nav-shell-collapse) .nav-menu .admin-nav-link {
    padding: 4px 0;
  }

  .wrap {
    margin: 16px auto;
    padding: 0 14px 32px;
  }

  .chart-grid {
    gap: 24px;
  }

  .chart-card-status {
    overflow: visible;
    margin-bottom: 8px;
    padding-bottom: 10px;
    position: relative;
    z-index: 2;
  }

  .chart-card-status .chart-legend-buttons {
    margin-bottom: 10px;
  }

  .hub-page-title {
    display: none;
  }

  .nav-hub + .wrap .hub-page-title {
    display: none;
  }

  .chart-card-table th,
  .chart-card-table td {
    font-size: 0.78rem;
    padding: 8px 4px;
  }

  .chart-card-table .table-scroll {
    overflow-x: hidden;
  }

  .chart-card-table .table-scroll table,
  .chart-card-table .bucket-summary-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
  }

  .chart-card-table .th-full {
    display: none;
  }

  .chart-card-table .th-short {
    display: inline;
  }

  .chart-card-table .num-col,
  .chart-card-table .usd-amount {
    font-size: 0.72rem;
    line-height: 1.25;
    word-break: break-all;
    white-space: normal;
  }

  .chart-card-table th:nth-child(1),
  .chart-card-table td:nth-child(1) {
    width: 30%;
  }

  .chart-card-table th:nth-child(2),
  .chart-card-table td:nth-child(2) {
    width: 10%;
  }

  .chart-card-table th:nth-child(3),
  .chart-card-table td:nth-child(3) {
    width: 22%;
  }

  .chart-card-table th:nth-child(4),
  .chart-card-table td:nth-child(4) {
    width: 14%;
  }

  .chart-card-table th:nth-child(5),
  .chart-card-table td:nth-child(5) {
    width: 24%;
  }

  h2 {
    font-size: 1.35rem;
  }

  .value {
    font-size: 22px;
  }

  .kpi-card .v {
    font-size: 20px;
  }

  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-form > div {
    width: 100%;
  }

  .filter-form select,
  .filter-form input[type="date"],
  .filter-form input[type="month"],
  .filter-form input[type="search"] {
    width: 100%;
  }

  .filter-form .filter-btn,
  .filter-form .btn-reset {
    width: 100%;
    min-height: 40px;
  }

  .filters-shell-summary {
    display: flex;
    align-items: center;
  }

  .filters-shell-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Collapsed by default on mobile */
  .filters-shell > .filter-form {
    display: none;
    margin-top: 0;
  }

  .filters-shell.is-open > .filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 8px;
    margin-bottom: 12px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar .btn {
    width: 100%;
    min-height: 42px;
  }

  .ai-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-input {
    min-width: 0;
    width: 100%;
  }

  .ai-row .btn {
    width: 100%;
    min-height: 42px;
  }

  .ai-answer {
    font-size: 14px;
    padding: 12px;
  }

  .ai-chip,
  .ai-action-btn {
    min-height: 36px;
  }

  .chart-wrap {
    height: 200px;
  }

  .table-scroll table {
    min-width: 640px;
  }

  .chart-card-table .table-scroll table {
    min-width: 0 !important;
  }

  .usd-amount {
    font-variant-numeric: tabular-nums;
  }

  .notify-schedule-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .notify-schedule-fields label,
  .notify-schedule-fields input,
  .notify-schedule-fields select,
  .notify-schedule-fields .btn {
    width: 100%;
  }

  .notify-actions,
  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .notify-actions .btn,
  .admin-actions .btn {
    width: 100%;
  }

  .acumatica-signin-main {
    margin-top: 20px;
    padding: 0 14px;
  }
}

@media (min-width: 901px) {
  .filters-shell-summary {
    display: none !important;
  }

  .filters-shell > .filter-form {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
  }
}
.admin-nav-link { color: #f3f4f6; text-decoration: none; font-weight: 600; margin-right: 10px; }
.admin-nav-link:hover { color: #ff8c00; }
.admin-panel { margin-top: 14px; }
.admin-connection-org {
  margin-bottom: 0;
  padding-bottom: 22px;
}
.admin-connect-choice {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}
.admin-panel h3 { margin: 0 0 8px; font-size: 16px; }
.admin-note { margin: 0 0 12px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.admin-form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #374151; font-weight: 600; }
.admin-form-grid input { width: 100%; }
.admin-map-table { margin-top: 8px; box-shadow: none; }
.admin-map-table input { width: 100%; max-width: 320px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.admin-actions-connection {
  margin-top: 20px;
  margin-bottom: 8px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.admin-result pre.admin-pre { white-space: pre-wrap; word-break: break-word; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; font-size: 12px; margin: 8px 0 0; }
.admin-checklist { margin: 8px 0 0; padding-left: 20px; line-height: 1.6; font-size: 14px; }
.admin-status-row { margin-top: 0; }
.login-body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: #f4f4f9;
  color: #222;
  display: flex;
  flex-direction: column;
}
.login-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #333;
  color: #fff;
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  z-index: 2;
}
.login-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
  position: relative;
  overflow: hidden;
  background-color: #eef1f6;
  background-image:
    radial-gradient(ellipse 90% 70% at 15% 10%, rgba(255, 237, 213, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 60% at 90% 85%, rgba(255, 220, 180, 0.4), transparent 50%),
    radial-gradient(rgba(255, 140, 0, 0.2) 1.4px, transparent 1.4px),
    radial-gradient(rgba(255, 180, 90, 0.12) 1px, transparent 1px),
    repeating-linear-gradient(
      -32deg,
      transparent,
      transparent 20px,
      rgba(255, 140, 0, 0.11) 20px,
      rgba(255, 140, 0, 0.11) 21px,
      transparent 21px,
      transparent 42px
    ),
    repeating-linear-gradient(
      58deg,
      transparent,
      transparent 26px,
      rgba(255, 163, 60, 0.07) 26px,
      rgba(255, 163, 60, 0.07) 27px
    );
  background-size:
    100% 100%,
    100% 100%,
    26px 26px,
    26px 26px,
    100% 100%,
    100% 100%;
  background-position:
    center,
    center,
    0 0,
    13px 13px,
    0 0,
    0 0;
}
.login-main::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='160' height='56' viewBox='0 0 160 56' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 28 C40 8 80 48 120 28 S160 8 160 28' fill='none' stroke='%23ff8c00' stroke-width='1.5' stroke-dasharray='5 9' stroke-opacity='0.32'/%3E%3Cpath d='M0 40 C40 56 80 20 120 40 S160 56 160 40' fill='none' stroke='%23ffb454' stroke-width='1' stroke-dasharray='3 11' stroke-opacity='0.22'/%3E%3Cpath d='M0 16 C40 0 80 32 120 16 S160 0 160 16' fill='none' stroke='%23ffd4a3' stroke-width='1' stroke-dasharray='2 14' stroke-opacity='0.35'/%3E%3C/svg%3E");
  background-size: 320px 112px;
  opacity: 0.85;
}
.login-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='24' cy='24' r='1.5' fill='%23ff8c00' fill-opacity='0.18'/%3E%3C/svg%3E");
  background-size: 48px 48px;
}
.login-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.login-panel-head {
  text-align: center;
  padding: 32px 32px 24px;
}
.login-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.login-icon-wrap i {
  font-size: 30px;
  color: #ff8c00;
}
.login-panel-head h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
}
.login-lead {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: #6b7280;
}
.login-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: #fef2f2;
  border-top: 1px solid #fecaca;
  border-bottom: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 24px;
  font-size: 13px;
  line-height: 1.45;
}
.login-error i {
  margin-top: 2px;
  flex-shrink: 0;
}
.login-panel-action {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 24px 32px 32px;
}
.login-action-label {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}
.login-action-hint {
  margin: 14px 0 0;
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}
.auth-loading-fallback {
  margin: 14px 0 0;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}
.auth-continue-link {
  color: #0078d4;
  font-weight: 600;
}
.login-ms-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: #0078d4;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0, 120, 212, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.login-ms-btn:hover {
  background: #106ebe;
  box-shadow: 0 4px 10px rgba(0, 120, 212, 0.4);
  transform: translateY(-1px);
  color: #fff;
}
.login-ms-btn:active {
  background: #005a9e;
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 120, 212, 0.35);
}
.login-ms-btn i {
  font-size: 20px;
}
.auth-loading-panel {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 32px 32px 28px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.auth-loading-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.auth-step {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}
.auth-step.active {
  color: #c2410c;
  background: #ffedd5;
}
.auth-step.done {
  color: #166534;
  background: #dcfce7;
}
.auth-step-sep {
  width: 18px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 1px;
}
.auth-loading-brand {
  margin-bottom: 12px;
}
.auth-ms-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f6fc;
  border: 1px solid #c7dff7;
  color: #0078d4;
  font-size: 28px;
}
.auth-loading-icon {
  margin-bottom: 0;
}
.auth-loading-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
}
.auth-loading-sub {
  margin: 10px 0 22px;
  font-size: 0.92rem;
  color: #6b7280;
  line-height: 1.5;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.auth-spinner {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
.auth-spinner span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0078d4;
  animation: auth-bounce 1.2s infinite ease-in-out both;
}
.auth-spinner span:nth-child(1) { animation-delay: -0.32s; }
.auth-spinner span:nth-child(2) { animation-delay: -0.16s; }
.auth-spinner span:nth-child(3) { animation-delay: 0s; }
.auth-spinner span:nth-child(4) { animation-delay: 0.16s; background: #ff8c00; }
@keyframes auth-bounce {
  0%, 80%, 100% { transform: scale(0.55); opacity: 0.45; }
  40% { transform: scale(1); opacity: 1; }
}
.auth-loading-user {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #166534;
}
.auth-loading-user i {
  margin-right: 6px;
}
.auth-loading-hint {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
}
.nav-user { margin-right: 10px; }
.admin-connect-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.admin-connect-card:hover {
  border-color: #ff8c00;
  background: #fff7ed;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.12);
}
.admin-connect-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffedd5;
  color: #c2410c;
  font-size: 18px;
  flex-shrink: 0;
}
.admin-connect-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  text-align: left;
}
.admin-connect-card-arrow {
  color: #9ca3af;
  font-size: 14px;
}
.admin-personal-status {
  margin: 14px 0 0;
  font-size: 13px;
  color: #166534;
  font-weight: 600;
}
.acumatica-signin-body {
  min-height: 100vh;
  background: #f4f4f9;
}
.acumatica-signin-main {
  max-width: 520px;
  margin: 32px auto 48px;
  padding: 0 20px;
}
.acumatica-signin-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 28px 28px 24px;
}
.acumatica-signin-head {
  text-align: center;
  margin-bottom: 20px;
}
.acumatica-logo-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 26px;
}
.acumatica-signin-head h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.acumatica-demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 20px;
}
.acumatica-demo-banner i {
  margin-top: 2px;
}
.acumatica-signin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acumatica-signin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.acumatica-signin-form input[type="url"],
.acumatica-signin-form input[type="text"],
.acumatica-signin-form input[type="password"] {
  width: 100%;
  font-weight: 400;
}
.acumatica-remember {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 500 !important;
}
.acumatica-remember input {
  width: auto;
}
.acumatica-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  font-size: 15px;
}
.acumatica-signin-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
}
.acumatica-signin-foot a {
  color: #374151;
  text-decoration: none;
  font-weight: 600;
}
.acumatica-signin-foot a:hover {
  color: #ff8c00;
}
