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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

/* Form Container */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo i {
    font-size: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h2 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 16px;
}

/* Form Styles */
.employee-form {
    display: grid;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: #667eea;
    width: 16px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #999;
}

/* File Upload Styles */
.file-upload-container {
    position: relative;
}

.file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: 2px dashed #ccc;
    border-radius: 12px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.file-upload-label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.file-info {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
}

/* Error Messages */
.error-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error input,
.form-group.error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Form Actions */
.form-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    margin-top: 20px;
}

.btn-submit,
.btn-reset,
.btn-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    min-width: 200px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-reset {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-reset:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.btn-new {
    background: #28a745;
    color: white;
    margin-top: 20px;
}

.btn-new:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-radius: 16px;
    margin-top: 30px;
}

.success-message.show {
    display: block;
    animation: slideUp 0.5s ease;
}

.success-message i {
    font-size: 48px;
    margin-bottom: 15px;
}

.success-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Admin Link */
.admin-link {
    text-align: center;
    margin-top: 30px;
}

.admin-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-link a:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading p {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .form-container {
        padding: 20px;
        border-radius: 16px;
    }
    
    .logo h1 {
        font-size: 28px;
    }
    
    .header h2 {
        font-size: 22px;
    }
    
    .form-actions {
        grid-template-columns: 1fr;
    }
    
    .btn-submit {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 15px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo i {
        font-size: 36px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
}