@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #1a1423;
  --surface: #2a1f35;
  --surface-2: #3a2a48;
  --surface-3: #4a385a;
  --accent: #e3b23c;
  --accent-hover: #f0c25a;
  --text: #f5efe6;
  --text-muted: #b8a9c3;
  --error: #e8735b;
  --success: #5cb85c;
  --radius: 14px;
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  --transition: all 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  padding: 24px;
  min-height: 100vh;
}

/* ========== LOGIN ========== */
.card {
  display: flex;
  width: 100%;
  max-width: 820px;
  margin: auto;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card__side {
  flex: 0 0 40%;
  background: linear-gradient(160deg, var(--surface-2), var(--bg));
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(245, 239, 230, 0.06);
}

.card__side h1 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
}

.card__side p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 12px 0 0;
}

.card__form {
  flex: 1;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card__form h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.card__form .subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0 0 28px;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus, select:focus, textarea:focus { border-color: var(--accent); }

button.primary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #1a1423;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

button.primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
button.primary:disabled { opacity: 0.6; cursor: not-allowed; }

.switch-mode {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.switch-mode button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  font-weight: 500;
}

.switch-mode button:hover { color: var(--accent-hover); }

.message { min-height: 20px; font-size: 0.82rem; margin: -8px 0 14px; }
.message.error { color: var(--error); }
.message.success { color: var(--success); }

/* ========== DASHBOARD ========== */
.dashboard-container { max-width: 1200px; margin: 0 auto; }

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 30px;
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
  margin-bottom: 30px;
}

.header-left { display: flex; align-items: center; gap: 20px; }

.dashboard-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
}

.user-badge {
  background: var(--surface-2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.logout-btn {
  background: none;
  border: 1px solid rgba(245, 239, 230, 0.15);
  color: var(--text);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition);
}

.logout-btn:hover { border-color: var(--error); color: var(--error); }

.dashboard-content { display: flex; flex-direction: column; gap: 40px; }

.quote-section,
.quotes-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--accent);
}

.section-header .section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.quote-form .field-row { display: grid; gap: 16px; margin-bottom: 16px; }
.cols-3 { grid-template-columns: 2fr 1fr 1fr; }
.cols-2 { grid-template-columns: 1fr 1fr; }

.quote-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.quote-form .form-actions button { width: auto; padding: 12px 28px; }

button.secondary {
  background: none;
  border: 1px solid rgba(245, 239, 230, 0.2);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

button.secondary:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* ========== DYNAMIC ITEMS ========== */
.item-card {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  position: relative;
}

.item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
}

.item-number {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
}

.btn-remove-item {
  background: rgba(232, 115, 91, 0.15);
  color: var(--error);
  border: 1px solid rgba(232, 115, 91, 0.3);
  padding: 5px 14px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-remove-item:hover {
  background: rgba(232, 115, 91, 0.25);
  border-color: var(--error);
}

.btn-add-item {
  background: rgba(227, 178, 60, 0.12);
  color: var(--accent);
  border: 2px dashed rgba(227, 178, 60, 0.4);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.btn-add-item:hover {
  background: rgba(227, 178, 60, 0.2);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ========== QUOTES GRID ========== */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.quote-card {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid var(--accent);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }

.quote-card .quote-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ========== MULTI-ITEM BADGE ========== */
.multi-badge {
  display: inline-block;
  background: rgba(227, 178, 60, 0.2);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== QUOTE ITEMS LIST ========== */
.quote-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0;
  padding: 8px 0;
  border-top: 1px solid rgba(245, 239, 230, 0.06);
  border-bottom: 1px solid rgba(245, 239, 230, 0.06);
}

.quote-item-line {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

.quote-item-line strong {
  color: var(--accent);
  margin-right: 4px;
}

.quote-item-line .item-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.quote-card .quote-detail { font-size: 0.85rem; color: var(--text-muted); }
.quote-card .quote-detail strong { color: var(--text); }

.quote-card .quote-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.quote-card .quote-actions button {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-small-primary { background: var(--accent); color: #1a1423; }
.btn-small-primary:hover { background: var(--accent-hover); }

.btn-small-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn-small-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.btn-small-success { background: var(--success); color: #1a1423; }
.btn-small-success:hover { background: #6fd06f; }

.btn-small-danger { background: var(--error); color: #fff; }
.btn-small-danger:hover { background: #f0806a; }

.btn-responded {
  background: var(--success) !important;
  color: #1a1423 !important;
  cursor: default !important;
  opacity: 0.8;
}

.quote-card .status-badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-open { background: rgba(227, 178, 60, 0.2); color: var(--accent); }
.status-production { background: rgba(92, 184, 92, 0.2); color: var(--success); }
.status-completed { background: rgba(92, 184, 92, 0.3); color: var(--success); }
.status-expired { background: rgba(232, 115, 91, 0.2); color: var(--error); }

.quote-card .quote-owner { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.production-section { border-left: 4px solid var(--success); }

.empty-message {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 20px;
  text-align: center;
  grid-column: 1 / -1;
}

/* ========== FILTER BAR ========== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar input {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.filter-bar input:focus { border-color: var(--accent); }
.filter-bar input::placeholder { color: var(--text-muted); opacity: 0.7; }

.filter-bar button {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.2);
  background: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-bar button:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* ========== MODAL ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0 8px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--error); }

/* ========== RESPONSES LIST ========== */
.responses-list { display: flex; flex-direction: column; gap: 12px; }

.response-item {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.response-item .response-info { flex: 1; }
.response-item .response-info .respondent { font-weight: 500; color: var(--text); }
.response-item .response-info .response-values {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.response-item .response-info .response-values span {
  display: inline-block;
  margin-right: 16px;
}
.response-item .response-actions { display: flex; gap: 8px; }

.response-details {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.response-details span {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 10px;
  border-radius: 12px;
}

/* ========== PRODUCTION DETAILS MODAL ========== */
.production-details-modal { max-width: 750px !important; }

.production-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.details-section {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 16px;
}

.details-section h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
}

.details-section .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(245, 239, 230, 0.04);
}

.details-section .detail-row.highlight {
  background: rgba(92, 184, 92, 0.15);
  padding: 6px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

.details-section .detail-row .detail-label { color: var(--text-muted); font-weight: 500; }

.details-section .detail-row .detail-value {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.details-section .detail-row .detail-value a { color: var(--accent); text-decoration: none; }
.details-section .detail-row .detail-value a:hover { text-decoration: underline; }

/* ========== DETAIL ITEM BLOCK ========== */
.detail-item-block {
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.detail-item-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ========== EDIT ITEM BLOCK ========== */
.edit-item-block {
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.edit-item-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ========== TRACKING MODAL ========== */
.tracking-modal { max-width: 500px !important; }
.tracking-modal .field { margin-bottom: 16px; }
.tracking-modal .field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.tracking-modal .field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.tracking-modal .field input:focus { border-color: var(--accent); }

.tracking-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.tracking-modal .form-actions button {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tracking-modal .form-actions .secondary {
  background: none;
  border: 1px solid rgba(245, 239, 230, 0.2);
  color: var(--text);
}

.tracking-modal .form-actions .primary { background: var(--success); color: #1a1423; }
.tracking-modal .form-actions .primary:hover { background: #6fd06f; }

/* ========== RESPONSE MODAL (OVERLAY) ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  padding: 20px;
}

.response-modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 700px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.response-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(245, 239, 230, 0.1);
}

.response-modal .modal-header h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0;
  color: var(--accent);
}

.response-modal .modal-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0 8px;
}
.response-modal .modal-close:hover { color: var(--error); }

/* ========== QUOTE DETAILS ========== */
.quote-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(245, 239, 230, 0.05);
}

.detail-label { color: var(--text-muted); font-size: 0.82rem; font-weight: 500; }

.detail-value {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.response-modal .divider {
  border: none;
  border-top: 1px solid rgba(245, 239, 230, 0.1);
  margin: 16px 0;
}

.response-modal .response-form h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: var(--accent);
}

.response-modal .field-row { display: grid; gap: 16px; margin-bottom: 16px; }
.response-modal .field-row.cols-2 { grid-template-columns: 1fr 1fr; }

.response-modal .field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.response-modal .field input,
.response-modal .field textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}
.response-modal .field input:focus,
.response-modal .field textarea:focus { border-color: var(--accent); }

.response-modal .field textarea { resize: vertical; min-height: 60px; }
.response-modal .field small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.response-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.response-modal .form-actions button {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.response-modal .form-actions .secondary {
  background: none;
  border: 1px solid rgba(245, 239, 230, 0.2);
  color: var(--text);
}

.response-modal .form-actions .primary { background: var(--accent); color: #1a1423; }
.response-modal .form-actions .primary:hover { background: var(--accent-hover); }

/* ========== LINK BUTTONS ========== */
.link-button {
  display: inline-block;
  background: var(--accent);
  color: #1a1423;
  padding: 4px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}
.link-button:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ========== EDIT QUOTE MODAL ========== */
.edit-quote-modal { max-width: 700px !important; }

/* ========== EXPIRATION ========== */
.quote-expiration { font-size: 0.85rem; color: var(--text-muted); padding: 4px 0; }
.countdown { font-weight: 600; font-family: monospace; font-size: 0.95rem; }

/* ========== SIMPLE RATING ========== */
.rating-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  appearance: none;
  cursor: pointer;
}
.rating-select:focus { border-color: var(--accent); }
.rating-select option { background: var(--surface); color: var(--text); }

.rating-category {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: 10px;
}

.rating-category label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.rating-category textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
}
.rating-category textarea:focus { border-color: var(--accent); }

.rating-modal { max-width: 450px !important; }
.rating-modal .rating-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  text-align: center;
}

.rating-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.rating-modal .form-actions button {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.rating-modal .form-actions .secondary {
  background: none;
  border: 1px solid rgba(245, 239, 230, 0.2);
  color: var(--text);
}

.rating-modal .form-actions .primary { background: var(--accent); color: #1a1423; }

/* ========== SELECTS - LETRAS PRETAS ========== */
select {
  color: #000000 !important;
  font-weight: 500;
}

select option {
  color: #000000 !important;
  background: #ffffff !important;
}

/* ========== PRINT BUTTON ========== */
.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #1a1423;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.btn-print:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ========== NOTIFICAÇÃO ========== */
.notification-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.response-badge {
  display: inline-block;
  background: #e8735b;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* ========== CHAT MODAL ========== */
.chat-modal {
  max-width: 620px !important;
  max-height: 85vh !important;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

.chat-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(245, 239, 230, 0.1);
  margin-bottom: 0;
}

.chat-modal .modal-header h3 { margin: 0; color: var(--accent); }

.chat-modal #chat-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 500px;
}

.chat-message {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
}

.chat-message.own {
  align-self: flex-end;
  background: var(--accent);
  color: #1a1423;
  border-bottom-right-radius: 4px;
}

.chat-message.other {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 0.7rem;
}

.chat-message.own .chat-message-header { color: rgba(26, 20, 35, 0.7); }
.chat-message.other .chat-message-header { color: var(--text-muted); }

.chat-message-sender { font-weight: 600; }
.chat-message-time { font-size: 0.65rem; opacity: 0.8; }

.chat-message-text {
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid rgba(245, 239, 230, 0.1);
  background: var(--surface);
}

.chat-input-area input {
  flex: 1;
  margin-bottom: 0 !important;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.chat-input-area input:focus { border-color: var(--accent); }

.chat-input-area button {
  padding: 10px 20px !important;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #1a1423;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chat-input-area button:hover { background: var(--accent-hover); }

.chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8735b;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
}

/* ========== BULK SHIPPING (seleção de pedidos) ========== */
.card-checkbox {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 3;
}

.card-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}

.card-checkbox label {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.quote-card.selected-for-ship {
  border-left-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(227, 178, 60, 0.3);
  transform: translateY(-2px);
}

.bulk-ship-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 14px 24px;
  display: none;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 999;
  animation: slideUpBar 0.3s ease;
}

.bulk-ship-bar.active {
  display: flex;
}

.bulk-ship-bar .bulk-count {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.bulk-ship-bar .bulk-count strong {
  color: var(--accent);
  font-size: 1.1rem;
}

.bulk-ship-bar button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.bulk-ship-bar .btn-clear-selection {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.bulk-ship-bar .btn-clear-selection:hover {
  background: rgba(255, 255, 255, 0.15);
}

.bulk-ship-bar .btn-ship-selected {
  background: var(--success);
  color: #1a1423;
}

.bulk-ship-bar .btn-ship-selected:hover {
  background: #6fd06f;
}

@keyframes slideUpBar {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.shipment-group {
  margin-bottom: 8px;
  padding: 8px 10px;
  background: rgba(227, 178, 60, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.shipment-group strong {
  color: var(--accent);
}

/* ========== RESPONSE PER-ITEM TOTALS ========== */
.item-subtotal-display {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(227, 178, 60, 0.1);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
}

.item-subtotal-display strong {
  color: var(--accent);
  font-size: 1rem;
}

.response-totals {
  margin-top: 16px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: 10px;
  border-left: 4px solid var(--success);
}

.response-totals .detail-row {
  padding: 6px 0;
  border-bottom: 1px solid rgba(245, 239, 230, 0.06);
}

.response-totals .detail-row.highlight {
  background: rgba(92, 184, 92, 0.15);
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 6px;
  border-bottom: none;
}

.response-totals .detail-value {
  font-weight: 700;
  color: var(--text);
}

.response-items-breakdown {
  margin: 10px 0;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.response-item-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.response-item-line strong {
  color: var(--text);
  font-weight: 600;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  body { padding: 12px; }
  .card { flex-direction: column; }
  .card__side {
    flex: none;
    padding: 24px;
    border-right: none;
    border-bottom: 1px solid rgba(245, 239, 230, 0.06);
  }
  .dashboard-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .header-left { flex-wrap: wrap; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .quote-card { padding: 16px; }
  .modal-content { padding: 20px; }
  .response-modal { padding: 20px; max-height: 95vh; }
  .response-modal .field-row.cols-2 { grid-template-columns: 1fr; }
  .detail-row { flex-direction: column; gap: 2px; }
  .detail-value { text-align: left; max-width: 100%; }
  .filter-bar { flex-direction: column; }
  .filter-bar input, .filter-bar button { width: 100%; }
  .chat-message { max-width: 90%; }
  .item-card { padding: 14px; }
  .bulk-ship-bar {
    flex-direction: column;
    width: calc(100% - 24px);
    padding: 12px 16px;
  }
}
/* ========== SHIPMENT GROUP - DETALHES DE FRETE ========== */
.shipment-group {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: rgba(227, 178, 60, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.shipment-group strong {
  color: var(--accent);
}

.shipment-cost-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.82rem;
}

.shipment-cost-row .label {
  color: var(--text-muted);
}

.shipment-cost-row .value {
  color: var(--text);
  font-weight: 600;
}

.shipment-cost-row.total {
  border-top: 1px solid rgba(245, 239, 230, 0.15);
  padding-top: 6px;
  margin-top: 4px;
}

.shipment-cost-row.total .value {
  color: var(--success);
  font-size: 0.95rem;
  font-weight: 700;
}

.shipment-cost-row.diff .value {
  color: var(--error);
}

.shipment-cost-row.diff.positive .value {
  color: var(--error);
}

.shipment-cost-row.diff.negative .value {
  color: var(--success);
}

/* Campo extra de frete no modal de bulk ship */
#bulk-shipping-cost {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent) !important;
  border-color: rgba(227, 178, 60, 0.4) !important;
}

#bulk-shipping-cost:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(227, 178, 60, 0.15);
}
/* ========== GOOGLE DRIVE BOX (Sample Photos) ========== */
.drive-box {
  margin: 16px 0;
  padding: 16px;
  background: rgba(227, 178, 60, 0.08);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
}

.drive-box-title {
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.drive-box-title strong {
  color: var(--accent);
}

.btn-drive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #1a1423;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}

.btn-drive:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(227, 178, 60, 0.3);
}

.drive-box-help {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.7;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(245, 239, 230, 0.1);
}

.drive-box-help strong {
  color: var(--text);
}
/* ========== DRIVE BOX - TIP ========== */
.drive-box-tip {
  border-top: 1px solid rgba(245, 239, 230, 0.1);
  padding-top: 10px;
  margin-top: 10px;
}
/* ========== DRIVE BOX - TIP ========== */
.drive-box-tip {
  border-top: 1px solid rgba(245, 239, 230, 0.1);
  padding-top: 10px;
  margin-top: 10px;
}

.drive-box-help code {
  background: rgba(227, 178, 60, 0.15);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
}

/* ========== EDIT RESPONSE ========== */
.response-edited-badge {
  display: inline-block;
  background: rgba(227, 178, 60, 0.15);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* ========== COMPLETE ORDER MODAL ========== */
.complete-order-modal {
  max-width: 500px !important;
}

.complete-order-modal .order-summary {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.complete-order-modal .order-summary strong {
  color: var(--text);
}

.complete-order-modal .order-summary ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.complete-order-modal .field {
  margin-bottom: 16px;
}

.complete-order-modal .field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.complete-order-modal .field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.complete-order-modal .field input:focus {
  border-color: var(--accent);
}

.complete-order-modal .field .required-star {
  color: var(--error);
  font-weight: 700;
}

.complete-order-modal .field .optional-tag {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
  margin-left: 6px;
}

.complete-order-modal .field small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.complete-order-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.complete-order-modal .form-actions button {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.complete-order-modal .form-actions .secondary {
  background: none;
  border: 1px solid rgba(245, 239, 230, 0.2);
  color: var(--text);
}

.complete-order-modal .form-actions .primary {
  background: var(--success);
  color: #1a1423;
}

.complete-order-modal .form-actions .primary:hover {
  background: #6fd06f;
}

/* ========== ADD TRACKING BUTTON (Delivered) ========== */
.btn-add-tracking {
  background: rgba(227, 178, 60, 0.2) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(227, 178, 60, 0.4) !important;
}

.btn-add-tracking:hover {
  background: rgba(227, 178, 60, 0.3) !important;
  border-color: var(--accent) !important;
}
/* ========== FIXED INFO IMAGE (modal de resposta) ========== */
.info-image-block {
  margin: 12px 0 14px 0;
  text-align: center;
}

.info-image-block img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 250px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid rgba(227, 178, 60, 0.3);
  background: rgba(0, 0, 0, 0.2);
  margin: 0 auto;
}

.info-image-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  font-style: italic;
}

/* Responsivo: em mobile fica um pouco menor */
@media (max-width: 768px) {
  .info-image-block img {
    max-height: 200px;
  }
}
/* ========== FREIGHT REAL (no complete order) ========== */
.complete-order-modal .field .optional-tag {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.75rem;
  margin-left: 6px;
}

.complete-order-modal .field .required-star {
  color: var(--error);
  font-weight: 700;
}

/* ========== VIEW DETAILS MODAL (Open Quote) ========== */
.open-quote-details-modal {
  max-width: 700px !important;
}

.open-quote-details-modal .detail-item-block {
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
/* ========== NOTIFICATION DOT (production) ========== */
.quote-card .notification-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}
/* ========== EXPIRED QUOTE NOTE ========== */
.quote-expired-note {
  background: rgba(232, 115, 91, 0.1);
  border-left: 3px solid var(--error);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0;
  line-height: 1.5;
}
/* ========== DOCUMENT TYPE BADGES ========== */
.doc-type-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.doc-type-budget {
  background: rgba(184, 169, 195, 0.2);
  color: var(--text-muted);
  border: 1px solid rgba(184, 169, 195, 0.4);
}

.doc-type-supply-order {
  background: rgba(227, 178, 60, 0.25);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ========== FILTER SELECT ========== */
.filter-select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #000000 !important;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
  min-width: 200px;
}

.filter-select:focus {
  border-color: var(--accent);
}

/* ========== EXPIRED QUOTE NOTE ========== */
.quote-expired-note {
  background: rgba(232, 115, 91, 0.1);
  border-left: 3px solid var(--error);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0;
  line-height: 1.5;
}
/* ========== DOCUMENT TYPE BADGES ========== */
.doc-type-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.doc-type-budget {
  background: rgba(184, 169, 195, 0.2);
  color: var(--text-muted);
  border: 1px solid rgba(184, 169, 195, 0.4);
}

.doc-type-supply-order {
  background: rgba(227, 178, 60, 0.25);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ========== FILTER SELECT ========== */
.filter-select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 230, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #000000 !important;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
  min-width: 200px;
}

.filter-select:focus {
  border-color: var(--accent);
}

/* ========== EXPIRED QUOTE NOTE ========== */
.quote-expired-note {
  background: rgba(232, 115, 91, 0.1);
  border-left: 3px solid var(--error);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0;
  line-height: 1.5;
}
/* ========== QUOTE EDIT WARNING ========== */
.quote-edit-warning {
  background: rgba(232, 115, 91, 0.12);
  border-left: 3px solid var(--error);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 6px 0;
  line-height: 1.5;
}