/* NDA signing page */

.nda-page {
    min-height: calc(100vh - 60px);
    background: var(--color-surface-alt, #f1f5f9);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 40px;
}

.nda-container {
    max-width: 640px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 32px;
}

.nda-loading,
.nda-error {
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-muted, #64748b);
}

.nda-error {
    color: #dc2626;
}

.nda-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px;
}

.nda-text {
    font-size: 0.875rem;
    line-height: 1.7;
    color: #334155;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
    white-space: pre-wrap;
}

.nda-form {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

.nda-field {
    margin-bottom: 20px;
}

.nda-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.nda-field input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s;
}

.nda-field input[type="text"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.nda-sig-wrapper {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.nda-sig-wrapper canvas {
    display: block;
    width: 100%;
    height: 200px;
    cursor: crosshair;
    touch-action: none;
}

.nda-sig-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    color: #64748b;
}

.nda-sig-clear:hover {
    background: #e2e8f0;
}

.nda-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.nda-decline-btn {
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    background: transparent !important;
    font-size: 0.875rem;
}

.nda-decline-btn:hover {
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

.nda-form-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 0.875rem;
}

/* Signed state */

.nda-signed {
    text-align: center;
    padding: 40px 20px;
}

.nda-signed-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.nda-signed h2 {
    margin: 0 0 12px;
    color: #1e293b;
}

.nda-signed p {
    color: #475569;
    line-height: 1.6;
    margin: 0 0 8px;
}

.nda-muted {
    color: #94a3b8 !important;
    font-size: 0.875rem;
}

/* Admin NDAs page */

.nda-admin-list {
    margin-top: 16px;
}

.nda-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.nda-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nda-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.nda-table tr:hover td {
    background: #f8fafc;
}

.nda-table .btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #d1d5db;
}

.nda-table .btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.nda-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.nda-status--pending {
    background: #fef3c7;
    color: #92400e;
}

.nda-status--user_signed {
    background: #dbeafe;
    color: #1e40af;
}

.nda-status--executed {
    background: #dbeafe;
    color: #1e40af;
}

.nda-status--downloaded {
    background: #d1fae5;
    color: #065f46;
}

.nda-status--declined {
    background: #fee2e2;
    color: #991b1b;
}

.nda-status--waived {
    background: #f3e8ff;
    color: #6b21a8;
}

.nda-empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px 0;
}

/* Countersign modal */

.nda-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.nda-modal {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.nda-modal h2 {
    margin: 0 0 16px;
    font-size: 1.25rem;
    color: #1e293b;
}

.nda-modal p {
    margin: 0 0 8px;
    color: #475569;
    font-size: 0.875rem;
}

.nda-modal .nda-field {
    margin-top: 16px;
}

.nda-modal .nda-sig-wrapper canvas {
    height: 160px;
}

.nda-user-sig {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.nda-user-sig img {
    display: block;
    max-width: 100%;
    height: auto;
}

.nda-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}
