/* Vendor Portal Specific Styles */

/* Screen Reader Only - Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vendor-sidebar {
  --accent-color: #10b981;
  --accent-light: rgba(16, 185, 129, 0.1);
}

.vendor-sidebar .nav-item.active {
  background: var(--accent-light);
  color: var(--accent-color);
}

.vendor-sidebar .nav-item:hover {
  background: var(--accent-light);
}

/* Vendor user-menu avatar uses green accent */
.vendor-portal .user-menu-avatar {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.stat-icon.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stat-icon.active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.stat-icon.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stat-icon.notifications {
  background: rgba(242, 169, 0, 0.15);
  color: #f2a900;
}

.stat-icon.earned {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stat-icon.commission {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stat-icon.outstanding {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Badge Pills */
.badge-pill {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

.badge-pill.badge-alert {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.badge-pulse {
  animation: badgePulse 0.6s ease-in-out 3;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); background: rgba(239, 68, 68, 0.5); }
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
}

.card h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Welcome Banner */
.welcome-banner {
  margin-bottom: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(13, 148, 136, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
}

.welcome-banner h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Onboarding Checklist */
.onboarding-checklist {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.onboarding-header h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.onboarding-progress {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #60a5fa);
  background: rgba(59, 130, 246, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.onboarding-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-bottom: 14px;
  overflow: hidden;
}

.onboarding-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.onboarding-step[data-done="true"] {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.onboard-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.onboard-check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.onboarding-step[data-done="true"] .onboard-check {
  background: #22c55e;
  border-color: #22c55e;
}

.onboarding-step[data-done="true"] .onboard-check svg {
  opacity: 1;
  stroke: white;
}

.onboard-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.onboarding-step[data-done="true"] .onboard-label {
  color: var(--text-primary);
  text-decoration: line-through;
  text-decoration-color: rgba(34, 197, 94, 0.4);
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.data-table td {
  font-size: 14px;
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.waiting {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.status-badge.in-progress {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-badge.picked-up {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.status-badge.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Payment Status Badges */
.payment-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.payment-badge.pending {
  background: rgba(156, 163, 175, 0.15);
  color: #6b7280;
}

.payment-badge.invoiced {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.payment-badge.paid {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.payment-badge.disputed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Due Date Color Coding */
.due-date-overdue {
  color: #ef4444;
  font-weight: 600;
}

.due-date-warning {
  color: #f59e0b;
  font-weight: 600;
}

/* Commission rate label */
.commission-rate-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-left: 4px;
}

/* Billing Stats */
.billing-stats {
  margin-bottom: 16px;
}

.stat-count {
  font-size: 12px;
  opacity: 0.7;
}

/* Billing Filters */
.billing-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 16px;
}

.billing-filters select,
.billing-filters input {
  width: auto;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.billing-filters select {
  min-width: 120px;
  padding-right: 30px;
}

.billing-filters input[type="date"] {
  width: 135px;
}

.billing-filters input[type="text"] {
  min-width: 140px;
  flex: 1;
  max-width: 220px;
}

.billing-filters select:focus,
.billing-filters input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: none;
}

/* Action Buttons */
.btn-accept {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-decline {
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-decline:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-view {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Notifications List */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.notification-item.unread {
  border-left: 3px solid #10b981;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.notification-icon.new-job {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.notification-icon.note {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.notification-icon.status {
  background: rgba(242, 169, 0, 0.15);
  color: #f2a900;
}

.notification-icon.document {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.notification-message {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-time {
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.quote-modal-content {
  max-width: 700px;
}

body.modal-open {
  overflow: hidden;
}

/* Job Detail Sections */
.job-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.job-detail-section h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin: 0 0 12px;
}

.job-detail-section p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-primary);
}

.job-detail-section p span {
  color: var(--text-secondary);
}

/* Notes Timeline */
.notes-timeline {
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  padding-left: 20px;
  margin: 24px 0;
}

.note-item {
  position: relative;
  padding-bottom: 16px;
}

.note-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
}

.note-item.staff::before {
  background: #3b82f6;
}

.note-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.note-content {
  font-size: 14px;
  color: var(--text-primary);
}

/* Add Note Form */
.add-note-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.add-note-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
}

.add-note-form textarea:focus {
  outline: none;
  border-color: #10b981;
}

/* File Upload */
.file-upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
}

.file-upload-zone:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.file-upload-zone.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.file-upload-zone svg {
  width: 40px;
  height: 40px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.file-upload-zone p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.file-upload-zone input {
  display: none;
}

/* Documents List */
.documents-list {
  margin-top: 16px;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
}

.document-item svg {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
}

.document-info {
  flex: 1;
  min-width: 0;
}

.document-name {
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Action Bar */
.action-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.action-bar select {
  flex: 1;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.action-bar button {
  padding: 10px 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .job-detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Admin View Banner */
.admin-view-banner {
  padding: 12px;
  margin: 8px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-view-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a78bfa;
}

.admin-view-badge svg {
  stroke: #a78bfa;
}

.btn-return {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, #005da0 0%, #009c73 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-return:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-return svg {
  stroke: white;
}

/* ============================================
   Vendor Estimate Section
   ============================================ */
.estimate-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.estimate-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.est-line {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.est-line input {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 12px;
}

.est-line input.desc { flex: 2; }
.est-line input.partnum { width: 80px; }
.est-line input.qty { width: 50px; }
.est-line input.cost,
.est-line input.rate,
.est-line input.hours { width: 70px; }
.est-line input.markup { width: 60px; }

.est-line .line-total {
  min-width: 70px;
  text-align: right;
  font-weight: 600;
  color: var(--success);
}

.est-line .btn-remove {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #ef4444;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.est-line .btn-remove:hover {
  background: rgba(239, 68, 68, 0.4);
}

.estimate-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.estimate-buttons .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #818cf8;
  border-radius: 4px;
  cursor: pointer;
}

.estimate-buttons .btn-sm:hover {
  background: rgba(99, 102, 241, 0.3);
}

.estimate-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.estimate-totals div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.estimate-totals div.total {
  font-weight: 600;
  color: var(--text-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  margin-top: 4px;
}

.estimate-section textarea {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 12px;
}

.estimate-submit-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.estimate-submit-row select {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 13px;
}

/* Previous Estimates */
.prev-estimate {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
}

.prev-estimate-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.prev-estimate-header strong {
  color: var(--text-primary);
  font-size: 13px;
}

.est-type {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-radius: 4px;
}

.est-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

.est-status.submitted {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.est-status.approved {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.est-status.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.prev-estimate-totals {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.prev-estimate-totals .total {
  font-weight: 600;
  color: var(--success);
}

.prev-estimate-items {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: 8px;
}

.prev-line-item {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0;
}

.prev-line-item .li-type {
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  text-transform: uppercase;
  font-size: 10px;
}

.prev-line-item .li-desc { flex: 1; }
.prev-line-item .li-total { color: var(--text-secondary); }

/* ============================================
   Quote View Styles
   ============================================ */
.modal-lg {
  max-width: 850px;
}

.quote-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.quote-info h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.quote-meta p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}

.quote-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.quote-detail-section h5 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

.quote-detail-section p {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text-primary);
}

.data-table.compact th,
.data-table.compact td {
  padding: 8px 12px;
  font-size: 13px;
}

.type-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  font-size: 11px;
  border-radius: 4px;
  text-transform: capitalize;
}

.quote-totals {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  max-width: 300px;
  margin-left: auto;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.total-row.grand-total {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 600;
  font-size: 16px;
  color: var(--success);
}

.quote-notes {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.quote-notes h5 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

.quote-notes p {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.quote-response-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quote-response-section h5 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.response-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lg svg {
  flex-shrink: 0;
}

.btn-accept.btn-lg {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: none;
  color: white;
}

.btn-accept.btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-decline.btn-lg {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-decline.btn-lg:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-counter {
  background: transparent;
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.btn-counter:hover {
  background: rgba(251, 191, 36, 0.1);
}

#reject-form textarea,
#counter-form textarea {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
}

.counter-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.counter-fields label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.counter-fields input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.quote-response-history {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.quote-response-history h5 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .quote-detail-grid {
    grid-template-columns: 1fr;
  }

  .response-options {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  /* Table column hiding for mobile - hide Phone and Status columns */
  .data-table th:nth-child(2),
  .data-table td:nth-child(2) { display: none; } /* Phone */
  .data-table th:nth-child(5),
  .data-table td:nth-child(5) { display: none; } /* Status */

  /* Modal mobile styling */
  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 16px;
    border-radius: 16px 16px 0 0;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* Vendor estimate input fields - 2 column grid */
  .est-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .est-line input { width: 100%; }
}

@media (max-width: 640px) {
  /* Table column hiding for small mobile - hide Service and Date columns */
  .data-table th:nth-child(4),
  .data-table td:nth-child(4) { display: none; } /* Service */
  .data-table th:nth-child(6),
  .data-table td:nth-child(6) { display: none; } /* Date */
  .data-table th, .data-table td { padding: 8px; }
}

@media (max-width: 480px) {
  /* Vendor estimate input fields - stack vertically on small phones */
  .est-line {
    flex-wrap: wrap;
  }
  .est-line input {
    flex: 1 1 calc(50% - 4px);
    min-width: 60px;
  }
  .est-line input.desc {
    flex: 1 1 100%;
  }
  .est-line .line-total {
    flex: 1 1 100%;
    text-align: left;
  }
}


/* =============================================
   QUOTE MODAL STYLES
   ============================================= */

/* Quote Summary */
.quote-summary {
  background: var(--surface, rgba(255,255,255,0.05));
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.quote-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.quote-info-row .label {
  color: var(--text-secondary, rgba(255,255,255,0.75));
}

.quote-info-row .value {
  font-weight: 500;
  color: var(--text-primary, #ffffff);
}

/* Line Items Table */
.line-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.line-items-table th,
.line-items-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary, #ffffff);
}

.line-items-table th {
  background: var(--surface, rgba(255,255,255,0.05));
  font-weight: 600;
  color: var(--text-secondary, rgba(255,255,255,0.75));
}

.line-items-table tfoot tr {
  font-weight: 500;
}

.line-items-table tfoot tr.total {
  font-size: 1.1rem;
  background: rgba(0, 93, 160, 0.15);
}

/* Quote Response Section */
.quote-response-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(255,255,255,0.1);
}

.response-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.response-form {
  background: var(--surface, rgba(255,255,255,0.05));
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.response-form.hidden {
  display: none;
}

.response-form h4 {
  margin-top: 0;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-draft { background: #e0e0e0; color: #666; }
.status-sent { background: #fff3cd; color: #856404; }
.status-viewed { background: #cce5ff; color: #004085; }
.status-accepted { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-revised { background: #e2d4f0; color: #533a7d; }

/* Quote Cards */
.quote-card {
  background: var(--surface, rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.quote-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
  background: var(--surface-hover, rgba(255,255,255,0.08));
}

.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.quote-number {
  font-weight: 600;
}

.quote-amount {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2196f3;
}

.quote-date {
  color: var(--text-secondary, rgba(255,255,255,0.75));
  font-size: 0.85rem;
}

/* =============================================
   NOTIFICATION STYLES
   ============================================= */

.notification-bell {
  position: relative;
  cursor: pointer;
}

#notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f44336;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

#notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.notification-bell:hover #notification-dropdown,
#notification-dropdown:hover {
  display: block;
}

.notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.notification-item:hover {
  background: #f8f9fa;
}

.notification-item.unread {
  background: #f0f7ff;
}

.notification-icon {
  font-size: 1.5rem;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.notification-message {
  color: #666;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-time {
  color: #999;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.no-notifications {
  padding: 2rem;
  text-align: center;
  color: #666;
}

/* =============================================
   DASHBOARD STATS
   ============================================= */

#dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-card.highlight {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: white;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
}

.stat-card.highlight .stat-label {
  color: rgba(255, 255, 255, 0.8);
}

/* =============================================
   SERVICE REQUEST CARDS
   ============================================= */

.service-request-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.service-request-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sr-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sr-vehicle {
  font-weight: 600;
}

.sr-service {
  color: #333;
  margin: 0.25rem 0;
}

.sr-customer {
  color: #666;
  font-size: 0.9rem;
}

.sr-date {
  color: #999;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Priority badges */
.priority-urgent { background: #f44336; color: white; }
.priority-high { background: #ff9800; color: white; }
.priority-normal { background: #4caf50; color: white; }
.priority-low { background: #9e9e9e; color: white; }

/* =============================================
   HISTORY CARDS
   ============================================= */

.history-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.history-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.history-date {
  color: #666;
}

.history-vehicle {
  font-weight: 600;
}

.history-service {
  color: #333;
}

.history-customer {
  color: #666;
  font-size: 0.9rem;
}

.history-amount {
  font-weight: 600;
  color: #2196f3;
  margin-top: 0.5rem;
}

/* =============================================
   EMPTY STATE
   ============================================= */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
}

/* =============================================
   BUTTONS
   ============================================= */

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-success {
  background: #4caf50;
  color: white;
}

.btn-success:hover {
  background: #43a047;
}

.btn-warning {
  background: #ff9800;
  color: white;
}

.btn-warning:hover {
  background: #f57c00;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #e53935;
}

.btn-secondary {
  background: #9e9e9e;
  color: white;
}

.btn-secondary:hover {
  background: #757575;
}

/* Form styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Quote notices */
.quote-accepted-notice,
.quote-rejected-notice,
.quote-countered-notice {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.quote-accepted-notice {
  background: #d4edda;
  color: #155724;
}

.quote-rejected-notice {
  background: #f8d7da;
  color: #721c24;
}

.quote-countered-notice {
  background: #e2d4f0;
  color: #533a7d;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */

.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #10b981;
  color: white;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: toastSlideIn 0.3s ease;
  max-width: 400px;
}

.toast-notification.toast-success {
  background: #10b981;
}

.toast-notification.toast-error {
  background: #ef4444;
}

.toast-notification.toast-warning {
  background: #f59e0b;
  color: #1f2937;
}

.toast-notification.toast-info {
  background: #3b82f6;
}

.toast-notification span {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.toast-notification .toast-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 0;
  line-height: 1;
}

.toast-notification .toast-close:hover {
  opacity: 1;
}

@keyframes toastSlideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* =============================================
   SETTINGS SECTION
   ============================================= */

.settings-panel {
  margin-bottom: 0;
}

.settings-panel h3 {
  margin-bottom: 8px;
}

.settings-form-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.settings-input {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  min-width: 150px;
}

.settings-input:focus {
  outline: none;
  border-color: #10b981;
}

.settings-input::placeholder {
  color: var(--text-tertiary);
}

/* Availability Schedule */
.availability-day {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.availability-day:last-child {
  border-bottom: none;
}

.availability-day-name {
  width: 100px;
  font-weight: 500;
  color: var(--text-primary);
}

.availability-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.availability-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #10b981;
  cursor: pointer;
}

.availability-times {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.availability-times input[type="time"] {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
}

.availability-times input[type="time"]:focus {
  outline: none;
  border-color: #10b981;
}

.availability-times input[type="time"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.availability-times span {
  color: var(--text-secondary);
  font-size: 13px;
}

.availability-max-jobs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.availability-max-jobs label {
  font-size: 12px;
  color: var(--text-secondary);
}

.availability-max-jobs input[type="number"] {
  width: 60px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  text-align: center;
}

.availability-max-jobs input[type="number"]:focus {
  outline: none;
  border-color: #10b981;
}

.availability-max-jobs input[type="number"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Blocked Dates List */
.blocked-date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 8px;
}

.blocked-date-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.blocked-date-date {
  font-weight: 500;
  color: var(--text-primary);
}

.blocked-date-reason {
  color: var(--text-secondary);
  font-size: 13px;
}

.blocked-date-remove {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #ef4444;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.blocked-date-remove:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Service Areas List */
.service-areas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-area-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  color: #10b981;
  font-size: 13px;
  font-weight: 500;
}

.service-area-tag button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.service-area-tag button:hover {
  opacity: 1;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #10b981;
  line-height: 1.2;
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-card.warning .metric-value {
  color: #f59e0b;
}

.metric-card.info .metric-value {
  color: #3b82f6;
}

/* Settings Section Responsive */
@media (max-width: 768px) {
  .availability-day {
    flex-wrap: wrap;
    gap: 12px;
  }

  .availability-day-name {
    width: 100%;
  }

  .availability-times {
    width: 100%;
  }

  .settings-form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-input {
    width: 100%;
  }
}

/* =============================================
   MOBILE SIDEBAR & NAVIGATION
   ============================================= */

/* Vendor-specific mobile header */
.vendor-mobile-header {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
}

.vendor-mobile-header span {
  color: #ffffff !important;
}

.vendor-mobile-header .mobile-menu-btn {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.vendor-mobile-header .mobile-menu-btn svg {
  stroke: #ffffff;
}

@media (max-width: 860px) {
  .vendor-sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    top: 0;
    bottom: 0;
    z-index: 10060;
    transition: left 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vendor-sidebar.mobile-open {
    left: 0;
  }

  .app-main {
    margin-left: 0;
    padding-top: 70px; /* Account for fixed mobile header */
  }

  /* Prevent horizontal overflow on mobile */
  .view-section {
    overflow-x: hidden;
    max-width: 100vw;
    padding: 12px;
  }

  /* Make tables horizontally scrollable */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Stack cards vertically */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Estimate form inputs wrap on mobile */
  .est-line {
    flex-wrap: wrap;
    gap: 6px;
  }

  .est-line input.desc { flex: 1 1 100%; }
  .est-line input.partnum,
  .est-line input.qty,
  .est-line input.cost,
  .est-line input.rate,
  .est-line input.hours,
  .est-line input.markup {
    width: auto;
    flex: 1 1 calc(33% - 6px);
    min-width: 60px;
  }

  /* Job action buttons stack */
  .btn-accept,
  .btn-decline {
    min-height: 44px;
    min-width: 44px;
  }

  /* Quote review buttons stack */
  .quote-response-section .response-options {
    flex-direction: column;
  }

  .quote-response-section .btn-lg {
    width: 100%;
  }

  /* Mobile overlay z-index fix — must sit between content and sidebar */
  .mobile-overlay {
    z-index: 10050 !important;
  }

  /* Mobile header always on top */
  .mobile-header,
  .vendor-mobile-header {
    z-index: 10100 !important;
  }

  /* Touch-friendly nav items */
  .vendor-sidebar .nav-item {
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Prevent iOS zoom on input focus */
  input, select, textarea {
    font-size: 16px;
  }

  /* Modal full-screen on mobile */
  .vendor-job-modal {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .view-section {
    padding: 8px;
  }

  .app-main {
    padding-top: 60px;
  }

  /* Further reduce table text */
  .data-table th,
  .data-table td {
    font-size: 0.8125rem;
    padding: 6px 4px;
  }

  /* Stack stat cards tighter */
  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }
}

/* Keep vendor portal billing visuals aligned with app theme (avoid white-on-white legacy overrides). */
.app-shell .stat-card,
.app-shell .card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  box-shadow: none;
}

.app-shell .stat-label {
  color: var(--text-secondary);
}

#billing .data-table th,
#billing .data-table td {
  color: var(--text-primary);
}

/* Jobs tab pills */
.jobs-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, rgba(255,255,255,0.6));
  cursor: pointer;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.jobs-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.jobs-tab.active {
  background: var(--accent, #50c8a8);
  color: #fff;
  border-color: var(--accent, #50c8a8);
}
.jobs-tab .badge-pill {
  font-size: 0.625rem;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  vertical-align: middle;
}
