/* submitter.css — Property Submitter portal styles (Stage 8, Session 42)
   Mockup source: submitter-portfolio-v2.html
   Load order: tokens.css → components.css → detail.css → pipeline.css → panel.css → submitter.css */

/* ========== SUBMITTER PORTAL ========== */

/* Portfolio View */
.submitter-view { padding: var(--s-6) var(--s-8) var(--s-10); max-width: 960px; margin: 0 auto; }

.portfolio-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-6);
}
.portfolio-header-left { display: flex; align-items: baseline; gap: var(--s-3); }
.portfolio-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.portfolio-count {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--gray-500); background: var(--gray-100); padding: 2px 8px;
  border-radius: var(--r-full);
}

/* Portfolio Sort Dropdown */
.portfolio-sort {
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  color: var(--gray-600); background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  padding: 4px 28px 4px 10px; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.portfolio-sort:hover { border-color: var(--gray-300); color: var(--gray-700); }
.portfolio-sort:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-glow); }

/* Portfolio Card */
.portfolio-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
  cursor: pointer; transition: all var(--t-base);
  display: grid; grid-template-columns: 4px 1fr;
  gap: 0; overflow: hidden; margin-bottom: var(--s-4);
}
.portfolio-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--gray-300); }

.card-accent { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.card-content { padding: var(--s-5) var(--s-6); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--s-4); }
.card-address { font-size: 15px; font-weight: 600; color: var(--gray-800); line-height: 1.35; }
.card-date { font-family: var(--font-mono); font-size: 12px; color: var(--gray-500); margin-top: var(--s-1); }
.card-stage-badge {
  display: inline-flex; align-items: center; padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}

.card-message {
  font-size: 13px; font-style: italic; color: var(--gray-600); line-height: 1.5;
  padding: var(--s-2) var(--s-3); background: var(--gray-50);
  border-left: 2px solid var(--gray-300); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-top: var(--s-3);
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--gray-100);
}

.card-deal-preview { display: flex; align-items: center; gap: var(--s-4); }
.card-deal-chip {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 11px; color: var(--gray-500);
}
.card-deal-chip i { width: 12px; height: 12px; }
.card-deal-chip .val { font-weight: 600; color: var(--gray-700); }

.view-details-link {
  display: inline-flex; align-items: center; gap: var(--s-1);
  font-size: 12px; font-weight: 600; color: var(--brand); cursor: pointer;
  transition: gap var(--t-fast);
}
.view-details-link:hover { gap: var(--s-2); }
.view-details-link i { width: 14px; height: 14px; }

/* ========== DHL TRACKER ========== */

.dhl-tracker { padding: var(--s-4) var(--s-3); }
.dhl-tracker.expanded {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: var(--s-6) var(--s-8);
  box-shadow: var(--shadow-xs); margin-bottom: var(--s-6);
}

.dhl-milestones {
  display: flex; align-items: flex-start; justify-content: space-between;
  position: relative;
}

.dhl-milestone {
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 2; flex: 1;
}
/* Connecting line between milestones */
.dhl-milestone:not(:last-child)::after {
  content: ''; position: absolute; top: 14px; left: 50%; right: -50%;
  height: 3px; background: var(--gray-200); z-index: 1;
}
.dhl-milestone.completed:not(:last-child)::after { background: var(--brand); }
.dhl-milestone.current:not(:last-child)::after {
  background: linear-gradient(90deg, var(--brand) 50%, var(--gray-200) 50%);
}

.dhl-dot {
  width: 28px; height: 28px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 3; border: 2px solid var(--gray-300);
  background: var(--gray-50); transition: all var(--t-base);
}
.dhl-dot i { width: 14px; height: 14px; }

.dhl-milestone.completed .dhl-dot {
  background: var(--brand); border-color: var(--brand); color: var(--white);
}
.dhl-milestone.current .dhl-dot {
  background: var(--brand-wash); border-color: var(--brand); color: var(--brand);
  animation: pulseGlow 2s ease-in-out infinite;
}
.dhl-milestone.future .dhl-dot {
  background: var(--gray-50); border-color: var(--gray-300); color: var(--gray-300);
}
.dhl-milestone.declined .dhl-dot {
  background: rgba(239,68,68,0.08); border-color: var(--error); color: var(--error);
}

.dhl-label {
  font-size: 12px; font-weight: 500; color: var(--gray-500);
  text-align: center; max-width: 80px; margin-top: var(--s-2); line-height: 1.3;
}
.dhl-milestone.completed .dhl-label { color: var(--gray-700); font-weight: 600; }
.dhl-milestone.current .dhl-label { color: var(--brand); font-weight: 600; }
.dhl-milestone.declined .dhl-label { color: var(--error); font-weight: 600; }

.dhl-timestamp {
  font-family: var(--font-mono); font-size: 10px; color: var(--gray-400);
  margin-top: var(--s-0-5); text-align: center;
}

.detail-milestone-msg {
  font-size: 14px; color: var(--gray-600); text-align: center;
  padding: var(--s-3) var(--s-5); background: var(--gray-50);
  border-radius: var(--r-md); margin-bottom: var(--s-6);
  font-style: italic;
}

/* ========== ARCHIVE SECTION ========== */

.archive-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-5);
}
.archive-header-left { display: flex; align-items: baseline; gap: var(--s-3); }
.archive-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.archive-count {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--gray-500); background: var(--gray-100); padding: 2px 8px;
  border-radius: var(--r-full);
}

.archive-tabs {
  display: flex; gap: var(--s-1); background: var(--gray-100);
  border-radius: var(--r-md); padding: 3px; margin-bottom: var(--s-5);
}
.archive-tab {
  display: flex; align-items: center; gap: var(--s-1-5);
  padding: var(--s-2) var(--s-4); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; color: var(--gray-500);
  cursor: pointer; transition: all var(--t-fast); border: none;
  background: none;
}
.archive-tab:hover { color: var(--gray-700); }
.archive-tab.active {
  background: var(--white); color: var(--gray-900); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.archive-tab i { width: 14px; height: 14px; }
.tab-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: var(--gray-200); color: var(--gray-600);
  border-radius: var(--r-full); padding: 1px 6px;
}
.archive-tab.active .tab-count { background: var(--brand-wash); color: var(--brand); }

.archive-table-wrap { overflow-x: auto; }
.archive-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.archive-table th {
  padding: var(--s-3) var(--s-4); font-weight: 600; color: var(--gray-600);
  font-size: 12px; text-align: left; border-bottom: 1px solid var(--gray-200);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.archive-table td {
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.table-address { font-weight: 500; color: var(--gray-800); }
.table-city { font-weight: 400; color: var(--gray-500); font-size: 12px; }

.archive-outcome-badge {
  display: inline-flex; padding: var(--s-1) var(--s-2);
  border-radius: var(--r-sm); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.archive-outcome-badge.won { background: rgba(4,120,87,0.08); color: #047857; }
.archive-outcome-badge.declined { background: rgba(239,68,68,0.08); color: var(--error); }

.btn-view-detail {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  background: var(--white); color: var(--gray-600); cursor: pointer;
  transition: all var(--t-fast);
}
.btn-view-detail:hover { border-color: var(--gray-300); color: var(--gray-800); }

.archive-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-2); font-size: 12px; color: var(--gray-500);
}
.page-buttons { display: flex; gap: var(--s-1); }
.page-btn {
  min-width: 30px; height: 30px; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--gray-200);
  border-radius: var(--r-sm); font-size: 12px; font-weight: 500;
  background: var(--white); color: var(--gray-600); cursor: pointer;
  transition: all var(--t-fast);
}
.page-btn:hover { border-color: var(--gray-300); background: var(--gray-50); }
.page-btn.active { background: var(--brand); color: var(--white); border-color: var(--brand); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== SUBMITTER DETAIL VIEW ========== */

.submitter-detail { padding: var(--s-6) var(--s-8) var(--s-10); max-width: 720px; margin: 0 auto; }

.detail-back-link {
  display: inline-flex; align-items: center; gap: var(--s-1-5);
  font-size: 13px; font-weight: 500; color: var(--gray-500); cursor: pointer;
  transition: color var(--t-fast); margin-bottom: var(--s-5);
}
.detail-back-link:hover { color: var(--gray-800); }
.detail-back-link i { width: 16px; height: 16px; }

.sub-detail-header { margin-bottom: var(--s-6); }
.sub-detail-title { font-size: 22px; font-weight: 700; color: var(--gray-900); }
.sub-detail-date { font-family: var(--font-mono); font-size: 12px; color: var(--gray-500); margin-top: var(--s-1); }

.sub-detail-section { margin-bottom: var(--s-8); }
.sub-detail-section-header { margin-bottom: var(--s-4); }
.sub-detail-section-title {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 15px; font-weight: 600; color: var(--gray-800);
}
.sub-detail-section-title i { width: 18px; height: 18px; color: var(--gray-400); }

/* Deal Info */
.deal-info-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); overflow: hidden;
}
.deal-info-hint {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: 12px; color: var(--gray-400);
  padding: var(--s-3) var(--s-5); background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.deal-info-hint i { width: 14px; height: 14px; flex-shrink: 0; }
.deal-info-body { padding: var(--s-5); }

.deal-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-5) var(--s-6);
}
.deal-field { display: flex; flex-direction: column; gap: var(--s-1-5); }
.deal-field.full { grid-column: 1 / -1; }
.deal-field-label {
  font-size: 12px; font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: 0.2px;
}
.deal-field-label .optional {
  font-weight: 400; color: var(--gray-400); text-transform: none;
  font-size: 11px; margin-left: var(--s-1);
}

.deal-input {
  width: 100%; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--gray-300); border-radius: var(--r-md);
  font-size: 14px; color: var(--gray-800); font-family: var(--font-sans);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-sizing: border-box;
}
.deal-input::placeholder { color: var(--gray-400); }
.deal-input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}
select.deal-input {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px; background-color: var(--white);
}
textarea.deal-input { min-height: 68px; resize: vertical; line-height: 1.5; }

.currency-wrap { position: relative; }
.currency-prefix {
  position: absolute; left: var(--s-3); top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  color: var(--gray-500); pointer-events: none;
}
.currency-input { padding-left: 28px; font-family: var(--font-mono); text-align: right; }

.deal-checkbox-group {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-2) var(--s-5);
}
.checkbox-item {
  display: flex; align-items: center; gap: var(--s-2);
  cursor: pointer; user-select: none;
}
.checkbox-box {
  width: 18px; height: 18px; border: 1.5px solid var(--gray-300);
  border-radius: var(--r-sm); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  transition: all var(--t-fast); background: var(--white);
}
.checkbox-item.checked .checkbox-box {
  background: var(--brand); border-color: var(--brand); color: var(--white);
}
.checkbox-label { font-size: 13px; color: var(--gray-700); }

.deal-actions {
  display: flex; gap: var(--s-3); margin-top: var(--s-5);
  padding-top: var(--s-5); border-top: 1px solid var(--gray-200);
}

/* Report Cards */
.report-cards { display: flex; flex-direction: column; gap: var(--s-3); }
.report-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: var(--s-4) var(--s-5);
  display: flex; align-items: center; gap: var(--s-4);
  transition: box-shadow var(--t-base), border-color var(--t-base);
  cursor: pointer;
}
.report-card:hover { box-shadow: var(--shadow-xs); border-color: var(--gray-300); }
.report-card-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.report-card-icon.available { background: var(--brand-wash); color: var(--brand); }
.report-card-icon.pending { background: var(--gray-100); color: var(--gray-400); }
.report-card-icon i { width: 20px; height: 20px; }
.report-card-info { flex: 1; }
.report-card-title { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.report-card-status { font-size: 12px; margin-top: var(--s-0-5); }
.report-card-status.available { color: var(--brand); font-weight: 500; }
.report-card-status.pending { color: var(--gray-400); }

/* Notes */
.note-list { display: flex; flex-direction: column; gap: var(--s-3); }
.note-item {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: var(--s-4);
}
.note-meta { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.note-author { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.note-time { font-family: var(--font-mono); font-size: 10px; color: var(--gray-400); }
.note-body { font-size: 13px; color: var(--gray-600); line-height: 1.6; }

/* Upload Area */
.upload-area {
  border: 2px dashed var(--gray-300); border-radius: var(--r-lg);
  padding: var(--s-10); text-align: center; cursor: pointer;
  transition: all var(--t-base); background: var(--white);
}
.upload-area:hover { border-color: var(--brand-light); background: var(--brand-wash); }
.upload-icon { color: var(--gray-400); margin-bottom: var(--s-3); }
.upload-icon i { width: 32px; height: 32px; }
.upload-text { font-size: 13px; font-weight: 500; color: var(--gray-600); }
.upload-hint { font-size: 12px; color: var(--gray-400); margin-top: var(--s-1); }

/* ========== INTAKE FORM ========== */

.form-view-wrap {
  min-height: 100vh; background: var(--gray-50);
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100;
  overflow-y: auto;
}
.form-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200); height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s-8);
}
.form-back-link {
  display: flex; align-items: center; gap: var(--s-1-5);
  font-size: 13px; font-weight: 500; color: var(--gray-500);
  cursor: pointer; transition: color var(--t-fast);
  padding: var(--s-1-5) var(--s-2); border-radius: var(--r-sm);
  border: none; background: none;
}
.form-back-link:hover { color: var(--gray-800); background: var(--gray-100); }
.form-back-link i { width: 16px; height: 16px; }

.form-container { max-width: 520px; margin: 0 auto; padding: var(--s-6) var(--s-8) var(--s-12); }

.form-progress {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s-4); margin-bottom: var(--s-8); padding-top: var(--s-5);
}
.progress-track {
  position: relative; flex: 1; max-width: 200px; height: 4px;
  background: var(--gray-200); border-radius: var(--r-full); overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--brand); border-radius: var(--r-full);
  transition: width 500ms ease;
}
.progress-step {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
}
.progress-dot {
  width: 12px; height: 12px; border-radius: var(--r-full);
  border: 2px solid var(--gray-300); background: var(--white);
  transition: all var(--t-base);
}
.progress-step.active .progress-dot { background: var(--brand); border-color: var(--brand); }
.progress-step-label { font-size: 12px; color: var(--gray-400); font-weight: 400; white-space: nowrap; }
.progress-step.active .progress-step-label { color: var(--brand); font-weight: 600; }

.intake-form {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
  padding: var(--s-8); animation: slideUp 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.form-title { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: var(--s-1); }
.form-subtitle { font-size: 13px; color: var(--gray-500); margin-bottom: var(--s-6); }

.form-group { margin-bottom: var(--s-5); }
.form-label {
  display: block; font-size: 13px; font-weight: 600; color: var(--gray-700);
  margin-bottom: var(--s-1-5);
}
.form-label .optional { font-weight: 400; color: var(--gray-400); font-size: 12px; margin-left: var(--s-1); }

.form-input {
  width: 100%; font-family: var(--font-sans); font-size: 14px; color: var(--gray-800);
  padding: 10px var(--s-3); border: 1px solid var(--gray-300);
  border-radius: var(--r-md); background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-sizing: border-box;
}
.form-input::placeholder { color: var(--gray-400); }
.form-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); }
.form-input.prefilled { background: var(--gray-50); color: var(--gray-600); }
.form-input.error { border-color: var(--error); }
.form-error { font-size: 12px; color: var(--error); margin-top: var(--s-1); }

.form-radio-group { display: flex; gap: var(--s-3); }
.radio-pill {
  flex: 1; padding: var(--s-2) var(--s-4);
  border: 1px solid var(--gray-300); border-radius: var(--r-md);
  text-align: center; font-size: 13px; font-weight: 500; color: var(--gray-600);
  cursor: pointer; transition: all var(--t-fast); user-select: none;
}
.radio-pill:hover { border-color: var(--gray-400); background: var(--gray-50); }
.radio-pill.selected { border-color: var(--brand); background: var(--brand-wash); color: var(--brand); font-weight: 600; }

.address-readonly {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--r-md); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-6);
}
.address-readonly-label { font-size: 12px; font-weight: 500; color: var(--gray-500); margin-bottom: var(--s-1); }
.address-readonly-value {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  display: flex; align-items: center; gap: var(--s-2);
}

.form-footer { display: flex; gap: var(--s-3); margin-top: var(--s-6); }
.form-footer .btn-primary,
.form-footer .btn-ghost { flex: 1; display: flex; justify-content: center; align-items: center; gap: var(--s-1-5); }

.form-checkbox-group {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-2) var(--s-5);
}

/* Turnstile container */
.cf-turnstile-wrap { margin-bottom: var(--s-5); display: flex; justify-content: center; }

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
  .submitter-view { padding: var(--s-4); }
  .submitter-detail { padding: var(--s-4); }
  .dhl-tracker.expanded { padding: var(--s-4); }
  .dhl-label { font-size: 10px; max-width: 60px; }
  .deal-grid { grid-template-columns: 1fr; }
  .form-container { padding: var(--s-4); }
  .intake-form { padding: var(--s-5); }
  .form-checkbox-group { grid-template-columns: 1fr; }
  .deal-checkbox-group { grid-template-columns: 1fr; }
  .card-top { flex-direction: column; gap: var(--s-2); }
}
