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

* {
  margin: 0;
}

button {
  color: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 1em;
}

img {
  display: block;
}

svg {
  display: inline-block;
  vertical-align: middle;
}

/* Prevent SVGs inside buttons from interfering with button hover effects */
button svg,
.btn svg,
[role="button"] svg {
  pointer-events: none;
}

img,
video {
  max-width: 100%;
  height: auto;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";
  background-color: var(--colour-bg-primary);
  color: var(--colour-text-primary);
}

/* === FRESH FRAMEWORK STYLES === */
.fresh-gradient {
  background-color: rgb(134, 239, 172);
  background-image: linear-gradient(
    to right bottom,
    rgb(219, 234, 254),
    rgb(187, 247, 208),
    rgb(254, 249, 195)
  );
}

/* === ACCESSIBILITY === */
.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* === SIDEBAR TRANSITIONS === */
.sidebar-transition-enabled {
  transition: margin-left 0.3s ease;
}

/* === BUTTON DISABLED STATE === */
.button-disabled-state {
  opacity: 0.3 !important;
  filter: grayscale(1) !important;
  background-color: #cccccc !important;
  color: #666666 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transition: none !important;
}

/* === ACCESSIBILITY - REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }

  .sidebar-transition-enabled {
    transition: none;
  }
}

/* === STACK RESPONSIVE VARIABLES === */
:root {
  --stack-gap-sm: 8px;
  --stack-gap-md: 16px;
  --stack-gap-lg: 24px;

  --inline-gap-sm: 8px;
  --inline-gap-md: 16px;
  --inline-gap-lg: 24px;

  --card-padding-none: 0;
  --card-padding-sm: 8px;
  --card-padding-md: 16px;
  --card-padding-lg: 24px;
  --card-radius: 12px;

  /* === THEME SYSTEM (SEMANTIC COLOURS) === */
  /* Brand colours */
  --colour-brand-primary: #0097cc;
  --colour-brand-hover: #085b8d;
  --colour-brand-light: #e6f7ff;
  --colour-brand-light-200: #b3e5fc;
  --colour-brand-lightest: rgba(0, 151, 204, 0.03);
  --colour-brand-secondary: #6b7280;
  --colour-brand-secondary-hover: #4b5563;
  --colour-header-bg: #0097cc;
  --colour-card-glass: rgba(255, 255, 255, 0.95);
  --colour-card-glass-border: rgba(255, 255, 255, 0.3);

  /* Mob Cards */
  --colour-mob-lightness: 85%;
  --colour-mob-text: #111827;
  --colour-mob-text-secondary: #4b5563;

  /* Layout backgrounds */
  --colour-bg-primary: #f8fafc;
  --colour-bg-secondary: #ffffff;
  --colour-bg-tertiary: #f3f4f6;
  --colour-bg-hover: #f9fafb;
  --colour-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --colour-select-arrow: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");

  /* Typography text states */
  --colour-text-primary: #111827;
  --colour-text-secondary: #4b5563;
  --colour-text-muted: #9ca3af;
  --colour-text-inverse: #ffffff;

  /* Borders & Dividers */
  --colour-border-primary: #e5e7eb;
  --colour-border-secondary: #f3f4f6;

  /* Status Accents */
  --colour-status-success-solid: #10b981;
  --colour-status-success-bg: #d1fae5;
  --colour-status-success-text: #065f46;
  --colour-status-success-40: rgba(16, 185, 129, 0.25);
  --colour-status-success-10: rgba(16, 185, 129, 0.063);

  --colour-status-warning-solid: #f59e0b;
  --colour-status-warning-bg: #fef3c7;
  --colour-status-warning-text: #92400e;
  --colour-status-warning-15: rgba(245, 158, 11, 0.082);

  --colour-status-danger-solid: #ef4444;
  --colour-status-danger-hover: #dc2626;
  --colour-status-danger-bg: #fee2e2;
  --colour-status-danger-text: #991b1b;

  --colour-status-info-solid: #3b82f6;
  --colour-status-info-bg: #dbeafe;
  --colour-status-info-text: #1e40af;

  /* Purple branding variables */
  --colour-purple-solid: #8b5cf6;
  --colour-purple-bg: #ede9fe;
  --colour-purple-text: #5b21b6;

  /* Semantic Neutral Gray Scale */
  --colour-gray-50: #f9fafb;
  --colour-gray-100: #f3f4f6;
  --colour-gray-200: #e5e7eb;
  --colour-gray-300: #d1d5db;
  --colour-gray-400: #9ca3af;
  --colour-gray-500: #6b7280;
  --colour-gray-600: #4b5563;
  --colour-gray-700: #374151;
  --colour-gray-800: #1f2937;
  --colour-gray-900: #111827;
}

/* Dark Theme Overrides */
html[data-theme="dark"] {
  --colour-bg-primary: #0f172a;
  --colour-bg-secondary: #1e293b;
  --colour-bg-tertiary: #0f172a;
  --colour-bg-hover: #334155;
  --colour-bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

  --colour-text-primary: #f8fafc;
  --colour-text-secondary: #94a3b8;
  --colour-text-muted: #64748b;

  --colour-border-primary: #334155;
  --colour-border-secondary: #1e293b;
  --colour-select-arrow: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");

  --colour-brand-hover: #00a3e0;
  --colour-brand-light: #0b3c5d;
  --colour-brand-light-200: rgba(0, 151, 204, 0.35);
  --colour-brand-lightest: rgba(0, 151, 204, 0.08);
  --colour-header-bg: #085b8d;
  --colour-card-glass: rgba(30, 41, 59, 0.95);
  --colour-card-glass-border: rgba(255, 255, 255, 0.1);

  /* Mob Cards */
  --colour-mob-lightness: 25%;
  --colour-mob-text: #f8fafc;
  --colour-mob-text-secondary: #ffffff;

  --colour-status-success-bg: #062f1e;
  --colour-status-success-text: #34d399;
  --colour-status-success-40: rgba(16, 185, 129, 0.4);
  --colour-status-success-10: rgba(16, 185, 129, 0.15);

  --colour-status-warning-bg: #452a0a;
  --colour-status-warning-text: #fbbf24;
  --colour-status-warning-15: rgba(245, 158, 11, 0.18);

  --colour-status-danger-bg: #4a1515;
  --colour-status-danger-text: #f87171;
  --colour-status-danger-hover: #f87171;

  --colour-status-info-bg: #1e293b;
  --colour-status-info-text: #60a5fa;

  /* Purple overrides */
  --colour-purple-solid: #a78bfa;
  --colour-purple-bg: #2e1065;
  --colour-purple-text: #ddd6fe;

  /* Inverted Gray Scale for seamless component dark adjustments */
  --colour-gray-50: #0f172a;
  --colour-gray-100: #1e293b;
  --colour-gray-200: #334155;
  --colour-gray-300: #475569;
  --colour-gray-400: #64748b;
  --colour-gray-500: #94a3b8;
  --colour-gray-600: #cbd5e1;
  --colour-gray-700: #e2e8f0;
  --colour-gray-800: #f1f5f9;
  --colour-gray-900: #f8fafc;
}

/* System Preference (OS Native dark detection) */
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --colour-bg-primary: #0f172a;
    --colour-bg-secondary: #1e293b;
    --colour-bg-tertiary: #0f172a;
    --colour-bg-hover: #334155;
    --colour-bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

    --colour-text-primary: #f8fafc;
    --colour-text-secondary: #94a3b8;
    --colour-text-muted: #64748b;

    --colour-border-primary: #334155;
    --colour-border-secondary: #1e293b;
    --colour-select-arrow: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");

    --colour-brand-hover: #00a3e0;
    --colour-brand-light: #0b3c5d;
    --colour-brand-light-200: rgba(0, 151, 204, 0.35);
    --colour-brand-lightest: rgba(0, 151, 204, 0.08);
    --colour-header-bg: #085b8d;
    --colour-card-glass: rgba(30, 41, 59, 0.95);
    --colour-card-glass-border: rgba(255, 255, 255, 0.1);

    /* Mob Cards */
    --colour-mob-lightness: 25%;
    --colour-mob-text: #f8fafc;
    --colour-mob-text-secondary: #ffffff;

    --colour-status-success-bg: #062f1e;
    --colour-status-success-text: #34d399;
    --colour-status-success-40: rgba(16, 185, 129, 0.4);
    --colour-status-success-10: rgba(16, 185, 129, 0.15);

    --colour-status-warning-bg: #452a0a;
    --colour-status-warning-text: #fbbf24;
    --colour-status-warning-15: rgba(245, 158, 11, 0.18);

    --colour-status-danger-bg: #4a1515;
    --colour-status-danger-text: #f87171;
    --colour-status-danger-hover: #f87171;

    --colour-status-info-bg: #1e293b;
    --colour-status-info-text: #60a5fa;

    --colour-purple-solid: #a78bfa;
    --colour-purple-bg: #2e1065;
    --colour-purple-text: #ddd6fe;

    --colour-gray-50: #0f172a;
    --colour-gray-100: #1e293b;
    --colour-gray-200: #334155;
    --colour-gray-300: #475569;
    --colour-gray-400: #64748b;
    --colour-gray-500: #94a3b8;
    --colour-gray-600: #cbd5e1;
    --colour-gray-700: #e2e8f0;
    --colour-gray-800: #f1f5f9;
    --colour-gray-900: #f8fafc;
  }
}

@media (max-width: 768px) {
  :root {
    --stack-gap-sm: 2px;
    --stack-gap-md: 4px;
    --stack-gap-lg: 6px;

    --inline-gap-sm: 4px;
    --inline-gap-md: 8px;
    --inline-gap-lg: 12px;

    --card-padding-none: 0;
    --card-padding-sm: 8px;
    --card-padding-md: 12px;
    --card-padding-lg: 16px;
    --card-radius: 0px;
  }
}

/* === UTILITY ANIMATIONS === */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === BACKGROUND GLOW & PARTICLE ANIMATIONS === */
@keyframes background-glow {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.02);
  }
}

@keyframes background-particle-float-1 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-18px) translateX(10px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-10px) translateX(-8px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-23px) translateX(14px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

@keyframes background-particle-float-2 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-21px) translateX(12px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-12px) translateX(-11px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-28px) translateX(16px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

@keyframes background-particle-float-3 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-24px) translateX(14px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-14px) translateX(-14px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-32px) translateX(18px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

@keyframes background-particle-float-4 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-27px) translateX(16px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-16px) translateX(-17px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-36px) translateX(20px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

@keyframes background-particle-float-5 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-30px) translateX(18px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-18px) translateX(-20px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-40px) translateX(22px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

@keyframes background-particle-float-6 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-33px) translateX(20px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-20px) translateX(-23px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-44px) translateX(24px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

@keyframes background-particle-float-7 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-36px) translateX(22px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-22px) translateX(-26px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-48px) translateX(26px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

@keyframes background-particle-float-8 {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-39px) translateX(24px) rotate(90deg) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-24px) translateX(-29px) rotate(180deg) scale(0.9);
    opacity: 0.7;
  }
  75% {
    transform: translateY(-52px) translateX(28px) rotate(270deg) scale(1.2);
    opacity: 0.8;
  }
}

/* === HOMEPAGE ANIMATIONS === */
@keyframes pulse-number {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes rotate-gradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes float-icon {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes float-pattern {
  0% {
    transform: translateX(0px) translateY(0px);
  }
  100% {
    transform: translateX(-60px) translateY(-60px);
  }
}

@keyframes homepage-float-1 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.8;
  }
}
@keyframes homepage-float-2 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-22px) rotate(180deg);
    opacity: 0.8;
  }
}
@keyframes homepage-float-3 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-18px) rotate(180deg);
    opacity: 0.8;
  }
}
@keyframes homepage-float-4 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-24px) rotate(180deg);
    opacity: 0.8;
  }
}
@keyframes homepage-float-5 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-16px) rotate(180deg);
    opacity: 0.8;
  }
}
@keyframes homepage-float-6 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-26px) rotate(180deg);
    opacity: 0.8;
  }
}
@keyframes homepage-float-7 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-14px) rotate(180deg);
    opacity: 0.8;
  }
}
@keyframes homepage-float-8 {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-28px) rotate(180deg);
    opacity: 0.8;
  }
}

/* === AUTHENTICATION KEYFRAMES === */
@keyframes auth-glow {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* === BARE-MINIMUM LAYOUT BRIDGES & RESETS === */
.responsive-padding {
  padding: var(--pad-desktop);
}
@media (max-width: 768px) {
  .responsive-padding {
    padding: var(--pad-mobile, var(--pad-desktop));
  }
}

.responsive-grid {
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .responsive-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 1), 1fr);
  }
}

.page-content-responsive {
  margin-bottom: var(--content-spacing-desktop);
}
@media (max-width: 768px) {
  .page-content-responsive {
    margin-bottom: var(
      --content-spacing-mobile,
      var(--content-spacing-desktop)
    );
  }
}

.responsive-rotating-bg {
  width: var(--bg-width-desktop, 200%);
  height: var(--bg-height-desktop, 200%);
  top: var(--bg-top-desktop, -50%);
  left: var(--bg-left-desktop, -50%);
}
@media (max-width: 768px) {
  .responsive-rotating-bg {
    width: var(--bg-width-mobile, var(--bg-width-desktop, 200%));
    height: var(--bg-height-mobile, var(--bg-height-desktop, 200%));
    top: var(--bg-top-mobile, var(--bg-top-desktop, -50%));
    left: var(--bg-left-mobile, var(--bg-left-desktop, -50%));
  }
}

.tab-list-scrollable::-webkit-scrollbar {
  display: none;
}

/* === BARCODE READER MODAL ANIMATIONS === */
@keyframes scanLineAnim {
  0%,
  100% {
    top: 5%;
    opacity: 0.6;
  }
  50% {
    top: 95%;
    opacity: 1;
  }
}
@keyframes detectToast {
  from {
    transform: translate(-50%, -10px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes boxFlash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* === DATA TABLE LAYOUT BRIDGES === */
.data-table-header-bridge {
  padding: var(--header-pad-desktop);
  border-bottom: var(--header-border-bottom);
  background-color: var(--header-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 768px) {
  .data-table-header-bridge {
    padding: var(--header-pad-mobile);
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .data-table-header-bridge .search-container {
    margin: 0 !important;
    min-width: 100% !important;
    order: 3;
  }
}

.search-filters-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 500px;
  justify-content: flex-end;
}
@media (max-width: 768px) {
  .search-filters-group {
    margin: 0 !important;
    min-width: 100% !important;
    order: 3;
  }
  .filters-btn-text {
    display: none;
  }
}

.data-table-filters-bridge {
  padding: var(--filters-pad-desktop);
  background-color: var(--filters-bg);
  border-bottom: var(--filters-border-bottom);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 768px) {
  .data-table-filters-bridge {
    padding: var(--filters-pad-mobile);
    gap: 0.75rem;
  }
}

.data-table-desktop-bridge {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table-desktop-bridge th {
  user-select: none;
  white-space: nowrap;
}
.data-table-desktop-bridge tr:hover {
  background-color: var(--colour-bg-hover);
}
.data-table-desktop-bridge tr.clickable {
  cursor: pointer;
}
.data-table-desktop-bridge tr.clickable:hover {
  background-color: var(--colour-bg-hover);
}

.mobile-list-bridge {
  display: none;
}
@media (max-width: 768px) {
  .data-table-desktop-bridge {
    display: none;
  }
  .mobile-list-bridge {
    display: block;
  }
}

/* === SIDEBAR LAYOUT HYDRATION BRIDGE === */
.sidebar-bridge {
  position: relative;
  width: var(--sidebar-width-desktop, 320px);
  transform: none;
  opacity: var(--sidebar-opacity-desktop, 1);
  visibility: var(--sidebar-visibility-desktop, visible);
}

@media (max-width: 768px) {
  .sidebar-bridge {
    position: absolute;
    width: var(--sidebar-width-mobile, 320px);
    transform: var(--sidebar-transform-mobile, translateX(-100%));
    opacity: var(--sidebar-opacity-mobile, 0);
    visibility: var(--sidebar-visibility-mobile, hidden);
  }
}

/* === BASE FORM ELEMENT STYLING RESETS (LIGHT/DARK THEME FALLBACK) === */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
select,
textarea {
  background-color: var(--colour-bg-secondary);
  color: var(--colour-text-primary);
  border: 1px solid var(--colour-gray-300);
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--colour-brand-primary);
  box-shadow: 0 0 0 3px var(--colour-brand-light-200);
}

select,
option {
  background-color: var(--colour-bg-secondary);
  color: var(--colour-text-primary);
}

::placeholder {
  color: var(--colour-text-muted);
  opacity: 1; /* Firefox override */
}

/* Custom browser autocomplete/autofill override for seamless light/dark mode */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--colour-bg-secondary) inset !important;
  -webkit-text-fill-color: var(--colour-text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}
