/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    padding: 40px 24px 60px;
    color: #1e2a3a;
}

.contract-container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 32px 36px;
}

.contract-header {
    text-align: center;
    margin-bottom: 28px;
    border-bottom: 2px solid #eef2f6;
    padding-bottom: 20px;
}

.contract-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #0a2540;
    margin-bottom: 12px;
}

.contract-code {
    font-size: 16px;
    color: #5c6f87;
    background: #f8fafc;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 40px;
    font-family: monospace;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.input-group label span {
    color: #e53e3e;
    margin-left: 4px;
}

.input-group input {
    padding: 12px 14px;
    border: 1px solid #cfdfed;
    border-radius: 14px;
    font-size: 15px;
    transition: 0.2s;
    outline: none;
}

.input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.clause-section {
    background: #fbfdff;
    border: 1px solid #eef2f9;
    border-radius: 24px;
    padding: 20px 28px;
    margin: 20px 0 28px 0;
}

.clause-title {
    font-size: 20px;
    font-weight: 700;
    border-left: 5px solid #3b82f6;
    padding-left: 16px;
    margin-bottom: 20px;
    color: #1e293b;
}

.clause-content {
    line-height: 1.55;
    color: #2d3e5a;
    font-size: 14px;
}

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

.signatures-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin: 30px 0;
}

.sign-box {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e4edf5;
    border-radius: 24px;
    padding: 18px 20px;
}

.sign-box h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f3a4b;
}

.sign-canvas-area {
    border: 1px solid #cfdfed;
    border-radius: 16px;
    background: #ffffff;
    margin: 12px 0;
}

canvas {
    display: block;
    width: 100%;
    height: 150px;
    background: white;
    border-radius: 14px;
    cursor: crosshair;
}

.btn-clear {
    background-color: #f1f5f9;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: 0.2s;
}

.btn-clear:hover {
    background-color: #e2e8f0;
}

.sign-time {
    font-size: 13px;
    color: #5f7d9c;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 20px;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 20px;
}

.btn-submit {
    background-color: #2c6e9e;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 44px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-submit:hover {
    background-color: #1f5a85;
    transform: translateY(-1px);
}

.btn-reset {
    background-color: #ffffff;
    border: 1px solid #cbdde9;
    padding: 14px 28px;
    border-radius: 44px;
    font-weight: 500;
    cursor: pointer;
}

.btn-reset:hover {
    background-color: #f8fafc;
}

@media (max-width: 760px) {
    .contract-container {
        padding: 20px 18px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .signatures-wrapper {
        flex-direction: column;
    }
}

.footnote {
    text-align: center;
    margin-top: 30px;
    font-size: 12px;
    color: #8ba0bc;
}

.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2e3a;
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}