:root {
  color-scheme: dark;
  --void: #07020f;
  --night: #11051f;
  --panel: #19092b;
  --panel-soft: rgba(37, 14, 62, 0.72);
  --panel-deep: rgba(15, 5, 28, 0.86);
  --line: rgba(221, 185, 255, 0.14);
  --line-hot: rgba(217, 70, 239, 0.42);
  --text: #f9f5ff;
  --muted: #c5b4da;
  --dim: #8f79a8;
  --violet: #8b5cf6;
  --purple: #a855f7;
  --magenta: #d946ef;
  --pink: #f472b6;
  --select-gray: #2f2938;
  --button-purple: #8122d9;
  --gold: #fde047;
  --green: #86efac;
  --red: #fb7185;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-feature-settings: "liga" 1, "calt" 1;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--void);
  background-image:
    radial-gradient(circle at 18% 18%, rgba(217, 70, 239, 0.34), transparent 34%),
    radial-gradient(circle at 82% 4%, rgba(168, 85, 247, 0.42), transparent 38%),
    radial-gradient(circle at 60% 84%, rgba(253, 224, 71, 0.12), transparent 36%),
    linear-gradient(180deg, #0b0613 0%, #07020f 100%);
  background-attachment: fixed;
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(217, 70, 239, 0.35);
  outline-offset: 2px;
}

::selection {
  background: rgba(217, 70, 239, 0.42);
  color: var(--text);
}

.page {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  padding: 18px 16px;
}

.inventory-board {
  position: relative;
  width: min(1160px, 100%);
  max-width: 1160px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(30, 9, 52, 0.96), rgba(17, 5, 31, 0.78)),
    var(--night);
  box-shadow:
    0 34px 120px -50px rgba(217, 70, 239, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: clamp(20px, 2vw, 26px);
}

.inventory-board::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 34px;
  background: linear-gradient(135deg, #d946ef, #7c3aed 45%, #fde047);
  filter: blur(42px);
  opacity: 0.38;
}

.board-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 56px;
}

.settings-menu {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 30;
}

.settings-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(221, 185, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.settings-button:hover,
.settings-button[aria-expanded="true"] {
  border-color: rgba(129, 34, 217, 0.85);
  background: rgba(129, 34, 217, 0.24);
  color: #ffffff;
}

.settings-button:hover {
  transform: translateY(-1px);
}

.settings-icon {
  width: 20px;
  height: 20px;
}

.settings-dialog {
  width: min(420px, calc(100% - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  border: 1px solid var(--line-hot);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  overflow: hidden;
  padding: 0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.settings-dialog::backdrop {
  background: rgba(7, 2, 15, 0.68);
  backdrop-filter: blur(6px);
}

.settings-window {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(47, 41, 56, 0.98), rgba(28, 12, 45, 0.98)),
    var(--select-gray);
  padding: 22px;
}

.settings-window-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-window h2 {
  color: var(--text);
  font-size: 1.25rem;
}

.settings-window-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.settings-close-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.settings-close-button:hover,
.settings-close-button:focus-visible {
  border-color: var(--button-purple);
  background: rgba(129, 34, 217, 0.22);
  outline: none;
}

.settings-actions {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.settings-action-row {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 800;
  min-width: 0;
  max-width: 100%;
}

.auth-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 2, 15, 0.26);
  padding: 12px;
}

.auth-panel-header {
  display: grid;
  gap: 5px;
}

.auth-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 850;
}

.auth-panel p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  padding: 10px 12px;
}

.auth-form input::placeholder {
  color: var(--dim);
}

.auth-form input:disabled {
  opacity: 0.72;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-actions .settings-action-button[hidden] {
  display: none;
}

#logout-button {
  grid-column: 1 / -1;
}

.tooltip-toggle {
  display: inline-flex;
  min-width: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(134, 239, 172, 0.4);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: var(--green);
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.tooltip-toggle.is-off {
  border-color: rgba(255, 77, 109, 0.5);
  background: rgba(255, 77, 109, 0.14);
  color: #ff8aa1;
}

.tooltip-toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.settings-action-button {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.settings-action-button {
  border: 1px solid rgba(129, 34, 217, 0.72);
  background: rgba(129, 34, 217, 0.22);
  color: var(--text);
}

.settings-action-button:hover,
.settings-action-button:focus-visible {
  background: var(--button-purple);
  outline: none;
}

#refill-confirm-button {
  border-color: rgba(251, 146, 60, 0.72);
  background: #140a06;
  color: #ffedd5;
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.18);
}

#refill-confirm-button:hover,
#refill-confirm-button:focus-visible {
  border-color: rgba(134, 239, 172, 0.72);
  background: rgba(34, 197, 94, 0.24);
  color: var(--green);
  outline: none;
}

.settings-status {
  min-height: 1.25rem;
  color: var(--green);
  font-size: 0.86rem;
  line-height: 1.4;
}

.settings-status.is-error {
  color: #ff8aa1;
}

.refill-dialog {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  width: min(360px, calc(100vw - 36px));
}

.refill-window {
  display: grid;
  gap: 16px;
  border: 0;
  border-radius: 12px;
  background: #09040f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  padding: 18px;
}

.refill-window h2 {
  color: #ff2d55;
  text-shadow:
    0 0 10px rgba(255, 45, 85, 0.72),
    0 0 22px rgba(255, 45, 85, 0.4);
}

#refill-message {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  color: var(--text);
}

.warning-item-name {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  vertical-align: middle;
}

.warning-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-title-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid rgba(255, 36, 84, 0.98);
  border-radius: 999px;
  background: rgba(255, 36, 84, 0.18);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow:
    0 0 22px rgba(255, 36, 84, 0.58),
    0 0 8px rgba(255, 36, 84, 0.45),
    inset 0 0 12px rgba(255, 36, 84, 0.16);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
}

.refill-controls {
  display: flex;
  gap: 8px;
}

.refill-dialog.is-minimized {
  width: min(230px, calc(100vw - 36px));
}

.refill-dialog.is-minimized .refill-window {
  gap: 0;
  padding: 12px 14px;
}

.refill-dialog.is-minimized #refill-message,
.refill-dialog.is-minimized #refill-confirm-button,
.refill-dialog.is-minimized #refill-close-button {
  display: none;
}

.refill-dialog.is-minimized .settings-window-header {
  align-items: center;
}

h1,
h2,
p {
  margin: 0;
}

.title-row,
.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-tip {
  position: relative;
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border: 1px solid rgba(221, 185, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f0d6ff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  z-index: 5;
}

.info-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 1000;
  width: max-content;
  max-width: 240px;
  border: 1px solid rgba(129, 34, 217, 0.72);
  border-radius: 8px;
  background: rgba(47, 41, 56, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  padding: 9px 10px;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  white-space: normal;
}

.info-tip:hover,
.info-tip:focus-visible,
.info-tip.is-open {
  border-color: rgba(129, 34, 217, 0.92);
  background: rgba(129, 34, 217, 0.28);
  outline: none;
}

.info-tip:hover::after,
.info-tip:focus-visible::after,
.info-tip.is-open::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tooltips-disabled .info-tip {
  display: none;
}

.hover-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  max-width: min(260px, calc(100vw - 20px));
  border: 1px solid rgba(129, 34, 217, 0.78);
  border-radius: 8px;
  background: rgba(47, 41, 56, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  padding: 9px 10px;
  pointer-events: none;
  text-align: left;
  transform: translate3d(-9999px, -9999px, 0);
  will-change: transform;
}

.hover-tooltip[hidden],
.tooltips-disabled .hover-tooltip {
  display: none;
}

.hover-tooltip.is-warning {
  border-color: rgba(255, 77, 109, 0.9);
  background:
    linear-gradient(180deg, rgba(78, 18, 45, 0.98), rgba(40, 10, 34, 0.98)),
    var(--select-gray);
  box-shadow: 0 18px 44px rgba(255, 77, 109, 0.16);
  color: #ffd7df;
}

h1 {
  color: var(--text);
  font-size: clamp(2.1rem, 2.8vw, 2.55rem);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(217, 70, 239, 0.45);
}

.intro {
  max-width: 42rem;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.stats {
  display: grid;
  width: 100%;
  gap: 12px;
}

.stat {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  padding: 13px 14px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.stat-tip {
  position: absolute;
  top: 10px;
  right: 10px;
}

.stat-label {
  display: block;
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 750;
  line-height: 1.2;
}

.stat:nth-child(2) strong {
  color: var(--green);
}

.stat:nth-child(3) strong {
  color: #ff4d6d;
}

.progress-area,
.category-overview {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-deep);
  padding: 15px 16px;
}

.progress-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.progress-area h2,
.category-header h2 {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.progress-area p {
  margin-top: 2px;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1.2;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(143, 121, 168, 0.18);
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 20px rgba(251, 113, 133, 0.42);
  transition: width 180ms ease;
}

.progress-bar.is-low {
  background: linear-gradient(90deg, #ef4444, #fb7185);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
}

.progress-bar.is-medium {
  background: linear-gradient(90deg, #facc15, #fde047);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.36);
}

.progress-bar.is-full {
  background: linear-gradient(90deg, #22c55e, #86efac);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.42);
}

.category-overview {
  display: grid;
  gap: 12px;
}

.category-header p {
  display: none;
  margin-top: 6px;
  color: var(--dim);
  font-size: 0.85rem;
}

.category-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 9px;
}

.category-chip {
  min-height: 62px;
  border: 1px solid rgba(221, 185, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 10px 11px;
}

.category-chip-title,
.category-chip em {
  display: block;
}

.category-chip-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 750;
}

.category-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 6px;
  background: rgba(129, 34, 217, 0.2);
  color: #f0d6ff;
  font-size: 0.95rem;
  box-shadow: 0 0 16px rgba(217, 70, 239, 0.2);
}

.category-chip strong {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 1.25rem;
}

.category-chip em {
  margin-top: 2px;
  color: #ff4d6d;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.inventory-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.inventory-form input,
.inventory-form select,
.custom-select-button {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
  color: var(--text);
  padding: 11px 14px;
}

.inventory-form input::placeholder {
  color: var(--dim);
}

.quantity-input {
  min-width: 124px;
}

.inventory-form select {
  appearance: none;
  background-color: var(--select-gray);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--button-purple) 50%),
    linear-gradient(135deg, var(--button-purple) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-button {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: var(--select-gray);
  text-align: left;
  white-space: nowrap;
}

.custom-select-button > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-button[aria-expanded="true"] {
  border-color: var(--line);
}

.custom-select-arrow {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid var(--button-purple);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: none;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--select-gray);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  padding: 4px;
}

.custom-select-options.is-open {
  display: grid;
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
}

.dropdown-option-icon {
  width: 16px;
  flex: 0 0 16px;
  color: #f0d6ff;
  font-size: 0.82rem;
  text-align: center;
}

.category-option-paper-cardstock .dropdown-option-icon {
  color: #d8b4fe;
}

.category-option-paper-copy .dropdown-option-icon {
  color: #a5b4fc;
}

.category-option-paper-photo .dropdown-option-icon {
  color: #93c5fd;
}

.category-option-paper-specialty .dropdown-option-icon {
  color: #f472b6;
}

.category-option-inks .dropdown-option-icon {
  color: #c084fc;
}

.category-option-adhesive .dropdown-option-icon {
  color: #f9a8d4;
}

.category-option-trimmers .dropdown-option-icon {
  color: #f0abfc;
}

.category-option-tools .dropdown-option-icon {
  color: #ddd6fe;
}

.status-option-in .dropdown-option-icon {
  color: var(--green);
}

.status-option-out .dropdown-option-icon {
  color: #ff4d6d;
}

.season-option-spring .dropdown-option-icon {
  color: #86efac;
}

.season-option-summer .dropdown-option-icon {
  color: #fde047;
}

.season-option-fall .dropdown-option-icon {
  color: #fb923c;
}

.season-option-winter .dropdown-option-icon {
  color: #93c5fd;
}

.season-option-none .dropdown-option-icon {
  color: #cbd5e1;
}

.color-option-red .dropdown-option-icon {
  color: #ef4444;
}

.color-option-pink .dropdown-option-icon {
  color: #f472b6;
}

.color-option-orange .dropdown-option-icon {
  color: #fb923c;
}

.color-option-yellow .dropdown-option-icon {
  color: #fde047;
}

.color-option-green .dropdown-option-icon {
  color: #22c55e;
}

.color-option-blue .dropdown-option-icon {
  color: #3b82f6;
}

.color-option-violet .dropdown-option-icon {
  color: #8b5cf6;
}

.color-option-white .dropdown-option-icon {
  color: #f8fafc;
}

.color-option-black .dropdown-option-icon {
  color: #0f172a;
  filter: drop-shadow(0 0 1px #ffffff);
}

.color-option-grey .dropdown-option-icon {
  color: #94a3b8;
}

.color-option-cream .dropdown-option-icon {
  color: #fef3c7;
}

.color-option:hover .dropdown-option-icon,
.color-option:focus .dropdown-option-icon,
.color-option.is-selected:hover .dropdown-option-icon,
.color-option.is-selected:focus .dropdown-option-icon {
  color: currentColor;
}

.custom-select-option.is-selected {
  background: transparent;
  color: var(--text);
}

.custom-select-option:hover,
.custom-select-option:focus,
.custom-select-option.is-selected:hover,
.custom-select-option.is-selected:focus {
  background: var(--button-purple);
  color: var(--text);
  outline: none;
}

.color-option-red:hover,
.color-option-red:focus,
.color-option-red.is-selected:hover,
.color-option-red.is-selected:focus {
  background: #ef4444;
  color: #ffffff;
}

.color-option-pink:hover,
.color-option-pink:focus,
.color-option-pink.is-selected:hover,
.color-option-pink.is-selected:focus {
  background: #f472b6;
  color: #19092b;
}

.color-option-orange:hover,
.color-option-orange:focus,
.color-option-orange.is-selected:hover,
.color-option-orange.is-selected:focus {
  background: #fb923c;
  color: #19092b;
}

.color-option-yellow:hover,
.color-option-yellow:focus,
.color-option-yellow.is-selected:hover,
.color-option-yellow.is-selected:focus {
  background: #fde047;
  color: #19092b;
}

.color-option-green:hover,
.color-option-green:focus,
.color-option-green.is-selected:hover,
.color-option-green.is-selected:focus {
  background: #22c55e;
  color: #06140b;
}

.color-option-blue:hover,
.color-option-blue:focus,
.color-option-blue.is-selected:hover,
.color-option-blue.is-selected:focus {
  background: #3b82f6;
  color: #ffffff;
}

.color-option-violet:hover,
.color-option-violet:focus,
.color-option-violet.is-selected:hover,
.color-option-violet.is-selected:focus {
  background: #8b5cf6;
  color: #ffffff;
}

.color-option-white:hover,
.color-option-white:focus,
.color-option-white.is-selected:hover,
.color-option-white.is-selected:focus {
  background: #f8fafc;
  color: #111827;
}

.color-option-black:hover,
.color-option-black:focus,
.color-option-black.is-selected:hover,
.color-option-black.is-selected:focus {
  background: #020617;
  color: #ffffff;
}

.color-option-grey:hover,
.color-option-grey:focus,
.color-option-grey.is-selected:hover,
.color-option-grey.is-selected:focus {
  background: #94a3b8;
  color: #0f172a;
}

.color-option-cream:hover,
.color-option-cream:focus,
.color-option-cream.is-selected:hover,
.color-option-cream.is-selected:focus {
  background: #fef3c7;
  color: #19092b;
}

.inventory-form option {
  background: var(--select-gray);
  color: var(--text);
}

.inventory-form option:checked {
  background: var(--button-purple);
  color: var(--text);
}

.inventory-form option:hover,
.inventory-form option:focus {
  background: var(--button-purple);
  color: var(--text);
}

.inventory-form input:focus,
.inventory-form select:focus,
.custom-select-button:focus {
  border-color: var(--line);
}

.inventory-form > button {
  border: 0;
  border-radius: 16px;
  background: var(--button-purple);
  box-shadow:
    0 12px 24px -10px rgba(129, 34, 217, 0.9),
    0 0 24px rgba(129, 34, 217, 0.32);
  color: #fff7ff;
  padding: 11px 22px;
  font-size: 1rem;
  font-weight: 800;
  transition:
    filter 150ms ease,
    transform 150ms ease;
}

.inventory-form > button:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.toolbar {
  margin-top: 12px;
}

.secondary-button {
  width: 100%;
  border: 1px solid var(--line-hot);
  border-radius: 16px;
  background: rgba(217, 70, 239, 0.08);
  color: #f6ddff;
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 750;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: rgba(251, 113, 133, 0.56);
  background: rgba(251, 113, 133, 0.11);
  color: #ffe4e6;
}

.columns {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.inventory-column {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  padding: 18px;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.column-header h2 {
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 800;
}

.column-header h2.stock-heading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.column-header h2.stock-heading-in {
  border: 1px solid rgba(34, 197, 94, 0.88);
  background: rgba(34, 197, 94, 0.18);
  color: #ffffff;
  box-shadow:
    0 0 18px rgba(34, 197, 94, 0.42),
    inset 0 0 12px rgba(34, 197, 94, 0.14);
  text-shadow: 0 0 8px rgba(134, 239, 172, 0.58);
}

.column-header h2.stock-heading-out {
  border: 1px solid rgba(255, 36, 84, 0.82);
  background: rgba(255, 36, 84, 0.18);
  color: #ffffff;
  box-shadow:
    0 0 16px rgba(255, 36, 84, 0.32),
    inset 0 0 12px rgba(255, 36, 84, 0.1);
  text-shadow: 0 0 8px rgba(255, 77, 109, 0.65);
}

.count-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 4px 16px;
  font-size: 0.875rem;
  font-weight: 700;
}

.inventory-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.inventory-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(221, 185, 255, 0.1);
  border-radius: 16px;
  background: rgba(13, 4, 24, 0.7);
  padding: 12px 16px;
}

.item-details {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 8px;
}

.item-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.item-name {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.2;
}

.inventory-item.is-out .item-name {
  color: var(--text);
  text-decoration: line-through;
}

.item-name .pill-icon {
  color: var(--text);
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.category-pill,
.color-pill,
.quantity-pill,
.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.pill-icon {
  font-size: 0.68rem;
}

.category-pill {
  border: 1px solid rgba(221, 185, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.quantity-pill,
.color-pill,
.season-pill {
  border: 1px solid rgba(221, 185, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.quantity-pill {
  border-color: rgba(134, 239, 172, 0.34);
  background: rgba(34, 197, 94, 0.13);
  color: var(--green);
}

.season-pill-spring {
  border-color: rgba(134, 239, 172, 0.28);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.season-pill-summer {
  border-color: rgba(253, 224, 71, 0.32);
  background: rgba(250, 204, 21, 0.13);
  color: #fef08a;
}

.season-pill-fall {
  border-color: rgba(251, 146, 60, 0.34);
  background: rgba(251, 146, 60, 0.14);
  color: #fed7aa;
}

.season-pill-winter {
  border-color: rgba(147, 197, 253, 0.34);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

.season-pill-none {
  border-color: rgba(203, 213, 225, 0.24);
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}

.color-pill-red {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.color-pill-pink {
  border-color: rgba(244, 114, 182, 0.34);
  background: rgba(244, 114, 182, 0.14);
  color: #fbcfe8;
}

.color-pill-orange {
  border-color: rgba(251, 146, 60, 0.34);
  background: rgba(251, 146, 60, 0.14);
  color: #fed7aa;
}

.color-pill-yellow {
  border-color: rgba(253, 224, 71, 0.34);
  background: rgba(250, 204, 21, 0.12);
  color: #fef08a;
}

.color-pill-green {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.13);
  color: #bbf7d0;
}

.color-pill-blue {
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

.color-pill-violet {
  border-color: rgba(139, 92, 246, 0.38);
  background: rgba(139, 92, 246, 0.16);
  color: #ddd6fe;
}

.color-pill-white {
  border-color: rgba(248, 250, 252, 0.32);
  background: rgba(248, 250, 252, 0.1);
  color: #f8fafc;
}

.color-pill-black {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.7);
  color: #ffffff;
}

.color-pill-grey {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
}

.color-pill-cream {
  border-color: rgba(254, 243, 199, 0.34);
  background: rgba(254, 243, 199, 0.12);
  color: #fde68a;
}

.status-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(221, 185, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.status-button:hover {
  border-color: rgba(217, 70, 239, 0.65);
}

.inventory-item:not(.is-out) .status-button {
  border-color: rgba(134, 239, 172, 0.82);
  background: rgba(34, 197, 94, 0.16);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.2);
}

.inventory-item.is-out .status-button {
  border-color: rgba(255, 36, 84, 0.9);
  background: rgba(255, 36, 84, 0.2);
  color: #ffffff;
  box-shadow:
    0 0 22px rgba(255, 36, 84, 0.5),
    0 0 8px rgba(255, 36, 84, 0.42),
    inset 0 0 14px rgba(255, 36, 84, 0.16);
}

.delete-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  padding: 0;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.delete-button:hover,
.delete-button:focus-visible {
  border-color: rgba(251, 113, 133, 0.36);
  background: rgba(251, 113, 133, 0.12);
  color: var(--red);
}

.delete-icon,
.check-icon {
  width: 16px;
  height: 16px;
}

.empty-state {
  border: 1px dashed rgba(221, 185, 255, 0.16);
  border-radius: 12px;
  background: rgba(13, 4, 24, 0.72);
  color: var(--dim);
  padding: 20px 14px;
  text-align: center;
  font-size: 0.875rem;
}

.footer {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.footer p + p {
  margin-top: 6px;
  color: var(--dim);
  font-size: 0.75rem;
}

.heart {
  display: inline-block;
  color: #ff8aa1;
  animation: heart-beat 1.25s ease-in-out infinite;
}

@keyframes heart-beat {
  0%,
  42%,
  100% {
    transform: scale(1);
  }

  18% {
    transform: scale(1.22);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 679px) {
  .page {
    align-items: start;
    padding: 10px;
  }

  .inventory-board {
    border-radius: 20px;
    padding: 16px;
    overflow: hidden;
  }

  .inventory-board::before {
    border-radius: 22px;
    filter: blur(28px);
  }

  .settings-menu {
    top: 12px;
    right: 12px;
  }

  .settings-button {
    width: 38px;
    height: 38px;
  }

  .board-header {
    gap: 14px;
    padding-right: 44px;
  }

  h1 {
    font-size: clamp(1.72rem, 8.4vw, 2.1rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .intro {
    margin-top: 7px;
    font-size: 0.86rem;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .stat {
    min-width: 0;
    border-radius: 12px;
    padding: 10px 6px;
  }

  .stat-label {
    font-size: 0.58rem;
    letter-spacing: 0.18em;
  }

  .stat strong {
    margin-top: 4px;
    font-size: 1.22rem;
  }

  .progress-area,
  .category-overview {
    margin-top: 14px;
    border-radius: 14px;
    padding: 13px;
  }

  .progress-area {
    gap: 12px;
  }

  .progress-area p {
    font-size: 1.15rem;
  }

  .progress-track {
    height: 7px;
  }

  .category-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .category-chip {
    min-height: 72px;
    padding: 10px;
  }

  .category-chip-title {
    align-items: flex-start;
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .inventory-form {
    gap: 10px;
    margin-top: 14px;
  }

  .inventory-form input,
  .inventory-form select,
  .custom-select-button,
  .inventory-form > button,
  .secondary-button {
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 13px;
  }

  .custom-select-options {
    max-height: min(280px, 48vh);
  }

  .toolbar {
    margin-top: 10px;
  }

  .columns {
    gap: 14px;
    margin-top: 18px;
  }

  .inventory-column {
    border-radius: 14px;
    padding: 14px;
  }

  .column-header {
    gap: 10px;
  }

  .count-pill {
    padding-inline: 12px;
  }

  .inventory-list {
    gap: 10px;
    margin-top: 14px;
  }

  .inventory-item {
    align-items: flex-start;
    gap: 10px;
    border-radius: 14px;
    padding: 12px;
  }

  .status-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .item-meta {
    gap: 6px;
  }

  .item-topline {
    gap: 6px;
  }

  .category-pill,
  .color-pill,
  .quantity-pill,
  .season-pill {
    padding: 3px 8px;
    font-size: 0.68rem;
  }

  .delete-button {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .empty-state {
    padding: 18px 12px;
  }

  .footer {
    margin-top: 18px;
    font-size: 0.8rem;
  }

  .settings-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .settings-window {
    gap: 15px;
    padding: 18px;
  }

  .settings-window-header {
    gap: 12px;
  }

  .settings-toggle-row {
    gap: 10px;
    padding: 9px 10px;
  }

  .settings-action-button {
    min-height: 44px;
  }

  .refill-dialog {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .refill-dialog.is-minimized {
    width: min(230px, calc(100vw - 20px));
  }

  .refill-window {
    padding: 16px;
  }
}

@media (max-width: 380px) {
  .inventory-board {
    padding: 14px;
  }

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

  .stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding-inline: 12px;
  }

  .stat strong {
    margin-top: 0;
  }

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

@media (min-width: 680px) {
  .page {
    padding-inline: 24px;
  }

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

  .inventory-form {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(92px, 0.45fr);
    align-items: stretch;
  }
}

@media (min-width: 768px) {
  .board-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .stats {
    width: auto;
  }

  .stat {
    min-width: 136px;
  }

  .progress-area {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .progress-track {
    width: 50%;
  }
}

@media (min-width: 1024px) {
  .page {
    padding-inline: 32px;
  }

  .inventory-form {
    grid-template-columns:
      minmax(150px, 1fr)
      minmax(132px, 0.62fr)
      minmax(170px, 0.95fr)
      minmax(124px, 0.42fr)
      minmax(126px, 0.5fr)
      minmax(150px, 0.56fr)
      auto;
  }

  .inventory-form.color-hidden {
    grid-template-columns:
      minmax(190px, 1fr)
      minmax(198px, 0.95fr)
      minmax(124px, 0.42fr)
      minmax(126px, 0.5fr)
      minmax(150px, 0.56fr)
      auto;
  }

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

@media (min-width: 1024px) and (max-height: 820px) {
  .page {
    padding-block: 12px;
  }

  .inventory-board {
    border-radius: 24px;
    padding: 18px 24px;
  }

  .inventory-board::before {
    border-radius: 26px;
    filter: blur(34px);
  }

  .board-header {
    gap: 14px;
    padding-right: 54px;
  }

  h1 {
    font-size: 2rem;
  }

  .intro {
    margin-top: 6px;
    font-size: 0.86rem;
  }

  .stat {
    min-width: 128px;
    padding: 10px 12px;
  }

  .stat-label {
    font-size: 0.67rem;
  }

  .stat strong {
    font-size: 1.35rem;
  }

  .progress-area,
  .category-overview {
    margin-top: 14px;
    padding: 12px 14px;
  }

  .progress-area p {
    font-size: 1.18rem;
  }

  .category-header p {
    display: none;
  }

  .category-summary {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 7px;
  }

  .category-chip {
    min-height: 52px;
    padding: 8px 9px;
  }

  .category-chip-title {
    font-size: 0.66rem;
  }

  .category-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    font-size: 0.8rem;
  }

  .category-chip strong {
    font-size: 1rem;
    margin-top: 3px;
  }

  .category-chip em {
    font-size: 0.66rem;
  }

  .inventory-form {
    margin-top: 14px;
    gap: 10px;
  }

  .inventory-form input,
  .inventory-form select,
  .custom-select-button,
  .inventory-form > button,
  .secondary-button {
    min-height: 38px;
    padding-block: 8px;
  }

  .toolbar {
    margin-top: 10px;
  }

  .columns {
    gap: 16px;
    margin-top: 18px;
  }

  .inventory-column {
    padding: 14px;
  }

  .inventory-list {
    margin-top: 14px;
  }

  .empty-state {
    padding-block: 16px;
  }

  .footer {
    margin-top: 16px;
  }

  .footer p + p {
    margin-top: 4px;
  }
}
