/* dashboard.css - custom styles and theme tweaks */
:root{
  --bg:#4F75A2;
  --sidebar:#385577;
  --accent:#EFEB86;
  --card-bg:#fff;
}

body{font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;}

/* layout tweaks */
.app-layout{min-height:calc(100vh - 64px);} /* header height accounted */

.sidebar{flex:0 0 25%;}

/* card */
.card{background:var(--card-bg);border-radius:12px;color:#333;box-shadow:0 4px 12px rgba(15,20,25,0.06);}

/* buttons */
.btn{background:transparent;border-radius:10px;padding:8px 12px;border:1px solid rgba(255,255,255,0.06);color:var(--accent);}
.tab.active{background:rgba(255,255,255,0.04);}

/* mobile responsive: sidebar becomes off-canvas */
@media (max-width: 900px){
  .sidebar{position:fixed;left:-110%;top:72px;bottom:0;width:75%;max-width:320px;z-index:60;transition:left .25s ease;background:var(--sidebar);margin:0;border-radius:0;padding:16px;}
  .sidebar.open{left:0}
  main{padding:16px}
}

/* avatar list */
.avatar-item{transition:transform .12s ease, background .12s ease}
.avatar-item:hover{transform:translateY(-3px)}

.shadow-green-glow {
  box-shadow: 0 0 10px rgba(34,197,94,0.8); /* verde tailwind 500 */
}

/* opcional - assets/css/dashboard.css */
.progress-bar {
  transition: width .4s ease;
}

/* Remove visual do contorno (sem quebrar as classes que o JS depende) */
.avatar-item.ring-2,
.avatar-item.ring-offset-2,
.avatar-item.ring-amber-300 {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

/* Nova aparência do item selecionado */
.avatar-item.ring-2 {
    background: #369BBD !important;
    border-radius: 12px;
    transition: background 0.25s ease;
}

.card {
	background: #385577 !important;
	border-radius: 20px !important;
}

.cardLot {
	background: #2b3f59 !important;
}

.rounded-xl {
	border-radius: 20px !important;
}

.rounded-md {
	border-radius: 13px !important;
}

.button-gallery{
	border-radius: 13px !important;
}

.manage-button{
	border-radius: 13px !important;
}

.leave-lot-button {
	border-radius: 13px !important;
}
/* --- MODAL ANIMATION --- */
.modal-hidden {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.modal-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    transition: opacity .25s ease, transform .25s ease;
}

/* BACKDROP FADE */
.modal-backdrop-hidden {
    opacity: 0;
    transition: opacity .25s ease;
}

.modal-backdrop-visible {
    opacity: 1;
    transition: opacity .25s ease;
}

/* --- LOADER (AMPULHETA GIRANDO) --- */
.loader-hourglass {
    font-size: 48px;
    animation: spinHourglass 1.2s linear infinite;
    display: inline-block;
}

@keyframes spinHourglass {
    0%   { transform: rotate(0deg); }
    50%  { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

.loader-box {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffdd85;
    font-size: 40px;
    opacity: .8;
}

/* Chat balloon color preview */
.chat-balloon-preview-shell {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, .28);
    background:
        radial-gradient(circle at 50% 100%, rgba(15, 23, 42, .82), rgba(15, 23, 42, .35)),
        linear-gradient(135deg, rgba(31, 52, 78, .9), rgba(20, 35, 55, .9));
    box-shadow: inset 0 0 24px rgba(0, 0, 0, .18);
}

.chat-balloon-preview {
    --chat-balloon-color: #ff1818;
    position: relative;
    width: 260px;
    height: 160px;
}

.chat-balloon-canvas {
    width: 260px;
    height: 160px;
    display: block;
    image-rendering: auto;
}

.chat-balloon-color-input {
    width: 54px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-radius: 13px;
    padding: 2px;
    background: #1e293b;
    cursor: pointer;
}

/* --- MODAL ANIMATION --- */
.modal-hidden {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.modal-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    transition: opacity .25s ease, transform .25s ease;
}

/* BACKDROP FADE */
.modal-backdrop-hidden {
    opacity: 0;
    transition: opacity .25s ease;
}

.modal-backdrop-visible {
    opacity: 1;
    transition: opacity .25s ease;
}

/* --- LOADER (AMPULHETA GIRANDO) --- */
.loader-hourglass {
    font-size: 48px;
    animation: spinHourglass 1.2s linear infinite;
    display: inline-block;
}

@keyframes spinHourglass {
    0%   { transform: rotate(0deg); }
    50%  { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

.loader-box {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffdd85;
    font-size: 40px;
    opacity: .8;
}

/* Container global das animações */
#whiteNeedsFxContainer {
    pointer-events: none;
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 999999;
}

/* Elementos flutuantes */
.white-needs-fx {
    position: absolute;
    font-size: 32px;
    opacity: 0;
    animation: needsFloat 1.4s ease-out forwards;
}

/* Animação principal */
@keyframes needsFloat {
    0% {
        transform: translateY(20px) scale(0.5) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120px) scale(1.3) rotate(45deg);
        opacity: 0;
    }
}

/* Free Green */
@keyframes fadeInSidebar {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

#fgFull {
    animation: fadeInSidebar .25s ease-out;
}

/* BONUS OBJECT GOLD HIGHLIGHT */
.bonus-card {
    position: relative;
    border: 1px solid #d4b36a !important;
    box-shadow:
        0 0 10px rgba(255, 215, 130, 0.25),
        0 0 25px rgba(255, 215, 130, 0.12);
    background: linear-gradient(
        to bottom,
        rgba(255, 220, 160, 0.06),
        rgba(255, 220, 160, 0.02)
    ) !important;
}
.bonus-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0.75rem;
    pointer-events: none;
    box-shadow: 0 0 12px 4px rgba(255, 230, 160, 0.14);
    animation: bonusPulse 3s ease-in-out infinite;
}
@keyframes bonusPulse {
    0%   { opacity: 0.4; }
    50%  { opacity: 0.75; }
    100% { opacity: 0.4; }
}

/* ----------------------------------
   ACCESSORIES ANIMATIONS
---------------------------------- */

/* entrada */
.accessory-enter {
  animation: accessoryEnter 220ms ease-out forwards;
}

@keyframes accessoryEnter {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* saída */
.accessory-exit {
  animation: accessoryExit 200ms ease-in forwards;
}

@keyframes accessoryExit {
  to {
    opacity: 0;
    transform: scale(0.7) translateY(12px);
  }
}

/* accessory pin action */
.accessory-equip-trigger {
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.6);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  transform: translateY(-2px);
}

.group:hover .accessory-equip-trigger,
.group:focus-within .accessory-equip-trigger,
.accessory-equip-trigger.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.accessory-equip-trigger:hover {
  background: rgba(30, 41, 59, 0.95);
}

.accessory-card-equipped {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 8px 20px rgba(15, 23, 42, 0.35);
}

.accessory-equipped-empty {
  min-height: 84px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.2);
}

.accessory-equipped-card {
  border: 1px solid rgba(34, 197, 94, 0.55);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.14), rgba(15, 23, 42, 0.18));
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accessory-equipped-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accessory-unequip-btn {
  border: 0;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: #ef4444;
  transition: background .15s ease;
}

.accessory-unequip-btn:hover {
  background: #dc2626;
}

/* ----------------------------------
   INVENTORY UX IMPROVEMENTS
---------------------------------- */
.inv-filter-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  transition: .15s ease;
}

.inv-filter-btn:hover {
  border-color: rgba(251, 191, 36, 0.55);
}

.inv-filter-btn.active {
  background: #f1d26f;
  color: #1f2937;
  border-color: #f1d26f;
}

.inventory-object-filter-panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.22);
  padding: 10px;
}

.inventory-object-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.inventory-object-search-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.36);
  color: #f8fafc;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}

.inventory-object-search-input:focus {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.inventory-object-clear-btn {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.62);
  color: #e2e8f0;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.inventory-object-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.inventory-object-filter-header-spaced {
  margin-top: 12px;
}

.inventory-object-filter-header small {
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.inventory-object-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inv-object-category-btn,
.inv-object-package-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.58);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}

.inv-object-category-btn:hover,
.inv-object-package-btn:hover {
  border-color: rgba(251, 191, 36, 0.58);
  transform: translateY(-1px);
}

.inv-object-category-btn.active,
.inv-object-package-btn.active {
  background: #f1d26f;
  border-color: rgba(253, 230, 138, .9);
  color: #1f2937;
}

.inv-object-category-btn strong,
.inv-object-package-btn strong {
  min-width: 20px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.38);
  color: #fde68a;
  text-align: center;
  font-size: 10px;
}

.inv-object-category-btn.active strong,
.inv-object-package-btn.active strong {
  background: rgba(31, 41, 55, .18);
  color: #1f2937;
}

.inventory-card {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, opacity .2s ease;
}

.inventory-card.selected {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 10px 20px rgba(15, 23, 42, 0.3);
}

.inventory-card.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4);
}

.inventory-card.loading {
  opacity: .65;
  pointer-events: none;
}

.inventory-card-exit {
  animation: inventoryCardExit 220ms ease forwards;
}

@keyframes inventoryCardExit {
  to {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
  }
}

.inventory-thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.inventory-qty-controls {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px 40px;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  width: 100%;
}

.inventory-qty-input {
  min-width: 0;
}

.inventory-qty-btn {
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 8px;
  height: 30px;
  background: rgba(15, 23, 42, .45);
  color: #e5e7eb;
  font-weight: 700;
}

.inventory-qty-max {
  border: 1px solid rgba(251, 191, 36, .5);
  border-radius: 8px;
  height: 30px;
  background: rgba(245, 158, 11, .2);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
}

.inventory-qty-max-block {
  width: 100%;
  margin-top: 6px;
}

.inventory-qty-error {
  margin-top: 6px;
  font-size: 11px;
  color: #fecaca;
}

.inventory-qty-error.hidden {
  display: none;
}

.inventory-card-furniture {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.inventory-furniture-thumb-frame {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.75);
  flex-shrink: 0;
}

.inventory-object-name {
  width: 100%;
  height: 30px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inventory-object-name.is-empty {
  visibility: hidden;
}

.inventory-chip-row {
  display: flex;
  max-width: 100%;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.inventory-category-chip,
.inventory-folder-chip {
  max-width: 100%;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-category-chip {
  border: 1px solid rgba(251, 191, 36, .34);
  background: rgba(245, 158, 11, .13);
  color: #fde68a;
}

.inventory-folder-chip {
  border: 1px solid rgba(56, 189, 248, .32);
  background: rgba(14, 165, 233, .12);
  color: #bae6fd;
}

.inventory-card-furniture .inventory-qty-controls-compact {
  grid-template-columns: 30px minmax(0, 1fr) 30px;
}

.inventory-action-bar {
  position: sticky;
  bottom: 10px;
  z-index: 30;
  background: rgba(43, 63, 89, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
  padding: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.inventory-selection-summary {
  color: #fde68a;
  font-weight: 700;
  font-size: 13px;
}

.inventory-target-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.35);
  color: #fff;
}

.inventory-action-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  color: #fff;
}

.inventory-action-btn.transfer { background: #10b981; }
.inventory-action-btn.discard { background: #ef4444; }
.inventory-action-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

@media (min-width: 900px) {
  .inventory-action-bar {
    grid-template-columns: 1fr minmax(220px, 280px) auto auto;
    align-items: center;
  }
}

/* Lots transfer toggle */
.lot-transfer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.lot-transfer-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.lot-transfer-toggle-ui {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.6);
  position: relative;
  transition: background .18s ease, border-color .18s ease;
  flex-shrink: 0;
}

.lot-transfer-toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: transform .18s ease;
}

.lot-transfer-toggle-input:checked + .lot-transfer-toggle-ui {
  background: rgba(245, 158, 11, 0.34);
  border-color: rgba(251, 191, 36, 0.8);
}

.lot-transfer-toggle-input:checked + .lot-transfer-toggle-ui::after {
  transform: translateX(20px);
  background: #fde68a;
}

.lot-transfer-toggle-input:focus-visible + .lot-transfer-toggle-ui {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}
