:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body.ch-theme-body {
  margin: 0;
  background: #f3f6fb;
  color: #495057;
}

a {
  color: #556ee6;
  text-decoration: none;
}

a:hover {
  color: #4458b8;
  text-decoration: none;
}

.main-content {
  min-height: 100vh;
}

.ch-auth-row {
  min-height: 520px;
}

.ch-auth-panel-inner {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.main-content.ch-no-sidebar {
  margin-left: 0 !important;
}

.ch-quick-action {
  transition: border-color 0.15s ease-in-out;
}

.ch-quick-action:hover {
  border-color: #5156be;
}

.ch-report-card {
  transition: border-color 0.15s ease-in-out;
  border: 1px solid #e9e9ef;
}

.ch-report-card:hover {
  border-color: #5156be;
}

.ch-report-card-active {
  border-color: #5156be;
}

.ch-report-card-disabled {
  opacity: 0.75;
}

/* Mobile-first data-entry: ushers/counters standing up right after a
   service, one-thumb use outdoors. 48px is the floor, not a target. */
.ch-btn-touch-lg {
  min-height: 52px;
}

.ch-stepper-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ch-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ch-stepper-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.ch-stepper-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ch-stepper-controls input[type="number"] {
  width: 64px;
  min-width: 44px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.25rem;
}

.ch-stepper-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Hide native number spinners so the stepper buttons are the only
   visible increment/decrement control. */
.ch-stepper-controls input[type="number"]::-webkit-outer-spin-button,
.ch-stepper-controls input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ch-stepper-controls input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.footer {
  left: 0;
  position: static;
  height: auto;
  margin-top: 1.5rem;
}

.page-content {
  min-height: calc(100vh - 70px);
  padding-bottom: 2rem;
}

.ch-page-shell {
  max-width: 760px;
  margin: 0 auto;
}

.ch-page-shell.wide-page {
  max-width: 1280px;
}

.header-profile-user {
  width: 22px;
  height: 22px;
  font-size: 0.7rem;
}

#page-topbar .navbar-header {
  height: 35px !important;
}

#page-topbar .navbar-brand-box {
  height: 35px !important;
  padding-top: 0;
  padding-bottom: 0;
}

#page-topbar .navbar-header .header-item,
#page-topbar .navbar-header .header-item .btn,
#page-topbar .navbar-header .btn.header-item {
  height: 35px !important;
  line-height: 35px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center;
}

/* .header-item's own default text color (a dark gray) otherwise wins
   over .btn-primary's white, since both classes sit on the same link. */
#page-topbar .navbar-header .btn-primary.header-item {
  color: #fff !important;
}

.vertical-menu {
  top: 35px !important;
}

.page-content {
  padding-top: 55px !important;
}

/* The vendor small/large-logo toggle (viewport width vs. collapsed
   sidebar) can disagree and show both at once; force exactly one. */
#page-topbar .navbar-brand-box .logo .logo-lg {
  display: none !important;
}

#page-topbar .navbar-brand-box .logo .logo-sm {
  display: inline-flex !important;
  align-items: center;
}

@media (min-width: 992px) {
  body:not([data-sidebar-size="sm"]) #page-topbar .navbar-brand-box .logo .logo-lg {
    display: inline-flex !important;
  }

  body:not([data-sidebar-size="sm"]) #page-topbar .navbar-brand-box .logo .logo-sm {
    display: none !important;
  }
}

.messages {
  margin-bottom: 1rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.85rem;
}

.page-header h2 {
  margin: 0;
}

.subtle {
  color: #74788d;
}

.panel {
  background: #fff;
  border: 1px solid #eff2f7;
  border-radius: 8px;
  box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
  padding: 1.25rem;
  overflow-x: auto;
}

.narrow-panel {
  max-width: 560px;
  margin: 0 auto;
}

.action-grid,
.content-grid,
.form-grid {
  display: grid;
  gap: 1rem;
}

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

.content-grid {
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  align-items: start;
}

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

.span-2 {
  grid-column: 1 / -1;
}

.action-panel {
  display: block;
  min-height: 100%;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.action-panel:hover {
  transform: translateY(-1px);
  border-color: #d8def1;
  box-shadow: 0 1rem 2rem rgba(18, 38, 63, 0.08);
  color: inherit;
}

.action-panel h2,
.panel h2,
.panel h3 {
  margin-top: 0;
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 1rem;
  border: 1px solid #556ee6;
  border-radius: 0.375rem;
  background: #556ee6;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
}

button:hover,
.button-link:hover {
  background: #4458b8;
  border-color: #4458b8;
  color: #fff;
}

.button-link.secondary,
button.secondary {
  background: #fff;
  border-color: #d9e2ef;
  color: #495057;
}

.button-link.secondary:hover,
button.secondary:hover {
  background: #f8f9fa;
  border-color: #c9d4e5;
  color: #495057;
}

button:disabled,
.button-link[aria-disabled="true"] {
  opacity: 0.65;
  cursor: default;
}

form p {
  margin: 0;
}

.form-label,
label {
  display: block;
  margin-bottom: 0.45rem;
  color: #344054;
  font-weight: 700;
}

.field-help {
  margin-top: 0.45rem;
  color: #74788d;
  font-size: 0.92rem;
}

.errorlist {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  color: #dc3545;
}

/* Google Identity branding guidelines (light theme): #FFFFFF fill, #747775
   stroke, #1F1F1F text, Google Sans Medium 14/20 with a safe fallback stack
   (Google Sans isn't available as a public webfont link, so this project
   doesn't self-host it just for one button), and the documented Android/Web
   padding (12px before the logo, 10px after it, 12px after the text). */
.google-signin-btn {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 12px;
  border: 1px solid #747775;
  border-radius: 4px;
  background: #ffffff;
  color: #1f1f1f;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
}

.google-signin-btn:hover {
  background: #f8f9fa;
  color: #1f1f1f;
  text-decoration: none;
}

.google-signin-btn__icon {
  display: inline-flex;
  flex-shrink: 0;
  margin-right: 10px;
}

.google-signin-btn__text {
  flex-grow: 1;
  text-align: center;
  padding-right: 12px;
}

.table {
  width: 100%;
  margin-bottom: 0;
  vertical-align: middle;
}

.table th {
  white-space: nowrap;
}

.table th,
.table td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.table th a {
  color: inherit;
  font-weight: inherit;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.metric-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eff2f7;
}

.metric-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.metric-label {
  color: #74788d;
}

.metric-value {
  color: #344054;
  font-size: 1.15rem;
  font-weight: 800;
}

.pagination {
  align-items: center;
}

.pagination .page-link {
  border-radius: 999px;
  min-width: 38px;
  text-align: center;
}

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

@media (max-width: 640px) {
  .page-header h1 {
    font-size: 1.55rem;
  }

  .auth-inline-field {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .auth-inline-field .field-help,
  .auth-inline-field .errorlist {
    grid-column: 1;
  }

  .panel {
    padding: 1rem;
  }
}
