@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ============================================
   1. DESIGN TOKENS
   ============================================ */
:root {
  --inv-primary: #4f46e5;
  --inv-primary-hover: #4338ca;
  --inv-primary-light: #eef2ff;
  --inv-primary-ring: rgba(79, 70, 229, 0.2);

  --inv-bg: #f8fafc;
  --inv-ink: #0f172a;
  --inv-muted: #64748b;
  --inv-border: #e2e8f0;
  --inv-panel: #ffffff;

  --inv-success: #059669;
  --inv-success-bg: #f0fdf4;
  --inv-success-border: #bbf7d0;
  --inv-warning: #d97706;
  --inv-warning-bg: #fffbeb;
  --inv-warning-border: #fde68a;
  --inv-danger: #dc2626;
  --inv-danger-bg: #fef2f2;
  --inv-danger-border: #fecaca;
  --inv-info: #0284c7;
  --inv-info-bg: #eff6ff;
  --inv-info-border: #bfdbfe;

  --inv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --inv-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --inv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --inv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  --inv-sidebar-width: 260px;
  --inv-topbar-height: 64px;
  --inv-page-max: 1400px;

  --inv-sidebar-bg: #1e293b;
  --inv-sidebar-hover: #334155;
  --inv-sidebar-text: #94a3b8;
  --inv-sidebar-text-active: #ffffff;

  --inv-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --inv-radius-sm: 6px;
  --inv-radius: 8px;
  --inv-radius-lg: 12px;
  --inv-radius-xl: 16px;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--inv-font);
  background: var(--inv-bg);
  color: var(--inv-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Theme isolation — override common theme interference */
.inv-portal-body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--inv-bg) !important;
  color: var(--inv-ink) !important;
  font-family: var(--inv-font) !important;
  line-height: 1.6 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.inv-portal-body *:not(input):not(select):not(textarea):not(button) {
  font-family: inherit;
}

/* Kill any theme hero / page title / entry header */
.inv-portal-body .entry-header,
.inv-portal-body .page-header,
.inv-portal-body .page-title,
.inv-portal-body .site-header,
.inv-portal-body .hero,
.inv-portal-body .hero-section,
.inv-portal-body .wp-block-cover,
.inv-portal-body .entry-title,
.inv-portal-body .site-branding,
.inv-portal-body .main-navigation,
.inv-portal-body .site-footer,
.inv-portal-body .site-info,
.inv-portal-body #masthead,
.inv-portal-body #colophon,
.inv-portal-body .breadcrumb,
.inv-portal-body .breadcrumbs,
.inv-portal-body #secondary,
.inv-portal-body .widget-area,
.inv-portal-body .sidebar:not(.inv-sidebar),
.inv-portal-body .ast-container,
.inv-portal-body .elementor-location-header,
.inv-portal-body .elementor-location-footer {
  display: none !important;
}

/* Reset any wrapper padding/margin from theme */
.inv-portal-body .site-content,
.inv-portal-body .content-area,
.inv-portal-body .entry-content,
.inv-portal-body .page-content,
.inv-portal-body #content,
.inv-portal-body #primary,
.inv-portal-body .site-main,
.inv-portal-body > #page {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  float: none !important;
  background: transparent !important;
  border: none !important;
}

/* Remove any theme-added pseudo-element backgrounds */
.inv-portal-body .site-content::before,
.inv-portal-body .site-content::after,
.inv-portal-body .content-area::before,
.inv-portal-body .content-area::after {
  display: none !important;
}

/* ============================================
   3. TOPBAR
   ============================================ */
.inv-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--inv-topbar-height);
  background: var(--inv-panel);
  border-bottom: 1px solid var(--inv-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  z-index: 50;
  box-shadow: var(--inv-shadow);
}

.inv-topbar__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px;
  background: none;
  border: none;
  border-radius: var(--inv-radius);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.inv-topbar__toggle:hover {
  background: var(--inv-bg);
}

.inv-topbar__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--inv-ink);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.inv-sidebar-active .inv-topbar__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.inv-sidebar-active .inv-topbar__toggle span:nth-child(2) {
  opacity: 0;
}

.inv-sidebar-active .inv-topbar__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.inv-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--inv-ink);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  min-width: 0;
}

.inv-topbar__brand img {
  height: 26px;
  width: auto;
  flex-shrink: 0;
}

.inv-topbar__brand span {
  display: none;
}

.inv-topbar__store {
  background: var(--inv-primary-light);
  color: var(--inv-primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  flex-shrink: 1;
}

.inv-topbar__spacer {
  flex: 1;
}

.inv-topbar__user {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--inv-muted);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ============================================
   4. SIDEBAR
   ============================================ */
.inv-shell {
  min-height: 100vh;
  display: flex;
  padding-top: var(--inv-topbar-height);
}

.inv-sidebar {
  background: var(--inv-sidebar-bg);
  color: var(--inv-sidebar-text);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  left: 0;
  top: var(--inv-topbar-height);
  width: var(--inv-sidebar-width);
  height: calc(100vh - var(--inv-topbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #475569 transparent;
  z-index: 40;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.inv-sidebar--open {
  transform: translateX(0);
}

.inv-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 39;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.inv-sidebar-active .inv-sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

.inv-brand {
  display: none;
}

.inv-brand__logo {
  display: none;
}

.inv-brand__title {
  display: none;
}

.inv-brand__store {
  display: none;
}

.inv-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.inv-nav a {
  color: var(--inv-sidebar-text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--inv-radius);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
}

.inv-nav a:hover {
  background: var(--inv-sidebar-hover);
  color: var(--inv-sidebar-text-active);
}

.inv-nav a.inv-nav--active {
  background: var(--inv-primary);
  color: #fff;
  font-weight: 600;
}

.inv-nav__icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.inv-nav a.inv-nav--active .inv-nav__icon {
  opacity: 1;
}

.inv-logout {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 12px;
  margin-top: auto;
}

.inv-logout button {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--inv-sidebar-text);
  padding: 10px 14px;
  border-radius: var(--inv-radius);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.inv-logout button:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.3);
}

/* ============================================
   5. CONTENT AREA
   ============================================ */
.inv-content {
  padding: 24px 16px 48px;
  min-height: calc(100vh - var(--inv-topbar-height));
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-left: 0;
}

.inv-page {
  max-width: var(--inv-page-max);
  margin: 0 auto;
  width: 100%;
  flex: 1;
  padding: 4px 0 24px;
}

.inv-page__header {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-page__header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--inv-ink);
}

.inv-page__header p {
  color: var(--inv-muted);
  margin: 0;
  font-size: 14px;
  max-width: 640px;
}

/* ============================================
   6. CARDS
   ============================================ */
.inv-auth__panel,
.inv-card {
  background: var(--inv-panel);
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius-lg);
  padding: 20px;
  box-shadow: var(--inv-shadow-sm);
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.inv-card--filter {
  padding: 16px;
}

/* Card with only a table — remove padding so table goes edge to edge */
.inv-card > .inv-table:only-child {
  margin: -20px;
  width: calc(100% + 40px);
  border: none;
  border-radius: 0;
}

.inv-card h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.inv-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.inv-card p {
  margin: 0 0 12px;
  color: var(--inv-muted);
  font-size: 14px;
}

/* ============================================
   7. BUTTONS
   ============================================ */
.inv-auth button,
.inv-card button,
.inv-button {
  background: var(--inv-primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: var(--inv-radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  font-family: var(--inv-font);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.inv-button {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.inv-auth button:hover,
.inv-card button:hover,
.inv-button:hover {
  background: var(--inv-primary-hover);
  box-shadow: var(--inv-shadow-sm);
}

.inv-button--ghost {
  background: transparent;
  color: var(--inv-muted);
  border: 1px solid var(--inv-border);
}

.inv-button--ghost:hover {
  background: var(--inv-bg);
  color: var(--inv-ink);
  border-color: #cbd5e1;
}

.inv-card button {
  width: 100%;
}

/* ============================================
   8. FORMS
   ============================================ */
.inv-auth form,
.inv-card form {
  display: grid;
  gap: 12px;
}

.inv-card form + form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--inv-border);
}

.inv-auth label,
.inv-card label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--inv-muted);
}

.inv-auth input,
.inv-card input,
.inv-card select {
  width: 100%;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: var(--inv-radius);
  border: 1px solid var(--inv-border);
  background: #fff;
  font-family: var(--inv-font);
  font-size: 14px;
  color: var(--inv-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inv-auth input:focus,
.inv-card input:focus,
.inv-card select:focus {
  outline: none;
  border-color: var(--inv-primary);
  box-shadow: 0 0 0 3px var(--inv-primary-ring);
}

.inv-card input[type="file"] {
  padding: 8px;
  background: var(--inv-bg);
}

.inv-card input[type="file"]::file-selector-button {
  background: var(--inv-primary);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--inv-radius-sm);
  margin-right: 12px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--inv-font);
}

.inv-card input[type="file"]::file-selector-button:hover {
  background: var(--inv-primary-hover);
}

.inv-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--inv-ink);
}

.inv-checkbox input[type="checkbox"] {
  width: auto;
  accent-color: var(--inv-primary);
}

.inv-field-note {
  color: var(--inv-muted);
  font-size: 13px;
  margin-bottom: 8px;
}

/* ============================================
   9. TABLES
   ============================================ */
.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  display: block;
  overflow-x: auto;
  min-width: 100%;
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.inv-table thead,
.inv-table tbody {
  display: table;
  width: 100%;
  table-layout: auto;
}

.inv-table th,
.inv-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--inv-border);
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

.inv-table thead th {
  background: var(--inv-bg);
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 600;
  color: var(--inv-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inv-table tbody tr:hover {
  background: #f1f5f9;
}

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

.inv-table--items th,
.inv-table--items td {
  white-space: normal;
}

.inv-table--items th:nth-child(1),
.inv-table--items td:nth-child(1) { width: 12%; }

.inv-table--items th:nth-child(2),
.inv-table--items td:nth-child(2) { width: 30%; font-weight: 600; }

.inv-table--items th:nth-child(3),
.inv-table--items td:nth-child(3) { width: 20%; }

.inv-table--items th:nth-child(4),
.inv-table--items td:nth-child(4) { width: 14%; }

.inv-table--items th:nth-child(5),
.inv-table--items td:nth-child(5) { width: 12%; }

.inv-table--items th:nth-child(6),
.inv-table--items td:nth-child(6) { width: 6%; }

.inv-table--items th:nth-child(7),
.inv-table--items td:nth-child(7) { width: 6%; }

.inv-table--items td:nth-child(2),
.inv-table--items td:nth-child(3),
.inv-table--items td:nth-child(4) {
  word-break: break-word;
}

/* ============================================
   10. TABS
   ============================================ */
.inv-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 8px 0 20px;
  padding-bottom: 2px;
}

.inv-tabs::-webkit-scrollbar {
  display: none;
}

.inv-tab {
  padding: 7px 14px;
  border-radius: var(--inv-radius);
  border: 1px solid var(--inv-border);
  text-decoration: none;
  color: var(--inv-muted);
  background: var(--inv-panel);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.inv-tab:hover {
  background: var(--inv-bg);
  color: var(--inv-ink);
}

.inv-tab--active {
  background: var(--inv-primary);
  border-color: var(--inv-primary);
  color: #fff;
}

.inv-tab--active:hover {
  background: var(--inv-primary-hover);
  color: #fff;
}

/* ============================================
   11. STATS
   ============================================ */
.inv-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}

.inv-stat {
  background: var(--inv-panel);
  border: 1px solid var(--inv-border);
  border-left: 4px solid var(--inv-primary);
  border-radius: var(--inv-radius-lg);
  padding: 16px 20px;
  box-shadow: var(--inv-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-stat strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--inv-ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  order: 2;
}

.inv-stat span,
.inv-stat div {
  font-size: 12px;
  color: var(--inv-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  order: 1;
}

/* ============================================
   12. ALERTS
   ============================================ */
.inv-alert {
  padding: 10px 16px;
  border-radius: var(--inv-radius);
  background: var(--inv-success-bg);
  border: 1px solid var(--inv-success-border);
  color: #166534;
  margin-bottom: 16px;
  font-size: 14px;
  cursor: pointer;
}

.inv-alert--info {
  background: var(--inv-info-bg);
  border-color: var(--inv-info-border);
  color: #1e40af;
}

/* ============================================
   13. AUTH PAGES (Radio Toggle)
   ============================================ */
.inv-auth,
.inv-select,
.inv-join {
  display: grid;
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 16px;
}

.inv-auth {
  justify-items: center;
}

.inv-auth h1,
.inv-auth h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.inv-auth p {
  color: var(--inv-muted);
  margin: 0 0 16px;
  font-size: 14px;
}

.inv-auth button {
  margin-top: 4px;
}

.inv-auth small {
  color: var(--inv-muted);
  font-size: 13px;
}

.inv-auth__toggle {
  width: min(520px, 100%);
  position: relative;
}

.inv-auth__toggle > input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.inv-auth__switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 20px;
  background: var(--inv-bg);
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius);
  padding: 4px;
}

.inv-auth__switch label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--inv-radius-sm);
  border: none;
  background: transparent;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  color: var(--inv-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.inv-auth__panels {
  display: grid;
}

#auth-login:checked ~ .inv-auth__switch label[for="auth-login"],
#auth-register:checked ~ .inv-auth__switch label[for="auth-register"] {
  background: var(--inv-primary);
  color: #fff;
  box-shadow: var(--inv-shadow-sm);
}

.inv-auth__toggle .inv-auth__panel {
  display: none;
}

#auth-login:checked ~ .inv-auth__panels .inv-auth__panel--login {
  display: block;
}

#auth-register:checked ~ .inv-auth__panels .inv-auth__panel--register {
  display: block;
}

.inv-auth__panel {
  max-width: 520px;
  margin: 0 auto;
}

.inv-auth__panel--alt {
  background: var(--inv-primary-light);
}

/* ============================================
   14. SELECT STORE
   ============================================ */
.inv-select__header {
  text-align: center;
}

.inv-select__header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
}

.inv-select__header p {
  color: var(--inv-muted);
  margin: 0;
  font-size: 14px;
}

.inv-select__toggle .inv-auth__switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#store-tab-stores:checked ~ .inv-auth__switch label[for="store-tab-stores"],
#store-tab-create:checked ~ .inv-auth__switch label[for="store-tab-create"],
#store-tab-join:checked ~ .inv-auth__switch label[for="store-tab-join"] {
  background: var(--inv-primary);
  color: #fff;
  box-shadow: var(--inv-shadow-sm);
}

.inv-select__panel {
  display: none;
}

#store-tab-stores:checked ~ .inv-auth__panels .inv-select__panel--stores {
  display: block;
}

#store-tab-create:checked ~ .inv-auth__panels .inv-select__panel--create {
  display: block;
}

#store-tab-join:checked ~ .inv-auth__panels .inv-select__panel--join {
  display: block;
}

.inv-store-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--inv-border);
}

.inv-store-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.inv-store-row strong {
  font-size: 15px;
}

.inv-store-row small {
  color: var(--inv-muted);
  font-size: 12px;
}

/* ============================================
   15. STANDALONE PAGES
   ============================================ */
.inv-standalone {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(79, 70, 229, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(79, 70, 229, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 50%, #f8fafc 100%);
}

.inv-standalone__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px 12px;
  font-weight: 700;
  font-size: 15px;
  color: var(--inv-ink);
}

.inv-standalone__header img {
  height: 28px;
  width: auto;
}

/* ============================================
   16. ITEM CARDS
   ============================================ */
.inv-item-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.inv-item-card__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.inv-item-card__meta {
  display: grid;
  gap: 4px;
  color: var(--inv-muted);
  font-size: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--inv-border);
}

.inv-item-card__form {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

/* ============================================
   17. GRID LAYOUTS
   ============================================ */
.inv-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
  align-content: flex-start;
  justify-content: flex-start;
}

.inv-grid--wide {
  gap: 20px;
}

.inv-grid--items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.inv-page > .inv-card,
.inv-page > .inv-grid,
.inv-page > .inv-tabs {
  margin-bottom: 20px;
}

.inv-page > .inv-grid:last-child,
.inv-page > .inv-card:last-child {
  margin-bottom: 0;
}

.inv-grid > .inv-card {
  flex: 1 1 100%;
  min-width: 0;
}

.inv-grid--wide > .inv-card {
  flex: 1 1 100%;
  min-width: 0;
}

/* ============================================
   18. MISC COMPONENTS
   ============================================ */
.inv-pill {
  background: var(--inv-primary-light);
  color: var(--inv-primary);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.inv-filter {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  align-items: end;
}

.inv-filter label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--inv-muted);
}

.inv-filter input,
.inv-filter select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--inv-radius);
  border: 1px solid var(--inv-border);
  background: #fff;
  font-family: var(--inv-font);
  font-size: 14px;
  color: var(--inv-ink);
}

.inv-filter input:focus,
.inv-filter select:focus {
  outline: none;
  border-color: var(--inv-primary);
  box-shadow: 0 0 0 3px var(--inv-primary-ring);
}

.inv-filter button {
  padding: 9px 20px;
  background: var(--inv-primary);
  color: #fff;
  border: none;
  border-radius: var(--inv-radius);
  font-family: var(--inv-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
}

.inv-filter button:hover {
  background: var(--inv-primary-hover);
}

.inv-filter .inv-button--ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
}

.inv-inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 4px 0;
  flex-wrap: wrap;
}

.inv-inline select {
  padding: 6px 8px;
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius-sm);
  font-size: 13px;
  font-family: var(--inv-font);
  background: #fff;
  color: var(--inv-ink);
}

.inv-inline button {
  padding: 6px 12px !important;
  width: auto !important;
  font-size: 13px !important;
}

.inv-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inv-actions .inv-button {
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: var(--inv-shadow-sm);
}

/* On very small screens, action buttons go full width */
@media (max-width: 479px) {
  .inv-actions {
    flex-direction: column;
  }

  .inv-actions .inv-button {
    text-align: center;
  }
}

/* ============================================
   19. PERMISSIONS
   ============================================ */
.inv-perms {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  grid-template-columns: 1fr;
}

.inv-perms--inline {
  grid-template-columns: 1fr;
}

.inv-perms__group {
  background: var(--inv-bg);
  border: 1px solid var(--inv-border);
  padding: 14px;
  border-radius: var(--inv-radius-lg);
  display: grid;
  gap: 8px;
}

.inv-perms__group label {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.inv-perms__group input[type="checkbox"] {
  margin: 0;
  accent-color: var(--inv-primary);
}

.inv-perms__group label span {
  display: block;
  line-height: 1.3;
}

.inv-perms__group summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--inv-ink);
  padding: 2px 0;
}

/* ============================================
   20. FOOTER
   ============================================ */
.inv-footer {
  margin-top: auto;
  padding: 20px 0 8px;
  border-top: 1px solid var(--inv-border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--inv-muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.inv-footer--standalone {
  padding: 24px;
  margin-top: auto;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: none;
}

.inv-footer a {
  color: inherit;
  text-decoration: none;
}

.inv-footer a:hover {
  color: var(--inv-primary);
}

/* ============================================
   21. SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.inv-sidebar::-webkit-scrollbar {
  width: 4px;
}

.inv-sidebar::-webkit-scrollbar-thumb {
  background: #475569;
}

/* ============================================
   22. RESPONSIVE — sm (640px+)
   ============================================ */
@media (min-width: 640px) {
  .inv-topbar {
    padding: 0 16px;
    gap: 12px;
  }

  .inv-topbar__brand span {
    display: inline;
  }

  .inv-topbar__store {
    max-width: 180px;
    font-size: 12px;
  }

  .inv-topbar__user {
    display: flex;
  }

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

  .inv-store-row {
    grid-template-columns: 1fr 180px auto;
    gap: 12px;
  }

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

  .inv-grid > .inv-card {
    flex: 1 1 280px;
    min-width: 260px;
  }

  .inv-grid--wide > .inv-card {
    flex: 1 1 380px;
    min-width: 340px;
  }

  .inv-grid--items {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .inv-perms,
  .inv-perms--inline {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .inv-table th,
  .inv-table td {
    padding: 12px 14px;
  }
}

/* ============================================
   23. RESPONSIVE — md (768px+)
   ============================================ */
@media (min-width: 768px) {
  .inv-topbar {
    padding: 0 20px;
  }

  .inv-topbar__store {
    max-width: none;
  }

  .inv-content {
    padding: 28px 24px 48px;
  }

  .inv-auth__panel,
  .inv-card {
    padding: 24px;
  }

  .inv-page__header h1 {
    font-size: 28px;
  }

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

  .inv-auth__switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inv-select__toggle .inv-auth__switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inv-auth,
  .inv-select,
  .inv-join {
    margin: 60px auto;
    padding: 20px;
  }

  .inv-tabs {
    flex-wrap: wrap;
  }

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

/* ============================================
   24. RESPONSIVE — lg (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .inv-topbar__toggle {
    display: none;
  }

  .inv-topbar {
    padding: 0 24px;
  }

  .inv-sidebar {
    transform: translateX(0);
  }

  .inv-sidebar-overlay {
    display: none;
  }

  .inv-content {
    margin-left: var(--inv-sidebar-width);
    padding: 32px 32px 48px;
  }

  .inv-filter {
    grid-template-columns: 1.5fr 1fr 1fr auto auto;
  }

  .inv-stats {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .inv-table thead,
  .inv-table tbody {
    table-layout: auto;
  }
}

/* ============================================
   25. RESPONSIVE — xl (1280px+)
   ============================================ */
@media (min-width: 1280px) {
  .inv-page {
    padding: 8px 0 28px;
  }
}

/* ============================================
   26. LANDING PAGE
   ============================================ */
.inv-landing {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(79, 70, 229, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 40%, #f8fafc 100%) !important;
}

.inv-landing__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 48px;
  text-align: center;
  flex: 1;
}

.inv-landing__content {
  max-width: 640px;
}

.inv-landing__content h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--inv-ink);
}

.inv-landing__content h1 span {
  background: linear-gradient(135deg, var(--inv-primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.inv-landing__content p {
  font-size: 16px;
  color: var(--inv-muted);
  line-height: 1.7;
  margin: 0 0 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.inv-landing__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.inv-landing__actions .inv-button {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--inv-radius-lg);
}

.inv-landing__actions .inv-button--ghost {
  background: var(--inv-panel);
  border: 1px solid var(--inv-border);
  color: var(--inv-ink);
  box-shadow: var(--inv-shadow-sm);
}

.inv-landing__actions .inv-button--ghost:hover {
  border-color: var(--inv-primary);
  color: var(--inv-primary);
  background: var(--inv-primary-light);
}

/* Feature cards */
.inv-landing__features {
  padding: 0 24px 60px;
}

.inv-landing__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  max-width: 960px;
  margin: 0 auto;
}

.inv-landing__card {
  background: var(--inv-panel);
  border: 1px solid var(--inv-border);
  border-radius: var(--inv-radius-lg);
  padding: 24px;
  box-shadow: var(--inv-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.inv-landing__card:hover {
  box-shadow: var(--inv-shadow-md);
  transform: translateY(-2px);
}

.inv-landing__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--inv-radius);
  background: var(--inv-primary-light);
  color: var(--inv-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.inv-landing__card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--inv-ink);
}

.inv-landing__card p {
  margin: 0;
  font-size: 14px;
  color: var(--inv-muted);
  line-height: 1.6;
}

/* Landing responsive */
@media (min-width: 640px) {
  .inv-landing__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .inv-landing__content h1 {
    font-size: 52px;
  }

  .inv-landing__content p {
    font-size: 17px;
  }
}

@media (min-width: 768px) {
  .inv-landing__hero {
    padding: 80px 32px 56px;
  }

  .inv-landing__features {
    padding: 0 32px 80px;
  }

  .inv-landing__content h1 {
    font-size: 60px;
  }
}

@media (min-width: 1024px) {
  .inv-landing__hero {
    padding: 100px 40px 64px;
  }

  .inv-landing__content h1 {
    font-size: 68px;
  }

  .inv-landing__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
