.bar-page {
  padding: 16px;
  border: 1px solid rgba(180, 136, 74, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(rgba(8, 6, 4, 0.78), rgba(8, 6, 4, 0.86)),
    radial-gradient(circle at top, rgba(255, 196, 92, 0.06), transparent 35%),
    url('/assets/img/backgrounds/bar_bg.jpg') center / cover no-repeat;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 214, 140, 0.05);
  position: relative;
  overflow: hidden;
}

.bar-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 211, 126, 0.03), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.12));
}

.bar-flash {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.bar-flash-ok,
.bar-flash-success {
  color: #d9f5d2;
  background: linear-gradient(180deg, rgba(40, 78, 41, 0.72), rgba(23, 49, 24, 0.72));
  border-color: rgba(138, 205, 123, 0.35);
}

.bar-flash-error {
  color: #ffd4cf;
  background: linear-gradient(180deg, rgba(106, 38, 30, 0.72), rgba(70, 23, 19, 0.72));
  border-color: rgba(214, 98, 84, 0.38);
}

.bar-intro {
  margin-bottom: 20px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(168, 126, 71, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(42, 26, 14, 0.45), rgba(18, 12, 8, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 170, 0.03),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.bar-intro h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffe7ba;
  text-shadow: 0 1px 8px rgba(255, 194, 92, 0.12);
}

.bar-intro p {
  margin: 0;
  max-width: 760px;
  color: #e5d8c1;
  line-height: 1.6;
}

.bar-grid-npcs {
  display: grid;
  grid-template-columns: 1.15fr 0.92fr 0.92fr;
  gap: 18px;
  align-items: start;
}

.bar-storage {
  margin-top: 20px;
}

.bar-card {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(146, 108, 60, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(24, 16, 10, 0.96), rgba(11, 8, 6, 0.97));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 225, 172, 0.04);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  overflow: hidden;
}

.bar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 218, 145, 0.025), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.08));
}

.bar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(198, 152, 86, 0.42);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 225, 172, 0.05);
}

.bar-card-body {
  position: relative;
  margin-top: 10px;
  text-align: left;
  z-index: 1;
}

.bar-card-npc {
  min-height: 100%;
}

.bar-card-compact .bar-card-body {
  display: flex;
  flex-direction: column;
}

.bar-card-top {
  position: relative;
  z-index: 1;
}

.bar-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  text-align: center;
}

.bar-card-header-simple {
  align-items: flex-start;
  text-align: left;
  margin-bottom: 12px;
}

.bar-avatar {
  width: min(238px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  border: 1px solid rgba(175, 132, 76, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(255, 198, 92, 0.05), transparent 35%),
    linear-gradient(180deg, rgba(29, 19, 12, 0.95), rgba(12, 9, 7, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 227, 175, 0.035),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.bar-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.bar-npc-meta {
  width: 100%;
}

.bar-npc-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff4df;
  text-shadow: 0 1px 8px rgba(255, 194, 92, 0.08);
}

.bar-npc-role {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(171, 128, 73, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(92, 63, 33, 0.32), rgba(39, 27, 15, 0.32));
  color: #f0dfbf;
  font-size: 12px;
  letter-spacing: 0.2px;
  box-shadow: inset 0 1px 0 rgba(255, 227, 175, 0.025);
}

.bar-npc-desc {
  margin: 0;
  color: #dfd1bb;
  line-height: 1.6;
}

.bar-card-header-simple .bar-npc-desc {
  max-width: 780px;
}

.bar-quest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-box {
  padding: 14px 15px;
  border: 1px solid rgba(147, 110, 64, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(62, 40, 21, 0.18), rgba(19, 13, 9, 0.2));
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 165, 0.02);
}

.bar-quest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bar-quest-meta {
  margin-bottom: 2px;
}

.bar-quest-name {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 800;
  color: #f6d89e;
}

.bar-quest-desc {
  margin: 0 0 10px;
  color: #dfd1bb;
  line-height: 1.55;
}

.bar-progress-line {
  margin: 0 0 8px;
  color: #f6efe4;
  line-height: 1.5;
}

.bar-progress-ok {
  color: #88e28a;
}

.bar-progress-bad {
  color: #ffce9d;
}

.bar-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #b7ab99;
}

.bar-status-box {
  padding: 12px 14px;
  border: 1px solid rgba(147, 110, 64, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(62, 40, 21, 0.14), rgba(19, 13, 9, 0.16));
}

.bar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-actions form {
  margin: 0;
}

.bar-btn,
.bar-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #8b4b26;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #c86b2f, #a94922);
  color: #fff8ef;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(120, 54, 19, 0.28),
    inset 0 1px 0 rgba(255, 220, 175, 0.18);
  transition:
    transform 0.12s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.bar-btn:hover,
.bar-link-btn:hover {
  filter: brightness(1.05);
  border-color: #c87b47;
  box-shadow:
    0 10px 22px rgba(120, 54, 19, 0.34),
    inset 0 1px 0 rgba(255, 220, 175, 0.22);
}

.bar-btn:active,
.bar-link-btn:active {
  transform: translateY(1px);
}

.bar-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(0.12);
}

.bar-card-storage {
  padding: 20px 22px;
  border-color: rgba(166, 126, 74, 0.3);
  background:
    linear-gradient(180deg, rgba(22, 15, 10, 0.97), rgba(12, 9, 7, 0.98));
}

.bar-items-list {
  margin: 0;
  padding-left: 20px;
}

.bar-item-row {
  margin-bottom: 15px;
  color: #f0e7d9;
}

.bar-item-row:last-child {
  margin-bottom: 0;
}

.bar-item-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.bar-item-top strong {
  color: #fff6e8;
}

.bar-item-qty {
  color: #f3ca80;
  font-weight: 800;
}

.bar-item-row small {
  display: block;
  color: #bcb09e;
  line-height: 1.5;
}

.bar-card a {
  text-decoration: none;
}

@media (max-width: 1180px) {
  .bar-grid-npcs {
    grid-template-columns: 1fr 1fr;
  }

  .bar-grid-npcs > .bar-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .bar-page {
    padding: 12px;
    border-radius: 16px;
  }

  .bar-intro {
    padding: 12px 13px 14px;
  }

  .bar-intro h2 {
    font-size: 19px;
  }

  .bar-grid-npcs {
    grid-template-columns: 1fr;
  }

  .bar-grid-npcs > .bar-card:first-child {
    grid-column: auto;
  }

  .bar-card {
    padding: 16px;
  }

  .bar-avatar {
    width: min(220px, 100%);
  }

  .bar-npc-title {
    font-size: 18px;
  }

  .bar-quest-name {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .bar-page {
    padding: 10px;
  }

  .bar-card {
    padding: 14px;
    border-radius: 15px;
  }

  .bar-avatar {
    width: min(190px, 100%);
  }

  .bar-btn,
  .bar-link-btn {
    min-height: 42px;
    font-size: 14px;
  }

  .bar-item-top {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
}
