/**
 * Agent Review Vue App Styles
 */
.page-header-bar {
  padding: 10px 16px;
  background: #fafbfc;
  border-bottom: 1px solid #e1e4e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px 8px 0 0;
}
.page-header-bar .page-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #24292e;
}
.page-header-bar .page-header-title i {
  margin-right: 6px;
}
.page-header-bar .page-header-left {
  display: flex;
  align-items: center;
}
.page-header-bar .page-header-left a {
  color: #24292e;
  text-decoration: none;
}
.page-header-bar .page-header-left a:hover {
  color: #2563eb;
}
.page-header-bar .page-header-left a strong {
  font-size: 14px;
  font-weight: 600;
}
.page-header-bar .page-header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

#agent-review-app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.agent-review-dashboard {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.filter-input,
.filter-select {
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
  background: white;
  outline: none;
}
.filter-input:focus,
.filter-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.filter-input {
  width: 180px;
}

.filter-select {
  min-width: 140px;
}

.status-dropdown {
  position: relative;
}

.status-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: left;
}
.status-trigger .icon {
  font-size: 10px;
  color: #9ca3af;
}

.status-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 180px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  padding: 6px 0;
}

.status-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s;
}
.status-checkbox-item:hover {
  background: #f9fafb;
}
.status-checkbox-item input[type=checkbox] {
  accent-color: #2563eb;
}

.status-dropdown-footer {
  border-top: 1px solid #f3f4f6;
  padding: 6px 14px;
  margin-top: 4px;
  display: flex;
  gap: 12px;
}

.btn-clear-statuses {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.btn-clear-statuses:hover {
  text-decoration: underline;
}

.btn-group-toggle,
.tab-toggle {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
}

.btn-toggle,
.tab-btn {
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  background: white;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-toggle:not(:last-child),
.tab-btn:not(:last-child) {
  border-right: 1px solid #d1d5db;
}
.btn-toggle.active,
.tab-btn.active {
  background: #2563eb;
  color: white;
}
.btn-toggle:hover:not(.active),
.tab-btn:hover:not(.active) {
  background: #f3f4f6;
}

.header-stat {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  padding: 3px 10px;
  background: #f3f4f6;
  border-radius: 12px;
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.loading-spinner .icon {
  font-size: 32px;
  color: #2563eb;
  -webkit-animation: spin 1s linear infinite;
          animation: spin 1s linear infinite;
}
.loading-spinner span {
  font-size: 14px;
  color: #6b7280;
}

@-webkit-keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.error-bar {
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.08);
  color: #eb1515;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.error-bar .btn-retry {
  margin-left: auto;
  padding: 4px 12px;
  border: 1px solid #ef4444;
  border-radius: 4px;
  background: white;
  color: #ef4444;
  font-size: 12px;
  cursor: pointer;
}
.error-bar .btn-retry:hover {
  background: #ef4444;
  color: white;
}

.agent-table-wrapper {
  overflow-x: auto;
}

.agent-table {
  width: 100%;
  border-collapse: collapse;
}
.agent-table th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 5;
}
.agent-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.col-sales {
  width: 60px;
  text-align: center;
}

.col-photo {
  width: 60px;
}

.col-name {
  min-width: 200px;
}

.col-agency {
  min-width: 150px;
}

.col-reviewed {
  width: 160px;
}

.col-actions {
  width: 200px;
  text-align: center;
  white-space: nowrap;
}

.agent-row {
  transition: opacity 0.3s, background 0.3s;
}
.agent-row:hover {
  background: rgba(37, 99, 235, 0.02);
}
.agent-row.row-fading {
  opacity: 0.5;
  background: rgba(245, 158, 11, 0.05);
}

.sold-badge {
  display: inline-block;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: rgba(16, 185, 129, 0.12);
  color: #0c8a60;
}

.agent-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #f3f4f6;
}
.agent-photo img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
.agent-photo .photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 18px;
}
.agent-photo .photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 14px;
}
.agent-photo:hover .photo-overlay {
  opacity: 1;
}

.photo-preview {
  position: fixed;
  z-index: 1000;
  width: 200px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border: 3px solid white;
  pointer-events: none;
}
.photo-preview img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.agent-name-link {
  color: #1f2937;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.agent-name-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.name-edit-row .name-input {
  width: 100%;
  max-width: 250px;
  padding: 3px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 12px;
  color: #374151;
  background: #f9fafb;
}
.name-edit-row .name-input:focus {
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge.status-accepting {
  background: rgba(16, 185, 129, 0.12);
  color: #0c8a60;
}
.status-badge.status-declined, .status-badge.status-declined_rental {
  background: rgba(239, 68, 68, 0.12);
  color: #eb1515;
}
.status-badge.status-blacklisted {
  background: rgba(31, 41, 55, 0.12);
  color: #1f2937;
}
.status-badge.status-selective {
  background: rgba(245, 158, 11, 0.12);
  color: #ac6f07;
}
.status-badge.status-inactive, .status-badge.status-unresponsive {
  background: rgba(156, 163, 175, 0.15);
  color: #4b5563;
}
.status-badge.status-refer_to_other {
  background: rgba(6, 182, 212, 0.12);
  color: #058ba2;
}

.review-date {
  font-size: 12px;
  color: #374151;
}

.review-by {
  font-size: 11px;
  color: #9ca3af;
  display: block;
}

.realtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.12);
  color: #ac6f07;
  -webkit-animation: pulse 1.5s infinite;
          animation: pulse 1.5s infinite;
}
.realtime-badge .icon {
  font-size: 10px;
}

@-webkit-keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}
.action-buttons {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-review {
  background: rgba(16, 185, 129, 0.12);
  color: #0c8a60;
}
.btn-review:hover:not(:disabled) {
  background: #10b981;
  color: white;
}

.btn-unreview {
  background: rgba(156, 163, 175, 0.12);
  color: #4b5563;
}
.btn-unreview:hover:not(:disabled) {
  background: #e5e7eb;
  color: #1f2937;
}

.btn-upload-photo {
  background: rgba(6, 182, 212, 0.12);
  color: #058ba2;
}
.btn-upload-photo:hover:not(:disabled) {
  background: #06b6d4;
  color: white;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.pagination-info {
  font-size: 12px;
  color: #6b7280;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-page {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
}
.btn-page:hover:not(:disabled) {
  background: #f3f4f6;
}
.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 12px;
  color: #6b7280;
  padding: 0 8px;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #9ca3af;
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 14px;
  margin: 0;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.modal-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-header .modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}
.modal-header .modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fecaca;
}

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

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
}

.input-tabs {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}

.input-section {
  margin-bottom: 16px;
}

.file-input {
  font-size: 13px;
}

.url-input-row {
  display: flex;
  gap: 8px;
}

.url-input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
}
.url-input:focus {
  border-color: #2563eb;
  outline: none;
}

.btn-load {
  padding: 7px 16px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.btn-load:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.preview-section {
  margin-top: 12px;
}

.crop-container {
  max-height: 350px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f3f4f6;
}
.crop-container .crop-image {
  max-width: 100%;
  display: block;
}

.crop-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 6px;
}

.error-message {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  color: #eb1515;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 12px;
}

.btn-cancel {
  padding: 8px 20px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
}
.btn-cancel:hover {
  background: #f3f4f6;
}

.btn-upload {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-upload:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-upload:hover:not(:disabled) {
  background: #1350d4;
}

.text-muted {
  color: #9ca3af;
}

@media (max-width: 768px) {
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-panel {
    flex-direction: column;
    align-items: flex-start;
  }

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