:root {
  --brand: #0f9d78;
  --brand-dark: #08745d;
  --brand-soft: #e8f8f3;
  --navy: #071c2c;
  --navy-2: #0d2a3d;
  --ink: #14242f;
  --muted: #6f7d87;
  --line: #e5eaee;
  --canvas: #f5f7f9;
  --surface: #ffffff;
  --danger: #d84f4f;
  --danger-soft: #fff0f0;
  --warning: #b7791f;
  --warning-soft: #fff8e8;
  --info: #3076b8;
  --info-soft: #edf6ff;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 16px 45px rgba(8, 32, 48, 0.08);
  --sidebar-width: 260px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.17; letter-spacing: -0.025em; }
h1 { font-size: 27px; margin-bottom: 0; }
h2 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 8px; }
h3 { font-size: 18px; margin-bottom: 5px; }
p { color: var(--muted); }
small { display: block; color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.grow { flex: 1; min-width: 0; }
.text-danger { color: var(--danger) !important; }
.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--brand); box-shadow: 0 9px 22px color-mix(in srgb, var(--brand) 25%, transparent); }
.button.primary:hover { color: #fff; background: var(--brand-dark); }
.button.soft { color: var(--navy); background: #f0f4f6; border-color: #e2e8ec; }
.button.soft:hover { color: var(--navy); background: #e6edf0; }
.button.danger { color: #fff; background: var(--danger); }
.button.danger-ghost { color: var(--danger); background: var(--danger-soft); border-color: #f6d3d3; }
.button.link-button { min-height: 38px; color: var(--brand-dark); background: transparent; }
.button.wide { width: 100%; }
.button.tiny { min-height: 32px; padding: 5px 11px; border-radius: 8px; font-size: 12px; }
.icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.icon-button:hover { border-color: var(--brand); color: var(--brand); }
.danger-text { color: var(--danger); }
.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; color: #42515a; font-size: 12px; font-weight: 700; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .search-box input, .pos-search input,
.purchase-add-row input, .purchase-add-row select, .date-filter input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #dce3e7;
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-box input:focus,
.pos-search input:focus, .purchase-add-row input:focus, .purchase-add-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.field input[type="color"] { padding: 5px; }
.password-field { display: flex; position: relative; }
.password-field input { padding-right: 70px; }
.password-field button { position: absolute; right: 7px; top: 6px; padding: 6px 9px; border: 0; color: var(--brand-dark); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.check { display: inline-flex; align-items: center; gap: 8px; color: #55636d; font-size: 12px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.consent { align-items: flex-start; line-height: 1.45; }
.info-note { padding: 11px 13px; border-radius: 10px; color: #47606c; background: #f0f6f8; font-size: 12px; }
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 650;
}
.alert button { border: 0; color: inherit; background: transparent; cursor: pointer; font-size: 20px; }
.alert-success { color: #14654f; background: #e9f8f2; border-color: #c6eadf; }
.alert-danger { color: #a83c3c; background: var(--danger-soft); border-color: #f2d0d0; }
.alert-warning { color: #8d5f13; background: var(--warning-soft); border-color: #f2dfb6; }
.alert-info { color: #245f92; background: var(--info-soft); border-color: #d2e7f8; }

/* Guest and authentication */
.guest-body { background: var(--navy); }
.guest-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, .78fr) minmax(520px, 1.22fr); }
.guest-brand {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px clamp(34px, 4vw, 70px);
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(15, 157, 120, .26), transparent 29%),
    radial-gradient(circle at 18% 86%, rgba(233, 185, 73, .13), transparent 27%),
    linear-gradient(145deg, #071c2c 0%, #0a2639 100%);
}
.guest-brand::after {
  width: 450px; height: 450px; content: ""; position: absolute; right: -240px; bottom: -220px;
  border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255,255,255,.018), 0 0 0 110px rgba(255,255,255,.012);
}
.guest-logo { display: flex; align-items: center; gap: 13px; color: #fff; position: relative; z-index: 1; }
.guest-logo:hover { color: #fff; }
.guest-logo img { width: 50px; height: 50px; }
.guest-logo strong { display: block; font-size: 20px; letter-spacing: -0.02em; }
.guest-logo small { color: #8fa7b5; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
.brand-stage { display: flex; flex: 1; align-items: center; justify-content: center; position: relative; z-index: 1; }
.brand-emblem {
  display: flex; width: clamp(150px, 16vw, 230px); height: clamp(150px, 16vw, 230px);
  align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%; position: relative; z-index: 2; background: rgba(255,255,255,.025);
  box-shadow: 0 40px 90px rgba(0,0,0,.2), inset 0 0 0 18px rgba(255,255,255,.012);
}
.brand-emblem img { width: 56%; height: 56%; filter: drop-shadow(0 20px 28px rgba(0,0,0,.25)); }
.brand-orbit { position: absolute; border: 1px solid rgba(95,212,179,.12); border-radius: 50%; }
.brand-orbit-one { width: clamp(260px, 27vw, 410px); height: clamp(260px, 27vw, 410px); }
.brand-orbit-two { width: clamp(370px, 38vw, 570px); height: clamp(370px, 38vw, 570px); opacity: .55; }
.brand-signature { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; color: #748e9b; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.brand-signature i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
.guest-panel {
  display: flex; min-height: 100vh; align-items: center; justify-content: flex-start; flex-direction: column;
  padding: 32px max(35px, 6vw) 22px; position: relative; overflow-y: auto; background: #f8fafb;
}
.guest-panel > .alert { width: 100%; max-width: 600px; flex: 0 0 auto; margin-bottom: 14px; }
.auth-card { width: 100%; max-width: 455px; margin: auto 0; padding: 24px 0; }
.auth-card h2 { font-size: 31px; }
.auth-card > .muted { margin-bottom: 28px; }
.application-card { max-width: 690px; margin: 0; padding: 30px 0 20px; }
.setup-card { max-width: 570px; }
.back-link { display: inline-block; margin-bottom: 30px; font-size: 12px; font-weight: 750; }
.form-options { display: flex; align-items: center; justify-content: space-between; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 23px 0 14px; color: #9aa5ab; font-size: 9px; letter-spacing: .13em; }
.auth-divider::before, .auth-divider::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 0; font-size: 10px; }
.security-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.guest-footer { flex: 0 0 auto; margin-top: auto; padding-top: 24px; color: #9aa6ad; font-size: 10px; }
.guest-mobile-brand { display: none; }
.form-section { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.section-number { display: flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 10px; color: #fff; background: var(--navy); font-size: 10px; font-weight: 800; }
.form-section h3, .form-section p { margin: 0; }
.form-section p { font-size: 11px; }
.success-card { text-align: center; }
.success-mark { display: flex; width: 70px; height: 70px; align-items: center; justify-content: center; margin: 0 auto 24px; border-radius: 22px; color: #fff; background: var(--brand); box-shadow: 0 15px 35px rgba(15,157,120,.24); font-size: 30px; }
.reference-box { margin: 25px 0; padding: 20px; border: 1px dashed #b9d9cf; border-radius: 14px; background: var(--brand-soft); }
.reference-box span, .reference-box small { color: var(--brand-dark); }
.reference-box span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.reference-box strong { display: block; margin: 5px 0; color: var(--navy); font-size: 24px; letter-spacing: .05em; }

/* Main app shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  display: flex; width: var(--sidebar-width); height: 100vh; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 50;
  color: #d0dce3; background: var(--navy); box-shadow: 8px 0 30px rgba(3, 20, 31, .08);
}
.sidebar-brand { display: flex; min-height: 86px; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,.075); }
.sidebar-brand img { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; object-fit: cover; background: #fff; }
.sidebar-brand strong { display: block; max-width: 155px; overflow: hidden; color: #fff; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand small { max-width: 155px; overflow: hidden; color: #78909d; font-size: 8px; text-overflow: ellipsis; letter-spacing: .11em; white-space: nowrap; }
.sidebar-nav { flex: 1; padding: 15px 12px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.nav-section { display: block; margin: 17px 11px 6px; color: #55717f; font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.sidebar-nav a { display: flex; min-height: 42px; align-items: center; gap: 11px; margin: 2px 0; padding: 9px 11px; border-radius: 10px; color: #96aab5; font-size: 12px; font-weight: 620; }
.sidebar-nav a i { display: flex; width: 25px; height: 25px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; color: #66818f; font-size: 8px; font-style: normal; }
.sidebar-nav a span { flex: 1; }
.sidebar-nav a b { padding: 2px 5px; border-radius: 5px; color: #68d1b3; background: rgba(15,157,120,.13); font-size: 7px; letter-spacing: .06em; }
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.045); }
.sidebar-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(15,157,120,.22), rgba(15,157,120,.075)); box-shadow: inset 3px 0 var(--brand); }
.sidebar-nav a.active i { border-color: rgba(80,211,173,.25); color: #6bd8b9; background: rgba(15,157,120,.17); }
.sidebar-user { display: flex; align-items: center; gap: 9px; margin: 10px 12px 14px; padding: 12px 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.025); }
.sidebar-user > div:nth-child(2) { flex: 1; min-width: 0; }
.sidebar-user strong { display: block; overflow: hidden; color: #e6edf1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #6f8995; font-size: 9px; }
.sidebar-user .icon-button { border-color: rgba(255,255,255,.07); color: #8ba0aa; background: rgba(255,255,255,.04); }
.avatar, .top-avatar { display: flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; background: var(--brand); font-size: 10px; font-weight: 800; }
.avatar { width: 34px; height: 34px; }
.top-avatar { width: 36px; height: 36px; }
.app-main { width: calc(100% - var(--sidebar-width)); min-width: 0; margin-left: var(--sidebar-width); }
.topbar { display: flex; min-height: 86px; align-items: center; justify-content: space-between; padding: 14px clamp(18px, 3vw, 38px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.93); backdrop-filter: blur(14px); }
.breadcrumb { color: #91a0a9; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.page-heading h1 { margin-top: 3px; font-size: 23px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.quick-action { display: inline-flex; min-height: 38px; align-items: center; padding: 8px 13px; border-radius: 9px; color: #fff; background: var(--navy); font-size: 11px; font-weight: 750; }
.quick-action:hover { color: #fff; background: var(--brand-dark); }
.menu-button { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.menu-button span { width: 16px; height: 2px; border-radius: 2px; background: var(--navy); }
.page-content { width: 100%; max-width: 1700px; margin: 0 auto; padding: 28px clamp(18px, 3vw, 38px) 45px; }
.support-banner { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 15px; padding: 7px 22px; color: #fff; background: #8a5d15; font-size: 11px; }
.support-banner form { margin: 0; }
.support-banner button { border: 0; color: #fff; background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; text-decoration: underline; }
.sidebar-overlay { display: none; }
.mobile-nav { display: none; }

/* Reusable content */
.welcome-strip { display: flex; min-height: 160px; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 22px; padding: 28px clamp(24px, 4vw, 44px); border-radius: var(--radius); overflow: hidden; position: relative; color: #fff; background: linear-gradient(120deg, var(--navy), #0e354b); box-shadow: var(--shadow); }
.welcome-strip::after { width: 260px; height: 260px; content: ""; position: absolute; right: -90px; top: -125px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.018), 0 0 0 70px rgba(255,255,255,.012); }
.welcome-strip > * { position: relative; z-index: 1; }
.welcome-strip h2 { margin-bottom: 7px; color: #fff; font-size: 29px; }
.welcome-strip p { margin-bottom: 0; color: #a9bac4; }
.welcome-strip .eyebrow { color: #64d1b2; }
.welcome-actions, .toolbar-actions { display: flex; gap: 9px; }
.tenant-welcome .button.soft { border-color: rgba(255,255,255,.15); color: #fff; background: rgba(255,255,255,.08); }
.stat-grid { display: grid; gap: 16px; margin-bottom: 20px; }
.stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { min-height: 142px; padding: 20px; border: 1px solid #e6ebee; border-radius: 16px; position: relative; background: #fff; box-shadow: 0 8px 26px rgba(16,40,54,.04); }
.stat-card::after { width: 4px; height: 34px; content: ""; position: absolute; left: 0; top: 22px; border-radius: 0 4px 4px 0; background: #d8e2e6; }
.stat-card.accent::after { background: var(--brand); }
.stat-card.warning::after { background: #e2a940; }
.stat-card > span { display: block; margin-bottom: 9px; color: #6d7b84; font-size: 11px; font-weight: 700; }
.stat-card > strong { display: block; margin-bottom: 7px; color: var(--navy); font-size: clamp(20px, 2vw, 27px); letter-spacing: -0.04em; }
.stat-card > small { font-size: 10px; }
.stat-icon { display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; margin-bottom: 13px; border-radius: 8px; color: var(--brand-dark); background: var(--brand-soft); font-size: 8px; font-weight: 900; letter-spacing: .06em; }
.content-grid { display: grid; gap: 18px; margin-bottom: 18px; }
.content-grid.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr); }
.panel { border: 1px solid #e6ebee; border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 26px rgba(16,40,54,.035); }
.panel:not(.table-panel) { padding: 21px; }
.panel-head { display: flex; min-height: 48px; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.panel-head h3 { margin: 0; }
.panel-head a { font-size: 11px; font-weight: 750; white-space: nowrap; }
.table-panel .panel-head { padding: 20px 20px 0; }
.list-stack { display: grid; }
.list-row { display: flex; min-height: 61px; align-items: center; gap: 11px; padding: 9px 3px; border-bottom: 1px solid #edf1f3; color: var(--ink); }
.list-row:last-child { border-bottom: 0; }
.list-row strong { font-size: 12px; }
.list-row small { margin-top: 2px; font-size: 10px; }
.entity-avatar, .product-mini {
  display: inline-flex; width: 38px; height: 38px; flex: 0 0 auto; align-items: center; justify-content: center;
  border-radius: 11px; color: var(--brand-dark); background: var(--brand-soft); font-size: 9px; font-weight: 900;
}
.entity-avatar.dark { color: #fff; background: var(--navy); }
.entity-avatar.large { width: 48px; height: 48px; border-radius: 14px; font-size: 11px; }
.product-mini { width: 34px; height: 34px; border-radius: 9px; }
.status { display: inline-flex; min-height: 23px; align-items: center; padding: 3px 8px; border-radius: 999px; color: #65747d; background: #eef2f4; font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.status.active, .status.approved, .status.paid, .status.received { color: #137058; background: #e5f7f1; }
.status.pending, .status.partial, .status.credit, .status.ordered { color: #8d5f13; background: #fff4d8; }
.status.suspended, .status.inactive, .status.rejected, .status.returned, .status.cancelled { color: #ac4040; background: #ffeded; }
.empty-state { display: flex; min-height: 200px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; padding: 25px; text-align: center; color: var(--muted); }
.empty-state.compact { min-height: 100px; }
.empty-state strong { color: var(--navy); }
.empty-state span { font-size: 11px; }
.empty-state.success strong { color: var(--brand-dark); }
.table-responsive { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); color: #86949c; background: #fafbfc; font-size: 8px; font-weight: 850; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid #edf1f3; color: #40505a; font-size: 11px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfdfd; }
.data-table td > strong { color: var(--ink); }
.data-table small { margin-top: 2px; font-size: 9px; }
.compact-table th, .compact-table td { padding-right: 9px; padding-left: 9px; }
.table-entity { display: flex; min-width: 180px; align-items: center; gap: 10px; }
.table-entity strong, .table-entity small { display: block; }
.row-actions { display: flex; align-items: center; gap: 5px; }
.row-actions form { display: inline-flex; margin: 0; }
.toolbar { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.toolbar p { margin: 0; }
.search-box { display: flex; width: min(480px, 100%); }
.search-box input { border-radius: 10px 0 0 10px; }
.search-box button { padding: 0 16px; border: 0; border-radius: 0 10px 10px 0; color: #fff; background: var(--navy); cursor: pointer; font-weight: 750; }
.filter-tabs { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.filter-tabs a { padding: 7px 13px; border-radius: 8px; color: #718089; font-size: 11px; font-weight: 700; }
.filter-tabs a.active { color: #fff; background: var(--navy); }
.date-filter { display: flex; align-items: flex-end; gap: 8px; }
.date-filter label { display: grid; gap: 4px; color: #72818a; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.date-filter input { min-height: 39px; padding: 7px 9px; }
.mini-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.mini-summary div { padding: 16px 20px; border-right: 1px solid var(--line); }
.mini-summary div:last-child { border-right: 0; }
.mini-summary span { display: block; color: var(--muted); font-size: 10px; }
.mini-summary strong { display: block; margin-top: 3px; color: var(--navy); font-size: 18px; }
.metric-inline { text-align: right; }
.metric-inline span { display: block; color: var(--muted); font-size: 9px; }
.metric-inline strong { color: var(--navy); font-size: 15px; }
.bar-chart { display: flex; height: 230px; align-items: flex-end; justify-content: space-around; gap: clamp(6px, 2vw, 20px); padding: 25px 5px 0; border-top: 1px solid #edf1f3; }
.bar-column { display: flex; height: 100%; flex: 1; align-items: center; justify-content: flex-end; flex-direction: column; gap: 7px; position: relative; }
.bar-column i { width: min(35px, 68%); min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--brand), var(--brand-dark)); box-shadow: 0 8px 16px color-mix(in srgb, var(--brand) 15%, transparent); }
.bar-column b { color: #87959d; font-size: 8px; text-transform: uppercase; }
.bar-value { color: var(--brand-dark); font-size: 8px; font-weight: 800; }
.stock-value-panel { min-height: 300px; overflow: hidden; position: relative; color: #fff; background: linear-gradient(145deg, #0e805f, #075844); }
.stock-value-panel h3, .stock-value-panel .hero-number { color: #fff; }
.stock-value-panel h3 { font-size: 22px; }
.stock-value-panel .eyebrow { color: #90e0ca; }
.hero-number { display: block; margin: 35px 0 5px; position: relative; z-index: 2; font-size: clamp(26px, 3vw, 39px); letter-spacing: -.05em; }
.stock-value-panel p { color: #9ed4c5; position: relative; z-index: 2; }
.stock-value-panel a { position: absolute; left: 21px; bottom: 22px; z-index: 2; color: #fff; font-size: 11px; font-weight: 750; }
.orb { position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }
.orb-one { width: 180px; height: 180px; right: -55px; bottom: -55px; }
.orb-two { width: 90px; height: 90px; right: 50px; top: 45px; }
.stock-indicator { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #e6a83c; box-shadow: 0 0 0 4px #fff5df; }
.stock-indicator.zero { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }

/* Super admin */
.tenant-grid, .customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.tenant-card, .customer-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 25px rgba(16,40,54,.04); }
.tenant-card-head, .customer-card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.tenant-card h3, .customer-card h3 { margin-bottom: 4px; font-size: 18px; }
.tenant-card > p, .customer-card > p { min-height: 42px; margin-bottom: 15px; font-size: 11px; }
.tenant-metrics { display: grid; grid-template-columns: .7fr .8fr 1.5fr; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tenant-metrics div { padding: 0 8px; border-right: 1px solid var(--line); }
.tenant-metrics div:first-child { padding-left: 0; }
.tenant-metrics div:last-child { border-right: 0; padding-right: 0; }
.tenant-metrics strong, .tenant-metrics span { display: block; }
.tenant-metrics strong { overflow: hidden; color: var(--navy); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tenant-metrics span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.license-line, .license-detail { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; color: var(--muted); font-size: 10px; }
.license-line strong, .license-detail strong { color: var(--navy); font-size: 11px; }
.card-actions { display: flex; align-items: center; gap: 7px; }
.card-actions form { flex: 1; margin: 0; }
.card-actions form .button, .customer-card .card-actions .button { width: 100%; min-height: 37px; font-size: 10px; }
.timeline { display: grid; }
.timeline-row { display: flex; min-height: 62px; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.timeline-row strong { display: block; color: var(--ink); font-size: 11px; }
.timeline-row time { color: #94a1a8; font-size: 9px; white-space: nowrap; }

/* Dialogs */
dialog.modal { width: min(660px, calc(100% - 28px)); max-height: calc(100vh - 35px); padding: 0; border: 0; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 35px 90px rgba(2, 20, 32, .3); overflow-y: auto; }
dialog.modal.small-modal { width: min(460px, calc(100% - 28px)); }
dialog.modal.wide-modal { width: min(900px, calc(100% - 28px)); }
dialog.modal::backdrop { background: rgba(4, 20, 31, .68); backdrop-filter: blur(3px); }
dialog.modal form { display: grid; gap: 16px; padding: 23px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 21px; }
.modal-head button { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #76858e; background: #f0f3f5; cursor: pointer; font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; border-radius: 12px; background: #f7f9fa; }
.detail-grid div { padding: 7px; }
.detail-grid span, .detail-grid strong { display: block; }
.detail-grid span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.detail-grid strong { margin-top: 3px; font-size: 11px; }
.balance-callout { padding: 15px; border-radius: 12px; background: var(--warning-soft); }
.balance-callout span, .balance-callout strong { display: block; }
.balance-callout span { color: #8d6a30; font-size: 10px; }
.balance-callout strong { margin-top: 2px; color: #815a13; font-size: 22px; }

/* POS */
.pos-layout { display: grid; min-height: calc(100vh - 159px); grid-template-columns: minmax(0, 1.55fr) minmax(350px, .75fr); gap: 17px; }
.pos-catalog, .pos-cart { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 25px rgba(16,40,54,.04); }
.pos-catalog { padding: 20px; }
.pos-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.pos-toolbar h2 { margin: 0; font-size: 22px; }
.pos-search { display: flex; width: min(390px, 52%); align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.pos-search span { padding-left: 12px; color: var(--muted); }
.pos-search input { min-height: 40px; border: 0; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-height: calc(100vh - 270px); padding-right: 4px; overflow-y: auto; }
.product-tile { display: grid; min-height: 142px; grid-template-columns: 42px 1fr; align-content: start; gap: 10px; padding: 14px; border: 1px solid #e5eaed; border-radius: 13px; position: relative; text-align: left; background: #fff; cursor: pointer; transition: transform .14s ease, border .14s ease, box-shadow .14s ease; }
.product-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, #dce4e8); box-shadow: 0 10px 24px rgba(15,50,65,.08); }
.product-tile[hidden] { display: none; }
.product-art { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 11px; color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; font-weight: 900; }
.product-info { min-width: 0; }
.product-info strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-info small { overflow: hidden; margin-top: 4px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.product-price { grid-column: 1 / -1; align-self: end; margin-top: 17px; color: var(--navy); font-size: 14px; font-weight: 850; }
.product-tile.shake { animation: shake .35s ease; border-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }
.pos-cart { display: flex; flex-direction: column; position: sticky; top: 104px; height: calc(100vh - 130px); overflow: hidden; }
.cart-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.cart-head h3 { margin: 0; font-size: 21px; }
.pos-cart form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.cart-items { flex: 1; min-height: 130px; padding: 7px 15px; overflow-y: auto; }
.empty-cart { display: flex; height: 100%; min-height: 150px; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); text-align: center; }
.empty-cart > span { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; margin-bottom: 8px; border: 1px dashed #c9d3d8; border-radius: 12px; font-size: 20px; }
.empty-cart strong { color: var(--navy); }
.empty-cart small { font-size: 10px; }
.cart-line { display: grid; grid-template-columns: 32px minmax(85px, 1fr) auto auto 22px; align-items: center; gap: 7px; padding: 10px 0; border-bottom: 1px solid #edf1f3; }
.cart-line .product-mini { width: 32px; height: 32px; font-size: 8px; }
.cart-line strong { color: var(--navy); font-size: 10px; }
.cart-line small { font-size: 8px; }
.qty-control { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.qty-control button { width: 23px; height: 23px; border: 0; border-radius: 6px; color: var(--navy); background: #f0f4f5; cursor: pointer; }
.qty-control b { min-width: 18px; font-size: 9px; text-align: center; }
.remove-line { padding: 0; border: 0; color: #a7b1b6; background: transparent; cursor: pointer; font-size: 17px; }
.cart-form { padding: 12px 15px 6px; border-top: 1px solid var(--line); }
.compact-grid { gap: 8px !important; }
.compact-grid .field { gap: 3px; font-size: 9px; }
.compact-grid .field input, .compact-grid .field select, .cart-form > .field input { min-height: 35px; padding: 6px 8px; font-size: 10px; }
.cart-form > .field { margin-top: 7px; gap: 3px; font-size: 9px; }
.cart-summary { display: grid; gap: 4px; padding: 9px 16px; border-top: 1px solid var(--line); background: #fafcfc; }
.cart-summary div { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.cart-summary strong { color: var(--navy); font-size: 12px; }
.cart-summary .cart-total { padding: 5px 0; color: var(--navy); font-size: 12px; }
.cart-summary .cart-total strong { font-size: 20px; }
.checkout-button { min-height: 49px; border-radius: 0; }
.checkout-button:disabled, .purchase-total + .button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }

/* Customers, purchases, settings */
.customer-balance, .customer-total { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: #f5f8f9; }
.customer-balance.has-debt { color: #a23e3e; background: var(--danger-soft); }
.customer-balance span, .customer-total span { font-size: 10px; }
.customer-balance strong, .customer-total strong { font-size: 13px; }
.customer-total { margin: 6px 0 13px; }
.statement-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.statement-head h2 { margin: 2px 0 5px; font-size: 24px; }
.statement-head p { margin: 0; font-size: 11px; }
.purchase-builder { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.purchase-add-row { display: grid; grid-template-columns: 1.6fr .55fr .75fr auto; gap: 7px; padding: 10px; background: #f6f9fa; }
.purchase-add-row input, .purchase-add-row select { min-height: 39px; }
.purchase-lines { max-height: 260px; padding: 4px 12px; overflow-y: auto; }
.purchase-line { display: flex; min-height: 53px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); font-size: 11px; }
.purchase-line strong, .purchase-line small { display: block; }
.purchase-line button { border: 0; color: var(--danger); background: transparent; cursor: pointer; font-size: 18px; }
.purchase-total { display: flex; align-items: center; justify-content: space-between; padding: 15px; border-radius: 12px; color: #fff; background: var(--navy); }
.purchase-total span { font-size: 11px; }
.purchase-total strong { font-size: 22px; }
.report-heading { margin-bottom: 17px; text-align: center; }
.report-heading h2, .report-heading p { margin-bottom: 3px; }
.role-chip { padding: 5px 8px; border-radius: 7px; color: #415561; background: #edf3f5; font-size: 9px; text-transform: capitalize; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .5fr); gap: 18px; margin-bottom: 18px; }
.brand-preview { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafb; }
.brand-preview img, .brand-preview > span { display: flex; width: 48px; height: 48px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 12px; object-fit: cover; color: #fff; background: var(--navy); font-weight: 850; }
.brand-preview strong, .brand-preview small { display: block; }
.license-card { overflow: hidden; position: relative; color: #d5e1e7; background: var(--navy); }
.license-card .eyebrow { color: #66d4b5; }
.license-card h3 { color: #fff; font-size: 25px; text-transform: capitalize; }
.license-card p { color: #8097a3; font-size: 11px; }
.license-badge { display: inline-flex; margin: 13px 0 24px; padding: 5px 9px; border-radius: 999px; color: #6cdbbd; background: rgba(15,157,120,.16); font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.license-detail { border-bottom: 1px solid rgba(255,255,255,.08); color: #7f96a2; }
.license-detail strong { color: #fff; }
.branch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.branch-grid article { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.branch-grid article > div { flex: 1; }
.branch-grid strong, .branch-grid small { display: block; }

/* Receipt */
.receipt-body { padding: 25px; background: #e9eef1; }
.receipt-actions { display: flex; max-width: 800px; justify-content: space-between; margin: 0 auto 14px; }
.receipt-paper { width: min(800px, 100%); min-height: 1050px; margin: 0 auto; padding: 50px; color: #1f2d35; background: #fff; box-shadow: 0 15px 50px rgba(15,35,48,.15); }
.receipt-header { text-align: center; }
.receipt-header img { width: 64px; height: 64px; margin-bottom: 10px; border-radius: 16px; object-fit: cover; }
.receipt-header h1 { margin-bottom: 5px; font-size: 25px; }
.receipt-header p { margin-bottom: 3px; font-size: 11px; }
.receipt-header small { font-size: 9px; }
.receipt-title { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; padding: 12px 0; border-top: 2px solid var(--navy); border-bottom: 1px solid #bfc8cd; }
.receipt-title strong { font-size: 13px; letter-spacing: .08em; }
.receipt-title span { font-size: 12px; font-weight: 800; }
.receipt-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 30px; margin-bottom: 22px; }
.receipt-meta div { display: flex; justify-content: space-between; gap: 15px; }
.receipt-meta span { color: var(--muted); font-size: 10px; }
.receipt-meta strong { font-size: 10px; text-align: right; }
.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table th, .receipt-table td { padding: 10px 8px; border-bottom: 1px solid #dce2e5; font-size: 10px; text-align: right; }
.receipt-table th { color: #66757e; background: #f5f7f8; font-size: 8px; text-transform: uppercase; }
.receipt-table th:first-child, .receipt-table td:first-child { text-align: left; }
.receipt-totals { width: 330px; margin: 18px 0 20px auto; }
.receipt-totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 10px; }
.receipt-totals .grand { margin: 5px 0; padding: 10px 0; border-top: 1px solid var(--navy); border-bottom: 1px solid var(--navy); font-size: 14px; }
.payment-history { margin: 22px 0; padding: 13px; border-radius: 9px; background: #f5f7f8; font-size: 9px; }
.payment-history > strong { display: block; margin-bottom: 5px; }
.payment-history div { display: flex; justify-content: space-between; padding: 3px 0; }
.receipt-footer { margin-top: 40px; padding-top: 18px; border-top: 1px dashed #bac4c9; text-align: center; }
.receipt-footer strong, .receipt-footer span { display: block; }
.receipt-footer strong { font-size: 11px; }
.receipt-footer span { margin-top: 5px; color: var(--muted); font-size: 8px; }
.error-page { display: flex; min-height: 60vh; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.error-page > span { color: var(--brand); font-size: 70px; font-weight: 900; letter-spacing: -.07em; }

@media (max-width: 1250px) {
  .stat-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tenant-grid, .customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-layout { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr); }
}

@media (max-width: 1020px) {
  .guest-shell { grid-template-columns: 1fr; }
  .guest-brand { display: none; }
  .guest-panel { min-height: 100svh; padding: 24px max(22px, 6vw) 16px; overflow-x: hidden; }
  .guest-mobile-brand {
    display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px;
    flex: 0 0 auto; margin-bottom: 18px; color: var(--navy); font-size: 18px;
  }
  .guest-mobile-brand img { width: 42px; height: 42px; }
  .guest-mobile-brand strong, .guest-mobile-brand small { display: block; }
  .guest-mobile-brand small { color: #8a989f; font-size: 7px; letter-spacing: .12em; }
  .guest-panel > .auth-card { margin: auto 0; }
  .guest-panel > .application-card { margin: 0; }
  .guest-footer { width: 100%; padding-top: 20px; text-align: center; }
  .app-main { width: 100%; margin-left: 0; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(3,19,29,.55); }
  .menu-button { display: flex; }
  .topbar { gap: 12px; }
  .page-heading { flex: 1; }
  .content-grid.split, .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
  .pos-layout { display: block; }
  .pos-cart { height: auto; min-height: 580px; margin-top: 15px; position: static; }
  .product-grid { max-height: none; }
  .stock-value-panel { min-height: 260px; }
}

@media (max-width: 720px) {
  body.app-body { padding-bottom: 72px; }
  .topbar { min-height: 70px; padding: 10px 14px; }
  .page-heading h1 { font-size: 19px; }
  .breadcrumb { display: none; }
  .quick-action { display: none; }
  .page-content { padding: 17px 12px 24px; }
  .welcome-strip { min-height: 180px; align-items: flex-start; flex-direction: column; padding: 23px; }
  .welcome-strip h2 { font-size: 24px; }
  .welcome-actions { width: 100%; }
  .welcome-actions .button { flex: 1; }
  .stat-grid.four { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 125px; padding: 15px; }
  .stat-card > strong { font-size: 18px; }
  .stat-icon { display: none; }
  .content-grid.split { gap: 12px; }
  .panel:not(.table-panel) { padding: 16px; }
  .tenant-grid, .customer-grid { grid-template-columns: 1fr; gap: 11px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar > .button, .toolbar-actions .button { flex: 1; }
  .toolbar-actions { display: flex; }
  .filter-tabs { width: 100%; overflow-x: auto; }
  .filter-tabs a { flex: 1; text-align: center; white-space: nowrap; }
  .date-filter { display: grid; grid-template-columns: 1fr 1fr; }
  .date-filter .button { grid-column: 1 / -1; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .mini-summary { grid-template-columns: 1fr; }
  .mini-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .mini-summary div:last-child { border-bottom: 0; }
  .bar-chart { height: 200px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .pos-catalog { padding: 12px; }
  .pos-toolbar { align-items: stretch; flex-direction: column; }
  .pos-search { width: 100%; }
  .product-tile { min-height: 135px; grid-template-columns: 34px 1fr; padding: 11px; }
  .product-art { width: 34px; height: 34px; }
  .cart-line { grid-template-columns: 30px 1fr auto 22px; }
  .cart-line > strong { grid-column: 2 / 4; }
  .qty-control { grid-column: 3; grid-row: 1; }
  .remove-line { grid-column: 4; grid-row: 1; }
  .purchase-add-row { grid-template-columns: 1fr 1fr; }
  .purchase-add-row select { grid-column: 1 / -1; }
  .purchase-add-row .button { grid-column: 1 / -1; }
  .purchase-line { align-items: flex-start; flex-wrap: wrap; padding: 10px 0; }
  .statement-head { align-items: flex-start; flex-direction: column; }
  .statement-head .balance-callout { width: 100%; }
  .branch-grid { grid-template-columns: 1fr; }
  .support-banner { align-items: flex-start; flex-direction: column; gap: 2px; padding: 8px 13px; }
  .mobile-nav {
    display: flex; height: 66px; align-items: center; justify-content: space-around; padding: 5px max(10px, env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    position: fixed; inset: auto 0 0; z-index: 40; background: rgba(255,255,255,.96); box-shadow: 0 -8px 25px rgba(10,34,48,.08); backdrop-filter: blur(12px);
  }
  .mobile-nav a { display: flex; min-width: 47px; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: #819099; font-size: 8px; font-weight: 700; }
  .mobile-nav a i { display: flex; width: 24px; height: 22px; align-items: center; justify-content: center; border-radius: 7px; background: #f1f4f5; font-size: 7px; font-style: normal; }
  .mobile-nav a.active { color: var(--brand-dark); }
  .mobile-nav a.active i { color: #fff; background: var(--brand); }
  .mobile-nav .mobile-pos { transform: translateY(-12px); }
  .mobile-nav .mobile-pos b { display: flex; width: 45px; height: 45px; align-items: center; justify-content: center; border: 5px solid #fff; border-radius: 16px; color: #fff; background: var(--brand); box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 26%, transparent); font-size: 22px; }
  .receipt-body { padding: 0; background: #fff; }
  .receipt-actions { padding: 10px; }
  .receipt-paper { min-height: 100vh; padding: 28px 18px; box-shadow: none; }
  .receipt-meta { grid-template-columns: 1fr; }
  .receipt-totals { width: 100%; }
  .guest-panel { padding: 18px 18px 14px; }
  .guest-mobile-brand { justify-content: center; margin-bottom: 16px; }
  .auth-card { max-width: 100%; padding: 18px 0; }
  .application-card, .setup-card { padding-top: 10px; }
  .form-options { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .stat-grid.four { grid-template-columns: 1fr; }
  .stat-card { min-height: 105px; }
  .product-grid { grid-template-columns: 1fr; }
  .guest-panel { padding-right: 18px; padding-left: 18px; }
  .auth-card h2 { font-size: 27px; }
}

@media print {
  @page { margin: 10mm; }
  body { padding: 0 !important; background: #fff !important; }
  .sidebar, .topbar, .mobile-nav, .support-banner, .no-print, .toolbar, .sidebar-overlay { display: none !important; }
  .app-main { width: 100% !important; margin: 0 !important; }
  .page-content { max-width: none !important; padding: 0 !important; }
  .panel, .stat-card, .mini-summary, .receipt-paper { break-inside: avoid; box-shadow: none !important; }
  .receipt-paper { width: 100%; min-height: 0; padding: 0; }
  .report-heading { margin-top: 0; }
  .data-table th, .data-table td { padding: 7px; }
  .content-grid.split { grid-template-columns: 1fr 1fr; }
}
