@import url('https://fonts.googleapis.com/css2?family=Staatliches&family=Space+Grotesk:wght@400;600&display=swap');

html {
  interpolate-size: allow-keywords;
}

:root {
  --bg: #101214;
  --bg-soft: #1a1d20;
  --card: #1d2024;
  --accent: #f29d38;
  --accent-2: #db3a34;
  --text: #f4f4f0;
  --muted: #9a9fa6;
  --line: #2a2f35;
}

* {
  box-sizing: border-box;
}

/* Hide default browser number input arrows globally */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  background: radial-gradient(circle at top, #242933, #0f1113 60%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

.hero {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: linear-gradient(120deg, rgba(242, 157, 56, 0.1), rgba(219, 58, 52, 0.15));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  margin-bottom: 16px;
  animation: floatIn 0.6s ease;
  position: relative;
  overflow: hidden;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero[style*="--hero-bg-img"]::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 65%;
  background-image: var(--hero-bg-img);
  background-size: cover;
  background-position: right center;
  -webkit-mask-image: linear-gradient(to right, transparent, black);
  mask-image: linear-gradient(to right, transparent, black);
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

.hero h1 {
  font-family: 'Staatliches', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 8px;
  letter-spacing: 1px;
}

.hero__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  color: var(--accent);
}

.hero__eyebrow-link {
  color: inherit;
  text-decoration: none;
}

.hero__eyebrow-link:hover {
  text-decoration: underline;
}

.hero__sub {
  margin: 0;
  color: var(--muted);
}

.cart-btn {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: #111;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.icon {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}

.modal-close {
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cart-btn__count {
  background: #111;
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

.cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(242, 157, 56, 0.25);
}

.cart-btn:active {
  transform: translateY(0);
}

.section-title h2 {
  margin: 0;
  font-size: 1.6rem;
  margin-top: 16px;
  margin-bottom: 10px;
}

.section-title__row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.section-title__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.section-title p {
  margin: 6px 0 20px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

@media (min-width: 992px) {
  .grid--1 { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  
  .grid--5 {
    grid-template-columns: repeat(6, 1fr);
  }
  .grid--5 > * { grid-column: span 2; }
  .grid--5 > *:nth-child(n+4) { grid-column: span 3; }
  
  .grid--6 { grid-template-columns: repeat(3, 1fr); }
  
  .grid--7 {
    grid-template-columns: repeat(6, 1fr);
  }
  .grid--7 > * { grid-column: span 2; }
  .grid--7 > *:nth-child(n+4) { grid-column: span 3; }
  
  .grid--8 {
    grid-template-columns: repeat(6, 1fr);
  }
  .grid--8 > * { grid-column: span 2; }
  .grid--8 > *:nth-child(n+7) { grid-column: span 3; }
  
  .grid--9 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  z-index: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card[style*="--card-bg-img"] {
  background: linear-gradient(rgba(29, 32, 36, 0.75), rgba(29, 32, 36, 0.8)), var(--card-bg-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card--compact {
  min-height: 170px;
  gap: 8px;
}

.card--auto-height {
  min-height: auto !important;
}

.access-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.access-pill--all {
  background: rgba(126, 193, 109, 0.2);
  color: #9adf8c;
  border: 1px solid rgba(126, 193, 109, 0.45);
}

.access-pill--neo {
  background: rgba(232, 196, 85, 0.2);
  color: #f0d46a;
  border: 1px solid rgba(232, 196, 85, 0.45);
}

.access-pill--of {
  background: rgba(232, 94, 94, 0.2);
  color: #f08a8a;
  border: 1px solid rgba(232, 94, 94, 0.45);
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(242, 157, 56, 0.1), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card__meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.card button {
  margin-top: auto;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: #111;
  border: none;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: transform 0.25s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}

.cart-fab__count {
  background: #111;
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

.cart-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(242, 157, 56, 0.3);
}

.cart-fab--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cart-fab--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.card__link,
.card__placeholder {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
}

.card__link {
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.card__link:hover {
  background: rgba(242, 157, 56, 0.15);
}

.card__placeholder {
  border: 1px dashed var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.card button:hover {
  background: rgba(242, 157, 56, 0.15);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 157, 56, 0.5);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.card__link:hover,
.card button:hover {
  box-shadow: 0 10px 18px rgba(242, 157, 56, 0.2);
}

.cart {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 95vw);
  background: #121418;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.cart.open {
  transform: translateX(0);
}

.cart__header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.cart__body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: none;
}

.cart__footer {
  padding: 16px 18px 20px;
  border-top: 1px solid var(--line);
}

.cart-submit {
  width: 100%;
  justify-content: center;
}

.cart__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cart-item h4 {
  margin: 0 0 6px;
}

.cart-item small {
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.cart-item:hover {
  transform: translateX(-4px);
  border-color: rgba(242, 157, 56, 0.35);
}

.cart__totals {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.inventory-toggle {
  margin-top: 12px;
  width: 100%;
  text-align: center;
}

.total-section {
  background: rgba(18, 20, 24, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.total-section h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.total-section + .total-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.total-line + .total-line {
  margin-top: 6px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.total-line strong {
  color: var(--text);
}

.total-line span {
  color: var(--accent);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 30;
}

.modal.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.open .modal__backdrop {
  opacity: 1;
}

.modal__panel {
  position: relative;
  max-width: 520px;
  margin: 10vh auto;
  background: #15181d;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;
}

.modal__body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal__panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal__panel--wide {
  max-width: 780px;
}

.modal.open .modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal__body {
  display: grid;
  gap: 16px;
}

.order-message {
  width: 100%;
  min-height: 320px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  padding: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

.order-message:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(18, 20, 24, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.inventory-list {
  background: rgba(18, 20, 24, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.inventory-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 17, 20, 0.7);
}

.inventory-row strong {
  color: var(--text);
  flex: 1;
}

.inventory-value {
  color: var(--accent);
  font-weight: 700;
  min-width: 90px;
  text-align: right;
}

.inventory-input {
  width: 100%;
  max-width: 120px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inventory-input:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

.inventory-section {
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.attachments-only-btn {
  white-space: nowrap;
}

.attachments-only-list {
  display: grid;
  gap: 12px;
}

.attachments-only-weapon {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 20, 24, 0.5);
  overflow: hidden;
}

.attachments-only-toggle {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  cursor: pointer;
}

.attachments-only-toggle::after {
  content: "+";
  color: var(--accent);
  font-weight: 700;
}

.attachments-only-weapon.open .attachments-only-toggle::after {
  content: "-";
}

.attachments-only-items {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  gap: 10px;
}

.attachments-only-weapon.open .attachments-only-items {
  display: grid;
}

.attachments-only-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 17, 20, 0.7);
}

.attachment-only-name {
  color: var(--text);
  font-weight: 600;
}

.qty-control--compact {
  grid-template-columns: 36px 80px 36px;
}

.attachment-only-input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

.attachment-only-input[type="number"]:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

.ammo-only-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15, 17, 20, 0.7);
}

.ammo-only-name {
  color: var(--text);
  font-weight: 600;
}

.attachments {
  display: grid;
  gap: 10px;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 10px;
}

.attachment input {
  accent-color: var(--accent);
}

.modal__qty {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qty-note {
  color: var(--muted);
  font-size: 0.75rem;
}

.qty-divider {
  height: 1px;
  background: var(--line);
}

.qty-control {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}

.qty-btn {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.modal__qty input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  min-width: 0;
}

.modal__footer {
  margin-top: 18px;
  text-align: right;
}

.primary {
  background: var(--accent);
  color: #111;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.muted {
  color: var(--muted);
  margin: 0 0 10px;
}

.drug-alert {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(242, 157, 56, 0.24);
  background: rgba(242, 157, 56, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.drug-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

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

.drug-card__rule {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(219, 58, 52, 0.14);
  border: 1px solid rgba(219, 58, 52, 0.3);
  color: #ffb3ad;
  font-size: 0.82rem;
  font-weight: 700;
}

.drug-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drug-card__fact {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 17, 20, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.drug-card__recipe {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 20, 24, 0.55);
}

.drug-card__recipe strong {
  display: block;
  margin-bottom: 10px;
}

.drug-card__recipe ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.drug-card__cta {
  width: 100%;
  justify-content: center;
}

.drug-card--placeholder {
  opacity: 0.8;
}

.drug-card--placeholder .drug-card__rule {
  background: rgba(154, 159, 166, 0.14);
  border-color: rgba(154, 159, 166, 0.28);
  color: var(--muted);
}

.drug-card__coming-soon {
  width: 100%;
}

.drug-modal__stats {
  display: grid;
  gap: 10px;
}

.drug-modal__stat {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 20, 24, 0.55);
}

.drug-modal__stat strong {
  display: block;
  margin-bottom: 4px;
}

.drug-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.drug-helper.is-invalid {
  color: #ffb3ad;
}

.input-invalid {
  border-color: rgba(219, 58, 52, 0.8) !important;
  box-shadow: 0 0 0 2px rgba(219, 58, 52, 0.18);
}

@media (max-width: 768px) {
  .drug-alert {
    white-space: normal;
    text-align: center;
  }

  .drug-card__facts {
    flex-direction: column;
  }
}

.qty-btn:hover,
.ghost:hover {
  border-color: rgba(242, 157, 56, 0.45);
  transform: translateY(-1px);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(242, 157, 56, 0.25);
}

.modal__qty input:focus {
  outline: none;
  border-color: rgba(242, 157, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 157, 56, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-title__row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .section-title__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
  }

  .cart-btn {
    align-self: stretch;
    justify-content: space-between;
  }

  .attachments-only-btn {
    width: auto;
    font-size: 0.78rem;
    padding: 6px 8px;
    white-space: nowrap;
  }

  .card {
    min-height: 180px;
    gap: 8px;
    padding: 14px;
  }

  .card__meta {
    margin-bottom: 0;
  }

  .cart-fab {
    left: 16px;
    right: 16px;
    bottom: 14px;
    justify-content: space-between;
  }

  .page {
    padding-bottom: 90px;
  }

  .modal__panel {
    margin: 10vh 16px;
  }

  .inventory-row {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .inventory-value,
  .inventory-input {
    min-width: 100%;
    max-width: 100%;
    text-align: left;
  }

  .inventory-row strong,
  .inventory-value {
    min-width: auto;
    width: auto;
  }

  .inventory-input {
    margin-top: 6px;
    text-align: center;
  }

  .qty-control--compact {
    grid-template-columns: 32px 56px 32px;
  }

  .attachments-only-item,
  .ammo-only-item {
    gap: 8px;
  }
}

/* Navbar */
.navbar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 0;
  margin-bottom: 5px;
  position: relative;
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
  width: 32px;
}

.navbar__brand {
  font-family: 'Staatliches', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--accent);
  margin-right: 32px;
  display: flex
}

.navbar__menu {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}

.navbar__menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.navbar__menu a:hover,
.navbar__menu a.active {
  color: var(--text);
}

.navbar__item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  min-width: 180px;
    display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar__item:hover .navbar__dropdown {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.dropdown-link {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: rgba(242, 157, 56, 0.1);
  color: var(--accent);
}

.dropdown-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar__user {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.navbar__user:hover {
  text-decoration: underline;
}

.navbar__logout {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

  /* Hamburger Animation */
  .navbar__toggle svg {
    transition: transform 0.3s ease;
  }
  
  .navbar__toggle.active svg line {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
  }
  
  /* We will handle the SVG path change via JS or CSS class logic, 
     but a simple rotation/opacity trick works well for standard hamburger SVGs.
     However, since the SVG is inline, we might need to swap the path or animate lines.
     Let's use a class-based transform approach in JS to swap the icon or animate it.
  */

.mobile-only {
  display: none;
}

.mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: calc(100vh - 60px);
  background: #121418;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  border-top: 1px solid var(--line);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu__content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-link {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(242, 157, 56, 0.1);
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  .navbar__toggle { display: block; }
  
  .navbar__brand {
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

.navbar-badge {
  position: absolute;
  top: -6px;
  right: -12px;
  background-color: var(--accent-2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-soft);
}

.navbar-badge--mobile {
  position: static;
  margin-left: auto;
  border: none;
}

/* Login */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h1 {
  font-family: 'Staatliches', sans-serif;
  margin: 0 0 8px;
  color: var(--accent);
}

.login-header p {
  color: var(--muted);
  margin: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-btn {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}

.flash-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.flash-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.flash-message {
  background: #15181d;
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  text-align: center;
  max-width: 90%;
  width: 400px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.flash-overlay.visible .flash-message {
  transform: scale(1);
}

.flash-message.success {
  border-color: rgba(126, 193, 109, 0.5);
  color: #9adf8c;
  background: radial-gradient(circle at center, rgba(126, 193, 109, 0.1), #15181d 80%);
}

.flash-message.error {
  border-color: rgba(219, 58, 52, 0.5);
  color: #ff8a85;
  background: radial-gradient(circle at center, rgba(219, 58, 52, 0.1), #15181d 80%);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 20, 0.85);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(242, 157, 56, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0;
  text-align: center;
  animation: pulse 1.5s infinite ease-in-out;
}

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

/* Forms */
.form-row {
  display: flex;
  gap: 16px;
  }
  
  .form-row .form-group {
    flex: 1;
    min-width: 0;
}

  @media (max-width: 600px) {
    .form-row {
      flex-direction: column;
      gap: 12px;
    }
    .task-item-row {
      flex-direction: row !important;
    }
  }

.modal__panel--meeting {
  max-width: 760px;
}

.meeting-datetime-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.meeting-datetime-row input[type="datetime-local"] {
  min-width: 0;
}

@media (max-width: 720px) {
  .meeting-datetime-row {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 768px) {
  .data-table th, .data-table td {
    padding: 10px 8px;
  }
}

.data-table th {
  background: rgba(18, 20, 24, 0.5);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge--success {
  background: rgba(126, 193, 109, 0.15);
  color: #9adf8c;
  border: 1px solid rgba(126, 193, 109, 0.3);
}

.badge--error {
  background: rgba(219, 58, 52, 0.15);
  color: #ff8a85;
  border: 1px solid rgba(219, 58, 52, 0.3);
}

.badge--warning {
  background: rgba(232, 196, 85, 0.15);
  color: #f0d46a;
  border: 1px solid rgba(232, 196, 85, 0.3);
}

.badge--neutral {
  background: rgba(163, 206, 142, 0.15);
  color: rgb(163, 206, 142);
  border: 1px solid rgba(154, 159, 166, 0.3);
}

.badge--orange {
  background: rgba(242, 157, 56, 0.15);
  color: #f29d38;
  border: 1px solid rgba(242, 157, 56, 0.3);
}

.link-icon {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.link-icon:hover {
  text-decoration: underline;
}

.btn-small {
  padding: 6px 8px !important;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 600;
}

.btn-success {
  background: rgba(126, 193, 109, 0.2) !important;
  color: #9adf8c !important;
  border-color: rgba(126, 193, 109, 0.4) !important;
}

.btn-danger {
  background: rgba(219, 58, 52, 0.2) !important;
  color: #ff8a85 !important;
  border-color: rgba(219, 58, 52, 0.4) !important;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination__link:hover,
.pagination__link.active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

.pagination__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  font-weight: 700;
}

/* Custom File Input */
.file-drop-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 24px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: #0f1114;
  transition: 0.2s;
  text-align: center;
  cursor: pointer;
}

.file-drop-area.highlight {
  border-color: var(--accent);
  background: rgba(242, 157, 56, 0.05);
}

.file-drop-area.filled {
  border-color: #9adf8c;
  border-style: solid;
}

.file-msg {
  font-size: 0.9rem;
  color: var(--muted);
  pointer-events: none;
}

.file-input {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Password Toggle */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.password-toggle:hover,
.password-toggle.active {
  color: var(--accent);
}

/* Color Picker */
.color-picker-wrapper {
  position: relative;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1114;
  overflow: hidden;
}

.color-input {
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  cursor: pointer;
  opacity: 0;
}

.color-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-weight: 600;
  color: var(--text);
  pointer-events: none;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.draggable-row {
  cursor: grab;
}

.draggable-row:active {
  cursor: grabbing;
}

.fixed-row {
  background: rgba(242, 157, 56, 0.05);
}

@media (max-width: 768px) {
  .mobile-scroll-x {
    overflow-x: auto;
  }
}

.input-wrapper {
  position: relative;
}

.input-action-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  background: none;
  border: none;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.input-action-btn:hover {
  color: var(--accent);
}

/* Progress Bar */
.progress-bar-container {
  position: relative;
  width: clamp(220px, 40vw, 500px);
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar__track {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.progress-bar__fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.progress-bar__fill.positive {
  background: #9adf8c;
  left: var(--separator-pos, 25%);
}

.progress-bar__fill.negative {
  background: var(--accent-2);
  right: calc(100% - var(--separator-pos, 25%));
}

.progress-bar__separator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    transparent,
    transparent 2px,
    var(--muted) 2px,
    var(--muted) 4px
  );
}

.progress-bar__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  color: #111;
}
.progress-bar__icon.success { color: #12290e; }
.progress-bar__icon.danger { color: #de5955; }

.progress-bar__label {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 80px;
  text-align: left;
}

/* Points Modal */
.points-section h4 {
  margin: 0 0 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.points-list {
  display: grid;
  gap: 10px;
}

.points-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-soft);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.points-item__label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
}

.points-item__label input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

/* Dynamic Point Rows */
.point-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.point-row select {
  flex: 1;
  min-width: 0;
}

.btn-delete-row {
  color: var(--accent-2);
  border-color: var(--line);
  padding: 0;
  width: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Filter Bar */
.filter-bar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.filter-group label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.cart-user-group {
  background: #1a1d20;
  padding: 5px;
  border-radius: 10px;
  overflow: hidden;
  transition: height 0.3s ease-out;
}

.cart-user-group:not([open]) {
  height: 46px;
}

.cart-user-group:not([open]):hover {
  background: #2b3035;
}

.cart-user-group[open] {
  height: auto;
}

.resource-armory-hero-btns {
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
  align-items: flex-end;
}

@media (max-width: 768px) {
  .filter-actions {
    margin-left: 0;
    margin-top: 8px;
    order: 3; 
  }
  .resource-armory-hero-btns {
  flex-direction: row; 
  }
  .filter-actions button {
    flex: 1;
  }
  #filter-status-group {
    order: 2;
  }
  #filter-managed-by {
    order: 2;
  }
  .meeting-card {
    justify-content: flex-end !important; 
}
}

/* Toggle Switch */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  user-select: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-soft);
  border: 1px solid var(--line);
  transition: .3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--muted);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--accent);
  border-color: var(--accent);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
  background-color: #111;
}

input:disabled + .toggle-slider {
  background-color: #353a3e;
  border-color: var(--line);
  cursor: not-allowed;
  opacity: 0.5;
}

input:disabled + .toggle-slider:before {
  background-color: #757a82;
}

.member-row.nolonger {
  display: none;
}

.show-old-members .member-row.nolonger {
  display: table-row;
  background: rgba(219, 58, 52, 0.05);
}

.role-section.only-old-members {
  display: none;
}

.show-old-members .role-section.only-old-members {
  display: block;
}

.custom-tooltip {
  position: fixed;
  background: #1a1d20;
  color: #f4f4f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 9999;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.custom-tooltip.visible {
  opacity: 1;
}

/* Filter Panel (Details) */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}

.filter-summary {
  padding: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.filter-summary::-webkit-details-marker {
  display: none;
}

.filter-panel .filter-bar {
  margin: 0;
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg-soft);
  box-shadow: none;
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--accent-2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 99px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border: 2px solid var(--card);
}

.table-buttons-row {
  display: flex; 
  justify-content: flex-end; 
  gap: 3px;
}

.participant-points {
  color: #9adf8c;
}

.meeting-card {
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start; 
  flex-wrap: wrap; 
  gap: 20px;
}

.meeting-alert-card {
  grid-column: 1 / -1;
  background: linear-gradient(to right, rgba(242, 157, 56, 0.1), rgba(30, 30, 30, 0.5));
  border: 1px solid var(--accent);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: auto;
  padding: 16px 24px;
}

.meeting-alert-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--accent);
}

.meeting-alert-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.meeting-alert-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 600px) {
  .meeting-alert-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .meeting-alert-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Timeline */
.timeline-container {
  --timeline-user-col-width: 150px;
  width: 100%;
  overflow-x: auto;
  position: relative;
  background: var(--card);
}

.timeline-header {
  display: flex;
  width: max-content;
  min-width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 20, 24, 0.5);
  position: sticky;
  top: 0;
  z-index: 2;
}

.timeline-body {
  position: relative;
  width: max-content;
  min-width: 100%;
}

.timeline-user-col {
  width: var(--timeline-user-col-width);
  min-width: var(--timeline-user-col-width);
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  left: 0;
  z-index: 3;
  font-weight: 700;
}

.timeline-track-col {
  flex: 1;
  min-width: 600px; /* Ensure scroll on mobile */
  display: flex;
  position: relative;
}

.timeline-day {
  flex: 1;
  padding: 8px;
  text-align: center;
  border-right: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.timeline-row {
  display: flex;
  width: max-content;
  min-width: 100%;
  border-bottom: 1px solid var(--line);
}

.timeline-day-grid {
  flex: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-block {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: rgba(219, 58, 52, 0.6);
  border-radius: 4px;
  border: 1px solid rgba(219, 58, 52, 0.8);
}

.current-time-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  z-index: 1;
  pointer-events: none;
}

/* Tasks */
.tasks-grid {
  display: grid;
  gap: 16px;
}

.task-card {
  border-left: 4px solid var(--accent);
  padding: 14px;
  gap: 0;
  min-height: auto;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.task-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  gap: 5px;
  align-items: center;
}

.task-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.task-members-details {
  background: var(--bg-soft);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.task-members-summary {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-members-list {
  padding: 0 14px;
  border-top: 1px solid var(--line);
}

.task-member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.task-member-row:last-child {
  border-bottom: none;
}

.member-info {
  display: flex;
  flex-direction: column;
}

.status-text {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-text.success { color: #9adf8c; }
.status-text.warning { color: #f0d46a; }
.status-text.error { color: #ff8a85; }

.member-actions {
  display: flex;
  gap: 6px;
}

.btn-icon-action {
  height: 32px;
  width: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
  padding: 0 !important;
}

.btn-icon-action svg {
  width: 16px;
  height: 16px;
}

.btn-icon-action.success:hover { color: #9adf8c; border-color: #9adf8c; background: rgba(154, 223, 140, 0.1); }
.btn-icon-action.warning:hover { color: #f0d46a; border-color: #f0d46a; background: rgba(240, 212, 106, 0.1); }
.btn-icon-action.error:hover { color: #ff8a85; border-color: #ff8a85; background: rgba(255, 138, 133, 0.1); }

/* Role Dropdown */
.role-summary {
  list-style: none;
}
.role-summary::-webkit-details-marker {
  display: none;
}
.role-group[open] .chevron {
  transform: rotate(180deg);
}
.chevron { transition: transform 0.2s; }

/* Notifications */
.notification-bell-wrapper {
  position: relative;
}

.navbar__action-btn {
  color: var(--muted);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 50%;
  transition: background 0.2s;
}

.navbar__action-btn:hover {
  color: var(--text);
}

.notification-dropdown {
  position: absolute;
  top: 70%;
  right: 0;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
  z-index: 1000;
  overflow: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-bell-wrapper:hover .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown__header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.notification-dropdown__footer {
  display: block;
  padding: 10px;
  text-align: center;
  background: var(--bg-soft);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  justify-content: space-between;
}

.notification-item:hover {
  background: var(--bg-soft);
}

.notification-item.unread {
  background: rgba(242, 157, 56, 0.05);
  border-left: 3px solid var(--accent);
}

.notification-content p {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}

.navbar-badge-closer {
  top: -2px;
  right: -7px;
}

.notification-actions {
  display: flex;
}

  /* Details/Summary Animation */
  details > summary {
    list-style: none;
  }
  details > summary::-webkit-details-marker {
    display: none;
  }
  
  details {
    transition: height 0.3s ease-out;
    overflow: hidden;
  }
  
  details[open] summary ~ * {
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

/* Wiki */
.wiki-glossary-card {
  padding: 14px;
}

.wiki-glossary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wiki-pane {
  border: 1px solid var(--line);
  background: rgba(15, 17, 20, 0.7);
  border-radius: 14px;
  padding: 12px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.wiki-pane__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.wiki-pane__header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.wiki-pane__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wiki-article-card {
  gap: 0px !important;
}

.wiki-pane__actions button:disabled,
.wiki-article-card__actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: saturate(0.6);
}

.wiki-list {
  display: grid;
  gap: 8px;
  align-content: flex-start;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: none;
}

.wiki-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.wiki-list-item {
  border: 1px solid var(--line);
  background: rgba(20, 23, 27, 0.85);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wiki-list-item:hover {
  border-color: var(--accent);
}

.wiki-list-item.active {
  border-color: var(--accent);
  background: rgba(242, 157, 56, 0.14);
}

.wiki-list-item.deleted {
  border-color: rgba(219, 58, 52, 0.6);
  color: #ffb3b0;
  background: rgba(219, 58, 52, 0.1);
}

.wiki-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.wiki-item-badge {
  font-size: 0.7rem;
  color: #ffd2d0;
  border: 1px solid rgba(219, 58, 52, 0.6);
  border-radius: 999px;
  padding: 1px 8px;
}

.wiki-item-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
}

.wiki-article-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.wiki-article-card__header h2 {
  margin: 0 0 5px;
}

.wiki-article-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.wiki-rendered-content {
  line-height: 1.65;
  color: #e9e9e6;
  overflow-wrap: anywhere;
}

.wiki-rendered-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  cursor: zoom-in;
}

.wiki-rendered-content .wiki-embed-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  resize: none !important;
  margin: 12px 0;
}

.wiki-rendered-content .wiki-embed-shell iframe,
.wiki-rendered-content .wiki-embed-shell video,
.wiki-rendered-content .wiki-embed-shell embed,
.wiki-rendered-content .wiki-embed-shell object {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.wiki-rendered-content .wiki-embed-shell .wiki-embed-payload {
  display: none !important;
}

.wiki-rendered-content pre,
.wiki-rendered-content code {
  background: #0f1114;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.wiki-rendered-content pre {
  padding: 10px;
  overflow-x: auto;
}

.wiki-rendered-content table {
  border-collapse: collapse;
  margin: 0;
  width: max-content;
  min-width: 100%;
}

.wiki-rendered-content th,
.wiki-rendered-content td {
  border: 1px solid #916b19;
  padding: 8px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.wiki-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 12px 0;
  scrollbar-width: none;
}

.wiki-table-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.wiki-rendered-content iframe,
.wiki-rendered-content video {
  max-width: 100%;
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

body.wiki-image-viewer-open {
  overflow: hidden;
}

.wiki-image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 13000;
}

.wiki-image-lightbox.open {
  display: block;
}

.wiki-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 11, 0.88);
  backdrop-filter: blur(2px);
}

.wiki-image-lightbox__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 10px;
}

.wiki-image-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wiki-image-lightbox__controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 23, 27, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
}

.wiki-image-lightbox__btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 20, 24, 0.85);
  color: var(--text);
  border-radius: 8px;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  font-weight: 700;
  cursor: pointer;
}

.wiki-image-lightbox__btn:hover {
  border-color: rgba(242, 157, 56, 0.65);
}

.wiki-image-lightbox__btn--close {
  background: rgba(14, 16, 19, 0.92);
}

.wiki-image-lightbox__zoom {
  min-width: 56px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

.wiki-image-lightbox__stage {
  position: relative;
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(4, 5, 6, 0.72);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wiki-image-lightbox__stage.is-dragging {
  cursor: grabbing;
}

.wiki-image-lightbox__image {
  max-width: min(92vw, 1400px);
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  cursor: grab;
  user-select: none;
  touch-action: none;
  border-radius: 10px;
}

.wiki-image-lightbox__hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .wiki-image-lightbox__panel {
    padding: 10px;
  }

  .wiki-image-lightbox__toolbar {
    flex-wrap: wrap;
  }

  .wiki-image-lightbox__image {
    max-width: 96vw;
    max-height: 68vh;
  }
}

.wiki-history-list {
  display: grid;
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: none;
}

.wiki-history-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.wiki-history-item {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(20, 23, 27, 0.75);
  padding: 10px;
}

.wiki-history-item strong {
  color: var(--text);
}

.wiki-history-item span {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.wiki-history-action.is-create,
.wiki-history-action.is-undelete {
  color: #47d37b;
}

.wiki-history-action.is-edit {
  color: var(--accent);
}

.wiki-history-action.is-delete {
  color: #ff6b6b;
}

.wiki-history-item small {
  color: var(--muted);
}

.wiki-editor-card {
  padding: 14px;
  --wiki-editor-sidebar-width: 390px;
}

.wiki-editor-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wiki-editor-toolbar-btn.is-active {
  border-color: rgba(242, 157, 56, 0.55);
  color: var(--accent);
  background: rgba(242, 157, 56, 0.14);
}

.wiki-editor-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(16, 18, 20, 0.88);
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease;
}

.wiki-editor-boot-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.wiki-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, calc(100% - var(--wiki-editor-sidebar-width))) minmax(300px, var(--wiki-editor-sidebar-width));
  gap: 16px;
}

.wiki-editor-main {
  min-width: 0;
}

.wiki-editor-sidebar {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 17, 20, 0.65);
  padding: 12px;
  min-width: 0;
}

.wiki-editor-sidebar h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.wiki-role-grid {
  display: grid;
  gap: 8px;
}

.wiki-role-option {
  border: 1px solid var(--line);
  background: rgba(20, 23, 27, 0.82);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.wiki-role-option input {
  margin: 0;
}

.wiki-role-option .wiki-role-name {
  color: var(--role-color);
  font-weight: 700;
}

.wiki-role-option small {
  color: var(--muted);
}

.wiki-role-option.disabled {
  opacity: 0.72;
}

.wiki-editor-toolbar-manual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #15191d;
}

.wiki-editor-toolbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1114;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  padding: 0 !important;
}

.wiki-editor-toolbar-btn:hover,
.wiki-editor-toolbar-btn:focus-visible {
  border-color: rgba(242, 157, 56, 0.55);
  background: rgba(242, 157, 56, 0.14);
  color: var(--accent);
  outline: none;
}

.wiki-editor-toolbar-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wiki-editor-toolbar-letter {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}

.wiki-editor-toolbar-letter--italic {
  font-style: italic;
}

.wiki-editor-toolbar-letter--underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wiki-editor-toolbar-letter--strike {
  text-decoration: line-through;
}

.wiki-editor-toolbar-separator {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 2px;
}

.wiki-editor-toolbar-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #1a1d20;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 30;
}

.wiki-editor-toolbar-btn:hover::after,
.wiki-editor-toolbar-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.wiki-table-picker {
  position: absolute;
  z-index: 40;
  display: none;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #15191d;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  padding: 10px;
}

.wiki-table-picker.open {
  display: block;
}

.wiki-table-picker__label {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.wiki-table-picker__grid {
  display: grid;
  grid-template-columns: repeat(8, 18px);
  grid-auto-rows: 18px;
  gap: 4px;
}

.wiki-table-picker__cell {
  width: 18px;
  height: 18px;
  border-radius: 0px !important;
  border: 1px solid var(--line);
  background: #0f1114;
  padding: 0 !important;
  cursor: pointer;
}

.wiki-table-picker__cell.is-active {
  background: rgba(242, 157, 56, 0.32);
  border-color: rgba(242, 157, 56, 0.72);
}

.wiki-editor-card .toastui-editor-defaultUI {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #0f1114;
  position: relative;
  min-height: 400px;
}

.wiki-editor-card .toastui-editor-toolbar {
  display: none !important;
}

.wiki-editor-card .toastui-editor-main,
.wiki-editor-card .toastui-editor-md-container,
.wiki-editor-card .toastui-editor-ww-container,
.wiki-editor-card .toastui-editor-contents,
.wiki-editor-card .toastui-editor-md-preview {
  background: #0f1114 !important;
  color: var(--text) !important;
}

.wiki-editor-card .toastui-editor-ww-container {
  position: relative;
}

.wiki-editor-card .toastui-editor-contents{
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 180px;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  resize: none;
}

.wiki-embed-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 0 !important;
  border: 0 !important;
  overflow: hidden;
  resize: none;
}

.wiki-editor-card .toastui-editor-contents .wiki-embed-shell iframe,
.wiki-editor-card .toastui-editor-contents .wiki-embed-shell video,
.wiki-editor-card .toastui-editor-contents .wiki-embed-shell embed,
.wiki-editor-card .toastui-editor-contents .wiki-embed-shell object {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.wiki-editor-card .toastui-editor-contents .wiki-embed-shell .wiki-embed-payload {
  display: none !important;
}

.wiki-editor-card .toastui-editor-md-container .CodeMirror,
.wiki-editor-card .toastui-editor-md-container .CodeMirror-scroll,
.wiki-editor-card .toastui-editor-md-container .CodeMirror-gutters {
  background: #0f1114 !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}

.wiki-editor-card .toastui-editor-md-container .CodeMirror-scroll,
.wiki-editor-card .toastui-editor-ww-container .toastui-editor-contents,
.wiki-editor-card .toastui-editor-md-preview {
  scrollbar-width: none;
}

.wiki-editor-card .toastui-editor-md-container .CodeMirror-scroll::-webkit-scrollbar,
.wiki-editor-card .toastui-editor-ww-container .toastui-editor-contents::-webkit-scrollbar,
.wiki-editor-card .toastui-editor-md-preview::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.wiki-editor-card .toastui-editor-md-preview-highlight::after {
  background-color: rgba(242, 157, 56, 0.2) !important;
}

.wiki-editor-card .toastui-editor-popup,
.wiki-editor-card .toastui-editor-dropdown-toolbar {
  background: #15191d !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}

.wiki-editor-card .toastui-editor-tooltip {
  background: #1a1d20 !important;
  color: #f4f4f0 !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  border-radius: 6px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

.wiki-editor-card .toastui-editor-popup input,
.wiki-editor-card .toastui-editor-popup textarea,
.wiki-editor-card .toastui-editor-popup label {
  background: #0f1114 !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}

.wiki-editor-card .toastui-editor-mode-switch {
  background: #15191d !important;
  border-top: 1px solid var(--line) !important;
}

.wiki-editor-card .toastui-editor-mode-switch .tab-item {
  color: var(--muted) !important;
}

.wiki-editor-card .toastui-editor-mode-switch .tab-item.active {
  color: var(--accent) !important;
  background: #0f1114 !important;
}

.wiki-editor-page .toastui-editor-full-screen .toastui-editor-toolbar {
  display: none !important;
}

.wiki-editor-page .toastui-editor-full-screen .toastui-editor-defaultUI,
.wiki-editor-page .toastui-editor-full-screen .toastui-editor-main,
.wiki-editor-page .toastui-editor-full-screen .toastui-editor-contents,
.wiki-editor-page .toastui-editor-full-screen .toastui-editor-md-preview,
.wiki-editor-page .toastui-editor-full-screen .toastui-editor-md-container,
.wiki-editor-page .toastui-editor-full-screen .toastui-editor-ww-container {
  background: #0f1114 !important;
  color: var(--text) !important;
}

.wiki-editor-card .toastui-editor-contents,
.wiki-editor-page .toastui-editor-full-screen .toastui-editor-contents,
.wiki-editor-page .toastui-editor-full-screen .toastui-editor-md-preview {
  color: var(--text) !important;
}

.wiki-editor-card .toastui-editor-ww-container .toastui-editor-contents img.wiki-editor-image-selected {
  outline: 2px dashed rgba(242, 157, 56, 0.78);
  outline-offset: 2px;
}

.wiki-editor-card .toastui-editor-ww-container .toastui-editor-contents .wiki-embed-shell.wiki-editor-embed-selected {
  outline: 2px dashed rgba(242, 157, 56, 0.78);
  outline-offset: 2px;
}

.wiki-image-resize-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(242, 157, 56, 0.95);
  border-radius: 999px;
  background: #11151a;
  cursor: nwse-resize;
  box-shadow: 0 0 0 2px rgba(15, 17, 20, 0.95);
  z-index: 20;
  padding: 0;
}

.wiki-embed-resize-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(242, 157, 56, 0.95);
  border-radius: 6px;
  background: #11151a;
  cursor: nwse-resize;
  box-shadow: 0 0 0 2px rgba(15, 17, 20, 0.95);
  z-index: 35;
  padding: 0;
}

.wiki-embed-resize-handle::before {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(242, 157, 56, 0.9);
  border-bottom: 2px solid rgba(242, 157, 56, 0.9);
}

.wiki-editor-resize-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(242, 157, 56, 0.55);
  border-radius: 6px;
  background: rgba(15, 17, 20, 0.9);
  cursor: nwse-resize;
  z-index: 25;
  padding: 0;
}

.wiki-editor-resize-handle::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(242, 157, 56, 0.85);
  border-bottom: 2px solid rgba(242, 157, 56, 0.85);
}

body.wiki-image-resizing,
body.wiki-image-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

body.wiki-embed-resizing,
body.wiki-embed-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

body.wiki-editor-resizing,
body.wiki-editor-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.wiki-editor-card.wiki-editor-card--expanded {
  padding: 14px;
}

.wiki-editor-layout.wiki-editor-layout--expanded {
  grid-template-columns: 1fr;
  gap: 12px;
}

.wiki-editor-layout.wiki-editor-layout--expanded .wiki-editor-main {
  order: 1;
}

.wiki-editor-layout.wiki-editor-layout--expanded .wiki-editor-sidebar {
  order: 2;
}

@media (max-width: 980px) {
  .wiki-glossary {
    grid-template-columns: 1fr;
  }

  .wiki-editor-layout {
    grid-template-columns: 1fr;
  }

  .wiki-editor-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .wiki-pane {
    min-height: 260px;
  }

  .wiki-article-card__header {
    flex-direction: column;
    align-items: stretch;
  }
}

.categories-list {
  overflow-y: auto;
  scrollbar-width: none;
}
