/* =============================================
   QUOTES PAGE — quotes.css
   Contém estilos específicos do módulo de
   orçamentos: badges de status comercial,
   indicador de proposta e sobrescritas
   mínimas sobre o sistema.css + service-ordem.css
   ============================================= */

/* ============================================
   COMMERCIAL STATUS BADGES
   ============================================ */

.quote-badge {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Pendente */
.quote-pending {
  background-color: #EFF6FF;
  color: #4527A0;
}

/* Enviado */
.quote-sent {
  background-color: #E3F2FD;
  color: #1565C0;
}

/* Aprovado */
.quote-approved {
  background-color: #E8F5E9;
  color: #2E7D32;
}

/* Rejeitado */
.quote-rejected {
  background-color: #FFEBEE;
  color: #C62828;
}

/* Expirado */
.quote-expired {
  background-color: #F3F3F3;
  color: #757575;
}

/* OPEN — backward compat with old data */
.quote-open {
  background-color: #EFF6FF;
  color: #4527A0;
}

body.dark .quote-pending {
  background-color: rgba(69, 39, 160, 0.22);
  color: #CE93D8;
}

body.dark .quote-sent {
  background-color: rgba(21, 101, 192, 0.2);
  color: #90CAF9;
}

body.dark .quote-approved {
  background-color: rgba(46, 125, 50, 0.2);
  color: #81C784;
}

body.dark .quote-rejected {
  background-color: rgba(198, 40, 40, 0.2);
  color: #EF9A9A;
}

body.dark .quote-expired {
  background-color: rgba(117, 117, 117, 0.15);
  color: #9E9E9E;
}

body.dark .quote-open {
  background-color: rgba(69, 39, 160, 0.22);
  color: #CE93D8;
}

/* ============================================
   PROPOSAL INDICATOR TAG
   Small tag shown in the modal header area
   to remind that this is a proposal, not
   an execution order.
   ============================================ */

.qt-proposal-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  background-color: rgba(69, 39, 160, 0.1);
  color: #4527A0;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

body.dark .qt-proposal-tag {
  background-color: rgba(206, 147, 216, 0.15);
  color: #CE93D8;
}

/* ============================================
   TABLE — Quote ID column
   ============================================ */

.col-quote-id { white-space: nowrap; }

.quote-id-text {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 0.3px;
}

body.dark .quote-id-text { color: #666; }

/* ============================================
   CONVERT BUTTON (green – positive action)
   ============================================ */

.convert-btn {
  color: #2E7D32;
}

.convert-btn:hover {
  background-color: rgba(46, 125, 50, 0.12);
}

body.dark .convert-btn {
  color: #81C784;
}

body.dark .convert-btn:hover {
  background-color: rgba(129, 199, 132, 0.12);
}

/* Already-converted state — shows a checkmark, non-interactive */
.convert-btn-done {
  color: #2E7D32;
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

body.dark .convert-btn-done {
  color: #81C784;
}

/* ============================================
   CONVERT CONFIRM MODAL
   ============================================ */

.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.cc-modal {
  background: var(--sidebar-color);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  padding: 2rem 1.75rem 1.5rem;
  width: min(100%, 400px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: ccPop 0.2s ease-out;
}

@keyframes ccPop {
  from { transform: scale(0.94) translateY(-12px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);     opacity: 1; }
}

.cc-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #2E7D32;
}

body.dark .cc-icon {
  background: rgba(129, 199, 132, 0.12);
  color: #81C784;
}

.cc-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
}

.cc-details {
  width: 100%;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

body.dark .cc-details {
  background: rgba(255, 255, 255, 0.04);
}

.cc-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.cc-detail-label {
  color: #888;
  font-weight: 500;
}

.cc-detail-value {
  color: var(--text-color);
  font-weight: 600;
}

.cc-note {
  margin: 0;
  font-size: 0.8rem;
  color: #888;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  text-align: left;
  line-height: 1.5;
}

.cc-note i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.95rem;
}

.cc-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.25rem;
}

.cc-actions .btn-secondary,
.cc-actions .admin-button {
  flex: 1;
  justify-content: center;
}


/*  Title column in table  */
.col-order-title,
.col-quote-title {
  max-width: 220px;
}

.order-title-text,
.quote-title-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  font-weight: 500;
  color: var(--text-color, #1e293b);
}

.text-muted { color: var(--text-muted, #64748b); }