/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 56, 0.5);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  border-top: 2px solid var(--border);
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding-bottom: 30px;
}
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-handle {
  width: 38px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 11px auto 13px;
}
.modal-header {
  padding: 0 16px 11px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  margin-bottom: 13px;
}
.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-body {
  padding: 0 16px;
}
.modal-photo {
  width: calc(100% - 32px);
  margin: 0 16px 13px;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  display: none;
  border: 1.5px solid var(--border);
}
.barcode-section {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.barcode-sku {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 3px;
  font-family: monospace;
  margin-bottom: 7px;
}
.barcode-img {
  max-width: 100%;
  height: 55px;
}
.odoo-preview-section {
  margin-top: 13px;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  overflow: hidden;
}
.odoo-preview-header {
  background: var(--gold);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.odoo-preview-body {
  padding: 10px 13px;
}
.odoo-warn {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.76rem;
  color: #856404;
  margin-bottom: 9px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* LOGIN OVERLAY */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.login-overlay.hidden {
  display: none;
}
.login-card {
  background: var(--card);
  border-radius: 18px;
  padding: 32px 24px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow2);
  text-align: center;
}
.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold2), var(--gold3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 18px;
  box-shadow: 0 0 24px rgba(245, 200, 66, 0.35);
}
.login-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.login-card p {
  font-size: 0.78rem;
  color: var(--text3);
  margin-bottom: 22px;
}
.login-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg2);
  outline: none;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.login-input:focus {
  border-color: var(--gold2);
}
.login-btn {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, var(--gold2), var(--gold3));
  color: var(--navy);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.login-btn:not(:disabled):active {
  opacity: 0.82;
}
.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.login-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 8px;
  min-height: 16px;
}

/* USER CHIP in header */
.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.user-name {
  font-size: 0.72rem;
  color: rgba(255, 244, 238, 0.75);
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-btn {
  background: rgba(255, 244, 238, 0.1);
  border: 1px solid rgba(255, 244, 238, 0.2);
  color: rgba(255, 244, 238, 0.7);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.67rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
@media (hover: hover) {
  .logout-btn:hover {
    background: rgba(255, 244, 238, 0.18);
  }
}
.logout-btn:active {
  background: rgba(255, 244, 238, 0.18);
}

