/* Digital Contract Manager Public Styles (RTL First) */
.dcm-contract-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: Tahoma, 'Segoe UI', IRANSans, Arial, sans-serif;
    color: #2c3e50;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
}

.dcm-contract-paper {
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.dcm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.dcm-header-title h1 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #1e293b;
}

.dcm-badge-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dcm-meta-pill {
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #475569;
}

.dcm-badge-tag {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
}

.dcm-tag-success {
    background: #dcfce7;
    color: #166534;
    border:  #bbf7d0;
}

.dcm-tag-warning {
    background {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.dcm-divider {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 30px 0;
}

.dcm-body-content {
    font-size: 15px;
    color: #334155;
    min-height: 150px;
}

.dcm-parties-section {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 25px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .dcm-parties-section {
        grid-template-columns: 1fr;
    }
    .dcm-contract-paper {
        padding: 25px 20px;
    }
}

.dcm-party-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.dcm-party-box h4 {
    margin-top: 0;
    color: #0f172a;
    font-size: 16px;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 8px;
}

.dcm-seal-badge {
    margin-top: 20px;
    display: inline-block;
    padding: 10px 20px;
    border: 2px dashed #0284c7;
    color: #0284c7;
    font-weight: bold;
    border-radius: 6px;
    transform: rotate(-3deg);
}

.dcm-canvas-inner {
    border: 2px dashed #94a3b8;
    background: #ffffff;
    border-radius: 6px;
    margin-bottom: 10px;
    touch-action: none;
}

.dcm-signature-pad {
    width: 100%;
    height: 160px;
    display: block;
    cursor: crosshair;
}

.dcm-form-group {
    margin-bottom: 15px;
}

.dcm-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #475569;
}

.dcm-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    box-sizing: border-box;
}

.dcm-form-group input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.dcm-checkbox-group {
    margin: 15px 0;
    font-size: 13px;
    color: #475569;
}

.dcm-btn-primary {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s {
    background: #-btn-primary:hover {
    background: #15803d;
}

.dcm-btn-secondary {
    background: #e2e8f0;
    border: none;
    color: #475569;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.dcm-btn-print {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

.dcm-footer-actions {
    margin-top: 30px;
    text-align: center;
}

.req {
    color: #dc2626;
}

.dcm-signed-certificate {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 15px;
    border-radius: 6px;
}

.dcm-signature-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 4px;
}

.dcm-signature-verified {
    color: #15803d;
    font-weight: bold;
    font-size: 13px;
    margin-top: 8px;
}

.dcm-signature-text-stamp {
    border: 2px dashed #94a3b8;
    color: #475569;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    background: #f8fafc;
    margin-top: 10px;
}

.dcm-status-message p {
    margin: 10px 0 0;
    font-size: 14px;
}

.dcm-btn-green {
    background: #16a34a;
    color: #ffffff !important;
    text-decoration: none;
}

.dcm-btn-green:hover {
    background: #15803d;
    color: #ffffff !important;
}

.dcm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.dcm-table th, .dcm-table td {
    padding: 12px;
    border: 1px solid #e2e8f0;
    text-align: right;
}
.dcm-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
.dcm-badge-success { background: #dcfce7; color: #166534; }
.dcm-badge-warning { background: #fef9c3; color: #854d0e; }
.dcm-badge-danger { background: #fee2e2; color: #991b1b; }

@media print {
    body * {
        visibility: hidden;
    }
    #dcm-printable-contract, #dcm-printable-contract * {
        visibility: visible;
    }
    #dcm-printable-contract {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
    }
    .dcm-footer-actions, .dcm-canvas-tools {
        display: none !important;
    }
}
