/* =====================================================
   CV Review Page Styles
   Following PMhelp design system
   ===================================================== */

/* ===================
   Hero Section
   =================== */
.cv-hero {
  padding: 80px 24px 40px;
  text-align: center;
}

.cv-hero .h1 {
  font-family: Satoshi, sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: #2C003C;
  margin-bottom: 16px;
  line-height: 1.1;
}

.cv-hero-subtitle {
  font-family: Satoshi, sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #636b75;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ===================
   Quota Badge
   =================== */
.cv-quota-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  padding: 16px 24px;
}

.cv-quota-text {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #2C003C;
}

.cv-quota-bar {
  width: 120px;
  height: 6px;
  background: #e9d5ff;
  border-radius: 3px;
  overflow: hidden;
}

.cv-quota-bar-fill {
  height: 100%;
  background: linear-gradient(123.77deg, #742194 10%, #9e2ff4 56%, #de5af9 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.cv-quota-bar-fill.cv-quota--warning {
  background: #f59e0b;
}

.cv-quota-bar-fill.cv-quota--exhausted {
  background: #ef4444;
}

.cv-quota-reset {
  font-family: Satoshi, sans-serif;
  font-size: 12px;
  color: #9ca3af;
}

/* ===================
   Upload Section
   =================== */
.cv-upload-section {
  padding: 0 24px 60px;
  max-width: 960px;
  margin: 0 auto;
}

/* Two-Column Upload Grid */
.cv-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}

.cv-upload-col,
.cv-tips-col {
  min-width: 0;
}

/* Tips Panel */
.cv-tips-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.cv-tips-panel:last-child {
  margin-bottom: 0;
}

.cv-tips-panel-title {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #2C003C;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.cv-tips-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cv-tips-panel li {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  color: #344054;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}

.cv-tips-panel li:last-child {
  margin-bottom: 0;
}

.cv-tips-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #742194;
}

/* Role Intro Text */
.cv-role-intro-text {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #636b75;
  max-width: 600px;
  margin: 0 auto 12px;
  text-align: center;
}

/* Drop Zone */
.cv-drop-zone {
  border: 2px dashed #d0d5dd;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.cv-drop-zone:hover {
  border-color: #9ca3af;
  background: #f5f5f5;
}

.cv-drop-zone--dragover {
  border-color: #742194;
  background: #faf5ff;
  transform: scale(1.01);
}

.cv-drop-zone--has-file {
  border: 2px solid #6ee7b7;
  background: #f0fdf4;
  padding: 20px 24px;
  cursor: default;
}

.cv-drop-zone--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.cv-drop-zone-icon {
  margin-bottom: 16px;
  color: #9ca3af;
}

.cv-drop-zone-title {
  font-family: Satoshi, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #344054;
  margin-bottom: 4px;
}

.cv-drop-zone-browse {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  color: #742194;
  text-decoration: underline;
  cursor: pointer;
}

.cv-drop-zone-hint {
  font-family: Satoshi, sans-serif;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
}

/* File selected state */
.cv-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.cv-file-details {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.cv-file-icon {
  flex-shrink: 0;
  color: #16a34a;
}

.cv-file-name {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #344054;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-file-size {
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  color: #636b75;
  margin-left: 4px;
  flex-shrink: 0;
}

.cv-file-remove {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.cv-file-remove:hover {
  color: #ef4444;
}

/* Target Role Select */
.cv-form-group {
  margin-bottom: 24px;
}

.cv-form-label {
  display: block;
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #2C003C;
  margin-bottom: 8px;
}

.cv-form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: Satoshi, sans-serif;
  color: #211f54;
  background: #fff;
  transition: all 0.2s;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.cv-form-select:focus {
  outline: none;
  border-color: #742194;
  box-shadow: 0 0 0 3px rgba(116, 33, 148, 0.1);
}

/* Form Message */
.cv-form-message {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  text-align: center;
  font-family: Satoshi, sans-serif;
  display: none;
}

.cv-form-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  display: block;
}

.cv-form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  display: block;
}

/* Submit Button */
.cv-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(123.77deg, #742194 10%, #9e2ff4 56%, #de5af9 100%);
  color: white;
  border: none;
  border-radius: 72px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: Satoshi, sans-serif;
}

.cv-submit-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(116, 33, 148, 0.3);
}

.cv-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cv-submit-btn .btn-spinner {
  display: none;
}

.cv-submit-btn .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: cvSpin 0.8s linear infinite;
}

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

/* ===================
   Processing State
   =================== */
.cv-processing-state {
  display: none;
  padding: 32px;
  text-align: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 24px;
}

.cv-processing-state.active {
  display: block;
}

.cv-processing-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #e9d5ff;
  border-top-color: #742194;
  border-radius: 50%;
  animation: cvSpin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.cv-processing-title {
  font-family: Satoshi, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #2C003C;
  margin-bottom: 4px;
  transition: opacity 0.3s ease;
}

.cv-processing-subtitle {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 24px;
  transition: opacity 0.3s ease;
}

/* Processing Steps */
.cv-processing-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 280px;
  margin: 0 auto;
  text-align: left;
}

.cv-processing-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  color: #9ca3af;
  transition: color 0.3s;
}

.cv-processing-step.active {
  color: #742194;
  font-weight: 600;
}

.cv-processing-step.completed {
  color: #16a34a;
}

.cv-step-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cv-step-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e9d5ff;
  border-top-color: #742194;
  border-radius: 50%;
  animation: cvSpin 0.8s linear infinite;
}

/* ===================
   Review Results
   =================== */
.cv-review-results {
  display: none;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.cv-review-results.active {
  display: block;
}

.cv-results-enter {
  animation: cvResultsSlideIn 0.4s ease-out forwards;
}

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

/* Results Header */
.cv-results-header {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cv-results-title {
  font-family: Satoshi, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #2C003C;
  margin-bottom: 8px;
}

.cv-results-role-badge {
  display: inline-block;
  background: #faf5ff;
  color: #742194;
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 72px;
  margin-bottom: 8px;
}

.cv-results-meta {
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  color: #9ca3af;
}

/* ===================
   Section Cards (Accordion)
   =================== */
.cv-section-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.cv-section-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cv-section-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: Satoshi, sans-serif;
  transition: background 0.15s;
}

.cv-section-header:hover {
  background: #fafafa;
}

.cv-section-header:focus {
  outline: 2px solid #742194;
  outline-offset: -2px;
}

.cv-section-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #742194;
}

.cv-section-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #2C003C;
}

.cv-section-chevron {
  width: 16px;
  height: 16px;
  color: #9ca3af;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.cv-section-card[data-expanded="true"] .cv-section-chevron {
  transform: rotate(180deg);
}

/* Section Body */
.cv-section-body {
  display: none;
  padding: 0 24px 24px;
}

.cv-section-card[data-expanded="true"] .cv-section-body {
  display: block;
}

/* Verdict Banner */
.cv-verdict-banner {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  color: #344054;
  padding: 12px 16px;
  background: #faf5ff;
  border-left: 4px solid #742194;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Sub-section Labels */
.cv-sub-label {
  font-family: Satoshi, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.cv-sub-label--working {
  color: #16a34a;
}

.cv-sub-label--attention {
  color: #dc2626;
}

.cv-sub-label--recommendations {
  color: #742194;
}

/* Sub-section Content */
.cv-sub-content {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  color: #344054;
  line-height: 1.7;
  margin-bottom: 20px;
}

.cv-sub-content:last-child {
  margin-bottom: 0;
}

.cv-sub-content p {
  margin: 0 0 12px;
}

.cv-sub-content p:last-child {
  margin-bottom: 0;
}

.cv-sub-content ul,
.cv-sub-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.cv-sub-content li {
  margin-bottom: 6px;
}

.cv-sub-content strong {
  font-weight: 700;
  color: #2C003C;
}

/* Recommendation Items */
.cv-recommendation-item {
  padding-left: 16px;
  border-left: 3px solid #e9d5ff;
  margin-bottom: 12px;
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  color: #344054;
  line-height: 1.6;
}

.cv-recommendation-item:last-child {
  margin-bottom: 0;
}

/* ===================
   Trajectory Card
   =================== */
.cv-trajectory-card {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}

.cv-trajectory-label {
  font-family: Satoshi, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #742194;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.cv-trajectory-content {
  font-family: Satoshi, sans-serif;
  font-size: 16px;
  color: #344054;
  line-height: 1.7;
}

.cv-trajectory-content p {
  margin: 0 0 12px;
}

.cv-trajectory-content p:last-child {
  margin-bottom: 0;
}

/* ===================
   Closing Reminder
   =================== */
.cv-closing-reminder {
  text-align: center;
  padding: 24px;
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.cv-closing-text {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #636b75;
  font-style: italic;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

/* ===================
   Actions Bar
   =================== */
.cv-results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 24px 0;
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.cv-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: linear-gradient(123.77deg, #742194 10%, #9e2ff4 56%, #de5af9 100%);
  color: white;
  border: none;
  border-radius: 72px;
  font-family: Satoshi, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.cv-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(116, 33, 148, 0.3);
  color: white;
  text-decoration: none;
}

.cv-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: transparent;
  border: 2px solid #742194;
  color: #742194;
  border-radius: 72px;
  font-family: Satoshi, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.cv-btn-outline:hover {
  background: #faf5ff;
  color: #742194;
  text-decoration: none;
}

/* ===================
   Review History
   =================== */
.cv-history-section {
  padding: 60px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.cv-history-title {
  font-family: Satoshi, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #2C003C;
  margin-bottom: 24px;
  text-align: center;
}

.cv-history-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

/* History Card */
.cv-history-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  min-height: 140px;
}

.cv-history-card:hover {
  box-shadow: 0 4px 16px rgba(116, 33, 148, 0.1);
  border-color: #742194;
}

.cv-history-icon {
  flex-shrink: 0;
  color: #742194;
}

.cv-history-details {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.cv-history-filename {
  font-family: Satoshi, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #2C003C;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.cv-history-meta {
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  color: #636b75;
  margin-top: 2px;
}

.cv-history-view {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #742194;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Empty State */
.cv-history-empty {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
  grid-column: 1 / -1;
}

.cv-history-empty-icon {
  margin-bottom: 12px;
  color: #d0d5dd;
}

.cv-history-empty-title {
  font-family: Satoshi, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 4px;
}

.cv-history-empty-text {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  color: #9ca3af;
}

/* Raw Text Fallback */
.cv-raw-text {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  color: #344054;
  line-height: 1.7;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
}

.cv-raw-text p {
  margin: 0 0 16px;
}

.cv-raw-text p:last-child {
  margin-bottom: 0;
}

.cv-raw-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: #2C003C;
  margin: 24px 0 12px;
}

.cv-raw-text h3:first-child {
  margin-top: 0;
}

.cv-raw-text strong {
  font-weight: 700;
  color: #2C003C;
}

.cv-raw-text ul,
.cv-raw-text ol {
  margin: 8px 0;
  padding-left: 20px;
}

.cv-raw-text li {
  margin-bottom: 6px;
}

/* ===================
   Responsive Design
   =================== */
@media (max-width: 991px) {
  .cv-hero .h1 {
    font-size: 36px;
  }
}

@media (max-width: 767px) {
  .cv-hero {
    padding: 60px 16px 32px;
  }

  .cv-hero .h1 {
    font-size: 28px;
  }

  .cv-hero-subtitle {
    font-size: 16px;
  }

  .cv-upload-section {
    padding: 0 16px 40px;
  }

  .cv-upload-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cv-drop-zone {
    padding: 32px 16px;
  }

  .cv-results-header {
    padding: 24px 20px;
  }

  .cv-results-title {
    font-size: 24px;
  }

  .cv-section-header {
    padding: 16px 20px;
  }

  .cv-section-body {
    padding: 0 20px 20px;
  }

  .cv-trajectory-card {
    padding: 20px;
  }

  .cv-results-actions {
    flex-direction: column;
  }

  .cv-btn-primary,
  .cv-btn-outline {
    width: 100%;
  }

  .cv-review-results {
    padding: 0 16px 40px;
  }

  .cv-history-section {
    padding: 40px 16px;
  }

  .cv-history-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cv-history-card {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
  }
}

@media (max-width: 479px) {
  .cv-hero .h1 {
    font-size: 24px;
  }

  .cv-section-header {
    padding: 14px 16px;
  }

  .cv-section-body {
    padding: 0 16px 16px;
  }

  .cv-section-title {
    font-size: 14px;
  }

  .cv-verdict-banner {
    font-size: 14px;
    padding: 10px 12px;
  }

  .cv-sub-content {
    font-size: 14px;
  }

  .cv-btn-download-pdf {
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================
   Download PDF Button (Results Header)
   ===================================================== */
.cv-btn-download-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #211f54;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 16px;
}

.cv-btn-download-pdf:hover:not(:disabled) {
  background: #2d2b6e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(33, 31, 84, 0.2);
}

.cv-btn-download-pdf:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cv-btn-download-pdf .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: cvSpin 0.8s linear infinite;
}

/* =====================================================
   History Card Download Button
   ===================================================== */
.cv-history-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: flex-end;
}

.cv-history-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  color: #742194;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.cv-history-download-btn:hover:not(:disabled) {
  background: #faf5ff;
  border-color: #742194;
}

.cv-history-download-btn:disabled,
.cv-history-download-btn.loading {
  opacity: 0.5;
  cursor: wait;
}

.cv-history-download-btn.loading svg {
  animation: cvSpin 0.8s linear infinite;
}

/* =====================================================
   Sign-In Modal
   ===================================================== */

.cv-signin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: cvFadeIn 0.2s ease;
}

.cv-signin-overlay.active {
  display: flex;
}

@keyframes cvFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cv-signin-modal {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: cvSlideUp 0.25s ease;
  text-align: center;
}

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

.cv-signin-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.15s;
  line-height: 0;
}

.cv-signin-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.cv-signin-icon {
  margin-bottom: 16px;
}

.cv-signin-title {
  font-family: Satoshi, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px;
}

.cv-signin-subtitle {
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 28px;
  line-height: 1.5;
}

.cv-signin-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 72px;
  background: #fff;
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.cv-signin-oauth-btn + .cv-signin-oauth-btn {
  margin-top: 12px;
}

.cv-signin-oauth-btn:hover {
  border-color: #742194;
  background: #faf5ff;
}

.cv-signin-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.cv-signin-divider::before,
.cv-signin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.cv-signin-divider span {
  font-family: Satoshi, sans-serif;
  font-size: 13px;
  color: #9ca3af;
  padding: 0 16px;
}

.cv-signin-email-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 72px;
  background: linear-gradient(123.77deg, #742194 10%, #9e2ff4 56%, #de5af9 100%);
  font-family: Satoshi, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.cv-signin-email-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(116, 33, 148, 0.3);
  color: #fff;
  text-decoration: none;
}

.cv-signin-footer {
  font-family: Satoshi, sans-serif;
  font-size: 14px;
  color: #6b7280;
  margin: 24px 0 0;
}

.cv-signin-footer a {
  color: #742194;
  font-weight: 600;
  text-decoration: none;
}

.cv-signin-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .cv-signin-modal {
    padding: 32px 24px 24px;
    border-radius: 16px;
  }

  .cv-signin-title {
    font-size: 20px;
  }
}
