/* ============================================================
   DISTRIBUTOR PAGE CSS
   ============================================================ */

/* ---- Growth Line Animation ---- */
.growth-line { stroke-dasharray: 300; stroke-dashoffset: 300; animation: drawLine 2s ease-in-out 0.5s forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* ---- Form ---- */
.dist-form-wrap {
    max-width: 760px; margin: 0 auto;
    background: var(--white); border-radius: var(--radius-lg);
    padding: 48px; box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}
.dist-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.req { color: #EF4444; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px; font-family: var(--font-primary);
    color: var(--text-dark);
    background: var(--white);
    transition: border-color 0.25s, box-shadow 0.25s;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(20,184,166,0.12);
}
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #EF4444;
}
.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
    border-color: #22C55E;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2322C55E' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 40px;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.field-error { font-size: 12px; color: #EF4444; min-height: 16px; }
.form-checkbox label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; }
.form-checkbox input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; accent-color: var(--primary); }

/* ---- Form Message ---- */
#form-message {
    padding: 0; display: none; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600;
}
#form-message.success {
    display: block; padding: 16px; background: rgba(34,197,94,0.1);
    color: #16A34A; border: 1px solid rgba(34,197,94,0.3);
}
#form-message.error {
    display: block; padding: 16px; background: rgba(239,68,68,0.1);
    color: #DC2626; border: 1px solid rgba(239,68,68,0.3);
}

/* ---- Spinner ---- */
.spinner-icon { animation: spin 1s linear infinite; }
#dist-submit[disabled] { opacity: 0.7; cursor: wait; }

/* ---- Timeline ---- */
.timeline {
    display: flex; gap: 0;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}
.timeline-item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.timeline-num {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: white;
    font-size: 20px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    z-index: 1; margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(20,184,166,0.4);
    animation: bounceIn 0.6s ease both;
}
.timeline-line {
    position: absolute; top: 26px; left: 60%; width: 80%;
    height: 2px; background: var(--primary); z-index: 0;
}
.timeline-content { text-align: center; padding: 0 8px; }
.timeline-content h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.timeline-content p  { font-size: 13px; color: var(--text-gray); line-height: 1.5; }
.timeline-dur { font-size: 12px; color: var(--primary); font-weight: 600; display: block; margin-top: 6px; }

/* ---- Opportunity Cards ---- */
.opp-card:hover { border-color: var(--primary); }
.opp-card.accordion-open { border-color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .dist-form-wrap { padding: 28px 20px; }
    .form-row { grid-template-columns: 1fr; }
    .timeline { flex-direction: column; gap: 24px; }
    .timeline-line { display: none; }
    .timeline-item { flex-direction: row; align-items: flex-start; gap: 16px; }
    .timeline-num { flex-shrink: 0; width: 40px; height: 40px; font-size: 16px; margin-bottom: 0; }
    .timeline-content { text-align: left; }
}
