        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Times New Roman', Times, serif;
            background: #2c3e50;
            padding: 20px;
        }

        .main-container {
            max-width: 1600px;
            margin: 0 auto;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 0 30px rgba(0,0,0,0.3);
        }

        .header {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            color: white;
            padding: 30px;
            text-align: center;
        }

        .header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            font-family: 'Georgia', serif;
        }

        .workspace {
            display: grid;
            grid-template-columns: 400px 1fr;
            min-height: 90vh;
        }

        .left-panel {
            background: #f8f9fa;
            border-right: 3px solid #dee2e6;
            overflow-y: auto;
            max-height: 90vh;
        }

        .right-panel {
            background: white;
            padding: 40px;
            overflow-y: auto;
            max-height: 90vh;
        }

        .panel-section {
            padding: 20px;
            border-bottom: 2px solid #dee2e6;
        }

        .panel-section h3 {
            color: #1a1a2e;
            margin-bottom: 15px;
            font-size: 1.2em;
        }

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

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
            color: #495057;
            font-family: Arial, sans-serif;
            font-size: 13px;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 10px;
            border: 2px solid #ced4da;
            border-radius: 5px;
            font-size: 14px;
            font-family: Arial, sans-serif;
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #1a1a2e;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s;
            margin-right: 10px;
            margin-bottom: 10px;
        }

        .btn-primary {
            background: #1a1a2e;
            color: white;
        }

        .btn-primary:hover {
            background: #16213e;
        }

        .btn-success {
            background: #28a745;
            color: white;
        }

        .btn-danger {
            background: #dc3545;
            color: white;
        }

        .btn-secondary {
            background: #6c757d;
            color: white;
        }

        .btn-small {
            padding: 5px 10px;
            font-size: 12px;
        }

        /* Document Preview Styles */
        .document-preview {
            background: white;
            padding: 60px;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
            min-height: 800px;
            position: relative;
        }

        .doc-border {
            border: 3px solid #000;
            padding: 40px;
            min-height: 700px;
            position: relative;
        }

        .doc-title {
            text-align: center;
            font-size: 32px;
            font-weight: bold;
            margin-bottom: 30px;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .doc-section {
            margin-bottom: 25px;
            position: relative;
            padding: 10px;
            transition: all 0.3s;
        }

        .doc-section:hover {
            background: #f8f9fa;
        }

        .doc-section:hover .delete-element {
            display: block;
        }

        .doc-section-title {
            font-weight: bold;
            text-decoration: underline;
            margin-bottom: 15px;
            font-size: 16px;
        }

        .doc-content {
            line-height: 1.8;
            text-align: justify;
            margin-bottom: 15px;
            position: relative;
        }

        .doc-field {
            display: inline-block;
            min-width: 200px;
            border-bottom: 1px solid #000;
            padding: 2px 10px;
            margin: 0 5px;
        }

        .doc-field-block {
            border: 1px solid #000;
            padding: 15px;
            margin: 10px 0;
            min-height: 100px;
        }

        .signature-section {
            margin-top: 50px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }

        .signature-box {
            text-align: center;
        }

        .signature-line {
            border-top: 2px solid #000;
            margin: 60px 20px 10px 20px;
        }

        /* Text Formatting Toolbar */
        .format-toolbar {
            position: sticky;
            top: 0;
            background: #1a1a2e;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
            z-index: 100;
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        }

        .format-btn {
            padding: 8px 12px;
            background: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            font-size: 14px;
            transition: all 0.3s;
            color: #1a1a2e;
        }

        .format-btn:hover {
            background: #667eea;
            color: white;
            transform: translateY(-2px);
        }

        .format-btn.active {
            background: #28a745;
            color: white;
        }

        /* Element List */
        .elements-list {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 15px;
        }

        .element-btn {
            padding: 12px;
            background: white;
            border: 2px solid #dee2e6;
            border-radius: 5px;
            cursor: pointer;
            text-align: center;
            font-size: 13px;
            transition: all 0.3s;
        }

        .element-btn:hover {
            background: #1a1a2e;
            color: white;
            border-color: #1a1a2e;
            transform: translateY(-2px);
        }

        .element-btn i {
            display: block;
            font-size: 20px;
            margin-bottom: 5px;
        }

        /* Color Picker */
        .color-group {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 15px;
        }

        .color-picker {
            width: 50px;
            height: 35px;
            border: 2px solid #dee2e6;
            border-radius: 5px;
            cursor: pointer;
        }

        /* Style Controls */
        .style-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .tabs {
            display: flex;
            background: #e9ecef;
            border-radius: 5px;
            margin-bottom: 20px;
        }

        .tab {
            flex: 1;
            padding: 12px;
            text-align: center;
            cursor: pointer;
            font-weight: 600;
            background: transparent;
            border: none;
            transition: all 0.3s;
        }

        .tab.active {
            background: #1a1a2e;
            color: white;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .saved-templates {
            display: grid;
            gap: 10px;
        }

        .template-item {
            padding: 15px;
            background: white;
            border: 2px solid #dee2e6;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .template-item:hover {
            border-color: #1a1a2e;
            box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        }

        /* Delete Element Button */
        .delete-element {
            position: absolute;
            top: 5px;
            right: 5px;
            background: #dc3545;
            color: white;
            border: none;
            border-radius: 50%;
            width: 25px;
            height: 25px;
            cursor: pointer;
            display: none;
            font-size: 16px;
            line-height: 1;
            z-index: 10;
        }

        .delete-element:hover {
            background: #c82333;
        }

        /* Toast Notification */
        .toast {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: linear-gradient(135deg, #28a745, #20c997);
            color: white;
            padding: 15px 25px;
            border-radius: 8px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
            display: none;
            align-items: center;
            gap: 10px;
            z-index: 1000;
            animation: slideIn 0.3s ease;
            font-family: Arial, sans-serif;
            font-weight: 600;
        }

        .toast.show {
            display: flex;
        }

        .toast.error {
            background: linear-gradient(135deg, #dc3545, #c82333);
        }

        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        /* Checkbox styling */
        .custom-checkbox {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            user-select: none;
            margin: 10px 0;
        }

        .custom-checkbox input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
        }

        .divider {
            border: none;
            border-top: 2px solid #000;
            margin: 20px 0;
        }

        @media print {
            .left-panel, .format-toolbar {
                display: none;
            }
            .workspace {
                grid-template-columns: 1fr;
            }
            .document-preview {
                box-shadow: none;
            }
            .delete-element {
                display: none !important;
            }
        }

        @media (max-width: 1200px) {
            .workspace {
                grid-template-columns: 1fr;
            }
            .left-panel {
                max-height: none;
            }
        }
/* .input {
    width: 100%;
    min-height: 300px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    overflow-y: auto;
}

.input p {
    margin: 0 0 10px 0;
} */

.btn-group .btn {
    margin-right: 5px;
}

/* Hover effect for template list */
#templatesContainer li:hover {
    background-color: #f0f0f0;
}
/* templates.css */
#stipulationText {
    width: 100%;
    min-height: 300px;
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #333;
    background-color: #fff;
    resize: vertical;
}

/* Optional: scrollbars */
#stipulationText::-webkit-scrollbar {
    width: 8px;
}
#stipulationText::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
