/* ============================================
   企业合规体检问卷 · 公共样式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

a, u, ins, s, strike, del {
    text-decoration: none;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* ===== Landing Page ===== */
.landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.landing-card {
    background: #fff;
    border-radius: 16px;
    padding: 50px 40px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.landing-card h1 {
    font-size: 22px;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.landing-card .company {
    font-size: 18px;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 24px;
}

.landing-card .desc {
    text-align: left;
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.landing-card .desc p {
    margin-bottom: 8px;
    padding-left: 16px;
    text-indent: -16px;
}

.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #fff;
    box-shadow: 0 4px 15px rgba(67,233,123,0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245,87,108,0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
}

/* ===== Consent Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-content h2 {
    text-align: center;
    color: #1a1a2e;
    margin-bottom: 16px;
}

.modal-content .body {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 24px;
}

.modal-content .body p {
    margin-bottom: 12px;
}

.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ===== Survey Page ===== */
.survey-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.survey-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
}

.survey-header h1 {
    font-size: 20px;
    margin-bottom: 4px;
}

.survey-header p {
    font-size: 13px;
    opacity: 0.85;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Section Header */
.section-header {
    background: #fff;
    border-left: 4px solid #667eea;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.question-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.question-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.question-card .q-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.question-card .q-number {
    display: inline-block;
    background: #667eea;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    margin-right: 8px;
    flex-shrink: 0;
}

.question-card .q-text {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
}

/* Input Fields */
.question-card input[type="text"],
.question-card input[type="number"],
.question-card textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.question-card input[type="text"]:focus,
.question-card input[type="number"]:focus,
.question-card textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.question-card .input-group {
    margin-bottom: 10px;
}

.question-card .input-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

/* Radio / Checkbox Options */
.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-item {
    position: relative;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    display: none;
}

.option-item label {
    display: inline-block;
    padding: 8px 20px;
    border: 1.5px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.option-item input[type="radio"]:checked + label,
.option-item input[type="checkbox"]:checked + label {
    border-color: #667eea;
    background: #f0f2ff;
    color: #667eea;
    font-weight: 600;
}

.option-item label:hover {
    border-color: #667eea;
}

/* Conditional Input */
.conditional-field {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.conditional-field.show {
    display: block;
}

.always-show-field {
    display: block;
    margin-top: 12px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

/* Dynamic Shareholders */
.shareholder-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.shareholder-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.shareholder-row .input-group {
    flex: 1;
}
.btn-add-shareholder {
    margin-top: 10px;
    padding: 8px 16px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    align-self: flex-start;
}
.btn-add-shareholder:hover {
    background: #5a6fd6;
}
.btn-remove-shareholder {
    width: 32px;
    height: 32px;
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    margin-bottom: 4px;
}
.btn-remove-shareholder:hover {
    background: #d32f2f;
}

/* Error */
.field-error {
    font-size: 12px;
    color: #f44336;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

/* Side Navigation */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 500;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid #d9d9d9;
    background: #fff;
    color: #667eea;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.nav-jump {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.nav-jump input {
    width: 40px;
    padding: 6px 0;
    text-align: center;
    border: 1.5px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
}

.nav-jump .nav-btn {
    font-size: 13px;
    height: 30px;
}

@media (max-width: 768px) {
    .side-nav { right: 10px; }
    .nav-btn { width: 34px; height: 34px; font-size: 15px; }
    .nav-jump input { width: 34px; font-size: 11px; }
}

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 500;
}
.bottom-nav .nav-btn {
    width: auto;
    padding: 0 16px;
    font-size: 14px;
}

.question-card.has-validation-error {
    border: 1.5px solid #f44336;
    box-shadow: 0 2px 8px rgba(244,67,54,0.15);
}

/* Submit Button Area */
.submit-area {
    text-align: center;
    margin: 32px 0;
}

.submit-area .btn {
    min-width: 200px;
}

/* ===== Success Modal ===== */
.success-modal .modal-content {
    text-align: center;
}

.success-modal .code-display {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #667eea;
    background: #f0f2ff;
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-family: "Courier New", monospace;
}

/* ===== Query Panel ===== */
.query-panel {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.query-panel h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #1a1a2e;
    cursor: pointer;
    user-select: none;
}

.query-panel .query-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.query-panel .query-form input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-family: "Courier New", monospace;
}

.query-panel .query-form .btn {
    padding: 10px 24px;
    font-size: 14px;
}

.query-result {
    margin-top: 16px;
}

.query-answer-card {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    font-size: 13px;
}

.query-answer-card .qa-question {
    font-weight: 600;
    color: #333;
}

.query-answer-card .qa-answer {
    color: #667eea;
    margin-top: 4px;
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #43e97b;
    color: #fff;
}

.toast.error {
    background: #f5576c;
    color: #fff;
}

/* ===== Industry Attachment Notice ===== */
.industry-attachment-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #856404;
}

.industry-attachment-notice strong {
    color: #533f03;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .landing-card {
        padding: 30px 20px;
    }
    
    .question-card {
        padding: 16px;
    }
    
    .options-list {
        gap: 8px;
    }
    
    .option-item label {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .query-panel .query-form {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 20px;
    }
}
