/* Console layout (_ConsoleLayout): dark sidebar (offcanvas below lg) + light content area. Shared by the super admin
   console and the business dashboard, which differ in accent so it's always clear whose data is on screen. */

.admin-body {
  margin-bottom: 0;
  background-color: #f4f6fa;
  --console-accent: #1b6ec2;
  --console-label: #60a5fa;
}

.admin-body.console-platform {
  --console-accent: #4f46e5;
  --console-label: #fbbf24;
}

.console-badge {
  background-color: var(--console-label);
  color: #111827;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  --bs-offcanvas-width: 260px;
  --bs-offcanvas-color: #cbd5e1;
  background-color: #111827 !important;
  color: #cbd5e1;
}

@media (min-width: 992px) {
  .admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}

.admin-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  padding: 1.15rem 1.25rem 1rem;
  color: #fff;
  text-decoration: none;
}

.admin-brand .brand-logo {
  height: 2.65rem;
  max-width: 100%;
}

.admin-brand:hover {
  color: #fff;
}

.admin-brand small {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--console-label);
}

.admin-business {
  margin: .25rem .75rem .25rem;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background-color: rgba(255, 255, 255, .05);
  color: #9ca3af;
  line-height: 1.4;
}

.admin-nav-heading {
  padding: 1.1rem 1.75rem .4rem;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6b7280;
}

.admin-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .1rem .75rem;
  padding: .55rem 1rem;
  border-radius: .5rem;
  color: #cbd5e1;
  font-size: .925rem;
}

.admin-nav .nav-link:hover,
.admin-nav .nav-link:focus-visible {
  background-color: rgba(255, 255, 255, .06);
  color: #fff;
}

.admin-nav .nav-link.active {
  background-color: var(--console-accent);
  color: #fff;
}

.admin-nav .nav-link.disabled {
  color: #6b7280;
}

.admin-soon {
  margin-left: auto;
  font-size: .65rem;
  font-weight: 600;
  background-color: rgba(255, 255, 255, .08);
  color: #9ca3af;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 60px;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

.admin-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--console-accent);
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  flex-shrink: 0;
}

.admin-avatar-sm {
  width: 1.85rem;
  height: 1.85rem;
  font-size: .8rem;
  background-color: #e0ecf9;
  color: #1b6ec2;
}

img.admin-avatar {
  object-fit: cover;
  background-color: var(--bs-tertiary-bg);
}

/* Pictures: uploads and their default pictures (images.js). Logos are shown whole; photos fill their square. */
.thumb {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: .5rem;
  object-fit: cover;
  background-color: var(--bs-tertiary-bg);
}

.thumb-lg {
  width: 3rem;
  height: 3rem;
  border-radius: .65rem;
}

.thumb-xl {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: .75rem;
}

.thumb-logo {
  object-fit: contain;
  background-color: #fff;
  border: 1px solid var(--bs-border-color-translucent);
}

/* Picture field in forms (image-picker.js) */
.image-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.image-picker-body {
  min-width: 0;
}

.image-picker-preview {
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: .75rem;
  object-fit: cover;
  background-color: var(--bs-tertiary-bg);
}

.image-picker-store .image-picker-preview,
.image-picker-qr .image-picker-preview {
  object-fit: contain;
  background-color: #fff;
}

.image-picker-qr .image-picker-preview {
  width: 8rem;
  height: 8rem;
}

.image-picker-person .image-picker-preview {
  border-radius: 50%;
}

/* Cards */
.admin-card {
  border: 0;
  border-radius: .75rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1.25rem;
  background-color: transparent;
}

.admin-card .table > :not(caption) > * > * {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.admin-card .list-group-item {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-search {
  flex: 1 1 260px;
  max-width: 360px;
}

.permission-matrix .table-group th {
  background-color: var(--bs-tertiary-bg);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .7rem;
}

/* Audit log */
.audit-row {
  cursor: pointer;
}

.audit-summary:hover,
.audit-summary:focus-visible {
  text-decoration: underline !important;
}

.audit-system {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
}

.audit-detail {
  --bs-offcanvas-width: min(520px, 100vw);
}

.audit-before {
  background-color: rgba(var(--bs-danger-rgb), .06);
}

.audit-after {
  background-color: rgba(var(--bs-success-rgb), .08);
}

/* Sales chart */
.sales-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: var(--bs-border-color);
  stroke-dasharray: 3 4;
}

.chart-label {
  fill: var(--bs-secondary-color);
  font-size: 11px;
}

.chart-bar {
  fill: rgba(27, 110, 194, .35);
  transition: fill .15s ease;
}

.chart-bar.today {
  fill: #1b6ec2;
}

.chart-bar:hover {
  fill: #1861ac;
}

.chart-hit {
  fill: transparent;
}

g:hover > .chart-bar {
  fill: #1861ac;
}

.chart-line {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 2;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.chart-dot {
  fill: #f59e0b;
  pointer-events: none;
}

.legend-swatch {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border-radius: .2rem;
  vertical-align: -1px;
}

.legend-current {
  background-color: rgba(27, 110, 194, .35);
}

.legend-previous {
  border-top: 2px dashed #f59e0b;
  height: 0;
  border-radius: 0;
  vertical-align: 3px;
}

/* Sales report */
.share-bar {
  height: 6px;
}

.payment-stack {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--bs-secondary-bg);
}

.payment-stack > span:nth-child(1), .payment-dot-0 { background-color: #1b6ec2; }
.payment-stack > span:nth-child(2), .payment-dot-1 { background-color: #22a06b; }
.payment-stack > span:nth-child(3), .payment-dot-2 { background-color: #f59e0b; }
.payment-stack > span:nth-child(4), .payment-dot-3 { background-color: #8b5cf6; }

.report-table tfoot td {
  font-weight: 600;
  background-color: var(--bs-tertiary-bg);
}

.report-table td, .report-table th {
  white-space: nowrap;
}

.payment-dot {
  display: inline-block;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
}

.kpi-change {
  font-size: .75rem;
  font-weight: 600;
}

/* Item categories: palette keys from CategoryColors */
.category-dot {
  display: inline-block;
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--category-color);
}

.category-gray { --category-color: #9ca3af; }
.category-red { --category-color: #ef4444; }
.category-orange { --category-color: #f97316; }
.category-yellow { --category-color: #eab308; }
.category-green { --category-color: #22c55e; }
.category-teal { --category-color: #14b8a6; }
.category-blue { --category-color: #3b82f6; }
.category-purple { --category-color: #a855f7; }
.category-pink { --category-color: #ec4899; }

.color-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  background-color: var(--category-color);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
}

.btn-check:checked + .color-swatch {
  outline: 3px solid var(--console-accent);
  outline-offset: 2px;
}

.btn-check:focus-visible + .color-swatch {
  outline: 3px solid #258cfb;
  outline-offset: 2px;
}

/* Choice cards (new store wizard): a radio rendered as a selectable card */
.choice-card {
  display: block;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .75rem;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.choice-card:hover {
  border-color: var(--console-accent);
}

.btn-check:checked + .choice-card {
  border-color: var(--console-accent);
  box-shadow: 0 0 0 .2rem rgba(27, 110, 194, .2);
}

.btn-check:disabled + .choice-card {
  opacity: .55;
  cursor: not-allowed;
}

.btn-check:focus-visible + .choice-card {
  outline: 3px solid #258cfb;
  outline-offset: 2px;
}

/* A card that opens something rather than being chosen (Custom POS opens the contact panel) */
button.choice-card {
  width: 100%;
  text-align: start;
  background: none;
  color: inherit;
}

button.choice-card:focus-visible {
  outline: 3px solid #258cfb;
  outline-offset: 2px;
}

.choice-icon {
  font-size: 1.75rem;
  line-height: 1;
}

/* Store workspace: menu board */
.menu-board-section + .menu-board-section {
  margin-top: 1.5rem;
}

.menu-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
}

.menu-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .5rem;
  min-height: 88px;
  padding: .75rem;
  border-radius: .6rem;
  border-left: 4px solid var(--category-color, #9ca3af);
  background-color: var(--bs-tertiary-bg);
}

.menu-tile-out {
  opacity: .6;
}

.store-card-link {
  color: inherit;
  text-decoration: none;
}

.store-card-link:hover .store-card-name {
  text-decoration: underline;
}

/* Inventory */
.stock-change-up { color: var(--bs-success-text-emphasis); }
.stock-change-down { color: var(--bs-danger-text-emphasis); }

/* Plan & billing */
.plan-eyebrow {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--bs-secondary-color);
}

.plan-hero {
  --plan-accent: var(--console-accent);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--plan-accent) 12%, transparent) 0%, transparent 55%),
    var(--bs-body-bg);
}

.plan-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background-color: var(--plan-accent);
}

.plan-accent-info { --plan-accent: #0ea5e9; }
.plan-accent-success { --plan-accent: #16a34a; }
.plan-accent-warning { --plan-accent: #f59e0b; }
.plan-accent-danger { --plan-accent: #dc2626; }

.plan-key-date {
  padding: .65rem 1rem;
  border-radius: .6rem;
  background-color: var(--bs-tertiary-bg);
}

.plan-trial-bar,
.usage-bar {
  --bs-progress-height: 8px;
  --bs-progress-border-radius: 999px;
}

.plan-trial-bar { --bs-progress-bar-bg: var(--plan-accent); }
.usage-bar { --bs-progress-bar-bg: var(--console-accent); }

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background-color: var(--bs-body-bg);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: transform .15s ease, box-shadow .15s ease;
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.5rem rgba(16, 24, 40, .08);
}

.pricing-card.is-featured {
  border: 2px solid var(--console-accent);
  box-shadow: 0 .75rem 2rem color-mix(in srgb, var(--console-accent) 18%, transparent);
}

.pricing-card.is-current {
  border-color: var(--console-accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--console-accent) 6%, var(--bs-body-bg)) 0%, var(--bs-body-bg) 45%);
}

.pricing-ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: .3rem .85rem;
  border-radius: 999px;
  background-color: var(--console-accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-desc {
  min-height: 3em;
}

.pricing-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem;
}

.pricing-amount {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.pricing-period {
  color: var(--bs-secondary-color);
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .3rem 0;
}

.pricing-features .icon {
  margin-top: .15rem;
  color: #16a34a;
}

.plan-limit-note {
  padding: .6rem .75rem;
  border-radius: .5rem;
  background-color: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
}

/* A change booked for the end of the paid period, in the current-plan card */
.plan-pending {
  padding: .6rem .75rem;
  border-left: 3px solid #f59e0b;
  border-radius: .35rem;
  background-color: var(--bs-warning-bg-subtle);
}

/* Add-ons card and the review dialog's quantity pickers */
.addon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
}

.addon-row + .addon-row {
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color-translucent);
}

.addon-stepper {
  width: 7.5rem;
  flex-wrap: nowrap;
}

.addon-stepper input {
  background-color: var(--bs-body-bg);
}

.change-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.change-total {
  border-bottom: 0;
}

.keep-head {
  margin-bottom: .75rem;
}

.keep-list {
  border: 1px solid var(--bs-border-color);
  border-radius: .6rem;
}

.keep-store {
  padding: .65rem .85rem;
}

.keep-store + .keep-store {
  border-top: 1px solid var(--bs-border-color-translucent);
}

.keep-store.is-leaving label {
  color: var(--bs-secondary-color);
  text-decoration: line-through;
}

.keep-devices {
  margin: .35rem 0 0 1.6rem;
}

.plan-includes {
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 1rem;
}

.plan-includes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .75rem 1.5rem;
}

.plan-includes-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .925rem;
}

.plan-includes-list .icon {
  color: var(--console-accent);
}

.card-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 2.15rem;
  border-radius: .4rem;
  background-color: #374151;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.card-brand-visa {
  background-color: #1a1f71;
  font-size: .8rem;
  font-style: italic;
}

.card-brand-mastercard {
  background:
    radial-gradient(circle at 62% 50%, rgba(247, 158, 27, .9) 0 .55rem, transparent .57rem),
    radial-gradient(circle at 38% 50%, #eb001b 0 .55rem, transparent .57rem),
    #111827;
}

.card-brand-amex { background-color: #2e77bc; }

.invoice-table thead th {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bs-secondary-color);
  background-color: var(--bs-tertiary-bg);
}

.billing-faq {
  border-radius: 0 0 .75rem .75rem;
  overflow: hidden;
}

.billing-faq .accordion-button {
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.billing-faq .accordion-button:not(.collapsed) {
  background-color: transparent;
  color: var(--console-accent);
  box-shadow: none;
}

.billing-faq .accordion-body {
  padding: 0 1.25rem 1.1rem;
}

#admin-content.is-loading {
  opacity: .55;
  pointer-events: none;
  transition: opacity .15s;
}

/* A device pairing code (Store > Settings): big enough to read out across the counter, with its QR code. */
.pairing-code {
  font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .12em;
}

.pairing-qr {
  width: min(11rem, 60vw);
  margin: 0 auto;
  padding: .5rem;
  border-radius: .75rem;
  background-color: #fff;
}

.pairing-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

.pairing-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: rgba(var(--bs-success-rgb), .15);
  color: var(--bs-success);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Store > Devices: each device with a phone-shaped icon, and the numbered steps to connect one. */
.device-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .5rem;
  background-color: rgba(var(--bs-primary-rgb), .1);
  color: var(--bs-primary);
}

.device-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.device-icon-lg {
  display: flex;
  width: 3.25rem;
  height: 3.25rem;
}

.device-steps {
  padding-left: 1.25rem;
}

.device-steps li + li {
  margin-top: .75rem;
}

.min-w-0 {
  min-width: 0;
}
