
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg: #080b18;
  --panel: #11172b;
  --line: #252e49;
  --text: #f3f5ff;
  --muted: #929bb5;
  --purple: #9b6bff;
  --green: #37d6a0;
  --red: #ff7187;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px 'DM Sans', sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* =================================
   MAIN BUSINESS SIDEBAR
================================= */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: #0b1021;
  border-right: 1px solid var(--line);
  padding: 22px 15px;
  display: flex;
  flex-direction: column;
  z-index: 5;
  transition: .2s;
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  color: white;
  padding: 2px 8px 25px;
}

.brand-icon {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a56cff, #477bff);
  display: grid;
  place-items: center;
  font: 800 22px Manrope;
}

.brand span,
.workspace span,
.user span {
  display: grid;
  gap: 3px;
}

.brand strong {
  font: 800 18px Manrope;
}

.brand small {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #a8b2d0;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #121a30;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 11px;
  margin-bottom: 20px;
}

.workspace > b,
.user > b,
.avatar {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #29385b;
  display: grid;
  place-items: center;
}

.workspace strong,
.user strong {
  font-size: 11px;
}

.workspace small,
.user small {
  font-size: 10px;
  color: var(--muted);
}

nav {
  display: grid;
  gap: 4px;
}

nav label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #697493;
  margin: 16px 9px 5px;
}

.nav {
  border: 0;
  background: none;
  color: #aeb7d0;
  text-align: left;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}

.nav:hover,
.nav.active {
  background: #242044;
  color: white;
}

.nav.active {
  box-shadow: inset 2px 0 var(--purple);
}

.nav small {
  float: right;
  color: #c7a8ff;
  font-size: 8px;
}

.side-bottom {
  margin-top: auto;
}

.user {
  border-top: 1px solid var(--line);
  padding: 16px 4px 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.user > b,
.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, #7054c8, #3679b9);
  text-align: center;
  padding: 8px;
}

/* =================================
   MAIN WORKSPACE
================================= */

.main {
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: #0a0f20;
  position: sticky;
  top: 0;
  z-index: 3;
}

.crumb {
  font-size: 10px;
  letter-spacing: .8px;
  color: #8994b1;
}

.crumb i {
  font-style: normal;
  margin: 0 9px;
  color: #46516e;
}

.crumb strong {
  color: #e9ecf8;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-actions input {
  background: #11182b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: white;
  font-size: 10px;
  width: 220px;
}

.avatar {
  font-size: 10px;
}

.menu {
  display: none;
  background: none;
  border: 0;
  color: white;
  font-size: 20px;
}

.content {
  width: 100%;
  max-width: 1450px;
  padding: 30px;
  flex: 1;
  margin: auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: appear .2s;
}

@keyframes appear {
  from {
    opacity: .4;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* =================================
   HEADINGS
================================= */

.heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 24px;
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #b18cff;
  font-weight: bold;
}

.heading h1 {
  font: 800 27px Manrope;
  margin: 7px 0;
}

.heading p,
.sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

/* =================================
   BUTTONS
================================= */

.primary,
.secondary {
  border: 0;
  border-radius: 8px;
  padding: 11px 15px;
  font-size: 11px;
  font-weight: bold;
}

.primary {
  background: linear-gradient(110deg, #9562f5, #527df5);
  color: white;
}

.primary:hover {
  filter: brightness(1.1);
}

.secondary {
  background: #1a2340;
  color: #dce4ff;
  border: 1px solid #303c60;
}

.secondary:hover {
  background: #242f50;
}

/* =================================
   STATISTICS
================================= */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 17px;
}

.stats.three {
  grid-template-columns: repeat(3, 1fr);
}

.stats article,
.panel {
  background: linear-gradient(145deg, #11172b, #0f1426);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.stats article {
  padding: 17px;
  min-height: 105px;
}

.stats article span {
  font-size: 10px;
  color: #aeb7d0;
}

.stats article strong {
  display: block;
  font: 800 22px Manrope;
  margin: 12px 0 4px;
}

.stats article small {
  font-size: 9px;
  color: var(--muted);
}

/* =================================
   PANELS AND COLUMNS
================================= */

.columns {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 15px;
}

.panel {
  padding: 20px;
  margin-bottom: 15px;
}

.panel h2,
.panel-head h2 {
  font: 700 14px Manrope;
  margin: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.panel-head p,
.panel .sub {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0 0;
}

.link {
  border: 0;
  background: none;
  color: #b79aff;
  font-size: 10px;
}

/* =================================
   TABLES
================================= */

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

th {
  text-align: left;
  font-size: 9px;
  color: #75809e;
  letter-spacing: 1px;
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
}

td {
  font-size: 11px;
  color: #cbd2e5;
  padding: 12px 9px;
  border-bottom: 1px solid #202942;
}

.empty {
  text-align: center;
  color: #7783a2;
  padding: 25px;
}

/* =================================
   QUICK ACTIONS
================================= */

.quick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #202942;
  background: none;
  color: #c6b0ff;
  text-align: left;
}

.quick span {
  display: grid;
  gap: 4px;
  flex: 1;
}

.quick b {
  font-size: 11px;
  color: white;
}

.quick small {
  font-size: 9px;
  color: var(--muted);
}

/* =================================
   NOTICES
================================= */

.notice {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #19172f;
  border: 1px solid #39305b;
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
  color: #bd9aff;
}

.notice span {
  display: grid;
  gap: 4px;
  flex: 1;
}

.notice b {
  font-size: 11px;
  color: white;
}

.notice small {
  font-size: 10px;
  color: #aab4ce;
}

.notice em {
  font-style: normal;
  font-size: 8px;
  background: #332653;
  padding: 6px;
  border-radius: 5px;
  white-space: nowrap;
}

/* =================================
   FORMS
================================= */

.form-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr auto;
  gap: 12px;
  align-items: end;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 10px;
  font-weight: bold;
  color: #b8c1d8;
}

.field input,
.field select {
  width: 100%;
  background: #0b1122;
  border: 1px solid #2a3552;
  border-radius: 8px;
  color: #e8ecf8;
  padding: 11px;
  font-size: 11px;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: #9168ef;
}

.field input::placeholder {
  color: #64708e;
}

.wide {
  grid-column: 1 / -1;
}

/* =================================
   OTHER WORKSPACE ELEMENTS
================================= */

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.coming {
  text-align: center;
  padding: 42px 20px;
}

.coming > b {
  display: block;
  font-size: 30px;
  color: #c4a7ff;
  margin-bottom: 13px;
}

.coming h2 {
  margin-bottom: 8px;
}

.coming p {
  font-size: 11px;
  color: var(--muted);
  max-width: 470px;
  margin: auto;
  line-height: 1.7;
}

.warning {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 20px;
  color: #9ba6c1;
  font-size: 10px;
  line-height: 1.6;
}

#receiptPreview {
  margin-top: 18px;
}

.receipt {
  border: 1px dashed #596786;
  padding: 20px;
  border-radius: 10px;
}

.receipt h2 {
  font-size: 18px;
}

.receipt p {
  font-size: 11px;
  line-height: 1.8;
  color: #bdc6dc;
}

.receipt strong {
  font-size: 20px;
  color: var(--green);
}

.delete {
  border: 0;
  background: none;
  color: #ff8798;
  font-size: 10px;
}

/* =================================
   FOOTER AND TOAST
================================= */

footer {
  border-top: 1px solid var(--line);
  padding: 16px 30px;
  color: #6e7894;
  font-size: 9px;
  display: flex;
  justify-content: space-between;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #1d2942;
  border: 1px solid #40547a;
  padding: 12px 16px;
  border-radius: 9px;
  color: white;
  font-size: 11px;
  opacity: 0;
  transform: translateY(8px);
  transition: .2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: none;
}

/* =================================
   BMY AUTHENTICATION
================================= */

[hidden] {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, #25204b 0, transparent 38%),
    #080b18;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 36px;
  background: #11172b;
  border: 1px solid #252e49;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}

.auth-brand > b {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #9b6bff;
  color: white;
  font-size: 24px;
}

.auth-brand span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-brand strong {
  font-size: 20px;
  color: #fff;
}

.auth-brand small {
  font-size: 10px;
  letter-spacing: 2px;
  color: #929bb5;
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading h1 {
  margin: 10px 0;
  font-size: 30px;
  color: #f3f5ff;
}

.auth-heading p {
  color: #929bb5;
  font-size: 14px;
  line-height: 1.6;
}

.auth-screen .field {
  margin-bottom: 19px;
}

.auth-screen .field label {
  display: block;
  margin-bottom: 8px;
  color: #c5cbe0;
  font-size: 13px;
}

.auth-screen .field input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  background: #080b18;
  border: 1px solid #252e49;
  border-radius: 9px;
  color: #f3f5ff;
  outline: none;
}

.auth-screen .field input:focus {
  border-color: #9b6bff;
  box-shadow: 0 0 0 3px rgba(155,107,255,.12);
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
}

.auth-error {
  padding: 11px;
  margin: 12px 0;
  border-radius: 8px;
  background: rgba(255,75,90,.10);
  color: #ff7c89;
  font-size: 13px;
}

/* =================================
   BUSINESS SELECTION
================================= */

.auth-footer {
  margin-top: 28px;
  text-align: center;
  color: #929bb5;
  font-size: 11px;
}

.business-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.business-option {
  width: 100%;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  background: #080b18;
  border: 1px solid #252e49;
  border-radius: 10px;
  color: #f3f5ff;
  cursor: pointer;
}

.business-option:hover {
  border-color: #9b6bff;
  background: #17152e;
}

.business-option strong {
  display: block;
  margin-bottom: 5px;
}

.business-option small {
  color: #929bb5;
}

.business-option span:last-child {
  color: #9b6bff;
  font-size: 20px;
}

/* =================================
   PLATFORM SUPER ADMIN DASHBOARD
================================= */

.super-admin-screen {
  min-height: 100vh;
  width: 100%;
  padding: 0;
  background:
    radial-gradient(
      circle at 85% 0,
      rgba(100, 75, 180, .13),
      transparent 32%
    ),
    var(--bg);
}

.super-admin-container {
  width: 100%;
  max-width: 1250px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 30px;
}

/* Super Admin Header */

.super-admin-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.super-admin-header .brand {
  padding: 0;
}

.super-admin-header .brand strong {
  font: 800 19px Manrope;
}

.super-admin-header .brand small {
  font-size: 9px;
}

.super-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.super-admin-actions button {
  min-height: 37px;
}

/* Welcome Section */

.super-admin-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 38px 0 28px;
}

.super-admin-welcome h1 {
  font: 800 29px Manrope;
  margin: 9px 0;
  color: var(--text);
}

.super-admin-welcome p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.super-admin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 9px 13px;
  border-radius: 30px;
  border: 1px solid rgba(55,214,160,.25);
  background: rgba(55,214,160,.08);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.super-admin-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(55,214,160,.6);
}

/* Statistics Cards */

.super-admin-screen .stats {
  margin-bottom: 24px;
}

.super-admin-screen .stats article {
  position: relative;
  overflow: hidden;
  min-height: 125px;
  padding: 21px;
  transition: border-color .2s, transform .2s;
}

.super-admin-screen .stats article:hover {
  border-color: #57437e;
  transform: translateY(-2px);
}

.super-admin-screen .stats article strong {
  font-size: 27px;
  margin: 15px 0 5px;
}

.super-admin-screen .stats article:first-child strong {
  color: #b99aff;
}

.super-admin-screen .stats article:nth-child(2) strong {
  color: #78a5ff;
}

.super-admin-screen .stats article:nth-child(3) strong {
  color: var(--green);
}

/* Create Business Panel */

.super-admin-panel {
  padding: 25px;
  margin-top: 5px;
}

.super-admin-panel .panel-head {
  margin-bottom: 22px;
}

.super-admin-panel .panel-head h2 {
  font-size: 17px;
}

.super-admin-panel .panel-head p {
  font-size: 11px;
  line-height: 1.6;
  margin-top: 7px;
}

.super-admin-panel .form-grid {
  margin-top: 0;
  gap: 20px;
}

.super-admin-panel .field {
  gap: 9px;
}

.super-admin-panel .field label {
  font-size: 11px;
  color: #c6cde0;
}

.super-admin-panel .field input,
.super-admin-panel .field select {
  min-height: 43px;
  padding: 12px 13px;
  font-size: 12px;
  background: #0a1020;
  border-color: #293451;
  transition: border-color .2s, box-shadow .2s;
}

.super-admin-panel .field input:focus,
.super-admin-panel .field select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155,107,255,.10);
}

.super-admin-create-button {
  min-height: 44px;
  min-width: 170px;
  margin-top: 23px;
  padding: 12px 20px;
}

.super-admin-create-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Error Message */

.super-admin-panel .auth-error {
  margin-top: 20px;
  line-height: 1.5;
}

/* Created Business Result */

.super-admin-result {
  padding: 24px;
  margin-top: 20px;
  border-color: rgba(55,214,160,.35);
  background: linear-gradient(
    145deg,
    rgba(23, 55, 53, .45),
    #0f1426
  );
}

.super-admin-result h2 {
  color: var(--green);
  font-size: 17px;
  margin-bottom: 9px;
}

.super-admin-result > p {
  line-height: 1.6;
  margin-bottom: 18px;
}

#superAdminResultDetails {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

#superAdminResultDetails > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 12px 14px;
  background: rgba(8,11,24,.65);
  border: 1px solid #293451;
  border-radius: 8px;
  font-size: 11px;
}

#superAdminResultDetails strong {
  color: #aeb7d0;
}

#superAdminResultDetails span {
  color: white;
  text-align: right;
  overflow-wrap: anywhere;
}

#superAdminResultDetails button {
  border: 1px solid #394769;
  background: #1a2340;
  color: #dce4ff;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 10px;
}

/* Super Admin Footer */

.super-admin-footer {
  margin-top: 35px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #6e7894;
  font-size: 10px;
}

/* =================================
   RESPONSIVE: TABLETS
================================= */

@media(max-width: 1050px) {
  .sidebar {
    width: 220px;
  }

  .main {
    margin-left: 220px;
  }

  .content {
    padding: 24px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .super-admin-container {
    padding: 0 24px;
  }
}

/* =================================
   RESPONSIVE: MOBILE
================================= */

@media(max-width: 700px) {
  .sidebar {
    transform: translateX(-100%);
    width: 255px;
    box-shadow: 12px 0 35px #0009;
  }

  .sidebar.open {
    transform: none;
  }

  .main {
    margin: 0;
  }

  .menu {
    display: block;
  }

  .topbar {
    height: 58px;
    padding: 0 14px;
    gap: 10px;
  }

  .top-actions input {
    width: 125px;
  }

  .content {
    padding: 22px 14px;
  }

  .heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .heading h1 {
    font-size: 23px;
  }

  .stats,
  .stats.three {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }

  .stats article {
    padding: 13px;
  }

  .stats article strong {
    font-size: 18px;
  }

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

  .wide {
    grid-column: auto;
  }

  .panel {
    padding: 15px;
  }

  .notice em {
    display: none;
  }

  footer {
    padding: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  /* Super Admin Mobile */

  .super-admin-container {
    padding: 0 15px;
  }

  .super-admin-header {
    min-height: 70px;
    gap: 10px;
  }

  .super-admin-header .brand {
    gap: 8px;
  }

  .super-admin-header .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .super-admin-header .brand strong {
    font-size: 16px;
  }

  .super-admin-header .brand small {
    font-size: 7px;
    letter-spacing: 1px;
  }

  .super-admin-actions {
    gap: 6px;
  }

  .super-admin-actions button {
    padding: 9px 10px;
    font-size: 10px;
  }

  .super-admin-welcome {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 0 22px;
  }

  .super-admin-welcome h1 {
    font-size: 23px;
  }

  .super-admin-welcome p {
    font-size: 11px;
  }

  .super-admin-screen .stats {
    gap: 9px;
  }

  .super-admin-screen .stats article {
    min-height: 105px;
    padding: 13px;
  }

  .super-admin-screen .stats article span {
    font-size: 9px;
  }

  .super-admin-screen .stats article strong {
    font-size: 21px;
    margin: 11px 0 4px;
  }

  .super-admin-screen .stats article small {
    font-size: 8px;
  }

  .super-admin-panel {
    padding: 17px;
  }

  .super-admin-panel .panel-head h2 {
    font-size: 15px;
  }

  .super-admin-panel .form-grid {
    gap: 16px;
  }

  .super-admin-create-button {
    width: 100%;
  }

  .super-admin-result {
    padding: 17px;
  }

  #superAdminResultDetails > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  #superAdminResultDetails span {
    text-align: left;
  }

  .super-admin-footer {
    font-size: 9px;
    flex-wrap: wrap;
  }
}

/* =================================
   SMALL MOBILE
================================= */

@media(max-width: 380px) {
  .super-admin-header .brand small {
    letter-spacing: .5px;
  }

  .super-admin-actions button {
    padding: 8px;
    font-size: 9px;
  }

  .super-admin-screen .stats article {
    padding: 10px;
  }

  .super-admin-screen .stats article strong {
    font-size: 19px;
  }

  .super-admin-welcome h1 {
    font-size: 21px;
  }
}

/* =================================
   AUTH SCREEN SMALL DEVICES
================================= */

@media(max-width: 500px) {
  .auth-card {
    padding: 25px 20px;
  }

  .auth-heading h1 {
    font-size: 26px;
  }
}

/* =================================
   PRINT
================================= */

@media print {
  body {
    background: white;
    color: #111;
  }

  .sidebar,
  .topbar,
  footer,
  .heading,
  .panel form,
  .primary {
    display: none !important;
  }

  .main {
    margin: 0;
  }

  .content {
    padding: 0;
  }

  .page {
    display: none !important;
  }

  #page-receipts {
    display: block !important;
  }

  .panel {
    background: white;
    border: 0;
  }

  .receipt {
    color: #111;
  }

  .receipt p {
    color: #333;
  }
}
/* ==========================================
   BMY AI ASSISTANT
========================================== */

.ai-welcome {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(155,107,255,.20),
      transparent 35%
    ),
    linear-gradient(135deg, #171832, #11172b);
  border: 1px solid #39305b;
  border-radius: 15px;
  padding: 23px;
  margin-bottom: 17px;
}

.ai-welcome h2 {
  font: 800 19px Manrope;
  margin: 0 0 9px;
}

.ai-welcome p {
  color: #b0bad3;
  font-size: 11px;
  line-height: 1.7;
  max-width: 650px;
  margin: 0;
}

.ai-welcome .ai-business-name {
  display: inline-block;
  margin-top: 15px;
  padding: 7px 11px;
  border-radius: 7px;
  background: rgba(155,107,255,.13);
  border: 1px solid rgba(155,107,255,.25);
  color: #c7a8ff;
  font-size: 10px;
}

/* AI workspace columns */

.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr);
  gap: 15px;
  align-items: start;
}

.ai-main,
.ai-side {
  min-width: 0;
}

/* Suggested prompts */

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

.ai-prompt {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 11px;
  text-align: left;
  background: #0c1225;
  border: 1px solid #293451;
  border-radius: 9px;
  color: #c7b0ff;
  font-size: 10px;
  transition: .2s;
}

.ai-prompt:hover {
  border-color: var(--purple);
  background: #19172f;
  transform: translateY(-1px);
}

/* Conversation panel */

.ai-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 490px;
  overflow: hidden;
}

.ai-messages {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 300px;
  max-height: 490px;
  overflow-y: auto;
  padding: 12px 3px 18px;
  scroll-behavior: smooth;
}

.ai-message {
  max-width: 88%;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.ai-message.assistant {
  align-self: flex-start;
  background: #1a2340;
  border: 1px solid #303c60;
  color: #e1e7f8;
  border-bottom-left-radius: 3px;
}

.ai-message.user {
  align-self: flex-end;
  background: linear-gradient(120deg, #6544b3, #465fc1);
  color: white;
  border-bottom-right-radius: 3px;
}

.ai-message strong {
  color: white;
}

.ai-message p {
  margin: 0 0 9px;
}

.ai-message p:last-child {
  margin-bottom: 0;
}

.ai-message ul,
.ai-message ol {
  padding-left: 19px;
  margin: 7px 0;
}

.ai-message li {
  margin: 4px 0;
}

/* Chat input */

.ai-chat-form {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: auto;
}

.ai-chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 9px;
  background: #0b1122;
  border: 1px solid #303c60;
  border-radius: 11px;
  transition: border-color .2s;
}

.ai-chat-input-wrap:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155,107,255,.08);
}

.ai-chat-input-wrap textarea {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  max-height: 130px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: white;
  font: 11px 'DM Sans', sans-serif;
  line-height: 1.6;
  padding: 9px 5px;
}

.ai-chat-input-wrap textarea::placeholder {
  color: #71809f;
}

.ai-send-button {
  min-width: 78px;
  min-height: 39px;
  padding: 9px 13px;
}

.ai-send-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.ai-chat-hint {
  font-size: 9px;
  color: #7884a1;
  margin: 9px 3px 0;
}

/* AI loading indicator */

.ai-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #bda3ff;
  font-size: 10px;
}

.ai-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
  animation: aiPulse 1s infinite ease-in-out;
}

.ai-typing span:nth-child(2) {
  animation-delay: .15s;
}

.ai-typing span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes aiPulse {
  0%, 80%, 100% {
    opacity: .35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* AI errors */

.ai-error {
  padding: 11px 13px;
  margin-top: 12px;
  border: 1px solid rgba(255,113,135,.25);
  border-radius: 8px;
  background: rgba(255,113,135,.08);
  color: #ff899b;
  font-size: 10px;
  line-height: 1.6;
}

/* Business performance review */

.ai-review-panel {
  background:
    linear-gradient(145deg, #17172f, #11172b);
  border-color: #39305b;
}

.ai-review-panel > p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.ai-review-button {
  width: 100%;
  margin-top: 13px;
}

.ai-review-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.ai-review-status {
  color: #b99aff;
  font-size: 10px;
  margin-top: 12px;
}

.ai-review-output {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: #cbd2e5;
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.ai-review-output h2,
.ai-review-output h3 {
  font: 700 13px Manrope;
  color: white;
  margin: 15px 0 7px;
}

.ai-review-output ul,
.ai-review-output ol {
  padding-left: 19px;
}

.ai-review-output li {
  margin: 5px 0;
}

/* AI disclaimer */

.ai-disclaimer {
  margin-top: 15px;
  padding: 12px 14px;
  background: #10172a;
  border: 1px solid #252e49;
  border-radius: 9px;
  color: #8490ac;
  font-size: 9px;
  line-height: 1.7;
}

/* AI empty state */

.ai-empty {
  text-align: center;
  padding: 35px 15px;
  color: #8d99b5;
  font-size: 11px;
}

/* ==========================================
   AI RESPONSIVE LAYOUT
========================================== */

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

  .ai-side {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media(max-width: 700px) {
  .ai-welcome {
    padding: 18px;
  }

  .ai-welcome h2 {
    font-size: 17px;
  }

  .ai-prompts {
    grid-template-columns: 1fr;
  }

  .ai-chat-panel {
    min-height: 420px;
  }

  .ai-messages {
    min-height: 250px;
    max-height: 400px;
  }

  .ai-message {
    max-width: 95%;
    padding: 11px 12px;
  }

  .ai-chat-input-wrap {
    gap: 6px;
  }

  .ai-send-button {
    min-width: 65px;
    padding: 9px;
  }

  .ai-review-panel {
    padding: 17px;
  }
}

@media(max-width: 380px) {
  .ai-welcome h2 {
    font-size: 15px;
  }

  .ai-chat-input-wrap textarea {
    font-size: 10px;
  }

  .ai-send-button {
    min-width: 57px;
    font-size: 10px;
  }
}
/* ==========================================
   BMY AI MARKDOWN FORMATTING
========================================== */

/* Markdown headings */

.ai-message h1,
.ai-message h2,
.ai-message h3 {
    font-family: 'Manrope', sans-serif;
    color: #ffffff;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ai-message h1 {
    font-size: 17px;
    margin: 17px 0 10px;
}

.ai-message h2 {
    font-size: 15px;
    margin: 15px 0 9px;
}

.ai-message h3 {
    font-size: 13px;
    margin: 13px 0 7px;
}

/* Markdown emphasis */

.ai-message strong {
    color: #d4bcff;
    font-weight: 700;
}

.ai-message em {
    color: #c6cce0;
}

/* Markdown tables */

.ai-message table.ai-markdown-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    margin: 13px 0;
    font-size: 10px;
}

.ai-message table.ai-markdown-table th {
    background: #29345a;
    color: #e0d1ff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 10px 8px;
    border: 1px solid #3a466b;
    white-space: normal;
}

.ai-message table.ai-markdown-table td {
    color: #e0e6f5;
    font-size: 10px;
    padding: 9px 8px;
    border: 1px solid #303c60;
    overflow-wrap: anywhere;
    min-width: 0;
}

.ai-message table.ai-markdown-table tr:nth-child(even) {
    background: rgba(255,255,255,.035);
}

/* Inline code */

.ai-message code {
    background: #0b1122;
    color: #c9aaff;
    border: 1px solid #303c60;
    border-radius: 5px;
    padding: 2px 5px;
    font-family: monospace;
    font-size: .92em;
    overflow-wrap: anywhere;
}

/* Blockquotes */

.ai-message blockquote {
    margin: 12px 0;
    padding: 9px 12px;
    border-left: 3px solid var(--purple);
    background: rgba(155,107,255,.08);
    color: #c4cce0;
    border-radius: 0 7px 7px 0;
}

/* Markdown dividers */

.ai-message hr {
    border: 0;
    border-top: 1px solid #394568;
    margin: 15px 0;
}

/* Paragraph spacing */

.ai-message p {
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.ai-message ul,
.ai-message ol {
    line-height: 1.8;
}

.ai-message li::marker {
    color: #b99aff;
}

/* Assistant message readability */

.ai-message.assistant {
    max-width: 94%;
    line-height: 1.8;
}

/* User messages should remain simple */

.ai-message.user {
    white-space: pre-wrap;
}

/* Mobile table adjustments */

@media(max-width: 700px) {

    .ai-message table.ai-markdown-table {
        font-size: 9px;
    }

    .ai-message table.ai-markdown-table th,
    .ai-message table.ai-markdown-table td {
        padding: 7px 5px;
        font-size: 9px;
    }

    .ai-message h1 {
        font-size: 16px;
    }

    .ai-message h2 {
        font-size: 14px;
    }

    .ai-message h3 {
        font-size: 12px;
    }

}
/* =================================
   SUPPLIER MANAGEMENT
================================= */
.supplier-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.supplier-contact-grid > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px;
  background: #0b1122;
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 0;
}
.supplier-contact-grid small {
  color: #75809e;
  font-size: 9px;
  letter-spacing: .8px;
}
.supplier-contact-grid strong {
  color: #dce4ff;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.supplier-profile-stats { margin-top: 14px; }
.supplier-actions { white-space: nowrap; }
.supplier-actions button { margin-right: 7px; }
#supplierSearch {
  background: #0b1122;
  border: 1px solid #2a3552;
  border-radius: 8px;
  color: #e8ecf8;
  padding: 10px 12px;
  font-size: 11px;
}
@media (max-width: 700px) {
  .supplier-contact-grid { grid-template-columns: 1fr; }
  #page-suppliers .heading { align-items: flex-start; flex-direction: column; }
  #page-suppliers .panel-head { align-items: flex-start; flex-direction: column; }
  #supplierSearch { max-width: 100% !important; width: 100%; }
}
