/* Mostrador — custom styles on top of Tailwind */

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  color: #4f4d45;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}
.nav-item:hover {
  background-color: #f7f6f4;
  color: #1f1e1c;
}
.nav-item.active {
  background-color: #fff5f0;
  color: #b8320b;
}
.nav-item.active svg {
  color: #f55a13;
}

/* Cards */
.card {
  background: white;
  border: 1px solid #ecebe6;
  border-radius: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: #f55a13;
  color: white;
}
.btn-primary:hover {
  background: #e0440a;
}
.btn-secondary {
  background: white;
  color: #393834;
  border-color: #d7d4ca;
}
.btn-secondary:hover {
  background: #f7f6f4;
}
.btn-ghost {
  background: transparent;
  color: #4f4d45;
}
.btn-ghost:hover {
  background: #ecebe6;
  color: #1f1e1c;
}
.btn-danger {
  background: white;
  color: #b8320b;
  border-color: #ffc9a8;
}
.btn-danger:hover {
  background: #fff5f0;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Inputs */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #d7d4ca;
  background: white;
  color: #1f1e1c;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #f55a13;
  box-shadow: 0 0 0 3px rgba(245, 90, 19, 0.15);
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #615f54;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #797667;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #ecebe6;
  background: #faf9f6;
}
.table tbody td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid #f3f1ec;
  font-size: 0.875rem;
  color: #393834;
  vertical-align: middle;
}
.table tbody tr:hover {
  background: #faf9f6;
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.pill-ok {
  background: #ecfdf3;
  color: #027a48;
}
.pill-low {
  background: #fff5f0;
  color: #b8320b;
}
.pill-out {
  background: #fef3f2;
  color: #b42318;
}
.pill-neutral {
  background: #f3f1ec;
  color: #4f4d45;
}

/* Toast */
.toast {
  pointer-events: auto;
  background: #1f1e1c;
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideIn 0.2s ease;
}
.toast-ok {
  background: #054f31;
}
.toast-err {
  background: #7a271a;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 30, 28, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 1rem;
}
.modal {
  background: white;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}
.modal-lg {
  max-width: 760px;
}

/* Scrollbar */
.scrollarea::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.scrollarea::-webkit-scrollbar-thumb {
  background: #d7d4ca;
  border-radius: 4px;
}
.scrollarea::-webkit-scrollbar-track {
  background: transparent;
}

/* Search highlight */
mark {
  background: #ffe6d5;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* Kbd */
kbd {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  background: #f3f1ec;
  border: 1px solid #d7d4ca;
  border-bottom-width: 2px;
  border-radius: 4px;
  color: #4f4d45;
}

/* Bar chart */
.bar-track {
  background: #f3f1ec;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff7a3b, #f55a13);
}
