        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background: linear-gradient(145deg, #e0eaf4 0%, #cfdef3 100%);
            font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }

        .contract-wrapper {
            max-width: 1400px;
            width: 100%;
            margin: 0 auto;
        }

        .action-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            justify-content: flex-start;
            margin-bottom: 20px;
            align-items: center;
        }

        .button-1981 {
            background: #1e2a3e;
            color: white;
            text-decoration: none;
            padding: 10px 24px;
            border-radius: 40px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.2s ease;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            display: inline-block;
            border: none;
            cursor: pointer;
            text-align: center;
        }

        .button-1981:hover {
            background: #0f1a24;
            transform: translateY(-2px);
        }

        .form-card {
            background: #ffffff;
            border-radius: 24px;
            padding: 24px;
            margin-top: 20px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid #e2edf7;
        }

        .form-title {
            font-size: 22px;
            font-weight: 700;
            color: #0a2647;
            margin-bottom: 20px;
            text-align: center;
            border-bottom: 2px solid #2c7da0;
            padding-bottom: 12px;
        }

        .file-upload-section {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .file-upload-box {
            flex: 1;
            min-width: 250px;
            padding: 15px;
            background: #f8fafc;
            border-radius: 16px;
            border: 2px dashed #cbd5e1;
            transition: all 0.3s ease;
        }

        .file-upload-box:hover {
            border-color: #2c7da0;
            background: #f0f7ff;
        }

        .file-upload-box label {
            font-weight: 600;
            color: #1f3a4b;
            display: block;
            margin-bottom: 10px;
            font-size: 14px;
        }

        .file-upload-box input[type="file"] {
            padding: 8px 12px;
            border-radius: 8px;
            border: 1px solid #cbdbe6;
            width: 100%;
            font-size: 13px;
        }

        .table-container {
            overflow-x: auto;
            margin: 20px 0;
            -webkit-overflow-scrolling: touch;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
            background: white;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            min-width: 600px;
        }

        .data-table th {
            background: #1e466e;
            color: white;
            padding: 12px 8px;
            border: 1px solid #2c5a8c;
            font-weight: 600;
            font-size: 12px;
        }

        .data-table td {
            border: 1px solid #cbd5e1;
            padding: 10px 8px;
            vertical-align: top;
            background: #fff;
            transition: all 0.3s ease;
        }

        .data-table textarea {
            width: 100%;
            min-height: 80px;
            padding: 8px;
            border: 2px solid #cbd5e6;
            border-radius: 8px;
            font-family: inherit;
            font-size: 12px;
            resize: vertical;
            transition: all 0.3s ease;
        }

        .data-table textarea:focus {
            outline: none;
            border-color: #2c7da0;
            box-shadow: 0 0 0 2px rgba(44,125,160,0.2);
        }

        .data-table td.error-field {
            background-color: #fff0f0;
            border-left: 3px solid #dc3545;
        }

        .data-table textarea.error-textarea {
            border-color: #dc3545;
            background-color: #fff0f0;
        }

        .file-input-error {
            border-color: #dc3545 !important;
            background-color: #fff0f0;
        }

        .error-message {
            color: #dc3545;
            font-size: 12px;
            margin-top: 5px;
            display: none;
        }

        .error-message.show {
            display: block;
        }

        .validation-summary {
            background: #fff3cd;
            border-left: 4px solid #ffc107;
            padding: 12px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: none;
        }

        .validation-summary.show {
            display: block;
        }

        .btn-create {
            background: linear-gradient(135deg, #2c7da0, #1e466e);
            color: white;
            border: none;
            padding: 12px 28px;
            border-radius: 40px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
            margin: 10px 0;
        }

        .btn-create:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 14px rgba(0,0,0,0.2);
        }

        .btn-save {
            background: #2c7a4d;
            color: white;
            border: none;
            padding: 12px 28px;
            border-radius: 40px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            margin-top: 10px;
            transition: all 0.2s;
        }

        .btn-save:hover:not(:disabled) {
            background: #1e5a3a;
            transform: scale(1.02);
        }

        .btn-save:disabled {
            background: #95a5a6;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .alert-success {
            background: #d4edda;
            border-left: 5px solid #28a745;
            padding: 12px 20px;
            border-radius: 12px;
            margin: 15px 0;
            color: #155724;
        }

        .alert-error {
            background: #f8d7da;
            border-left: 5px solid #dc3545;
            padding: 12px 20px;
            border-radius: 12px;
            margin: 15px 0;
            color: #721c24;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            font-weight: 600;
            color: #1f3a4b;
            display: block;
            margin-bottom: 8px;
        }

        input[type="text"] {
            padding: 10px 16px;
            border-radius: 40px;
            border: 2px solid #cbdbe6;
            width: 100%;
            max-width: 100%;
            transition: all 0.3s ease;
        }

        input[type="text"]:focus {
            outline: none;
            border-color: #2c7da0;
        }

        footer {
            text-align: center;
            font-size: 12px;
            color: #5a6e82;
            margin: 30px 0 20px;
        }
        
        .db-info {
            background: #e8f0fe;
            border-left: 4px solid #1e466e;
            padding: 10px 15px;
            margin-top: 15px;
            border-radius: 8px;
            font-size: 12px;
            color: #1e466e;
        }
        
        .required-star {
            color: red;
        }
        
        .file-info {
            background: #f0f7ff;
            padding: 8px 12px;
            border-radius: 8px;
            margin-top: 5px;
            font-size: 11px;
            color: #2c7da0;
            word-break: break-all;
        }
        
        .required-fields-info {
            background: #fff3cd;
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 15px;
            font-size: 13px;
            color: #856404;
        }
        
        .optional-badge {
            background: #e9ecef;
            color: #6c757d;
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 12px;
            margin-left: 8px;
            font-weight: normal;
        }
        
        .current-date-info {
            background: #e8f0fe;
            padding: 8px 12px;
            border-radius: 8px;
            margin-bottom: 15px;
            font-size: 13px;
            text-align: center;
        }
        
        #previewContent {
            overflow-x: auto;
        }
        
        #previewContent table {
            min-width: 300px;
        }
        
        @media (max-width: 480px) {
            body {
                padding: 10px;
            }
            
            .form-card {
                padding: 16px;
                border-radius: 20px;
            }
            
            .form-title {
                font-size: 18px;
                margin-bottom: 16px;
            }
            
            .action-buttons {
                gap: 10px;
                margin-bottom: 15px;
            }
            
            .button-1981 {
                padding: 8px 16px;
                font-size: 0.85rem;
            }
            
            .file-upload-section {
                flex-direction: column;
                gap: 12px;
            }
            
            .file-upload-box {
                min-width: auto;
                padding: 12px;
            }
            
            .file-upload-box label {
                font-size: 13px;
            }
            
            .data-table {
                font-size: 11px;
                min-width: 500px;
            }
            
            .data-table th,
            .data-table td {
                padding: 8px 6px;
            }
            
            .data-table textarea {
                min-height: 60px;
                font-size: 11px;
            }
            
            .btn-create,
            .btn-save {
                padding: 10px 20px;
                font-size: 14px;
                width: 100%;
            }
            
            .required-fields-info,
            .current-date-info,
            .db-info {
                font-size: 11px;
                padding: 8px 12px;
            }
            
            .db-info ul {
                margin-left: 16px;
            }
            
            footer {
                font-size: 10px;
                margin: 20px 0 10px;
            }
        }
        
        @media (min-width: 481px) and (max-width: 767px) {
            body {
                padding: 15px;
            }
            
            .form-card {
                padding: 20px;
            }
            
            .form-title {
                font-size: 20px;
            }
            
            .file-upload-section {
                flex-direction: column;
                gap: 15px;
            }
            
            .file-upload-box {
                min-width: auto;
            }
            
            .data-table {
                font-size: 12px;
                min-width: 550px;
            }
            
            .btn-create,
            .btn-save {
                padding: 10px 24px;
            }
            
            .action-buttons {
                justify-content: center;
            }
        }
        
        @media (min-width: 768px) and (max-width: 1023px) {
            .form-card {
                padding: 28px;
            }
            
            .form-title {
                font-size: 22px;
            }
            
            .file-upload-section {
                gap: 15px;
            }
            
            .file-upload-box {
                min-width: 220px;
            }
            
            .data-table {
                font-size: 12px;
            }
            
            .data-table th,
            .data-table td {
                padding: 10px 8px;
            }
            
            .action-buttons {
                justify-content: flex-start;
            }
        }
        
        @media (min-width: 1024px) and (max-width: 1279px) {
            .contract-wrapper {
                max-width: 1200px;
            }
            
            .form-card {
                padding: 32px;
            }
            
            .file-upload-section {
                gap: 20px;
            }
            
            .data-table {
                font-size: 13px;
            }
        }
        
        @media (min-width: 1280px) {
            .contract-wrapper {
                max-width: 1400px;
            }
            
            .form-card {
                padding: 36px;
            }
            
            .form-title {
                font-size: 26px;
            }
            
            .data-table {
                font-size: 14px;
            }
            
            .data-table th,
            .data-table td {
                padding: 14px 12px;
            }
            
            .data-table textarea {
                min-height: 100px;
                font-size: 13px;
            }
        }
        
        @media (max-width: 767px) and (orientation: landscape) {
            body {
                padding: 10px;
            }
            
            .form-card {
                padding: 16px;
            }
            
            .data-table textarea {
                min-height: 50px;
            }
            
            .action-buttons {
                margin-bottom: 10px;
            }
        }
        
        @media (max-width: 480px) {
            .db-info ul {
                padding-left: 20px;
            }
            
            .db-info li {
                margin-bottom: 5px;
            }
            
            .validation-summary {
                padding: 10px 15px;
            }
            
            .validation-summary ul {
                margin-left: 20px;
                margin-top: 8px;
            }
            
            .alert-success,
            .alert-error {
                padding: 10px 15px;
                font-size: 13px;
            }
        }
        
        @media (max-width: 767px) {
            button,
            .button-1981,
            input[type="file"] {
                cursor: pointer;
                -webkit-tap-highlight-color: transparent;
            }
            
            button:active,
            .button-1981:active {
                transform: scale(0.98);
            }
            
            textarea {
                font-size: 16px !important; 
            }
            
            input[type="text"] {
                font-size: 16px !important;
            }
        }

        html {
            scroll-behavior: smooth;
        }
