/**
 * Sidakerta Form System Styles
 * Professional, clean, responsive design
 * Light theme only, no dark mode
 */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2d3748;
    background: transparent;
    font-weight: 400;
}

/* Typography */
h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
    text-align: center;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.5rem;
    color: #718096;
    font-weight: 400;
}

/* Container and Layout */
.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.form-container {
    background: transparent;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* Form Styles */
.form {
    width: 100%;
}

.form-section {
    margin-bottom: 3rem;
    position: relative;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

/* Form Groups */
.form-group {
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-col {
    flex: 1;
}

.form-col-6 {
    flex: 0 0 50%;
}

/* Labels */
.form-label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.form-label.required::after {
    content: ' *';
    color: #e53e3e;
    font-weight: 700;
}

/* Input Fields */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-weight: 400;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #cbd5e0;
}

.form-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-file {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-file:hover {
    border-color: #adb5bd;
}

.form-file:focus {
    outline: none;
    border-color: #0066cc;
}

/* File Upload Area */
.file-upload-area {
    width: 100%;
    padding: 2rem;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.file-upload-area:hover {
    border-color: #cbd5e0;
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.file-upload-area.dragover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
    border-style: solid;
}

.file-upload-area .upload-icon {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
    display: block;
    transition: color 0.3s ease;
}

.file-upload-area:hover .upload-icon {
    color: #667eea;
}

.file-upload-area .upload-text {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.file-upload-area .upload-hint {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-checkbox:hover {
    border-color: #cbd5e0;
    background-color: rgba(255, 255, 255, 0.7);
}

.checkbox-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.2rem;
    accent-color: #667eea;
    border-radius: 4px;
}

.checkbox-label {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    font-weight: 400;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

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

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loading .spinner {
    display: inline-block;
}

.btn:not(.btn-loading) .spinner {
    display: none;
}

/* Alert Messages */
.alert {
    padding: 1.25rem 1.5rem;
    border: none;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(72, 187, 120, 0.1);
    border-left-color: #48bb78;
    color: #2f855a;
}

.alert-error {
    background-color: rgba(245, 101, 101, 0.1);
    border-left-color: #f56565;
    color: #c53030;
}

.alert-warning {
    background-color: rgba(237, 137, 54, 0.1);
    border-left-color: #ed8936;
    color: #c05621;
}

.alert-info {
    background-color: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
    color: #5a67d8;
}

/* Form Validation */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: #dc3545;
}

.form-input.is-valid,
.form-select.is-valid,
.form-textarea.is-valid {
    border-color: #28a745;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Footer */
.footer {
    display: none;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #5a67d8;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-col {
        flex: none;
    }
    
    .form-col-6 {
        flex: none;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem 0;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .btn {
        display: none;
    }
    
    .form-container {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .alert {
        border: 1px solid #dee2e6;
    }
}