/* ===== Global Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.8;
}

/* ===== Page Container ===== */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== Document Card ===== */
.document-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 50px 60px;
    overflow: hidden;
}

@media (max-width: 600px) {
    .document-card {
        padding: 30px 24px;
    }
}

/* ===== Header ===== */
.doc-header {
    text-align: center;
    border-bottom: 2px solid #e8e8e8;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #1a3a6b;
    letter-spacing: 4px;
}

.logo-subtext {
    font-size: 14px;
    color: #888;
    margin-top: 6px;
    letter-spacing: 2px;
}

/* ===== Title ===== */
.doc-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1a3a6b;
    margin-bottom: 30px;
    letter-spacing: 3px;
}

/* ===== Document Body ===== */
.doc-body {
    margin-bottom: 20px;
}

.doc-intro {
    font-size: 16px;
    color: #444;
    margin-bottom: 24px;
    text-indent: 2em;
    line-height: 2;
}

.section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a3a6b;
    margin-bottom: 8px;
}

.section-text {
    font-size: 15px;
    color: #555;
    text-indent: 2em;
    line-height: 2;
}

/* ===== Divider ===== */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    margin: 30px 0 20px;
}

/* ===== Signature Section ===== */
.signature-section {
    margin-top: 10px;
}

.signature-heading {
    font-size: 18px;
    font-weight: 700;
    color: #1a3a6b;
    text-align: center;
    margin-bottom: 8px;
}

.signature-tip {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

/* ===== Form Elements ===== */
.form-row {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
    font-family: inherit;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
    font-family: inherit;
    resize: vertical;
}

.form-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== Signature Pad ===== */
.signature-pad-wrapper {
    margin-bottom: 20px;
}

.signature-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.signature-pad-container {
    position: relative;
    border: 2px dashed #bbb;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}

.signature-pad {
    display: block;
    width: 100%;
    height: 200px;
    cursor: crosshair;
    touch-action: none;
}

.signature-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 16px;
    pointer-events: none;
    user-select: none;
}

.signature-placeholder.hidden {
    display: none;
}

.signature-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* ===== Checkbox ===== */
.agree-row {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #555;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #667eea;
}

/* ===== Buttons ===== */
.submit-row {
    text-align: center;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    padding: 12px 36px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 1px;
}

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

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

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ===== Company Form ===== */
.company-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-row-2 {
    display: flex;
    gap: 20px;
}

.form-row-2 .form-group {
    flex: 1;
}

@media (max-width: 600px) {
    .form-row-2 {
        flex-direction: column;
        gap: 0;
    }
}

.required {
    color: #e74c3c;
}

/* ===== Info Banner ===== */
.info-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #2e7d32;
}

.banner-icon {
    font-size: 18px;
    font-weight: 700;
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 50%;
    background: #4caf50;
    color: #fff;
    font-size: 32px;
    margin: 0 auto 16px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.modal-text {
    font-size: 14px;
    color: #888;
}
