        * {
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            direction: rtl;
            text-align: right;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            margin: 0;
            padding: 20px;
        }
        
        .container {
            background-color: #ffffff;
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.15);
            max-width: 900px;
            margin: auto;
            position: relative;
            overflow: hidden;
        }
        
        .container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #667eea, #764ba2);
        }
        
        h2 {
            text-align: center;
            color: #2c3e50;
            font-size: 2.2em;
            margin-bottom: 30px;
            font-weight: 300;
            letter-spacing: 1px;
        }
        
        .form-section {
            margin-bottom: 30px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 15px;
            border: 1px solid #e9ecef;
            transition: all 0.3s;
        }
        
        .form-section:hover {
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
            transform: translateY(-2px);
        }
        
        .form-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 15px;
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
        }
        
        label {
            font-weight: 600;
            color: #495057;
            margin-bottom: 5px;
            font-size: 0.95em;
        }
        
        input[type=text], select {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.3s;
            background: white;
        }
        
        input[type=text]:focus, select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            transform: translateY(-1px);
        }
        
        .terms-section {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border: 2px solid #dee2e6;
            border-radius: 15px;
            padding: 25px;
            margin: 30px 0;
            line-height: 1.8;
            font-size: 15px;
            color: #495057;
            position: relative;
        }
        
        .terms-section::before {
            content: "⚠️";
            position: absolute;
            top: 15px;
            left: 15px;
            font-size: 1.5em;
        }
        
        .terms-section p {
            margin-bottom: 15px;
        }
        
        .terms-section ul {
            margin-right: 20px;
        }
        
        .terms-section li {
            margin-bottom: 10px;
            text-align: justify;
        }
        
        .signature-section {
            background: #fff;
            border: 2px dashed #dee2e6;
            border-radius: 15px;
            padding: 20px;
            text-align: center;
        }
        
        canvas {
            border: 2px solid #e9ecef;
            border-radius: 10px;
            cursor: crosshair;
            background: #fafafa;
            transition: all 0.3s;
            margin: 20px 0;
        }
        
        canvas:hover {
            border-color: #667eea;
            box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        }
        
        .checkbox-section {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 20px;
            background: #e8f5e8;
            border-radius: 15px;
            border: 2px solid #d4edda;
            margin: 20px 0;
        }
        
        .checkbox-section label {
            font-weight: 500;
            color: #155724;
            margin: 0;
            cursor: pointer;
        }
        
        /* Radio group styles for surplus options */
        .radio-group {
            margin: 20px 0;
        }

        .radio-item {
            display: flex;
            align-items: flex-start;
            margin-bottom: 15px;
            padding: 15px;
            background: white;
            border-radius: 10px;
            border: 2px solid #e9ecef;
            transition: all 0.3s;
            opacity: 0.6;
            filter: grayscale(1);
        }

        .radio-item:hover {
            border-color: #667eea;
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
        }

        .radio-item.selected {
            opacity: 1;
            filter: grayscale(0);
            border-color: #667eea;
            background: #f8f9ff;
        }

        .radio-item input[type="radio"] {
            margin-left: 15px;
            width: 20px;
            height: 20px;
            accent-color: #667eea;
            filter: none !important;
            opacity: 1 !important;
        }

        .radio-item label {
            margin: 0;
            line-height: 1.6;
            font-weight: normal;
            color: #495057;
        }

        .radio-item.selected label {
            color: #2c3e50;
        }

        .radio-item input[type="text"] {
            margin-top: 10px;
        }

        .radio-item input[type="text"]:disabled {
            background-color: #f5f5f5;
            color: #999;
            cursor: not-allowed;
            opacity: 0.6;
        }

        input[type=checkbox] {
            width: 20px;
            height: 20px;
            accent-color: #667eea;
        }
        
        .button-group {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 30px;
        }
        
        button {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }
        
        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
        }
        
        #clear-signature {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
            padding: 10px 20px;
            font-size: 14px;
            margin-top: 15px;
            box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
        }
        
        #clear-signature:hover {
            box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
        }
        
        .section-title {
            font-size: 1.2em;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #e9ecef;
        }

        .apartment-section {
            border: 2px solid #dee2e6;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            background: white;
        }

        .apartment-title {
            font-weight: bold;
            color: #495057;
            margin-bottom: 15px;
            font-size: 1.1em;
        }
        
        /* Balance options styling */
        .balance-options {
            margin-top: 20px;
        }
        
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .container {
                padding: 20px;
            }
            
            h2 {
                font-size: 1.8em;
            }
            
            .form-row {
                grid-template-columns: 1fr;
            }

            canvas {
                width: 100%;
                height: 150px;
            }
        }