:root {
  --color-primary: #2563eb;
  --color-secondary: #059669;
  --color-accent: #613aed;
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-secondary: #575d69;
  --color-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-error: #dc2626;
  --color-success: #10b981;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
}

@font-face {
  font-family: "Vazir";
  src: url("https://cdnjs.cloudflare.com/ajax/libs/vazir-font/26.0.0/Vazir-Light.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazir";
  src: url("https://cdnjs.cloudflare.com/ajax/libs/vazir-font/26.0.0/Vazir-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Vazir', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 14px;
}

.container {
  width: min(1200px, 95vw);
  margin: 0 auto;
}

/* Header */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.header-left {
  flex: 1;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.tagline {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Main Content */
.main-content {
  padding: 40px 0;
  min-height: calc(100vh - 120px);
}

.talent-section {
  width: 100%;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 32px;
  position: sticky;
  top: 100px;
  z-index: 9;
  background: var(--color-bg);
  padding: 10px 0 12px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-note {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--color-surface);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.filter-dropdown {
  position: relative;
  flex-shrink: 0;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn-active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.filter-btn-active:hover {
  background: #1d4ed8;
  color: white;
}

.filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 20;
  min-width: 180px;
  overflow: hidden;
  display: none;
}

.filter-menu:not(.hidden) {
  display: block;
}

.filter-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: background 0.15s ease;
}

.filter-option:hover {
  background: rgba(37, 99, 235, 0.06);
}

.filter-option.active {
  color: var(--color-primary);
  font-weight: 700;
  background: rgba(37, 99, 235, 0.08);
}

/* Buttons */
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-secondary);
  color: white;
}

.btn-secondary:hover {
  background: #059669;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent);
  color: white;
}

.btn-accent:hover {
  background: #6d28d9;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

.btn-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

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

.talent-actions .btn {
  background: var(--color-primary);
  color: white;
}

.talent-actions .btn:hover {
  background: #1d4ed8;
}

.talent-actions .btn[style*="background: transparent"] {
  background: transparent !important;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-primary) !important;
}

.talent-actions .btn[style*="background: transparent"]:hover {
  background: rgba(37, 99, 235, 0.05) !important;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary);
}

.badge-muted {
  background: rgba(107, 114, 128, 0.1);
  color: var(--color-text-secondary);
}

/* Talent List */
.talent-list {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .talent-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .talent-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.talent-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
}

.talent-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.talent-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  align-self: center;
  border: 2px solid var(--color-border);
}

.talent-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.talent-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.talent-title {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 600;
}

.talent-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  font-size: 16px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
}

.detail-label {
  font-weight: 600;
  color: var(--color-text);
  min-width: 80px;
  font-size: 12px;
}

.talent-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.talent-actions .btn {
  flex: 1;
  white-space: nowrap;
  font-size: 13px;
  padding: 8px 12px;
}

.copy-btn {
  padding: 4px 8px;
  font-size: 12px;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  gap: 4px;
}

.copy-btn:hover {
  background: rgba(37, 99, 235, 0.05);
}

.copy-btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
}

.copy-btn-email {
  border-radius: var(--radius-md);
}

/* Loading & Empty States */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  color: var(--color-text-secondary);
}

.loading-indicator.hidden {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.end-message {
  text-align: center;
  padding: 40px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.end-message.hidden {
  display: none;
}

.end-message p {
  font-weight: 500;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.copy-success-modal {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -20px);
  opacity: 0;
  pointer-events: none;
  z-index: 70;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-success-modal.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-success-modal-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  box-shadow: var(--shadow-md);
  font-weight: 700;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: min(500px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-content.modal-small {
  width: min(420px, 95vw);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

/* Modal Form */
.modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: var(--color-text);
  font-size: 13px;
}

.form-group input,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-text {
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.form-message {
  min-height: 20px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-top: -8px;
}

.form-message.error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-error);
}

.form-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    position: static;
  }

  .header-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .header-right {
    flex-direction: column;
    width: 100%;
  }

  .header-right .btn {
    width: 100%;
  }

  .section-header {
    position: sticky;
    top: 0px;
  }

  .search-wrapper {
    width: 100%;
    min-width: unset;
  }

  .search-row {
    flex-direction: column;
  }

  .search-input {
    width: 100%;
    min-width: unset;
  }

  .talent-list {
    grid-template-columns: 1fr;
  }

  .talent-actions {
    flex-direction: row;
  }

  .talent-actions .btn {
    flex: 1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    border-radius: var(--radius-md);
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 22px;
  }

  .header-logo-image {
    width: 36px;
    height: 36px;
  }

  .tagline {
    display: none;
  }

  .section-header h2 {
    font-size: 20px;
  }

  .talent-details {
    grid-template-columns: 1fr;
  }
}
